diff --git a/Telegram/BUILD b/Telegram/BUILD
index 166d2c6f6e..1c9328eabf 100644
--- a/Telegram/BUILD
+++ b/Telegram/BUILD
@@ -78,6 +78,79 @@ genrule(
cmd = "touch $(OUTS)",
)
+genrule(
+ name = "GeneratedPresentationStrings",
+ srcs = [
+ "//build-system:GenerateStrings/GenerateStrings.py",
+ "Telegram-iOS/en.lproj/Localizable.strings",
+ ],
+ cmd = '''
+ python3 $(location //build-system:GenerateStrings/GenerateStrings.py) \\
+ --source=$(location Telegram-iOS/en.lproj/Localizable.strings) \\
+ --outImplementation=$(location GeneratedPresentationStrings/Sources/PresentationStrings.m) \\
+ --outHeader=$(location GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h) \\
+ --outData=$(location GeneratedPresentationStrings/Resources/PresentationStrings.data) \\
+ ''',
+ outs = [
+ "GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h",
+ "GeneratedPresentationStrings/Sources/PresentationStrings.m",
+ "GeneratedPresentationStrings/Resources/PresentationStrings.data",
+ ],
+)
+
+empty_languages = [
+ "ar",
+ "be",
+ "ca",
+ "de",
+ "es",
+ "fa",
+ "fr",
+ "id",
+ "it",
+ "ko",
+ "ms",
+ "nl",
+ "pl",
+ "pt",
+ "ru",
+ "tr",
+ "uk",
+ "uz",
+]
+
+[
+ genrule(
+ name = "Localizable_{}.strings".format(language),
+ outs = ["{}.lproj/Localizable.strings".format(language)],
+ cmd = "touch $(OUTS)",
+ ) for language in empty_languages
+]
+
+objc_library(
+ name = "PresentationStrings",
+ enable_modules = True,
+ module_name = "PresentationStrings",
+ srcs = [
+ "GeneratedPresentationStrings/Sources/PresentationStrings.m",
+ ],
+ hdrs = [
+ "GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h",
+ ],
+ includes = [
+ "GeneratedPresentationStrings/PublicHeaders",
+ ],
+ sdk_frameworks = [
+ "Foundation",
+ ],
+ deps = [
+ "//submodules/NumberPluralizationForm:NumberPluralizationForm",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
+
swift_library(
name = "_LocalDebugOptions",
srcs = [":empty"],
@@ -122,9 +195,11 @@ filegroup(
filegroup(
name = "AppStringResources",
- srcs = glob([
- "Telegram-iOS/*.lproj/Localizable.strings",
- ], exclude = ["Telegram-iOS/*.lproj/**/.*"]),
+ srcs = [
+ "Telegram-iOS/en.lproj/Localizable.strings",
+ ] + [
+ "{}.lproj/Localizable.strings".format(language) for language in empty_languages
+ ],
)
filegroup(
@@ -220,6 +295,7 @@ swift_library(
"//submodules/PasswordSetupUI:PasswordSetupUIAssets",
"//submodules/TelegramUI:TelegramUIResources",
"//submodules/TelegramUI:TelegramUIAssets",
+ ":GeneratedPresentationStrings/Resources/PresentationStrings.data",
],
deps = [
"//submodules/TelegramUI:TelegramUI",
@@ -745,49 +821,6 @@ ios_framework(
],
)
-plist_fragment(
- name = "SyncCoreInfoPlist",
- extension = "plist",
- template =
- """
- CFBundleIdentifier
- {telegram_bundle_id}.SyncCore
- CFBundleDevelopmentRegion
- en
- CFBundleName
- SyncCore
- CFBundlePackageType
- FMWK
- """.format(
- telegram_bundle_id = telegram_bundle_id,
- )
-)
-
-ios_framework(
- name = "SyncCoreFramework",
- bundle_id = "{telegram_bundle_id}.SyncCore".format(
- telegram_bundle_id = telegram_bundle_id,
- ),
- families = [
- "iphone",
- "ipad",
- ],
- infoplists = [
- ":SyncCoreInfoPlist",
- ":BuildNumberInfoPlist",
- ":VersionInfoPlist",
- ],
- frameworks = [
- ":SwiftSignalKitFramework",
- ":PostboxFramework",
- ],
- minimum_os_version = "9.0",
- ipa_post_processor = strip_framework,
- deps = [
- "//submodules/SyncCore:SyncCore",
- ],
-)
-
plist_fragment(
name = "TelegramCoreInfoPlist",
extension = "plist",
@@ -824,7 +857,6 @@ ios_framework(
":MtProtoKitFramework",
":SwiftSignalKitFramework",
":PostboxFramework",
- ":SyncCoreFramework",
],
minimum_os_version = "9.0",
ipa_post_processor = strip_framework,
@@ -994,7 +1026,6 @@ ios_framework(
":MtProtoKitFramework",
":SwiftSignalKitFramework",
":PostboxFramework",
- ":SyncCoreFramework",
":TelegramCoreFramework",
":AsyncDisplayKitFramework",
":DisplayFramework",
@@ -1246,7 +1277,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
"//Telegram:GeneratedSources",
],
@@ -1299,7 +1329,6 @@ ios_extension(
frameworks = [
":SwiftSignalKitFramework",
":PostboxFramework",
- ":SyncCoreFramework",
":TelegramCoreFramework",
],
)
@@ -1374,7 +1403,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramApi:TelegramApi",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramCore:TelegramCore",
"//submodules/BuildConfig:BuildConfig",
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
@@ -1429,7 +1457,6 @@ ios_extension(
":SwiftSignalKitFramework",
":PostboxFramework",
":TelegramCoreFramework",
- ":SyncCoreFramework",
],
)
@@ -1796,7 +1823,6 @@ ios_application(
":MtProtoKitFramework",
":SwiftSignalKitFramework",
":PostboxFramework",
- ":SyncCoreFramework",
":TelegramCoreFramework",
":AsyncDisplayKitFramework",
":DisplayFramework",
diff --git a/Telegram/SiriIntents/IntentContacts.swift b/Telegram/SiriIntents/IntentContacts.swift
index cb0fca310e..a1c0baab37 100644
--- a/Telegram/SiriIntents/IntentContacts.swift
+++ b/Telegram/SiriIntents/IntentContacts.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Contacts
import Intents
diff --git a/Telegram/SiriIntents/IntentHandler.swift b/Telegram/SiriIntents/IntentHandler.swift
index 9429b3d762..c71c957c1c 100644
--- a/Telegram/SiriIntents/IntentHandler.swift
+++ b/Telegram/SiriIntents/IntentHandler.swift
@@ -1,7 +1,6 @@
import Foundation
import Intents
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import BuildConfig
diff --git a/Telegram/SiriIntents/IntentMessages.swift b/Telegram/SiriIntents/IntentMessages.swift
index 1fddc10935..4e925f0c2f 100644
--- a/Telegram/SiriIntents/IntentMessages.swift
+++ b/Telegram/SiriIntents/IntentMessages.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Contacts
import Intents
diff --git a/Telegram/Telegram-iOS/ar.lproj/Localizable.strings b/Telegram/Telegram-iOS/ar.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/be.lproj/Localizable.strings b/Telegram/Telegram-iOS/be.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/ca.lproj/Localizable.strings b/Telegram/Telegram-iOS/ca.lproj/Localizable.strings
deleted file mode 100644
index 8b13789179..0000000000
--- a/Telegram/Telegram-iOS/ca.lproj/Localizable.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Telegram/Telegram-iOS/de.lproj/Localizable.strings b/Telegram/Telegram-iOS/de.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings
index 214e01026c..779b363a2b 100644
--- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings
+++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings
@@ -89,24 +89,21 @@
"PUSH_MESSAGE_GAME" = "%1$@|invited you to play %2$@";
"PUSH_MESSAGE_INVOICE" = "%1$@|sent you an invoice for %2$@";
"PUSH_MESSAGE_FWD" = "%1$@|forwarded you a message";
-"PUSH_MESSAGE_FWDS_1" = "%1$@|forwarded you a message";
-"PUSH_MESSAGE_FWDS_any" = "%1$@|forwarded you %2$d messages";
+"PUSH_MESSAGE_FWDS_TEXT_1" = "forwarded you a message";
+"PUSH_MESSAGE_FWDS_TEXT_any" = "forwarded you %d messages";
"PUSH_MESSAGE_PHOTO" = "%1$@|sent you a photo";
-"PUSH_MESSAGE_PHOTOS_1" = "%1$@|sent you a photo";
-"PUSH_MESSAGE_PHOTOS_any" = "%1$@|sent you %2$d photos";
+"PUSH_MESSAGE_PHOTOS_TEXT_1" = "sent you a photo";
+"PUSH_MESSAGE_PHOTOS_TEXT_any" = "sent you %d photos";
"PUSH_MESSAGE_VIDEO" = "%1$@|sent you a video";
-"PUSH_MESSAGE_VIDEOS_1" = "%1$@|sent you a video";
-"PUSH_MESSAGE_VIDEOS_any" = "%1$@|sent you %2$d videos";
+"PUSH_MESSAGE_VIDEOS_TEXT_1" = "sent you a video";
+"PUSH_MESSAGE_VIDEOS_TEXT_any" = "sent you %d videos";
"PUSH_MESSAGE_ROUND" = "%1$@|sent you a video message";
-"PUSH_MESSAGE_ROUNDS_1" = "%1$@|sent you a video message";
-"PUSH_MESSAGE_ROUNDS_any" = "%1$@|sent you %2$d video messages";
"PUSH_MESSAGE" = "%1$@|sent you a message";
-"PUSH_MESSAGES_1" = "%1$@|sent you a message";
-"PUSH_MESSAGES_any" = "%1$@|sent you %2$d messages";
+"PUSH_MESSAGES_TEXT_1" = "sent you a message";
+"PUSH_MESSAGES_TEXT_any" = "sent you %2$d messages";
"PUSH_ALBUM" = "%1$@|sent you an album";
-"PUSH_MESSAGE_FILES_1" = "%1$@|sent you a file";
-"PUSH_MESSAGE_FILES_any" = "%1$@|sent you %2$d files";
-
+"PUSH_MESSAGE_FILES_TEXT_1" = "sent you a file";
+"PUSH_MESSAGE_FILES_TEXT_any" = "sent you %d files";
"PUSH_CHANNEL_MESSAGE_TEXT" = "%1$@|%2$@";
"PUSH_CHANNEL_MESSAGE_NOTEXT" = "%1$@|posted a message";
@@ -124,24 +121,19 @@
"PUSH_CHANNEL_MESSAGE_GIF" = "%1$@|posted a GIF";
"PUSH_CHANNEL_MESSAGE_GAME" = "%1$@|invited you to play %2$@";
"PUSH_CHANNEL_MESSAGE_FWD" = "%1$@|posted a forwarded message";
-"PUSH_CHANNEL_MESSAGE_FWDS_1" = "%1$@|posted a forwarded message";
-"PUSH_CHANNEL_MESSAGE_FWDS_any" = "%1$@|posted %2$d forwarded messages";
"PUSH_CHANNEL_MESSAGE_PHOTO" = "%1$@|posted a photo";
-"PUSH_CHANNEL_MESSAGE_PHOTOS_1" = "%1$@|posted a photo";
-"PUSH_CHANNEL_MESSAGE_PHOTOS_any" = "%1$@|posted %2$d photos";
+"PUSH_CHANNEL_MESSAGE_PHOTOS_TEXT_1" = "posted a photo";
+"PUSH_CHANNEL_MESSAGE_PHOTOS_TEXT_any" = "posted %d photos";
"PUSH_CHANNEL_MESSAGE_VIDEO" = "%1$@|posted a video";
-"PUSH_CHANNEL_MESSAGE_VIDEOS_1" = "%1$@|posted a video";
-"PUSH_CHANNEL_MESSAGE_VIDEOS_any" = "%1$@|posted %2$d videos";
+"PUSH_CHANNEL_MESSAGE_VIDEOS_TEXT_1" = "posted a video";
+"PUSH_CHANNEL_MESSAGE_VIDEOS_TEXT_any" = "posted %d videos";
"PUSH_CHANNEL_MESSAGE_ROUND" = "%1$@|posted a video message";
-"PUSH_CHANNEL_MESSAGE_ROUNDS_1" = "%1$@|posted a video message";
-"PUSH_CHANNEL_MESSAGE_ROUNDS_any" = "%1$@|posted %2$d video messages";
"PUSH_CHANNEL_MESSAGE" = "%1$@|posted a message";
-"PUSH_CHANNEL_MESSAGES_1" = "%1$@|posted a message";
-"PUSH_CHANNEL_MESSAGES_any" = "%1$@|posted %2$d messages";
+"PUSH_CHANNEL_MESSAGES_TEXT_1" = "posted a message";
+"PUSH_CHANNEL_MESSAGES_TEXT_any" = "posted %d messages";
"PUSH_CHANNEL_ALBUM" = "%1$@|posted an album";
-"PUSH_CHANNEL_MESSAGE_DOCS" = "%1$@|posted %2$d files";
-"PUSH_CHANNEL_MESSAGE_DOCS_1" = "%1$@|posted a file";
-"PUSH_CHANNEL_MESSAGE_DOCS_any" = "%1$@|posted %2$d files";
+"PUSH_CHANNEL_MESSAGE_DOCS_TEXT_1" = "posted a file";
+"PUSH_CHANNEL_MESSAGE_DOCS_TEXT_any" = "posted %d files";
"PUSH_CHAT_MESSAGE_TEXT" = "%2$@|%1$@:%3$@";
"PUSH_CHAT_MESSAGE_NOTEXT" = "%2$@|%1$@ sent a message to the group";
@@ -169,23 +161,21 @@
"PUSH_CHAT_RETURNED" = "%2$@|%1$@ has returned to the group";
"PUSH_CHAT_JOINED" = "%2$@|%1$@ has joined the group";
"PUSH_CHAT_MESSAGE_FWD" = "%2$@|%1$@ forwarded a message";
-"PUSH_CHAT_MESSAGE_FWDS_1" = "%2$@|%1$@ forwarded a message";
-"PUSH_CHAT_MESSAGE_FWDS_any" = "%2$@|%1$@ forwarded %3$d messages";
+"PUSH_CHAT_MESSAGE_FWDS_TEXT_1" = "{author} forwarded a message";
+"PUSH_CHAT_MESSAGE_FWDS_TEXT_any" = "{author} forwarded %d messages";
"PUSH_CHAT_MESSAGE_PHOTO" = "%2$@|%1$@ sent a photo";
-"PUSH_CHAT_MESSAGE_PHOTOS_1" = "%2$@|%1$@ sent a photo";
-"PUSH_CHAT_MESSAGE_PHOTOS_any" = "%2$@|%1$@ sent %3$d photos";
+"PUSH_CHAT_MESSAGE_PHOTOS_TEXT_1" = "{author} sent a photo";
+"PUSH_CHAT_MESSAGE_PHOTOS_TEXT_any" = "{author} sent %d photos";
"PUSH_CHAT_MESSAGE_VIDEO" = "%2$@|%1$@ sent a video";
-"PUSH_CHAT_MESSAGE_VIDEOS_1" = "%2$@|%1$@ sent a video";
-"PUSH_CHAT_MESSAGE_VIDEOS_any" = "%2$@|%1$@ sent %3$d videos";
+"PUSH_CHAT_MESSAGE_VIDEOS_TEXT_1" = "{author} sent a video";
+"PUSH_CHAT_MESSAGE_VIDEOS_TEXT_any" = "{text} sent %d videos";
"PUSH_CHAT_MESSAGE_ROUND" = "%2$@|%1$@ sent a video message";
-"PUSH_CHAT_MESSAGE_ROUNDS_1" = "%2$@|%1$@ sent a video message";
-"PUSH_CHAT_MESSAGE_ROUNDS_any" = "%2$@|%1$@ sent %3$d video messages";
"PUSH_CHAT_MESSAGE" = "%2$@|%1$@ sent a message";
-"PUSH_CHAT_MESSAGES_1" = "%2$@|%1$@ sent a message";
-"PUSH_CHAT_MESSAGES_any" = "%2$@|%1$@ sent %3$d messages";
+"PUSH_CHAT_MESSAGES_TEXT_1" = "{author} sent a message";
+"PUSH_CHAT_MESSAGES_TEXT_any" = "{author} sent %d messages";
"PUSH_CHAT_ALBUM" = "%2$@|%1$@ sent an album";
-"PUSH_CHAT_MESSAGE_DOCS_FIX1_1" = "%2$@|%1$@ sent a file";
-"PUSH_CHAT_MESSAGE_DOCS_FIX1_any" = "%2$@|%1$@ sent %3$d files";
+"PUSH_CHAT_MESSAGE_DOCS_TEXT_1" = "{author} sent a file";
+"PUSH_CHAT_MESSAGE_DOCS_TEXT_any" = "{author} sent %d files";
"PUSH_PINNED_TEXT" = "%1$@|pinned \"%2$@\" ";
"PUSH_PINNED_NOTEXT" = "%1$@|pinned a message";
@@ -1285,12 +1275,6 @@
"ForwardedContacts_0" = "%@ forwarded contacts";
"ForwardedAuthors2" = "%@, %@";
-"ForwardedAuthorsOthers_1" = "%@ and 1 other";
-"ForwardedAuthorsOthers_2" = "%@ and 2 others";
-"ForwardedAuthorsOthers_3_10" = "%@ and %@ others";
-"ForwardedAuthorsOthers_any" = "%@ and %@ others";
-"ForwardedAuthorsOthers_many" = "%@ and %@ others";
-"ForwardedAuthorsOthers_0" = "%@ and %@ others";
"PrivacySettings.TwoStepAuth" = "Two-Step Verification";
"TwoStepAuth.Title" = "Two-Step Verification";
@@ -3298,7 +3282,7 @@ Unused sets are archived when you add more.";
"Passport.DeleteDocument" = "Delete Document";
"Passport.DeleteDocumentConfirmation" = "Are you sure you want to delete this document? All details will be lost.";
-"Passport.Scans" = "SCANS";
+"Passport.ScansHeader" = "SCANS";
"Passport.Scans.Upload" = "Upload Scan";
"Passport.Scans.UploadNew" = "Upload Additional Scan";
"Passport.Scans.ScanIndex" = "Scan %@";
diff --git a/Telegram/Telegram-iOS/es.lproj/Localizable.strings b/Telegram/Telegram-iOS/es.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/fa.lproj/Localizable.strings b/Telegram/Telegram-iOS/fa.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/fr.lproj/Localizable.strings b/Telegram/Telegram-iOS/fr.lproj/Localizable.strings
deleted file mode 100644
index 8b13789179..0000000000
--- a/Telegram/Telegram-iOS/fr.lproj/Localizable.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Telegram/Telegram-iOS/id.lproj/Localizable.strings b/Telegram/Telegram-iOS/id.lproj/Localizable.strings
deleted file mode 100644
index 8b13789179..0000000000
--- a/Telegram/Telegram-iOS/id.lproj/Localizable.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Telegram/Telegram-iOS/it.lproj/Localizable.strings b/Telegram/Telegram-iOS/it.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/ko.lproj/Localizable.strings b/Telegram/Telegram-iOS/ko.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/ms.lproj/Localizable.strings b/Telegram/Telegram-iOS/ms.lproj/Localizable.strings
deleted file mode 100644
index 8b13789179..0000000000
--- a/Telegram/Telegram-iOS/ms.lproj/Localizable.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Telegram/Telegram-iOS/nl.lproj/Localizable.strings b/Telegram/Telegram-iOS/nl.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/pl.lproj/Localizable.strings b/Telegram/Telegram-iOS/pl.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/pt.lproj/Localizable.strings b/Telegram/Telegram-iOS/pt.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/ru.lproj/Localizable.strings b/Telegram/Telegram-iOS/ru.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/Telegram-iOS/tr.lproj/Localizable.strings b/Telegram/Telegram-iOS/tr.lproj/Localizable.strings
deleted file mode 100644
index 8b13789179..0000000000
--- a/Telegram/Telegram-iOS/tr.lproj/Localizable.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Telegram/Telegram-iOS/uk.lproj/Localizable.strings b/Telegram/Telegram-iOS/uk.lproj/Localizable.strings
deleted file mode 100644
index 8b13789179..0000000000
--- a/Telegram/Telegram-iOS/uk.lproj/Localizable.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Telegram/Telegram-iOS/uz.lproj/Localizable.strings b/Telegram/Telegram-iOS/uz.lproj/Localizable.strings
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/Telegram/WidgetKitWidget/TodayViewController.swift b/Telegram/WidgetKitWidget/TodayViewController.swift
index 943953cce4..84bc6339c3 100644
--- a/Telegram/WidgetKitWidget/TodayViewController.swift
+++ b/Telegram/WidgetKitWidget/TodayViewController.swift
@@ -12,7 +12,6 @@ import Intents
import OpenSSLEncryptionProvider
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import OpenSSLEncryptionProvider
import WidgetItemsUtils
diff --git a/build-system/BUILD b/build-system/BUILD
index b69d112b36..5fb4a881f4 100644
--- a/build-system/BUILD
+++ b/build-system/BUILD
@@ -3,3 +3,7 @@ config_setting(
name = "ios_sim_arm64",
values = {"cpu": "ios_sim_arm64"},
)
+
+exports_files([
+ "GenerateStrings/GenerateStrings.py",
+])
diff --git a/build-system/GenerateStrings/GenerateStrings.py b/build-system/GenerateStrings/GenerateStrings.py
new file mode 100644
index 0000000000..1bd55e673c
--- /dev/null
+++ b/build-system/GenerateStrings/GenerateStrings.py
@@ -0,0 +1,686 @@
+#!/bin/pyton3
+
+# Based on https://github.com/chrisballinger/python-localizable
+
+import argparse
+import sys
+import re
+import codecs
+import struct
+
+from typing import Dict, List
+
+
+def _unescape_key(s):
+ return s.replace('\\\n', '')
+
+
+def _unescape(s):
+ s = s.replace('\\\n', '')
+ return s.replace('\\"', '"').replace(r'\n', '\n').replace(r'\r', '\r')
+
+
+def _get_content(filename: str):
+ if filename is None:
+ return None
+ return _get_content_from_file(filename, 'utf-8')
+
+
+def _get_content_from_file(filename: str, encoding: str):
+ f = open(filename, 'rb')
+ try:
+ f = codecs.open(filename, 'r', encoding=encoding)
+ return f.read()
+ except IOError as e:
+ print("Error opening file %s with encoding %s: %s" % (filename, encoding, e.message))
+ except Exception as e:
+ print("Unhandled exception: %s" % e)
+ finally:
+ f.close()
+
+
+def parse_strings(filename: str):
+ content = _get_content(filename=filename)
+
+ stringset = []
+ f = content
+ if f.startswith(u'\ufeff'):
+ f = f.lstrip(u'\ufeff')
+ # regex for finding all comments in a file
+ cp = r'(?:/\*(?P(?:[^*]|(?:\*+[^*/]))*\**)\*/)'
+ p = re.compile(r'(?:%s[ \t]*[\n]|[\r\n]|[\r])?(?P(("(?P[^"\\]*(?:\\.[^"\\]*)*)")|('
+ r'?P\w+))\s*=\s*"(?P[^"\\]*(?:\\.[^"\\]*)*)"\s*;)' % cp, re.DOTALL | re.U)
+ c = re.compile(r'//[^\n]*\n|/\*(?:.|[\r\n])*?\*/', re.U)
+ ws = re.compile(r'\s+', re.U)
+ end = 0
+ for i in p.finditer(f):
+ start = i.start('line')
+ end_ = i.end()
+ key = i.group('key')
+ if not key:
+ key = i.group('property')
+ value = i.group('value')
+ while end < start:
+ m = c.match(f, end, start) or ws.match(f, end, start)
+ if not m or m.start() != end:
+ print("Invalid syntax: %s" % f[end:start])
+ end = m.end()
+ end = end_
+ key = _unescape_key(key)
+ stringset.append({'key': key, 'value': _unescape(value)})
+ return stringset
+
+
+class PositionalArgument:
+ def __init__(self, index: int, kind: str):
+ self.index = index
+ self.kind = kind
+
+
+class Entry:
+ def __init__(self, name: str, is_pluralized: bool, positional_arguments: [PositionalArgument]):
+ self.name = name
+ self.is_pluralized = is_pluralized
+ self.positional_arguments = positional_arguments
+
+
+def parse_positional_arguments(string: str) -> [PositionalArgument]:
+ result = list()
+
+ implicit_index = 0
+ argument = re.compile(r'%((\d)\$)?([@d])', re.U)
+ start_position = 0
+ while True:
+ m = argument.search(string, start_position)
+ if m is None:
+ break
+ index = m.group(2)
+ if index is None:
+ index = implicit_index
+ implicit_index += 1
+ else:
+ index = int(index)
+ kind = m.group(3)
+ result.append(PositionalArgument(index=index, kind=kind))
+ start_position = m.end(0)
+
+ return result
+
+
+def parse_entries(strings: [dict]) -> [Entry]:
+ entries: List[Entry] = []
+ pluralized = re.compile(r'^(.*?)_(0|1|2|3_10|many|any)$', re.U)
+ processed_entries = set()
+ for string in strings:
+ key = string['key']
+ m = pluralized.match(key)
+ if m is not None:
+ raw_key = m.group(1)
+
+ positional_arguments = parse_positional_arguments(string['value'])
+
+ if raw_key in processed_entries:
+ for i in range(0, len(entries)):
+ if entries[i].name == raw_key:
+ if len(entries[i].positional_arguments) < len(positional_arguments):
+ entries[i].positional_arguments = positional_arguments
+ continue
+ processed_entries.add(raw_key)
+
+ entries.append(Entry(
+ name=raw_key,
+ is_pluralized=True,
+ positional_arguments=positional_arguments
+ ))
+ else:
+ if key in processed_entries:
+ continue
+ processed_entries.add(key)
+
+ entries.append(Entry(
+ name=key,
+ is_pluralized=False,
+ positional_arguments=parse_positional_arguments(string['value'])
+ ))
+
+ had_error = False
+ for entry in entries:
+ if entry.is_pluralized:
+ if len(entry.positional_arguments) > 1:
+ print('Pluralized key "{}" needs to contain at most 1 positional argument, {} were provided'
+ .format(entry.name, len(entry.positional_arguments)))
+ had_error = True
+
+ if had_error:
+ sys.exit(1)
+
+ entries.sort(key=lambda x: x.name)
+ return entries
+
+
+def write_string(file, string: str):
+ file.write((string + '\n').encode('utf-8'))
+
+
+def write_bin_uint32(file, value: int):
+ file.write(struct.pack('I', value))
+
+
+def write_bin_uint8(file, value: int):
+ file.write(struct.pack('B', value))
+
+
+def write_bin_string(file, value: str):
+ file.write(value.encode('utf-8'))
+
+
+class IndexCounter:
+ def __init__(self):
+ self.dictionary = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+ self.filter_ids = {
+ 'NO',
+ 'YES',
+ }
+ self.max_index = len(self.dictionary) - 1
+ self.value = []
+ self.increment()
+
+ def increment(self):
+ index = 0
+ while True:
+ if len(self.value) == index:
+ for i in range(len(self.value)):
+ self.value[i] = 0
+ self.value.append(0)
+ break
+ if self.value[index] + 1 <= self.max_index:
+ if index != 0:
+ for i in range(index):
+ self.value[i] = 0
+ self.value[index] += 1
+ break
+ else:
+ index += 1
+
+ def get(self):
+ result = ''
+ for index in reversed(self.value):
+ result += self.dictionary[index]
+ return result
+
+ def get_next_valid_id(self) -> str:
+ while True:
+ result = self.get()
+ self.increment()
+ if result not in self.filter_ids:
+ return result
+
+
+def sanitize_entry_identifer(string: str) -> str:
+ return string.replace('.', '_')
+
+
+def generate(header_path: str, implementation_path: str, data_path: str, entries: [Entry]):
+ print('Generating strings into:\n{}\n{}'.format(header_path, implementation_path))
+ with open(header_path, 'wb') as header_file, open(implementation_path, 'wb') as source_file,\
+ open(data_path, 'wb') as data_file:
+
+ formatted_accessors = ''
+ max_format_argument_count = 0
+ for entry in entries:
+ num_arguments = len(entry.positional_arguments)
+ if num_arguments > max_format_argument_count:
+ max_format_argument_count = num_arguments
+ if max_format_argument_count != 0:
+ for num_arguments in range(1, max_format_argument_count + 1):
+ arguments_string = ''
+ arguments_array = ''
+ for i in range(0, num_arguments):
+ arguments_string += ', id _Nonnull arg{}'.format(i)
+ if i != 0:
+ arguments_array += ', '
+ arguments_array += '[[NSString alloc] initWithFormat:@"%@", arg{}]'.format(i)
+ formatted_accessors += '''
+static _FormattedString * _Nonnull getFormatted{num_arguments}(_PresentationStrings * _Nonnull strings,
+ uint32_t keyId{arguments_string}) {{
+ NSString *formatString = getSingle(strings, strings->_idToKey[@(keyId)]);
+ NSArray<_FormattedStringRange *> *argumentRanges = extractArgumentRanges(formatString);
+ return formatWithArgumentRanges(formatString, argumentRanges, @[{arguments_array}]);
+}}
+'''.format(num_arguments=num_arguments, arguments_string=arguments_string, arguments_array=arguments_array)
+
+ write_string(header_file, '''// Automatically-generated file, do not edit
+
+#import
+
+@interface _FormattedStringRange : NSObject
+
+@property (nonatomic, readonly) NSInteger index;
+@property (nonatomic, readonly) NSRange range;
+
+- (instancetype _Nonnull)initWithIndex:(NSInteger)index range:(NSRange)range;
+
+@end
+
+
+@interface _FormattedString : NSObject
+
+@property (nonatomic, strong, readonly) NSString * _Nonnull string;
+@property (nonatomic, strong, readonly) NSArray<_FormattedStringRange *> * _Nonnull ranges;
+
+- (instancetype _Nonnull)initWithString:(NSString * _Nonnull)string
+ ranges:(NSArray<_FormattedStringRange *> * _Nonnull)ranges;
+
+@end
+
+
+@interface _PresentationStringsComponent : NSObject
+
+@property (nonatomic, strong, readonly) NSString * _Nonnull languageCode;
+@property (nonatomic, strong, readonly) NSString * _Nonnull localizedName;
+@property (nonatomic, strong, readonly) NSString * _Nullable pluralizationRulesCode;
+@property (nonatomic, strong, readonly) NSDictionary * _Nonnull dict;
+
+- (instancetype _Nonnull)initWithLanguageCode:(NSString * _Nonnull)languageCode
+ localizedName:(NSString * _Nonnull)localizedName
+ pluralizationRulesCode:(NSString * _Nullable)pluralizationRulesCode
+ dict:(NSDictionary * _Nonnull)dict;
+
+@end
+
+@interface _PresentationStrings : NSObject
+
+@property (nonatomic, readonly) uint32_t lc;
+@property (nonatomic, strong, readonly) _PresentationStringsComponent * _Nonnull primaryComponent;
+@property (nonatomic, strong, readonly) _PresentationStringsComponent * _Nullable secondaryComponent;
+@property (nonatomic, strong, readonly) NSString * _Nonnull baseLanguageCode;
+@property (nonatomic, strong, readonly) NSString * _Nonnull groupingSeparator;
+
+- (instancetype _Nonnull)initWithPrimaryComponent:(_PresentationStringsComponent * _Nonnull)primaryComponent
+ secondaryComponent:(_PresentationStringsComponent * _Nullable)secondaryComponent
+ groupingSeparator:(NSString * _Nullable)groupingSeparator;
+
+@end
+
+''')
+
+ write_string(source_file, '''// Automatically-generated file, do not edit
+
+#import
+#import
+
+@implementation _FormattedStringRange
+
+- (instancetype _Nonnull)initWithIndex:(NSInteger)index range:(NSRange)range {
+ self = [super init];
+ if (self != nil) {
+ _index = index;
+ _range = range;
+ }
+ return self;
+}
+
+@end
+
+
+@implementation _FormattedString
+
+- (instancetype _Nonnull)initWithString:(NSString * _Nonnull)string
+ ranges:(NSArray<_FormattedStringRange *> * _Nonnull)ranges {
+ self = [super init];
+ if (self != nil) {
+ _string = string;
+ _ranges = ranges;
+ }
+ return self;
+}
+
+@end
+
+@implementation _PresentationStringsComponent
+
+- (instancetype _Nonnull)initWithLanguageCode:(NSString * _Nonnull)languageCode
+ localizedName:(NSString * _Nonnull)localizedName
+ pluralizationRulesCode:(NSString * _Nullable)pluralizationRulesCode
+ dict:(NSDictionary * _Nonnull)dict {
+ self = [super init];
+ if (self != nil) {
+ _languageCode = languageCode;
+ _localizedName = localizedName;
+ _pluralizationRulesCode = pluralizationRulesCode;
+ _dict = dict;
+ }
+ return self;
+}
+
+@end
+
+@interface _PresentationStrings () {
+ @public
+ NSDictionary *_idToKey;
+}
+
+@end
+
+static NSArray<_FormattedStringRange *> * _Nonnull extractArgumentRanges(NSString * _Nonnull string) {
+ static NSRegularExpression *argumentRegex = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ argumentRegex = [NSRegularExpression regularExpressionWithPattern:@"%(((\\\\d+)\\\\$)?)([@df])"
+ options:0 error:nil];
+ });
+
+ NSMutableArray<_FormattedStringRange *> *result = [[NSMutableArray alloc] init];
+ NSArray *matches = [argumentRegex matchesInString:string
+ options:0 range:NSMakeRange(0, string.length)];
+ int index = 0;
+ for (NSTextCheckingResult *match in matches) {
+ int currentIndex = index;
+ NSRange matchRange = [match rangeAtIndex:3];
+ if (matchRange.location != NSNotFound) {
+ currentIndex = [[string substringWithRange:matchRange] intValue] - 1;
+ }
+ [result addObject:[[_FormattedStringRange alloc] initWithIndex:currentIndex range:[match rangeAtIndex:0]]];
+ index += 1;
+ }
+
+ return result;
+}
+
+static _FormattedString * _Nonnull formatWithArgumentRanges(
+ NSString * _Nonnull string,
+ NSArray<_FormattedStringRange *> * _Nonnull ranges,
+ NSArray * _Nonnull arguments
+) {
+ NSMutableArray<_FormattedStringRange *> *resultingRanges = [[NSMutableArray alloc] init];
+ NSMutableString *result = [[NSMutableString alloc] init];
+ NSUInteger currentLocation = 0;
+
+ for (_FormattedStringRange *range in ranges) {
+ if (currentLocation < range.range.location) {
+ [result appendString:[string substringWithRange:
+ NSMakeRange(currentLocation, range.range.location - currentLocation)]];
+ }
+ [resultingRanges addObject:[[_FormattedStringRange alloc] initWithIndex:range.index
+ range:NSMakeRange(result.length, arguments[range.index].length)]];
+ [result appendString:arguments[range.index]];
+ currentLocation = range.range.location + range.range.length;
+ }
+
+ if (currentLocation != string.length) {
+ [result appendString:[string substringWithRange:NSMakeRange(currentLocation, string.length - currentLocation)]];
+ }
+
+ return [[_FormattedString alloc] initWithString:result ranges:resultingRanges];
+}
+
+static NSString * _Nonnull getPluralizationSuffix(_PresentationStrings * _Nonnull strings, int32_t value) {
+ NumberPluralizationForm pluralizationForm = numberPluralizationForm(strings.lc, value);
+ switch (pluralizationForm) {
+ case NumberPluralizationFormZero: {
+ return @"_0";
+ }
+ case NumberPluralizationFormOne: {
+ return @"_1";
+ }
+ case NumberPluralizationFormTwo: {
+ return @"_2";
+ }
+ case NumberPluralizationFormFew: {
+ return @"_3_10";
+ }
+ case NumberPluralizationFormMany: {
+ return @"_many";
+ }
+ default: {
+ return @"_any";
+ }
+ }
+}
+
+static NSString * _Nonnull getSingle(_PresentationStrings * _Nonnull strings, NSString * _Nonnull key) {
+ NSString *result = strings.primaryComponent.dict[key];
+ if (!result) {
+ result = strings.secondaryComponent.dict[key];
+ }
+ if (!result) {
+ static NSDictionary *fallbackDict = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ NSString *lprojPath = [[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"];
+ if (!lprojPath) {
+ return;
+ }
+ NSBundle *bundle = [NSBundle bundleWithPath:lprojPath];
+ if (!bundle) {
+ return;
+ }
+ NSString *stringsPath = [bundle pathForResource:@"Localizable" ofType:@"strings"];
+ if (!stringsPath) {
+ return;
+ }
+ fallbackDict = [NSDictionary dictionaryWithContentsOfURL:[NSURL fileURLWithPath:stringsPath]];
+ });
+ result = fallbackDict[key];
+ }
+ if (!result) {
+ result = key;
+ }
+ return result;
+}
+
+static NSString * _Nonnull getSingleIndirect(_PresentationStrings * _Nonnull strings, uint32_t keyId) {
+ return getSingle(strings, strings->_idToKey[@(keyId)]);
+}
+
+static NSString * _Nonnull getPluralized(_PresentationStrings * _Nonnull strings, NSString * _Nonnull key,
+ int32_t value) {
+ NSString *parsedKey = [[NSString alloc] initWithFormat:@"%@%@", key, getPluralizationSuffix(strings, value)];
+ NSString *formatString = getSingle(strings, parsedKey);
+ NSString *stringValue = formatNumberWithGroupingSeparator(strings.groupingSeparator, value);
+ NSArray<_FormattedStringRange *> *argumentRanges = extractArgumentRanges(formatString);
+ return formatWithArgumentRanges(formatString, argumentRanges, @[stringValue]).string;
+}
+
+static NSString * _Nonnull getPluralizedIndirect(_PresentationStrings * _Nonnull strings, uint32_t keyId,
+ int32_t value) {
+ return getPluralized(strings, strings->_idToKey[@(keyId)], value);
+}''' + formatted_accessors + '''
+@implementation _PresentationStrings
+
+- (instancetype _Nonnull)initWithPrimaryComponent:(_PresentationStringsComponent * _Nonnull)primaryComponent
+ secondaryComponent:(_PresentationStringsComponent * _Nullable)secondaryComponent
+ groupingSeparator:(NSString * _Nullable)groupingSeparator {
+ self = [super init];
+ if (self != nil) {
+ static NSDictionary *idToKey = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ NSString *dataPath = [[NSBundle mainBundle] pathForResource:@"PresentationStrings" ofType:@"data"];
+ if (!dataPath) {
+ assert(false);
+ return;
+ }
+ NSData *data = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:dataPath]];
+ if (!data) {
+ assert(false);
+ return;
+ }
+ if (data.length < 4) {
+ assert(false);
+ return;
+ }
+
+ NSMutableDictionary *result = [[NSMutableDictionary alloc] init];
+
+ uint32_t entryCount = 0;
+ [data getBytes:&entryCount range:NSMakeRange(0, 4)];
+
+ NSInteger offset = 4;
+ for (uint32_t i = 0; i < entryCount; i++) {
+ uint8_t stringLength = 0;
+ [data getBytes:&stringLength range:NSMakeRange(offset, 1)];
+ offset += 1;
+
+ NSData *stringData = [data subdataWithRange:NSMakeRange(offset, stringLength)];
+ offset += stringLength;
+
+ result[@(i)] = [[NSString alloc] initWithData:stringData encoding:NSUTF8StringEncoding];
+ }
+ idToKey = result;
+ });
+ _idToKey = idToKey;
+
+ _primaryComponent = primaryComponent;
+ _secondaryComponent = secondaryComponent;
+ _groupingSeparator = groupingSeparator;
+
+ if (secondaryComponent) {
+ _baseLanguageCode = secondaryComponent.languageCode;
+ } else {
+ _baseLanguageCode = primaryComponent.languageCode;
+ }
+
+ NSString *languageCode = nil;
+ if (primaryComponent.pluralizationRulesCode) {
+ languageCode = primaryComponent.pluralizationRulesCode;
+ } else {
+ languageCode = primaryComponent.languageCode;
+ }
+
+ NSString *rawCode = languageCode;
+
+ NSRange range = [languageCode rangeOfString:@"_"];
+ if (range.location != NSNotFound) {
+ rawCode = [rawCode substringWithRange:NSMakeRange(0, range.location)];
+ }
+ range = [languageCode rangeOfString:@"-"];
+ if (range.location != NSNotFound) {
+ rawCode = [rawCode substringWithRange:NSMakeRange(0, range.location)];
+ }
+
+ rawCode = [rawCode lowercaseString];
+
+ uint32_t lc = 0;
+ for (NSInteger i = 0; i < rawCode.length; i++) {
+ lc = (lc << 8) + (uint32_t)[rawCode characterAtIndex:i];
+ }
+ _lc = lc;
+ }
+ return self;
+}
+
+@end
+
+''')
+
+ counter = IndexCounter()
+
+ entry_keys = []
+
+ for entry in entries:
+ entry_id = '_L' + counter.get_next_valid_id()
+
+ entry_key_id = len(entry_keys)
+ entry_keys.append(entry.name)
+
+ write_string(source_file, '// {}'.format(entry.name))
+
+ function_arguments = ''
+ format_arguments_array = ''
+ if entry.is_pluralized:
+ function_return_spec = 'NSString * _Nonnull'
+ swift_spec = '_PresentationStrings.{}(self:_:)'.format(sanitize_entry_identifer(entry.name))
+ function_arguments = ', int32_t value'
+ elif len(entry.positional_arguments) != 0:
+ function_return_spec = '_FormattedString * _Nonnull'
+ positional_arguments_spec = ''
+ argument_index = -1
+ for argument in entry.positional_arguments:
+ argument_index += 1
+ format_arguments_array += ', '
+ if argument.kind == 'd':
+ function_arguments += ', NSInteger _{}'.format(argument_index)
+ format_arguments_array += '@(_{})'.format(argument_index)
+ elif argument.kind == '@':
+ function_arguments += ', NSString * _Nonnull _{}'.format(argument_index)
+ format_arguments_array += '_{}'.format(argument_index)
+ else:
+ raise Exception('Unsupported argument type {}'.format(argument.kind))
+ positional_arguments_spec += '_:'
+ swift_spec = '_PresentationStrings.{}(self:{})'.format(
+ sanitize_entry_identifer(entry.name), positional_arguments_spec)
+ else:
+ function_return_spec = 'NSString * _Nonnull'
+ swift_spec = 'getter:_PresentationStrings.{}(self:)'.format(sanitize_entry_identifer(entry.name))
+
+ function_spec = '{} {}'.format(function_return_spec, entry_id)
+ function_spec += '(_PresentationStrings * _Nonnull _self{})'.format(function_arguments)
+
+ write_string(header_file, '{function_spec} __attribute__((__swift_name__("{swift_spec}")));'.format(
+ function_spec=function_spec, swift_spec=swift_spec))
+
+ if entry.is_pluralized:
+ argument_format_type = ''
+ if entry.positional_arguments[0].kind == 'd':
+ argument_format_type = '0'
+ elif entry.positional_arguments[0].kind == '@':
+ argument_format_type = '1'
+ else:
+ raise Exception('Unsupported argument type {}'.format(argument.kind))
+ write_string(source_file, function_spec + ''' {{
+ return getPluralizedIndirect(_self, {entry_key_id}, value);
+}}'''.format(key=entry.name, entry_key_id=entry_key_id))
+ elif len(entry.positional_arguments) != 0:
+ write_string(source_file, function_spec + ''' {{
+ return getFormatted{argument_count}(_self, {key_id}{arguments_array});
+}}'''.format(key_id=entry_key_id, argument_count=len(entry.positional_arguments), arguments_array=format_arguments_array))
+ else:
+ write_string(source_file, function_spec + ''' {{
+ return getSingleIndirect(_self, {entry_key_id});
+}}'''.format(key=entry.name, entry_key_id=entry_key_id))
+
+ write_bin_uint32(data_file, len(entry_keys))
+ for entry_key in entry_keys:
+ write_bin_uint8(data_file, len(entry_key))
+ write_bin_string(data_file, entry_key)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(prog='GenerateStrings')
+
+ parser.add_argument(
+ '--source',
+ required=True,
+ help='Path to Localizable.strings',
+ metavar='path'
+ )
+ parser.add_argument(
+ '--outImplementation',
+ required=True,
+ help='Path to PresentationStrings.m',
+ metavar='path'
+ )
+ parser.add_argument(
+ '--outHeader',
+ required=True,
+ help='Path to PresentationStrings.h',
+ metavar='path'
+ )
+ parser.add_argument(
+ '--outData',
+ required=True,
+ help='Path to PresentationStrings.data',
+ metavar='path'
+ )
+
+ if len(sys.argv) < 2:
+ parser.print_help()
+ sys.exit(1)
+
+ args = parser.parse_args()
+
+ parsed_strings = parse_strings(args.source)
+ all_entries = parse_entries(parsed_strings)
+ generate(header_path=args.outHeader, implementation_path=args.outImplementation, data_path=args.outData,
+ entries=all_entries)
diff --git a/submodules/AccountContext/BUILD b/submodules/AccountContext/BUILD
index f3f19db373..280d5f0d5e 100644
--- a/submodules/AccountContext/BUILD
+++ b/submodules/AccountContext/BUILD
@@ -16,7 +16,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
],
visibility = [
"//visibility:public",
diff --git a/submodules/AccountContext/Sources/AccountContext.swift b/submodules/AccountContext/Sources/AccountContext.swift
index abbaafa7c3..5b5d256af8 100644
--- a/submodules/AccountContext/Sources/AccountContext.swift
+++ b/submodules/AccountContext/Sources/AccountContext.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import SwiftSignalKit
diff --git a/submodules/AccountContext/Sources/ChatController.swift b/submodules/AccountContext/Sources/ChatController.swift
index d0cf354fd6..d0919530dd 100644
--- a/submodules/AccountContext/Sources/ChatController.swift
+++ b/submodules/AccountContext/Sources/ChatController.swift
@@ -1,32 +1,31 @@
import Foundation
import UIKit
-import Postbox
import TelegramCore
-import SyncCore
import TextFormat
import AsyncDisplayKit
import Display
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
+import Postbox
public final class ChatMessageItemAssociatedData: Equatable {
public enum ChannelDiscussionGroupStatus: Equatable {
case unknown
- case known(PeerId?)
+ case known(EnginePeer.Id?)
}
public let automaticDownloadPeerType: MediaAutoDownloadPeerType
public let automaticDownloadNetworkType: MediaAutoDownloadNetworkType
public let isRecentActions: Bool
public let subject: ChatControllerSubject?
- public let contactsPeerIds: Set
+ public let contactsPeerIds: Set
public let channelDiscussionGroup: ChannelDiscussionGroupStatus
public let animatedEmojiStickers: [String: [StickerPackItem]]
public let forcedResourceStatus: FileMediaResourceStatus?
- public let currentlyPlayingMessageId: MessageIndex?
+ public let currentlyPlayingMessageId: EngineMessage.Index?
- public init(automaticDownloadPeerType: MediaAutoDownloadPeerType, automaticDownloadNetworkType: MediaAutoDownloadNetworkType, isRecentActions: Bool = false, subject: ChatControllerSubject? = nil, contactsPeerIds: Set = Set(), channelDiscussionGroup: ChannelDiscussionGroupStatus = .unknown, animatedEmojiStickers: [String: [StickerPackItem]] = [:], forcedResourceStatus: FileMediaResourceStatus? = nil, currentlyPlayingMessageId: MessageIndex? = nil) {
+ public init(automaticDownloadPeerType: MediaAutoDownloadPeerType, automaticDownloadNetworkType: MediaAutoDownloadNetworkType, isRecentActions: Bool = false, subject: ChatControllerSubject? = nil, contactsPeerIds: Set = Set(), channelDiscussionGroup: ChannelDiscussionGroupStatus = .unknown, animatedEmojiStickers: [String: [StickerPackItem]] = [:], forcedResourceStatus: FileMediaResourceStatus? = nil, currentlyPlayingMessageId: EngineMessage.Index? = nil) {
self.automaticDownloadPeerType = automaticDownloadPeerType
self.automaticDownloadNetworkType = automaticDownloadNetworkType
self.isRecentActions = isRecentActions
@@ -80,7 +79,7 @@ public extension ChatMessageItemAssociatedData {
public enum ChatControllerInteractionLongTapAction {
case url(String)
case mention(String)
- case peerMention(PeerId, String)
+ case peerMention(EnginePeer.Id, String)
case command(String)
case hashtag(String)
case timecode(Double, String)
@@ -111,7 +110,7 @@ public enum ChatHistoryMessageSelection: Equatable {
public enum ChatControllerInitialBotStartBehavior {
case interactive
- case automatic(returnToPeerId: PeerId, scheduled: Bool)
+ case automatic(returnToPeerId: EnginePeer.Id, scheduled: Bool)
}
public struct ChatControllerInitialBotStart {
@@ -172,7 +171,7 @@ public enum ChatTextInputStateTextAttributeType: PostboxCoding, Equatable {
case bold
case italic
case monospace
- case textMention(PeerId)
+ case textMention(EnginePeer.Id)
case textUrl(String)
public init(decoder: PostboxDecoder) {
@@ -184,7 +183,7 @@ public enum ChatTextInputStateTextAttributeType: PostboxCoding, Equatable {
case 2:
self = .monospace
case 3:
- self = .textMention(PeerId(decoder.decodeInt64ForKey("peerId", orElse: 0)))
+ self = .textMention(EnginePeer.Id(decoder.decodeInt64ForKey("peerId", orElse: 0)))
case 4:
self = .textUrl(decoder.decodeStringForKey("url", orElse: ""))
default:
@@ -341,9 +340,9 @@ public struct ChatTextInputStateText: PostboxCoding, Equatable {
}
public enum ChatControllerSubject: Equatable {
- case message(id: MessageId, highlight: Bool, timecode: Double?)
+ case message(id: EngineMessage.Id, highlight: Bool, timecode: Double?)
case scheduledMessages
- case pinnedMessages(id: MessageId?)
+ case pinnedMessages(id: EngineMessage.Id?)
}
public enum ChatControllerPresentationMode: Equatable {
@@ -383,10 +382,10 @@ public final class ChatEmbeddedInterfaceState: PeerChatListEmbeddedInterfaceStat
public enum ChatPresentationInputQueryResult: Equatable {
case stickers([FoundStickerItem])
case hashtags([String])
- case mentions([Peer])
+ case mentions([EnginePeer])
case commands([PeerCommand])
case emojis([(String, String)], NSRange)
- case contextRequestResult(Peer?, ChatContextResultCollection?)
+ case contextRequestResult(EnginePeer?, ChatContextResultCollection?)
public static func ==(lhs: ChatPresentationInputQueryResult, rhs: ChatPresentationInputQueryResult) -> Bool {
switch lhs {
@@ -404,16 +403,10 @@ public enum ChatPresentationInputQueryResult: Equatable {
}
case let .mentions(lhsPeers):
if case let .mentions(rhsPeers) = rhs {
- if lhsPeers.count != rhsPeers.count {
+ if lhsPeers != rhsPeers {
return false
- } else {
- for i in 0 ..< lhsPeers.count {
- if !lhsPeers[i].isEqual(rhsPeers[i]) {
- return false
- }
- }
- return true
}
+ return true
} else {
return false
}
@@ -445,14 +438,9 @@ public enum ChatPresentationInputQueryResult: Equatable {
}
case let .contextRequestResult(lhsPeer, lhsCollection):
if case let .contextRequestResult(rhsPeer, rhsCollection) = rhs {
- if let lhsPeer = lhsPeer, let rhsPeer = rhsPeer {
- if !lhsPeer.isEqual(rhsPeer) {
- return false
- }
- } else if (lhsPeer != nil) != (rhsPeer != nil) {
+ if lhsPeer != rhsPeer {
return false
}
-
if lhsCollection != rhsCollection {
return false
}
@@ -484,7 +472,7 @@ public protocol ChatController: ViewController {
var isSendButtonVisible: Bool { get }
}
-public protocol ChatMessagePreviewItemNode: class {
+public protocol ChatMessagePreviewItemNode: AnyObject {
var forwardInfoReferenceNode: ASDisplayNode? { get }
}
diff --git a/submodules/AccountContext/Sources/DeviceContactData.swift b/submodules/AccountContext/Sources/DeviceContactData.swift
index 3111c3bd5a..d9351befda 100644
--- a/submodules/AccountContext/Sources/DeviceContactData.swift
+++ b/submodules/AccountContext/Sources/DeviceContactData.swift
@@ -2,7 +2,6 @@ import Foundation
import Contacts
import Postbox
import TelegramCore
-import SyncCore
public final class DeviceContactPhoneNumberData: Equatable {
public let label: String
diff --git a/submodules/AccountContext/Sources/DeviceContactDataManager.swift b/submodules/AccountContext/Sources/DeviceContactDataManager.swift
index 8b4fa465e3..10db927b98 100644
--- a/submodules/AccountContext/Sources/DeviceContactDataManager.swift
+++ b/submodules/AccountContext/Sources/DeviceContactDataManager.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import SwiftSignalKit
diff --git a/submodules/AccountContext/Sources/DownloadedMediaStoreManager.swift b/submodules/AccountContext/Sources/DownloadedMediaStoreManager.swift
index 30df77d471..05653f8d6d 100644
--- a/submodules/AccountContext/Sources/DownloadedMediaStoreManager.swift
+++ b/submodules/AccountContext/Sources/DownloadedMediaStoreManager.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
import TelegramUIPreferences
import SwiftSignalKit
diff --git a/submodules/AccountContext/Sources/FetchManager.swift b/submodules/AccountContext/Sources/FetchManager.swift
index ad4db3b593..f53df05fac 100644
--- a/submodules/AccountContext/Sources/FetchManager.swift
+++ b/submodules/AccountContext/Sources/FetchManager.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramUIPreferences
diff --git a/submodules/AccountContext/Sources/FetchMediaUtils.swift b/submodules/AccountContext/Sources/FetchMediaUtils.swift
index f3dc6c4eee..3e7416c63f 100644
--- a/submodules/AccountContext/Sources/FetchMediaUtils.swift
+++ b/submodules/AccountContext/Sources/FetchMediaUtils.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramUIPreferences
diff --git a/submodules/AccountContext/Sources/IsMediaStreamable.swift b/submodules/AccountContext/Sources/IsMediaStreamable.swift
index ab7e940f3d..548fa2f8d6 100644
--- a/submodules/AccountContext/Sources/IsMediaStreamable.swift
+++ b/submodules/AccountContext/Sources/IsMediaStreamable.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
private let minimalStreamableSize: Int = 384 * 1024
diff --git a/submodules/AccountContext/Sources/LiveLocationManager.swift b/submodules/AccountContext/Sources/LiveLocationManager.swift
index a597a4c108..e43ba071f0 100644
--- a/submodules/AccountContext/Sources/LiveLocationManager.swift
+++ b/submodules/AccountContext/Sources/LiveLocationManager.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
diff --git a/submodules/AccountContext/Sources/MediaManager.swift b/submodules/AccountContext/Sources/MediaManager.swift
index 7f5ef063b0..e3ddeddff4 100644
--- a/submodules/AccountContext/Sources/MediaManager.swift
+++ b/submodules/AccountContext/Sources/MediaManager.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import UIKit
import AsyncDisplayKit
diff --git a/submodules/AccountContext/Sources/OpenChatMessage.swift b/submodules/AccountContext/Sources/OpenChatMessage.swift
index 58b24cd349..fff0a235f0 100644
--- a/submodules/AccountContext/Sources/OpenChatMessage.swift
+++ b/submodules/AccountContext/Sources/OpenChatMessage.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import AsyncDisplayKit
diff --git a/submodules/AccountContext/Sources/PeersNearbyManager.swift b/submodules/AccountContext/Sources/PeersNearbyManager.swift
index a3b5fba092..e4b69f00b3 100644
--- a/submodules/AccountContext/Sources/PeersNearbyManager.swift
+++ b/submodules/AccountContext/Sources/PeersNearbyManager.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
public protocol PeersNearbyManager {
diff --git a/submodules/AccountContext/Sources/PresentationCallManager.swift b/submodules/AccountContext/Sources/PresentationCallManager.swift
index d954c7b175..04b6b37c22 100644
--- a/submodules/AccountContext/Sources/PresentationCallManager.swift
+++ b/submodules/AccountContext/Sources/PresentationCallManager.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramAudio
diff --git a/submodules/AccountContext/Sources/SharedMediaPlayer.swift b/submodules/AccountContext/Sources/SharedMediaPlayer.swift
index e71f6843b1..55285fd463 100644
--- a/submodules/AccountContext/Sources/SharedMediaPlayer.swift
+++ b/submodules/AccountContext/Sources/SharedMediaPlayer.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
import TelegramUIPreferences
import SwiftSignalKit
diff --git a/submodules/AccountContext/Sources/StoredMessageFromSearchPeer.swift b/submodules/AccountContext/Sources/StoredMessageFromSearchPeer.swift
index 845e350199..8cf71a3dbd 100644
--- a/submodules/AccountContext/Sources/StoredMessageFromSearchPeer.swift
+++ b/submodules/AccountContext/Sources/StoredMessageFromSearchPeer.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
public func storedMessageFromSearchPeer(account: Account, peer: Peer) -> Signal {
diff --git a/submodules/AccountContext/Sources/ThemeUpdateManager.swift b/submodules/AccountContext/Sources/ThemeUpdateManager.swift
index 2424bce36e..1e2f7bef56 100644
--- a/submodules/AccountContext/Sources/ThemeUpdateManager.swift
+++ b/submodules/AccountContext/Sources/ThemeUpdateManager.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
public protocol ThemeUpdateManager: class {
diff --git a/submodules/AccountContext/Sources/UniversalVideoNode.swift b/submodules/AccountContext/Sources/UniversalVideoNode.swift
index 336c8f6db8..8c14428978 100644
--- a/submodules/AccountContext/Sources/UniversalVideoNode.swift
+++ b/submodules/AccountContext/Sources/UniversalVideoNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Display
import TelegramAudio
import UniversalMediaPlayer
diff --git a/submodules/AccountContext/Sources/VideoCallsConfiguration.swift b/submodules/AccountContext/Sources/VideoCallsConfiguration.swift
index 2fd564d60d..3cb4414021 100644
--- a/submodules/AccountContext/Sources/VideoCallsConfiguration.swift
+++ b/submodules/AccountContext/Sources/VideoCallsConfiguration.swift
@@ -1,4 +1,4 @@
-import SyncCore
+import TelegramCore
public struct VideoCallsConfiguration: Equatable {
public enum VideoCallsSupport {
diff --git a/submodules/AccountContext/Sources/WallpaperUploadManager.swift b/submodules/AccountContext/Sources/WallpaperUploadManager.swift
index a29066ef34..5c3a67f351 100644
--- a/submodules/AccountContext/Sources/WallpaperUploadManager.swift
+++ b/submodules/AccountContext/Sources/WallpaperUploadManager.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
public enum WallpaperUploadManagerStatus {
diff --git a/submodules/AccountUtils/BUILD b/submodules/AccountUtils/BUILD
index 4edfde468a..0d89e02324 100644
--- a/submodules/AccountUtils/BUILD
+++ b/submodules/AccountUtils/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
],
diff --git a/submodules/AccountUtils/Sources/AccountUtils.swift b/submodules/AccountUtils/Sources/AccountUtils.swift
index 607d783966..a9d5fee5db 100644
--- a/submodules/AccountUtils/Sources/AccountUtils.swift
+++ b/submodules/AccountUtils/Sources/AccountUtils.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/ActionSheetPeerItem/BUILD b/submodules/ActionSheetPeerItem/BUILD
index e2840eb207..a80d9284a8 100644
--- a/submodules/ActionSheetPeerItem/BUILD
+++ b/submodules/ActionSheetPeerItem/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/AvatarNode:AvatarNode",
diff --git a/submodules/ActionSheetPeerItem/Sources/ActionSheetPeerItem.swift b/submodules/ActionSheetPeerItem/Sources/ActionSheetPeerItem.swift
index 03fc661474..0ebacb71a0 100644
--- a/submodules/ActionSheetPeerItem/Sources/ActionSheetPeerItem.swift
+++ b/submodules/ActionSheetPeerItem/Sources/ActionSheetPeerItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import AvatarNode
diff --git a/submodules/AnimatedAvatarSetNode/BUILD b/submodules/AnimatedAvatarSetNode/BUILD
index 72e6976f4a..3e13b3823d 100644
--- a/submodules/AnimatedAvatarSetNode/BUILD
+++ b/submodules/AnimatedAvatarSetNode/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
"//submodules/AvatarNode:AvatarNode",
"//submodules/AudioBlob:AudioBlob",
diff --git a/submodules/AnimatedAvatarSetNode/Sources/AnimatedAvatarSetNode.swift b/submodules/AnimatedAvatarSetNode/Sources/AnimatedAvatarSetNode.swift
index 8f1e87dfab..f4d240578c 100644
--- a/submodules/AnimatedAvatarSetNode/Sources/AnimatedAvatarSetNode.swift
+++ b/submodules/AnimatedAvatarSetNode/Sources/AnimatedAvatarSetNode.swift
@@ -6,7 +6,6 @@ import AvatarNode
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
import AudioBlob
diff --git a/submodules/AnimationUI/BUILD b/submodules/AnimationUI/BUILD
index adc0b2a210..643f7c7cd3 100644
--- a/submodules/AnimationUI/BUILD
+++ b/submodules/AnimationUI/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/YuvConversion:YuvConversion",
diff --git a/submodules/ArchivedStickerPacksNotice/BUILD b/submodules/ArchivedStickerPacksNotice/BUILD
index 296ed10c8d..8d54e521f8 100644
--- a/submodules/ArchivedStickerPacksNotice/BUILD
+++ b/submodules/ArchivedStickerPacksNotice/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift b/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift
index 00d0eccae4..cb43c40d4a 100644
--- a/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift
+++ b/submodules/ArchivedStickerPacksNotice/Sources/ArchivedStickerPacksNoticeController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ActivityIndicator
import AccountContext
diff --git a/submodules/AuthTransferUI/BUILD b/submodules/AuthTransferUI/BUILD
index df8e758fa6..82321614ec 100644
--- a/submodules/AuthTransferUI/BUILD
+++ b/submodules/AuthTransferUI/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
diff --git a/submodules/AuthorizationUI/BUILD b/submodules/AuthorizationUI/BUILD
index 9e15b1858d..968bcdf9eb 100644
--- a/submodules/AuthorizationUI/BUILD
+++ b/submodules/AuthorizationUI/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Display:Display",
"//submodules/TextFormat:TextFormat",
"//submodules/Markdown:Markdown",
diff --git a/submodules/AuthorizationUI/Sources/AuthorizationOptionText.swift b/submodules/AuthorizationUI/Sources/AuthorizationOptionText.swift
index e9d2cadc8d..e9a6dd5ae7 100644
--- a/submodules/AuthorizationUI/Sources/AuthorizationOptionText.swift
+++ b/submodules/AuthorizationUI/Sources/AuthorizationOptionText.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Display
import TelegramPresentationData
import TextFormat
@@ -30,13 +29,13 @@ public func authorizationNextOptionText(currentType: SentAuthorizationCodeType,
return (NSAttributedString(string: strings.Login_CodeSentSms, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
} else {
let timeString = NSString(format: "%d:%.02d", Int(minutes), Int(seconds))
- return (NSAttributedString(string: strings.Login_WillSendSms(timeString as String).0, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
+ return (NSAttributedString(string: strings.Login_WillSendSms(timeString as String).string, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
}
case .call, .flashCall:
if timeout <= 0 {
return (NSAttributedString(string: strings.ChangePhoneNumberCode_Called, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
} else {
- return (NSAttributedString(string: String(format: strings.ChangePhoneNumberCode_CallTimer(String(format: "%d:%.2d", minutes, seconds)).0, minutes, seconds), font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
+ return (NSAttributedString(string: String(format: strings.ChangePhoneNumberCode_CallTimer(String(format: "%d:%.2d", minutes, seconds)).string, minutes, seconds), font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
}
}
} else {
diff --git a/submodules/AvatarNode/BUILD b/submodules/AvatarNode/BUILD
index d601aef087..7e52852b6b 100644
--- a/submodules/AvatarNode/BUILD
+++ b/submodules/AvatarNode/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AnimationUI:AnimationUI",
"//submodules/AppBundle:AppBundle",
diff --git a/submodules/AvatarNode/Sources/AvatarNode.swift b/submodules/AvatarNode/Sources/AvatarNode.swift
index 22b15b4753..f8abba7970 100644
--- a/submodules/AvatarNode/Sources/AvatarNode.swift
+++ b/submodules/AvatarNode/Sources/AvatarNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Postbox
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AnimationUI
diff --git a/submodules/AvatarNode/Sources/PeerAvatar.swift b/submodules/AvatarNode/Sources/PeerAvatar.swift
index e58b3ab6fc..711af8dd55 100644
--- a/submodules/AvatarNode/Sources/PeerAvatar.swift
+++ b/submodules/AvatarNode/Sources/PeerAvatar.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import ImageIO
import TelegramCore
-import SyncCore
import TinyThumbnail
import FastBlur
diff --git a/submodules/BotPaymentsUI/BUILD b/submodules/BotPaymentsUI/BUILD
index d917b67fe4..f99f6e631d 100644
--- a/submodules/BotPaymentsUI/BUILD
+++ b/submodules/BotPaymentsUI/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/LocalAuth:LocalAuth",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift
index 0c67b6e05c..c9b48ea0bd 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift
index 2f44761fc7..251837ac51 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import PassKit
import TelegramPresentationData
@@ -971,7 +970,7 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
let totalAmount = currentTotalPrice(paymentForm: self.paymentFormValue, validatedFormInfo: self.currentValidatedFormInfo, currentShippingOptionId: self.currentShippingOptionId, currentTip: self.currentTipAmount)
let payString: String
if let paymentForm = self.paymentFormValue, totalAmount > 0 {
- payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).0
+ payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).string
} else {
payString = self.presentationData.strings.CheckoutInfo_Pay
}
@@ -1324,12 +1323,12 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
let alertText: String
if requiresBiometrics {
if let biometricAuthentication = LocalAuth.biometricAuthentication, case .faceId = biometricAuthentication {
- alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).0
+ alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).string
} else {
- alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).0
+ alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).string
}
} else {
- alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).0
+ alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).string
}
strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: alertText, actions: [
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutHeaderItem.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutHeaderItem.swift
index 2946d5ca0b..98b7b8ce09 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutHeaderItem.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutHeaderItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutInfoController.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutInfoController.swift
index a1f316815e..5365164c59 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutInfoController.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutInfoController.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import ProgressNavigationButtonNode
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutInfoControllerNode.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutInfoControllerNode.swift
index 034628432e..2a92d8c313 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutInfoControllerNode.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutInfoControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryController.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryController.swift
index a5d7cb506d..a5bb8e6564 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryController.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryController.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import ProgressNavigationButtonNode
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift
index 0072d16381..2cec187417 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutPasswordEntryController.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutPasswordEntryController.swift
index c2c0a5733e..157a9bee57 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutPasswordEntryController.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutPasswordEntryController.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
@@ -109,7 +108,7 @@ private final class BotCheckoutPasswordAlertContentNode: AlertContentNode {
self.titleNode = titleNode
self.textNode = ASTextNode()
- self.textNode.attributedText = NSAttributedString(string: strings.Checkout_PasswordEntry_Text(cardTitle).0, font: Font.regular(13.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
+ self.textNode.attributedText = NSAttributedString(string: strings.Checkout_PasswordEntry_Text(cardTitle).string, font: Font.regular(13.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
self.textNode.displaysAsynchronously = false
self.textNode.isUserInteractionEnabled = false
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentMethodSheet.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentMethodSheet.swift
index 546a9e9a4d..2d77d7d1ad 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentMethodSheet.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentMethodSheet.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import AccountContext
import AppBundle
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentShippingOptionSheetController.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentShippingOptionSheetController.swift
index 4f81f5d797..56587bd3c9 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentShippingOptionSheetController.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutPaymentShippingOptionSheetController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import AccountContext
import TelegramStringFormatting
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutWebInteractionController.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutWebInteractionController.swift
index 8f555ac9ac..faaa68ba27 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutWebInteractionController.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutWebInteractionController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/BotPaymentsUI/Sources/BotReceiptController.swift b/submodules/BotPaymentsUI/Sources/BotReceiptController.swift
index b8b2036b2b..f09ee95dce 100644
--- a/submodules/BotPaymentsUI/Sources/BotReceiptController.swift
+++ b/submodules/BotPaymentsUI/Sources/BotReceiptController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/BotPaymentsUI/Sources/BotReceiptControllerNode.swift b/submodules/BotPaymentsUI/Sources/BotReceiptControllerNode.swift
index 5a038bfb0c..a34c40d6e5 100644
--- a/submodules/BotPaymentsUI/Sources/BotReceiptControllerNode.swift
+++ b/submodules/BotPaymentsUI/Sources/BotReceiptControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/BotPaymentsUI/Sources/TipEditController.swift b/submodules/BotPaymentsUI/Sources/TipEditController.swift
index d785c6d17e..59725defe9 100644
--- a/submodules/BotPaymentsUI/Sources/TipEditController.swift
+++ b/submodules/BotPaymentsUI/Sources/TipEditController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
diff --git a/submodules/CallListUI/BUILD b/submodules/CallListUI/BUILD
index 65d5b40bb9..15d61132a7 100644
--- a/submodules/CallListUI/BUILD
+++ b/submodules/CallListUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/CallListUI/Sources/CallListCallItem.swift b/submodules/CallListUI/Sources/CallListCallItem.swift
index 72ad5c7f11..06674a7027 100644
--- a/submodules/CallListUI/Sources/CallListCallItem.swift
+++ b/submodules/CallListUI/Sources/CallListCallItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -438,8 +437,8 @@ class CallListCallItemNode: ItemListRevealOptionsItemNode {
statusAccessibilityString = isVideo ? (item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VideoCallIncoming) : (item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming)
} else if hasIncoming {
if let callDuration = callDuration, callDuration != 0 {
- statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallIncomingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
- statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallIncoming : item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0
+ statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallIncomingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
+ statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallIncoming : item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string
} else {
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallIncomingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
@@ -447,8 +446,8 @@ class CallListCallItemNode: ItemListRevealOptionsItemNode {
}
} else {
if let callDuration = callDuration, callDuration != 0 {
- statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallOutgoingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
- statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0
+ statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallOutgoingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
+ statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string
} else {
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallOutgoingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
statusAccessibilityString = isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing
diff --git a/submodules/CallListUI/Sources/CallListController.swift b/submodules/CallListUI/Sources/CallListController.swift
index 2f9faa7e85..9fb3a327d0 100644
--- a/submodules/CallListUI/Sources/CallListController.swift
+++ b/submodules/CallListUI/Sources/CallListController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
@@ -449,7 +448,7 @@ public final class CallListController: TelegramBaseController {
if let cachedUserData = view.cachedData as? CachedUserData, cachedUserData.callsPrivate {
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
- strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
+ strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
return
}
diff --git a/submodules/CallListUI/Sources/CallListControllerNode.swift b/submodules/CallListUI/Sources/CallListControllerNode.swift
index 88354bfed8..dcd3cbdd65 100644
--- a/submodules/CallListUI/Sources/CallListControllerNode.swift
+++ b/submodules/CallListUI/Sources/CallListControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -232,7 +231,7 @@ final class CallListControllerNode: ASDisplayNode {
self.listNode = ListView()
self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.leftOverlayNode = ASDisplayNode()
@@ -338,7 +337,7 @@ final class CallListControllerNode: ASDisplayNode {
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
var items: [ActionSheetItem] = []
- items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0, color: .destructive, action: { [weak actionSheet] in
+ items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string, color: .destructive, action: { [weak actionSheet] in
actionSheet?.dismissAnimated()
guard let strongSelf = self else {
return
diff --git a/submodules/CallListUI/Sources/CallListGroupCallItem.swift b/submodules/CallListUI/Sources/CallListGroupCallItem.swift
index 6d1af1b65d..8cbdd2028f 100644
--- a/submodules/CallListUI/Sources/CallListGroupCallItem.swift
+++ b/submodules/CallListUI/Sources/CallListGroupCallItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/CallListUI/Sources/CallListNodeEntries.swift b/submodules/CallListUI/Sources/CallListNodeEntries.swift
index 52c856bb12..42e20926b1 100644
--- a/submodules/CallListUI/Sources/CallListNodeEntries.swift
+++ b/submodules/CallListUI/Sources/CallListNodeEntries.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
diff --git a/submodules/CallListUI/Sources/CallListNodeLocation.swift b/submodules/CallListUI/Sources/CallListNodeLocation.swift
index 4f660fb007..b7905b6f3c 100644
--- a/submodules/CallListUI/Sources/CallListNodeLocation.swift
+++ b/submodules/CallListUI/Sources/CallListNodeLocation.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
diff --git a/submodules/CallListUI/Sources/CallListViewTransition.swift b/submodules/CallListUI/Sources/CallListViewTransition.swift
index 3fe18eec60..aa70ded605 100644
--- a/submodules/CallListUI/Sources/CallListViewTransition.swift
+++ b/submodules/CallListUI/Sources/CallListViewTransition.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import MergeLists
diff --git a/submodules/ChatHistoryImportTasks/BUILD b/submodules/ChatHistoryImportTasks/BUILD
index e023a3ffb9..6e0b39f4c3 100644
--- a/submodules/ChatHistoryImportTasks/BUILD
+++ b/submodules/ChatHistoryImportTasks/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
],
visibility = [
"//visibility:public",
diff --git a/submodules/ChatHistoryImportTasks/Sources/ChatHistoryImportTask.swift b/submodules/ChatHistoryImportTasks/Sources/ChatHistoryImportTask.swift
index 004e3f255f..2a50b6f8cb 100644
--- a/submodules/ChatHistoryImportTasks/Sources/ChatHistoryImportTask.swift
+++ b/submodules/ChatHistoryImportTasks/Sources/ChatHistoryImportTask.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
public enum ChatHistoryImportTasks {
diff --git a/submodules/ChatImportUI/BUILD b/submodules/ChatImportUI/BUILD
index 5cefaf7300..63889b0ae2 100644
--- a/submodules/ChatImportUI/BUILD
+++ b/submodules/ChatImportUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/Postbox:Postbox",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramCore:TelegramCore",
"//submodules/AppBundle:AppBundle",
"//third-party/ZipArchive:ZipArchive",
diff --git a/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift b/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift
index 5cefdf43e0..87e2b7603a 100644
--- a/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift
+++ b/submodules/ChatImportUI/Sources/ChatImportActivityScreen.swift
@@ -2,7 +2,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/ChatInterfaceState/BUILD b/submodules/ChatInterfaceState/BUILD
index 08daa544b5..3ed561edb1 100644
--- a/submodules/ChatInterfaceState/BUILD
+++ b/submodules/ChatInterfaceState/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TextFormat:TextFormat",
"//submodules/AccountContext:AccountContext",
],
diff --git a/submodules/ChatInterfaceState/Sources/ChatInterfaceState.swift b/submodules/ChatInterfaceState/Sources/ChatInterfaceState.swift
index 830419853e..2daae7aa39 100644
--- a/submodules/ChatInterfaceState/Sources/ChatInterfaceState.swift
+++ b/submodules/ChatInterfaceState/Sources/ChatInterfaceState.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import TextFormat
import AccountContext
diff --git a/submodules/ChatListSearchItemHeader/Sources/ChatListSearchItemHeader.swift b/submodules/ChatListSearchItemHeader/Sources/ChatListSearchItemHeader.swift
index ab2515d3ed..35c867213e 100644
--- a/submodules/ChatListSearchItemHeader/Sources/ChatListSearchItemHeader.swift
+++ b/submodules/ChatListSearchItemHeader/Sources/ChatListSearchItemHeader.swift
@@ -170,6 +170,14 @@ public final class ChatListSearchItemHeader: ListViewItemHeader {
self.actionTitle = actionTitle
self.action = action
}
+
+ public func combinesWith(other: ListViewItemHeader) -> Bool {
+ if let other = other as? ChatListSearchItemHeader, other.id == self.id {
+ return true
+ } else {
+ return false
+ }
+ }
public func node(synchronousLoad: Bool) -> ListViewItemHeaderNode {
return ChatListSearchItemHeaderNode(type: self.type, theme: self.theme, strings: self.strings, actionTitle: self.actionTitle, action: self.action)
diff --git a/submodules/ChatListSearchRecentPeersNode/BUILD b/submodules/ChatListSearchRecentPeersNode/BUILD
index 659eec2f7a..1010ab4162 100644
--- a/submodules/ChatListSearchRecentPeersNode/BUILD
+++ b/submodules/ChatListSearchRecentPeersNode/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
"//submodules/HorizontalPeerItem:HorizontalPeerItem",
"//submodules/MergeLists:MergeLists",
diff --git a/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift b/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift
index 5cc3470630..b1bf7c83b6 100644
--- a/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift
+++ b/submodules/ChatListSearchRecentPeersNode/Sources/ChatListSearchRecentPeersNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
import HorizontalPeerItem
@@ -141,7 +140,7 @@ public final class ChatListSearchRecentPeersNode: ASDisplayNode {
self.listView = ListView()
self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/ChatListUI/BUILD b/submodules/ChatListUI/BUILD
index c48fbb276c..f404887b30 100644
--- a/submodules/ChatListUI/BUILD
+++ b/submodules/ChatListUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/ChatListUI/Sources/ChatContextMenus.swift b/submodules/ChatListUI/Sources/ChatContextMenus.swift
index 8c353d57e2..ee9f7cedcb 100644
--- a/submodules/ChatListUI/Sources/ChatContextMenus.swift
+++ b/submodules/ChatListUI/Sources/ChatContextMenus.swift
@@ -5,7 +5,6 @@ import ContextUI
import AccountContext
import Postbox
import TelegramCore
-import SyncCore
import Display
import TelegramUIPreferences
import OverlayStatusController
diff --git a/submodules/ChatListUI/Sources/ChatListController.swift b/submodules/ChatListUI/Sources/ChatListController.swift
index 6baa6ea005..ee97122b5d 100644
--- a/submodules/ChatListUI/Sources/ChatListController.swift
+++ b/submodules/ChatListUI/Sources/ChatListController.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramBaseController
@@ -2340,7 +2339,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
beginClear(.forLocalPeer)
actionSheet?.dismissAnimated()
}))
- items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak actionSheet] in
+ items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak actionSheet] in
beginClear(.forEveryone)
actionSheet?.dismissAnimated()
}))
@@ -2369,7 +2368,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
}
if chatPeer is TelegramSecretChat {
- items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak actionSheet] in
+ items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak actionSheet] in
actionSheet?.dismissAnimated()
guard let strongSelf = self else {
return
@@ -2511,7 +2510,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
})
completion(true)
}))
- items.append(ActionSheetButtonItem(title: self.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak self, weak actionSheet] in
+ items.append(ActionSheetButtonItem(title: self.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak self, weak actionSheet] in
actionSheet?.dismissAnimated()
guard let strongSelf = self else {
return
diff --git a/submodules/ChatListUI/Sources/ChatListControllerNode.swift b/submodules/ChatListUI/Sources/ChatListControllerNode.swift
index ae585ccff7..89e035f20e 100644
--- a/submodules/ChatListUI/Sources/ChatListControllerNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import MergeLists
@@ -369,7 +368,7 @@ private final class ChatListContainerItemNode: ASDisplayNode {
self.presentationData = presentationData
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.listNode.updateThemeAndStrings(theme: presentationData.theme, fontSize: presentationData.listsFontSize, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameSortOrder: presentationData.nameSortOrder, nameDisplayOrder: presentationData.nameDisplayOrder, disableAnimations: true)
diff --git a/submodules/ChatListUI/Sources/ChatListFilterPresetController.swift b/submodules/ChatListUI/Sources/ChatListFilterPresetController.swift
index aedd7d3f15..64ca31b31f 100644
--- a/submodules/ChatListUI/Sources/ChatListFilterPresetController.swift
+++ b/submodules/ChatListUI/Sources/ChatListFilterPresetController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import PresentationDataUtils
import ItemListUI
diff --git a/submodules/ChatListUI/Sources/ChatListFilterPresetListController.swift b/submodules/ChatListUI/Sources/ChatListFilterPresetListController.swift
index 75cb00bd1f..1a170067c4 100644
--- a/submodules/ChatListUI/Sources/ChatListFilterPresetListController.swift
+++ b/submodules/ChatListUI/Sources/ChatListFilterPresetListController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/ChatListUI/Sources/ChatListFilterPresetListItem.swift b/submodules/ChatListUI/Sources/ChatListFilterPresetListItem.swift
index 77855286cc..aa38e59f3d 100644
--- a/submodules/ChatListUI/Sources/ChatListFilterPresetListItem.swift
+++ b/submodules/ChatListUI/Sources/ChatListFilterPresetListItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import TelegramUIPreferences
diff --git a/submodules/ChatListUI/Sources/ChatListFilterTabContainerNode.swift b/submodules/ChatListUI/Sources/ChatListFilterTabContainerNode.swift
index a7ae11eefd..29a657aedf 100644
--- a/submodules/ChatListUI/Sources/ChatListFilterTabContainerNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListFilterTabContainerNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import Display
-import SyncCore
import Postbox
import TelegramCore
import TelegramPresentationData
diff --git a/submodules/ChatListUI/Sources/ChatListFilterTabInlineContainerNode.swift b/submodules/ChatListUI/Sources/ChatListFilterTabInlineContainerNode.swift
index f5c24a8564..954642fba7 100644
--- a/submodules/ChatListUI/Sources/ChatListFilterTabInlineContainerNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListFilterTabInlineContainerNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import Display
-import SyncCore
import Postbox
import TelegramCore
import TelegramPresentationData
diff --git a/submodules/ChatListUI/Sources/ChatListRecentPeersListItem.swift b/submodules/ChatListUI/Sources/ChatListRecentPeersListItem.swift
index aceec993d0..f119038ac7 100644
--- a/submodules/ChatListUI/Sources/ChatListRecentPeersListItem.swift
+++ b/submodules/ChatListUI/Sources/ChatListRecentPeersListItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ChatListSearchRecentPeersNode
import ContextUI
diff --git a/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift b/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift
index 041708249f..1cef931d41 100644
--- a/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
@@ -830,18 +829,13 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
var items: [ActionSheetItem] = []
var personalPeerName: String?
var isChannel = false
-// if let user = peer as? TelegramUser {
-// personalPeerName = user.compactDisplayTitle
-// } else if let channel = peer as? TelegramChannel, case .broadcast = channel.info {
-// isChannel = true
-// }
if actions.options.contains(.deleteGlobally) {
let globalTitle: String
if isChannel {
globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesForMe
} else if let personalPeerName = personalPeerName {
- globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).0
+ globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).string
} else {
globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesForEveryone
}
@@ -967,14 +961,14 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0 : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0 : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0 : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
diff --git a/submodules/ChatListUI/Sources/ChatListSearchFiltersContainerNode.swift b/submodules/ChatListUI/Sources/ChatListSearchFiltersContainerNode.swift
index fe11a7cf60..7d7b51f020 100644
--- a/submodules/ChatListUI/Sources/ChatListSearchFiltersContainerNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListSearchFiltersContainerNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import Display
-import SyncCore
import Postbox
import TelegramCore
import TelegramPresentationData
diff --git a/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift b/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift
index 969b115076..1709c9d6e7 100644
--- a/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift
@@ -1,7 +1,6 @@
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
@@ -746,7 +745,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
self.recentListNode = ListView()
self.recentListNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
self.recentListNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.shimmerNode = ChatListSearchShimmerNode(key: key)
@@ -756,7 +755,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
self.listNode = ListView()
self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
var openMediaMessageImpl: ((Message, ChatControllerInteractionOpenMessageMode) -> Void)?
@@ -2077,7 +2076,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
let emptyResultsText: String
if let query = transition.query, !query.isEmpty {
emptyResultsTitle = strongSelf.presentationData.strings.ChatList_Search_NoResults
- emptyResultsText = strongSelf.presentationData.strings.ChatList_Search_NoResultsQueryDescription(query).0
+ emptyResultsText = strongSelf.presentationData.strings.ChatList_Search_NoResultsQueryDescription(query).string
} else {
if let searchOptions = searchOptions, searchOptions.date == nil && searchOptions.peer == nil {
emptyResultsTitle = strongSelf.presentationData.strings.ChatList_Search_NoResultsFilter
diff --git a/submodules/ChatListUI/Sources/ChatListSearchMediaNode.swift b/submodules/ChatListUI/Sources/ChatListSearchMediaNode.swift
index 7979476472..cad629e5b9 100644
--- a/submodules/ChatListUI/Sources/ChatListSearchMediaNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListSearchMediaNode.swift
@@ -1,7 +1,6 @@
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/ChatListUI/Sources/ChatListSearchMessageSelectionPanelNode.swift b/submodules/ChatListUI/Sources/ChatListSearchMessageSelectionPanelNode.swift
index 765d79ab65..1ce2efbf4a 100644
--- a/submodules/ChatListUI/Sources/ChatListSearchMessageSelectionPanelNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListSearchMessageSelectionPanelNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/ChatListUI/Sources/ChatListSearchPaneContainerNode.swift b/submodules/ChatListUI/Sources/ChatListSearchPaneContainerNode.swift
index 4c2805501b..59f9855459 100644
--- a/submodules/ChatListUI/Sources/ChatListSearchPaneContainerNode.swift
+++ b/submodules/ChatListUI/Sources/ChatListSearchPaneContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import TelegramPresentationData
import Postbox
-import SyncCore
import TelegramCore
import AccountContext
import ContextUI
diff --git a/submodules/ChatListUI/Sources/ChatListSelection.swift b/submodules/ChatListUI/Sources/ChatListSelection.swift
index 3c0c533c59..18faea4e5f 100644
--- a/submodules/ChatListUI/Sources/ChatListSelection.swift
+++ b/submodules/ChatListUI/Sources/ChatListSelection.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
enum ChatListSelectionReadOption: Equatable {
diff --git a/submodules/ChatListUI/Sources/Node/ChatListItem.swift b/submodules/ChatListUI/Sources/Node/ChatListItem.swift
index c4f36a0073..dcf12008f5 100644
--- a/submodules/ChatListUI/Sources/Node/ChatListItem.swift
+++ b/submodules/ChatListUI/Sources/Node/ChatListItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -520,7 +519,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
}
let (_, initialHideAuthor, messageText) = chatListItemStrings(strings: item.presentationData.strings, nameDisplayOrder: item.presentationData.nameDisplayOrder, dateTimeFormat: item.presentationData.dateTimeFormat, messages: messages, chatPeer: peer, accountPeerId: item.context.account.peerId, isPeerGroup: false)
if message.flags.contains(.Incoming), !initialHideAuthor, let author = message.author, author is TelegramUser {
- result += "\n\(item.presentationData.strings.VoiceOver_ChatList_MessageFrom(author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)).0)"
+ result += "\n\(item.presentationData.strings.VoiceOver_ChatList_MessageFrom(author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)).string)"
}
result += "\n\(messageText)"
return result
@@ -554,7 +553,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
}
let (_, initialHideAuthor, messageText) = chatListItemStrings(strings: item.presentationData.strings, nameDisplayOrder: item.presentationData.nameDisplayOrder, dateTimeFormat: item.presentationData.dateTimeFormat, messages: messages, chatPeer: peer, accountPeerId: item.context.account.peerId, isPeerGroup: false)
if message.flags.contains(.Incoming), !initialHideAuthor, let author = message.author, author is TelegramUser {
- result += "\n\(item.presentationData.strings.VoiceOver_ChatList_MessageFrom(author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)).0)"
+ result += "\n\(item.presentationData.strings.VoiceOver_ChatList_MessageFrom(author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)).string)"
}
if !message.flags.contains(.Incoming), let combinedReadState = combinedReadState, combinedReadState.isOutgoingMessageIndexRead(message.index) {
result += "\n\(item.presentationData.strings.VoiceOver_ChatList_MessageRead)"
diff --git a/submodules/ChatListUI/Sources/Node/ChatListItemStrings.swift b/submodules/ChatListUI/Sources/Node/ChatListItemStrings.swift
index c7e3c3b503..8cf12f0f1a 100644
--- a/submodules/ChatListUI/Sources/Node/ChatListItemStrings.swift
+++ b/submodules/ChatListUI/Sources/Node/ChatListItemStrings.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramStringFormatting
@@ -159,7 +158,7 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
processed = true
break inner
} else {
- messageText = strings.Message_StickerText(displayText).0
+ messageText = strings.Message_StickerText(displayText).string
processed = true
break inner
}
@@ -288,16 +287,16 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
case .active:
switch secretChat.role {
case .creator:
- messageText = strings.DialogList_EncryptedChatStartedOutgoing(peer?.compactDisplayTitle ?? "").0
+ messageText = strings.DialogList_EncryptedChatStartedOutgoing(peer?.compactDisplayTitle ?? "").string
case .participant:
- messageText = strings.DialogList_EncryptedChatStartedIncoming(peer?.compactDisplayTitle ?? "").0
+ messageText = strings.DialogList_EncryptedChatStartedIncoming(peer?.compactDisplayTitle ?? "").string
}
case .terminated:
messageText = strings.DialogList_EncryptionRejected
case .handshake:
switch secretChat.role {
case .creator:
- messageText = strings.DialogList_AwaitingEncryption(peer?.compactDisplayTitle ?? "").0
+ messageText = strings.DialogList_AwaitingEncryption(peer?.compactDisplayTitle ?? "").string
case .participant:
messageText = strings.DialogList_EncryptionProcessing
}
diff --git a/submodules/ChatListUI/Sources/Node/ChatListNode.swift b/submodules/ChatListUI/Sources/Node/ChatListNode.swift
index 8f430c32b2..2d96d5dbd0 100644
--- a/submodules/ChatListUI/Sources/Node/ChatListNode.swift
+++ b/submodules/ChatListUI/Sources/Node/ChatListNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
@@ -714,7 +713,7 @@ public final class ChatListNode: ListView {
if chatListFilter != nil {
text = strongSelf.currentState.presentationData.strings.DialogList_UnknownPinLimitError
} else {
- text = strongSelf.currentState.presentationData.strings.DialogList_PinLimitError("\(maxCount)").0
+ text = strongSelf.currentState.presentationData.strings.DialogList_PinLimitError("\(maxCount)").string
}
strongSelf.presentAlert?(text)
}
diff --git a/submodules/ChatListUI/Sources/Node/ChatListNodeEntries.swift b/submodules/ChatListUI/Sources/Node/ChatListNodeEntries.swift
index e42428259f..ac87a13490 100644
--- a/submodules/ChatListUI/Sources/Node/ChatListNodeEntries.swift
+++ b/submodules/ChatListUI/Sources/Node/ChatListNodeEntries.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
import AccountContext
diff --git a/submodules/ChatListUI/Sources/Node/ChatListNodeLocation.swift b/submodules/ChatListUI/Sources/Node/ChatListNodeLocation.swift
index 108f6dc796..4e96f658ad 100644
--- a/submodules/ChatListUI/Sources/Node/ChatListNodeLocation.swift
+++ b/submodules/ChatListUI/Sources/Node/ChatListNodeLocation.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import TelegramUIPreferences
diff --git a/submodules/ChatListUI/Sources/Node/ChatListTypingNode.swift b/submodules/ChatListUI/Sources/Node/ChatListTypingNode.swift
index 711821cf45..ab7ef7a0f3 100644
--- a/submodules/ChatListUI/Sources/Node/ChatListTypingNode.swift
+++ b/submodules/ChatListUI/Sources/Node/ChatListTypingNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import SwiftSignalKit
import TelegramPresentationData
@@ -85,21 +84,21 @@ final class ChatListInputActivitiesNode: ASDisplayNode {
let peerTitle = activities[0].0.compactDisplayTitle
switch activities[0].1 {
case .uploadingVideo:
- text = strings.DialogList_SingleUploadingVideoSuffix(peerTitle).0
+ text = strings.DialogList_SingleUploadingVideoSuffix(peerTitle).string
case .uploadingInstantVideo:
- text = strings.DialogList_SingleUploadingVideoSuffix(peerTitle).0
+ text = strings.DialogList_SingleUploadingVideoSuffix(peerTitle).string
case .uploadingPhoto:
- text = strings.DialogList_SingleUploadingPhotoSuffix(peerTitle).0
+ text = strings.DialogList_SingleUploadingPhotoSuffix(peerTitle).string
case .uploadingFile:
- text = strings.DialogList_SingleUploadingFileSuffix(peerTitle).0
+ text = strings.DialogList_SingleUploadingFileSuffix(peerTitle).string
case .recordingVoice:
- text = strings.DialogList_SingleRecordingAudioSuffix(peerTitle).0
+ text = strings.DialogList_SingleRecordingAudioSuffix(peerTitle).string
case .recordingInstantVideo:
- text = strings.DialogList_SingleRecordingVideoMessageSuffix(peerTitle).0
+ text = strings.DialogList_SingleRecordingVideoMessageSuffix(peerTitle).string
case .playingGame:
- text = strings.DialogList_SinglePlayingGameSuffix(peerTitle).0
+ text = strings.DialogList_SinglePlayingGameSuffix(peerTitle).string
case .typingText:
- text = strings.DialogList_SingleTypingSuffix(peerTitle).0
+ text = strings.DialogList_SingleTypingSuffix(peerTitle).string
case .speakingInGroupCall:
text = ""
}
@@ -129,12 +128,12 @@ final class ChatListInputActivitiesNode: ASDisplayNode {
let peerTitle = activities[0].0.compactDisplayTitle
if activities.count == 2 {
let secondPeerTitle = activities[1].0.compactDisplayTitle
- string = NSAttributedString(string: strings.DialogList_MultipleTypingPair(peerTitle, secondPeerTitle).0, font: textFont, textColor: color)
+ string = NSAttributedString(string: strings.DialogList_MultipleTypingPair(peerTitle, secondPeerTitle).string, font: textFont, textColor: color)
} else {
- string = NSAttributedString(string: strings.DialogList_MultipleTyping(peerTitle, strings.DialogList_MultipleTypingSuffix(activities.count - 1).0).0, font: textFont, textColor: color)
+ string = NSAttributedString(string: strings.DialogList_MultipleTyping(peerTitle, strings.DialogList_MultipleTypingSuffix(activities.count - 1).string).string, font: textFont, textColor: color)
}
} else {
- string = NSAttributedString(string: strings.DialogList_MultipleTypingSuffix(activities.count).0, font: textFont, textColor: color)
+ string = NSAttributedString(string: strings.DialogList_MultipleTypingSuffix(activities.count).string, font: textFont, textColor: color)
}
state = .typingText(string, lightColor)
}
diff --git a/submodules/ChatListUI/Sources/Node/ChatListViewTransition.swift b/submodules/ChatListUI/Sources/Node/ChatListViewTransition.swift
index 45aa92b7db..68ed9415f5 100644
--- a/submodules/ChatListUI/Sources/Node/ChatListViewTransition.swift
+++ b/submodules/ChatListUI/Sources/Node/ChatListViewTransition.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import MergeLists
diff --git a/submodules/ChatListUI/Sources/TabBarChatListFilterController.swift b/submodules/ChatListUI/Sources/TabBarChatListFilterController.swift
index e930adb883..18159fa45a 100644
--- a/submodules/ChatListUI/Sources/TabBarChatListFilterController.swift
+++ b/submodules/ChatListUI/Sources/TabBarChatListFilterController.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import AsyncDisplayKit
import TelegramPresentationData
import AccountContext
-import SyncCore
import Postbox
import TelegramUIPreferences
import TelegramCore
diff --git a/submodules/ComposePollUI/BUILD b/submodules/ComposePollUI/BUILD
index 7d37f6e963..78a59ef096 100644
--- a/submodules/ComposePollUI/BUILD
+++ b/submodules/ComposePollUI/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/ItemListUI:ItemListUI",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/ComposePollUI/Sources/CreatePollController.swift b/submodules/ComposePollUI/Sources/CreatePollController.swift
index 4c93ee41c6..304a5ebcd2 100644
--- a/submodules/ComposePollUI/Sources/CreatePollController.swift
+++ b/submodules/ComposePollUI/Sources/CreatePollController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/ContactListUI/BUILD b/submodules/ContactListUI/BUILD
index 18654656cb..28a4a99837 100644
--- a/submodules/ContactListUI/BUILD
+++ b/submodules/ContactListUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/ContactListUI/Sources/ContactAddItem.swift b/submodules/ContactListUI/Sources/ContactAddItem.swift
index f3c9093614..1088e2dd1c 100644
--- a/submodules/ContactListUI/Sources/ContactAddItem.swift
+++ b/submodules/ContactListUI/Sources/ContactAddItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AppBundle
import PhoneNumberFormat
@@ -189,7 +188,7 @@ class ContactsAddItemNode: ListViewItemNode {
let leftInset: CGFloat = 65.0 + params.leftInset
let rightInset: CGFloat = 10.0 + params.rightInset
- let titleAttributedString = NSAttributedString(string: item.strings.Contacts_AddPhoneNumber(formatPhoneNumber(item.phoneNumber)).0, font: titleFont, textColor: item.theme.list.itemAccentColor)
+ let titleAttributedString = NSAttributedString(string: item.strings.Contacts_AddPhoneNumber(formatPhoneNumber(item.phoneNumber)).string, font: titleFont, textColor: item.theme.list.itemAccentColor)
let (titleLayout, titleApply) = makeTitleLayout(TextNodeLayoutArguments(attributedString: titleAttributedString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: max(0.0, params.width - leftInset - rightInset), height: CGFloat.infinity), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
diff --git a/submodules/ContactListUI/Sources/ContactContextMenus.swift b/submodules/ContactListUI/Sources/ContactContextMenus.swift
index 17dbcc8682..27c51714c2 100644
--- a/submodules/ContactListUI/Sources/ContactContextMenus.swift
+++ b/submodules/ContactListUI/Sources/ContactContextMenus.swift
@@ -5,7 +5,6 @@ import ContextUI
import AccountContext
import Postbox
import TelegramCore
-import SyncCore
import Display
import AlertUI
import PresentationDataUtils
diff --git a/submodules/ContactListUI/Sources/ContactListNameIndexHeader.swift b/submodules/ContactListUI/Sources/ContactListNameIndexHeader.swift
index 7390365843..2d263ec274 100644
--- a/submodules/ContactListUI/Sources/ContactListNameIndexHeader.swift
+++ b/submodules/ContactListUI/Sources/ContactListNameIndexHeader.swift
@@ -18,6 +18,14 @@ final class ContactListNameIndexHeader: Equatable, ListViewItemHeader {
self.letter = letter
self.id = ListViewItemNode.HeaderId(space: 0, id: Int64(letter))
}
+
+ func combinesWith(other: ListViewItemHeader) -> Bool {
+ if let other = other as? ContactListNameIndexHeader, self.id == other.id {
+ return true
+ } else {
+ return false
+ }
+ }
func node(synchronousLoad: Bool) -> ListViewItemHeaderNode {
return ContactListNameIndexHeaderNode(theme: self.theme, letter: self.letter)
diff --git a/submodules/ContactListUI/Sources/ContactListNode.swift b/submodules/ContactListUI/Sources/ContactListNode.swift
index 0149b4b795..286c371b31 100644
--- a/submodules/ContactListUI/Sources/ContactListNode.swift
+++ b/submodules/ContactListUI/Sources/ContactListNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import DeviceAccess
@@ -889,7 +888,7 @@ public final class ContactListNode: ASDisplayNode {
self.listNode = ListView()
self.listNode.dynamicBounceEnabled = false
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.indexNode = CollectionIndexNode()
diff --git a/submodules/ContactListUI/Sources/ContactsController.swift b/submodules/ContactListUI/Sources/ContactsController.swift
index df4c849526..f635e0df83 100644
--- a/submodules/ContactListUI/Sources/ContactsController.swift
+++ b/submodules/ContactListUI/Sources/ContactsController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import DeviceAccess
diff --git a/submodules/ContactListUI/Sources/ContactsControllerNode.swift b/submodules/ContactListUI/Sources/ContactsControllerNode.swift
index c3c03b07e0..85b52e9645 100644
--- a/submodules/ContactListUI/Sources/ContactsControllerNode.swift
+++ b/submodules/ContactListUI/Sources/ContactsControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift b/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift
index d337d880b6..ebc5871a4a 100644
--- a/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift
+++ b/submodules/ContactListUI/Sources/ContactsSearchContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
@@ -239,7 +238,7 @@ public final class ContactsSearchContainerNode: SearchDisplayControllerContentNo
self.listNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor
self.listNode.isHidden = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/ContactListUI/Sources/InviteContactsController.swift b/submodules/ContactListUI/Sources/InviteContactsController.swift
index 4a62814ed5..45bd3d0b8d 100644
--- a/submodules/ContactListUI/Sources/InviteContactsController.swift
+++ b/submodules/ContactListUI/Sources/InviteContactsController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import MessageUI
import TelegramPresentationData
import AccountContext
@@ -131,7 +130,7 @@ public class InviteContactsController: ViewController, MFMessageComposeViewContr
self.contactsNode.requestShareTelegram = { [weak self] in
if let strongSelf = self {
let url = strongSelf.presentationData.strings.InviteText_URL
- let body = strongSelf.presentationData.strings.InviteText_SingleContact(url).0
+ let body = strongSelf.presentationData.strings.InviteText_SingleContact(url).string
presentExternalShare(context: strongSelf.context, text: body, parentController: strongSelf)
strongSelf.contactsNode.listNode.clearHighlightAnimated(true)
@@ -149,7 +148,7 @@ public class InviteContactsController: ViewController, MFMessageComposeViewContr
composer.messageComposeDelegate = strongSelf
composer.recipients = Array(Set(recipients))
let url = strongSelf.presentationData.strings.InviteText_URL
- var body = strongSelf.presentationData.strings.InviteText_SingleContact(url).0
+ var body = strongSelf.presentationData.strings.InviteText_SingleContact(url).string
if numbers.count == 1, numbers[0].1 > 0 {
body = strongSelf.presentationData.strings.InviteText_ContactsCountText(numbers[0].1)
body = body.replacingOccurrences(of: "{url}", with: url)
diff --git a/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift b/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift
index 13e4f3283a..79eeb39c55 100644
--- a/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift
+++ b/submodules/ContactListUI/Sources/InviteContactsControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -294,7 +293,7 @@ final class InviteContactsControllerNode: ASDisplayNode {
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
var shareImpl: (() -> Void)?
diff --git a/submodules/ContactsPeerItem/BUILD b/submodules/ContactsPeerItem/BUILD
index 1af726ec27..47a5925430 100644
--- a/submodules/ContactsPeerItem/BUILD
+++ b/submodules/ContactsPeerItem/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
"//submodules/AvatarNode:AvatarNode",
"//submodules/TelegramPresentationData:TelegramPresentationData",
diff --git a/submodules/ContactsPeerItem/Sources/ContactsPeerItem.swift b/submodules/ContactsPeerItem/Sources/ContactsPeerItem.swift
index 1d5c1f259e..fab112e2e2 100644
--- a/submodules/ContactsPeerItem/Sources/ContactsPeerItem.swift
+++ b/submodules/ContactsPeerItem/Sources/ContactsPeerItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/ContextUI/Sources/ContextController.swift b/submodules/ContextUI/Sources/ContextController.swift
index 95b1ebabd7..8ec8e50c43 100644
--- a/submodules/ContextUI/Sources/ContextController.swift
+++ b/submodules/ContextUI/Sources/ContextController.swift
@@ -6,7 +6,6 @@ import TelegramPresentationData
import TextSelectionNode
import ReactionSelectionNode
import TelegramCore
-import SyncCore
import SwiftSignalKit
private let animationDurationFactor: Double = 1.0
diff --git a/submodules/ContextUI/Sources/PinchController.swift b/submodules/ContextUI/Sources/PinchController.swift
index 473031f90a..8f2a93e12a 100644
--- a/submodules/ContextUI/Sources/PinchController.swift
+++ b/submodules/ContextUI/Sources/PinchController.swift
@@ -6,7 +6,6 @@ import TelegramPresentationData
import TextSelectionNode
import ReactionSelectionNode
import TelegramCore
-import SyncCore
import SwiftSignalKit
private func convertFrame(_ frame: CGRect, from fromView: UIView, to toView: UIView) -> CGRect {
diff --git a/submodules/CountrySelectionUI/Sources/AuthorizationSequenceCountrySelectionControllerNode.swift b/submodules/CountrySelectionUI/Sources/AuthorizationSequenceCountrySelectionControllerNode.swift
index b429fc0be1..5317051f0e 100644
--- a/submodules/CountrySelectionUI/Sources/AuthorizationSequenceCountrySelectionControllerNode.swift
+++ b/submodules/CountrySelectionUI/Sources/AuthorizationSequenceCountrySelectionControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramStringFormatting
import AppBundle
diff --git a/submodules/DebugSettingsUI/BUILD b/submodules/DebugSettingsUI/BUILD
index 21c301e2de..9b154444b7 100644
--- a/submodules/DebugSettingsUI/BUILD
+++ b/submodules/DebugSettingsUI/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/MtProtoKit:MtProtoKit",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/DebugSettingsUI/Sources/DebugAccountsController.swift b/submodules/DebugSettingsUI/Sources/DebugAccountsController.swift
index ccc2dc17fb..32a67c8272 100644
--- a/submodules/DebugSettingsUI/Sources/DebugAccountsController.swift
+++ b/submodules/DebugSettingsUI/Sources/DebugAccountsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/DebugSettingsUI/Sources/DebugController.swift b/submodules/DebugSettingsUI/Sources/DebugController.swift
index 8a796df36a..c40825879d 100644
--- a/submodules/DebugSettingsUI/Sources/DebugController.swift
+++ b/submodules/DebugSettingsUI/Sources/DebugController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MtProtoKit
import MessageUI
import TelegramPresentationData
diff --git a/submodules/DeleteChatPeerActionSheetItem/BUILD b/submodules/DeleteChatPeerActionSheetItem/BUILD
index c8da24e78c..d991fcc4b4 100644
--- a/submodules/DeleteChatPeerActionSheetItem/BUILD
+++ b/submodules/DeleteChatPeerActionSheetItem/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
"//submodules/AvatarNode:AvatarNode",
"//submodules/TelegramPresentationData:TelegramPresentationData",
diff --git a/submodules/DeleteChatPeerActionSheetItem/Sources/DeleteChatPeerActionSheetItem.swift b/submodules/DeleteChatPeerActionSheetItem/Sources/DeleteChatPeerActionSheetItem.swift
index 77bddd23dc..43e975e098 100644
--- a/submodules/DeleteChatPeerActionSheetItem/Sources/DeleteChatPeerActionSheetItem.swift
+++ b/submodules/DeleteChatPeerActionSheetItem/Sources/DeleteChatPeerActionSheetItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AvatarNode
@@ -103,11 +102,11 @@ private final class DeleteChatPeerActionSheetItemNode: ActionSheetItemNode {
break
}
default:
- var text: (String, [(Int, NSRange)])?
+ var text: PresentationStrings.FormattedString?
switch action {
case .delete:
if chatPeer.id == context.account.peerId {
- text = (strings.ChatList_DeleteSavedMessagesConfirmation, [])
+ text = PresentationStrings.FormattedString(string: strings.ChatList_DeleteSavedMessagesConfirmation, ranges: [])
} else if let chatPeer = chatPeer as? TelegramGroup {
text = strings.ChatList_LeaveGroupConfirmation(chatPeer.title)
} else if let chatPeer = chatPeer as? TelegramChannel {
@@ -119,7 +118,7 @@ private final class DeleteChatPeerActionSheetItemNode: ActionSheetItemNode {
}
case .deleteAndLeave:
if chatPeer.id == context.account.peerId {
- text = (strings.ChatList_DeleteSavedMessagesConfirmation, [])
+ text = PresentationStrings.FormattedString(string: strings.ChatList_DeleteSavedMessagesConfirmation, ranges: [])
} else if let chatPeer = chatPeer as? TelegramGroup {
text = strings.ChatList_DeleteAndLeaveGroupConfirmation(chatPeer.title)
} else if let chatPeer = chatPeer as? TelegramChannel {
@@ -131,7 +130,7 @@ private final class DeleteChatPeerActionSheetItemNode: ActionSheetItemNode {
}
case let .clearHistory(canClearCache):
if peer.id == context.account.peerId {
- text = (strings.ChatList_DeleteSavedMessagesConfirmation, [])
+ text = PresentationStrings.FormattedString(string: strings.ChatList_DeleteSavedMessagesConfirmation, ranges: [])
} else if peer is TelegramUser {
text = strings.ChatList_ClearChatConfirmation(peer.displayTitle(strings: strings, displayOrder: nameOrder))
} else {
@@ -139,7 +138,9 @@ private final class DeleteChatPeerActionSheetItemNode: ActionSheetItemNode {
}
if canClearCache {
- text?.0 += "\n\n\(strings.Conversation_AlsoClearCacheTitle)"
+ if let textValue = text {
+ text = PresentationStrings.FormattedString(string: textValue.string + "\n\n\(strings.Conversation_AlsoClearCacheTitle)", ranges: textValue.ranges)
+ }
}
case .removeFromGroup:
text = strings.VoiceChat_RemoveAndBanPeerConfirmation(peer.displayTitle(strings: strings, displayOrder: nameOrder), chatPeer.displayTitle(strings: strings, displayOrder: nameOrder))
@@ -149,9 +150,9 @@ private final class DeleteChatPeerActionSheetItemNode: ActionSheetItemNode {
break
}
if let text = text {
- let formattedAttributedText = NSMutableAttributedString(attributedString: NSAttributedString(string: text.0, font: textFont, textColor: theme.primaryTextColor))
- for (_, range) in text.1 {
- formattedAttributedText.addAttribute(.font, value: boldFont, range: range)
+ let formattedAttributedText = NSMutableAttributedString(attributedString: NSAttributedString(string: text.string, font: textFont, textColor: theme.primaryTextColor))
+ for range in text.ranges {
+ formattedAttributedText.addAttribute(.font, value: boldFont, range: range.range)
}
attributedText = formattedAttributedText
}
diff --git a/submodules/DeviceAccess/BUILD b/submodules/DeviceAccess/BUILD
index 1bfb8443f5..77cdb116dd 100644
--- a/submodules/DeviceAccess/BUILD
+++ b/submodules/DeviceAccess/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/DeviceAccess/Sources/DeviceAccess.swift b/submodules/DeviceAccess/Sources/DeviceAccess.swift
index 9c67ad7c0c..c3aabcf48b 100644
--- a/submodules/DeviceAccess/Sources/DeviceAccess.swift
+++ b/submodules/DeviceAccess/Sources/DeviceAccess.swift
@@ -3,7 +3,6 @@ import UIKit
import AVFoundation
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Photos
import CoreLocation
diff --git a/submodules/Display/Source/ListView.swift b/submodules/Display/Source/ListView.swift
index 7221fe1e86..489fc15251 100644
--- a/submodules/Display/Source/ListView.swift
+++ b/submodules/Display/Source/ListView.swift
@@ -3297,7 +3297,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
var containsSameHeader = false
if let nextHeaders = nextItemNode.headers() {
nextHeaderSearch: for nextHeader in nextHeaders {
- if nextHeader.id == currentId {
+ if nextHeader.id == currentId && nextHeader.combinesWith(other: currentHeader) {
containsSameHeader = true
break nextHeaderSearch
}
@@ -3341,7 +3341,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
let flashing = self.headerItemsAreFlashing()
- func addHeader(id: VisibleHeaderNodeId, upperBound: CGFloat, upperBoundEdge: CGFloat, lowerBound: CGFloat, item: ListViewItemHeader, hasValidNodes: Bool) {
+ func addHeader(id: VisibleHeaderNodeId, upperBound: CGFloat, upperIndex: Int, upperBoundEdge: CGFloat, lowerBound: CGFloat, lowerIndex: Int, item: ListViewItemHeader, hasValidNodes: Bool) {
let itemHeaderHeight: CGFloat = item.height
let headerFrame: CGRect
@@ -3364,7 +3364,9 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
visibleHeaderNodes.insert(id)
let initialHeaderNodeAlpha = self.itemHeaderNodesAlpha
- if let headerNode = self.itemHeaderNodes[id] {
+ let headerNode: ListViewItemHeaderNode
+ if let current = self.itemHeaderNodes[id] {
+ headerNode = current
switch transition.0 {
case .immediate:
headerNode.frame = headerFrame
@@ -3410,7 +3412,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
}
headerNode.updateStickDistanceFactor(stickLocationDistanceFactor, transition: transition.0)
} else {
- let headerNode = item.node(synchronousLoad: synchronousLoad)
+ headerNode = item.node(synchronousLoad: synchronousLoad)
headerNode.alpha = initialHeaderNodeAlpha
if headerNode.item !== item {
item.updateNode(headerNode, previous: nil, next: nil)
@@ -3432,11 +3434,52 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
}
headerNode.updateStickDistanceFactor(stickLocationDistanceFactor, transition: .immediate)
}
+ var maxIntersectionHeight: (CGFloat, Int)?
+ for i in upperIndex ... lowerIndex {
+ let itemNode = self.itemNodes[i]
+ let itemNodeFrame = itemNode.apparentFrame
+ let intersectionHeight: CGFloat = itemNodeFrame.intersection(headerFrame).height
+
+ if let (currentMaxIntersectionHeight, _) = maxIntersectionHeight {
+ if currentMaxIntersectionHeight < intersectionHeight {
+ maxIntersectionHeight = (intersectionHeight, i)
+ }
+ } else {
+ maxIntersectionHeight = (intersectionHeight, i)
+ }
+ }
+ if let (_, i) = maxIntersectionHeight {
+ let itemNode = self.itemNodes[i]
+ let itemNodeFrame = itemNode.apparentFrame
+
+ if itemNodeFrame.intersects(headerFrame) {
+ var updated = false
+ if let previousItemNode = headerNode.attachedToItemNode {
+ if previousItemNode !== itemNode {
+ previousItemNode.attachedHeaderNodes.removeAll(where: { $0 === headerNode })
+ updated = true
+ }
+ } else {
+ updated = true
+ }
+ if updated {
+ headerNode.attachedToItemNode = itemNode
+ itemNode.attachedHeaderNodes.append(headerNode)
+ itemNode.attachedHeaderNodesUpdated()
+ }
+ }
+ } else {
+ if let previousItemNode = headerNode.attachedToItemNode {
+ previousItemNode.attachedHeaderNodes.removeAll(where: { $0 === headerNode })
+ headerNode.attachedToItemNode = nil
+ }
+ }
}
- var previousHeaderBySpace: [AnyHashable: (id: VisibleHeaderNodeId, upperBound: CGFloat, upperBoundEdge: CGFloat, lowerBound: CGFloat, item: ListViewItemHeader, hasValidNodes: Bool)] = [:]
+ var previousHeaderBySpace: [AnyHashable: (id: VisibleHeaderNodeId, upperBound: CGFloat, upperBoundIndex: Int, upperBoundEdge: CGFloat, lowerBound: CGFloat, lowerBoundIndex: Int, item: ListViewItemHeader, hasValidNodes: Bool)] = [:]
- for itemNode in self.itemNodes {
+ for i in 0 ..< self.itemNodes.count {
+ let itemNode = self.itemNodes[i]
let itemFrame = itemNode.apparentFrame
let itemTopInset = itemNode.insets.top
var validItemHeaderSpaces: [AnyHashable] = []
@@ -3458,16 +3501,16 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
itemMaxY = itemFrame.maxY - (self.rotated ? itemNode.insets.top : itemNode.insets.bottom)
}
- if let (previousHeaderId, previousUpperBound, previousUpperBoundEdge, previousLowerBound, previousHeaderItem, hasValidNodes) = previousHeaderBySpace[itemHeader.id.space] {
+ if let (previousHeaderId, previousUpperBound, previousUpperIndex, previousUpperBoundEdge, previousLowerBound, previousLowerIndex, previousHeaderItem, hasValidNodes) = previousHeaderBySpace[itemHeader.id.space] {
if previousHeaderId == headerId {
- previousHeaderBySpace[itemHeader.id.space] = (previousHeaderId, previousUpperBound, previousUpperBoundEdge, itemMaxY, previousHeaderItem, hasValidNodes || itemNode.index != nil)
+ previousHeaderBySpace[itemHeader.id.space] = (previousHeaderId, previousUpperBound, previousUpperIndex, previousUpperBoundEdge, itemMaxY, i, previousHeaderItem, hasValidNodes || itemNode.index != nil)
} else {
- addHeader(id: previousHeaderId, upperBound: previousUpperBound, upperBoundEdge: previousUpperBoundEdge, lowerBound: previousLowerBound, item: previousHeaderItem, hasValidNodes: hasValidNodes)
+ addHeader(id: previousHeaderId, upperBound: previousUpperBound, upperIndex: previousUpperIndex, upperBoundEdge: previousUpperBoundEdge, lowerBound: previousLowerBound, lowerIndex: previousLowerIndex, item: previousHeaderItem, hasValidNodes: hasValidNodes)
- previousHeaderBySpace[itemHeader.id.space] = (headerId, itemFrame.minY, itemFrame.minY + itemTopInset, itemMaxY, itemHeader, itemNode.index != nil)
+ previousHeaderBySpace[itemHeader.id.space] = (headerId, itemFrame.minY, i, itemFrame.minY + itemTopInset, itemMaxY, i, itemHeader, itemNode.index != nil)
}
} else {
- previousHeaderBySpace[itemHeader.id.space] = (headerId, itemFrame.minY, itemFrame.minY + itemTopInset, itemMaxY, itemHeader, itemNode.index != nil)
+ previousHeaderBySpace[itemHeader.id.space] = (headerId, itemFrame.minY, i, itemFrame.minY + itemTopInset, itemMaxY, i, itemHeader, itemNode.index != nil)
}
}
}
@@ -3477,18 +3520,18 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
continue
}
- let (previousHeaderId, previousUpperBound, previousUpperBoundEdge, previousLowerBound, previousHeaderItem, hasValidNodes) = previousHeader
+ let (previousHeaderId, previousUpperBound, previousUpperIndex, previousUpperBoundEdge, previousLowerBound, previousLowerIndex, previousHeaderItem, hasValidNodes) = previousHeader
- addHeader(id: previousHeaderId, upperBound: previousUpperBound, upperBoundEdge: previousUpperBoundEdge, lowerBound: previousLowerBound, item: previousHeaderItem, hasValidNodes: hasValidNodes)
+ addHeader(id: previousHeaderId, upperBound: previousUpperBound, upperIndex: previousUpperIndex, upperBoundEdge: previousUpperBoundEdge, lowerBound: previousLowerBound, lowerIndex: previousLowerIndex, item: previousHeaderItem, hasValidNodes: hasValidNodes)
previousHeaderBySpace.removeValue(forKey: space)
}
}
for (space, previousHeader) in previousHeaderBySpace {
- let (previousHeaderId, previousUpperBound, previousUpperBoundEdge, previousLowerBound, previousHeaderItem, hasValidNodes) = previousHeader
+ let (previousHeaderId, previousUpperBound, previousUpperIndex, previousUpperBoundEdge, previousLowerBound, previousLowerIndex, previousHeaderItem, hasValidNodes) = previousHeader
- addHeader(id: previousHeaderId, upperBound: previousUpperBound, upperBoundEdge: previousUpperBoundEdge, lowerBound: previousLowerBound, item: previousHeaderItem, hasValidNodes: hasValidNodes)
+ addHeader(id: previousHeaderId, upperBound: previousUpperBound, upperIndex: previousUpperIndex, upperBoundEdge: previousUpperBoundEdge, lowerBound: previousLowerBound, lowerIndex: previousLowerIndex, item: previousHeaderItem, hasValidNodes: hasValidNodes)
previousHeaderBySpace.removeValue(forKey: space)
}
diff --git a/submodules/Display/Source/ListViewItemHeader.swift b/submodules/Display/Source/ListViewItemHeader.swift
index dcbbffb286..6356694670 100644
--- a/submodules/Display/Source/ListViewItemHeader.swift
+++ b/submodules/Display/Source/ListViewItemHeader.swift
@@ -13,6 +13,8 @@ public protocol ListViewItemHeader: AnyObject {
var stickDirection: ListViewItemHeaderStickDirection { get }
var height: CGFloat { get }
var stickOverInsets: Bool { get }
+
+ func combinesWith(other: ListViewItemHeader) -> Bool
func node(synchronousLoad: Bool) -> ListViewItemHeaderNode
func updateNode(_ node: ListViewItemHeaderNode, previous: ListViewItemHeader?, next: ListViewItemHeader?)
@@ -25,6 +27,7 @@ open class ListViewItemHeaderNode: ASDisplayNode {
final private(set) var internalStickLocationDistanceFactor: CGFloat = 0.0
final var internalStickLocationDistance: CGFloat = 0.0
private var isFlashingOnScrolling = false
+ weak var attachedToItemNode: ListViewItemNode?
var item: ListViewItemHeader?
diff --git a/submodules/Display/Source/ListViewItemNode.swift b/submodules/Display/Source/ListViewItemNode.swift
index 0322282174..8b0803b233 100644
--- a/submodules/Display/Source/ListViewItemNode.swift
+++ b/submodules/Display/Source/ListViewItemNode.swift
@@ -129,6 +129,11 @@ open class ListViewItemNode: ASDisplayNode, AccessibilityFocusableNode {
final var tempHeaderSpaceAffinities: [ListViewItemNode.HeaderId: Int] = [:]
final var headerSpaceAffinities: [ListViewItemNode.HeaderId: Int] = [:]
+
+ public internal(set) var attachedHeaderNodes: [ListViewItemHeaderNode] = []
+
+ open func attachedHeaderNodesUpdated() {
+ }
final let wantsScrollDynamics: Bool
diff --git a/submodules/EncryptionKeyVisualization/BUILD b/submodules/EncryptionKeyVisualization/BUILD
index 6717c60e4f..f19adbb6ab 100644
--- a/submodules/EncryptionKeyVisualization/BUILD
+++ b/submodules/EncryptionKeyVisualization/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/EncryptionKeyVisualization/Impl:EncryptionKeyVisualizationImpl",
],
visibility = [
diff --git a/submodules/EncryptionKeyVisualization/Sources/SecretChatKeyVisualization.swift b/submodules/EncryptionKeyVisualization/Sources/SecretChatKeyVisualization.swift
index 90a83ea5a9..7e68d630f6 100644
--- a/submodules/EncryptionKeyVisualization/Sources/SecretChatKeyVisualization.swift
+++ b/submodules/EncryptionKeyVisualization/Sources/SecretChatKeyVisualization.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import EncryptionKeyVisualizationImpl
public func secretChatKeyImage(_ fingerprint: SecretChatKeyFingerprint, size: CGSize) -> UIImage? {
diff --git a/submodules/FileMediaResourceStatus/BUILD b/submodules/FileMediaResourceStatus/BUILD
index b58e90917c..84090d2b33 100644
--- a/submodules/FileMediaResourceStatus/BUILD
+++ b/submodules/FileMediaResourceStatus/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
"//submodules/MediaPlayer:UniversalMediaPlayer",
],
diff --git a/submodules/FileMediaResourceStatus/Sources/FileMediaResourceStatus.swift b/submodules/FileMediaResourceStatus/Sources/FileMediaResourceStatus.swift
index 209bae920e..db4f075a66 100644
--- a/submodules/FileMediaResourceStatus/Sources/FileMediaResourceStatus.swift
+++ b/submodules/FileMediaResourceStatus/Sources/FileMediaResourceStatus.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import UniversalMediaPlayer
diff --git a/submodules/GalleryData/BUILD b/submodules/GalleryData/BUILD
index 100f76b985..d433b87091 100644
--- a/submodules/GalleryData/BUILD
+++ b/submodules/GalleryData/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/AppBundle:AppBundle",
diff --git a/submodules/GalleryData/Sources/GalleryData.swift b/submodules/GalleryData/Sources/GalleryData.swift
index ba873e0d3c..4cc8b1b532 100644
--- a/submodules/GalleryData/Sources/GalleryData.swift
+++ b/submodules/GalleryData/Sources/GalleryData.swift
@@ -3,7 +3,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import PassKit
import Lottie
diff --git a/submodules/GalleryUI/BUILD b/submodules/GalleryUI/BUILD
index 59860c2bf8..115b6fc4b4 100644
--- a/submodules/GalleryUI/BUILD
+++ b/submodules/GalleryUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TextFormat:TextFormat",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift b/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift
index 592120b113..5ebe3a5a8f 100644
--- a/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift
+++ b/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Photos
import TelegramPresentationData
@@ -536,7 +535,7 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll
func setup(origin: GalleryItemOriginData?, caption: NSAttributedString) {
let titleText = origin?.title
- let dateText = origin?.timestamp.flatMap { humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: $0).0 }
+ let dateText = origin?.timestamp.flatMap { humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: $0).string }
if self.currentMessageText != caption || self.currentAuthorNameText != titleText || self.currentDateText != dateText {
self.currentMessageText = caption
@@ -638,7 +637,7 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll
authorNameText = peer.displayTitle(strings: self.strings, displayOrder: self.nameOrder)
}
- var dateText = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: message.timestamp).0
+ var dateText = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: message.timestamp).string
if !displayInfo {
authorNameText = ""
dateText = ""
@@ -1036,7 +1035,7 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll
if isChannel {
globalTitle = strongSelf.strings.Common_Delete
} else if let personalPeerName = personalPeerName {
- globalTitle = strongSelf.strings.Conversation_DeleteMessagesFor(personalPeerName).0
+ globalTitle = strongSelf.strings.Conversation_DeleteMessagesFor(personalPeerName).string
} else {
globalTitle = strongSelf.strings.Conversation_DeleteMessagesForEveryone
}
@@ -1198,14 +1197,14 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0 : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0 : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0 : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -1262,14 +1261,14 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0 : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0 : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0 : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -1387,14 +1386,14 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0
+ text = presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0
+ text = presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0
+ text = presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
diff --git a/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift b/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift
index dcb3b6d743..6c0bebacfd 100644
--- a/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift
+++ b/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import UniversalMediaPlayer
@@ -236,7 +235,7 @@ final class ChatVideoGalleryItemScrubberView: UIView {
case .Remote:
text = dataSizeString(fileSize, forceDecimal: true, formatting: formatting)
case let .Fetching(_, progress):
- text = strings.DownloadingStatus(dataSizeString(Int64(Float(fileSize) * progress), forceDecimal: true, formatting: formatting), dataSizeString(fileSize, forceDecimal: true, formatting: formatting)).0
+ text = strings.DownloadingStatus(dataSizeString(Int64(Float(fileSize) * progress), forceDecimal: true, formatting: formatting), dataSizeString(fileSize, forceDecimal: true, formatting: formatting)).string
default:
text = ""
}
diff --git a/submodules/GalleryUI/Sources/GalleryController.swift b/submodules/GalleryUI/Sources/GalleryController.swift
index cb1bce5c5b..1cef4d5fe8 100644
--- a/submodules/GalleryUI/Sources/GalleryController.swift
+++ b/submodules/GalleryUI/Sources/GalleryController.swift
@@ -6,7 +6,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SafariServices
import TelegramPresentationData
import TextFormat
diff --git a/submodules/GalleryUI/Sources/GalleryTitleView.swift b/submodules/GalleryUI/Sources/GalleryTitleView.swift
index 475efaa33d..c61e8213b4 100644
--- a/submodules/GalleryUI/Sources/GalleryTitleView.swift
+++ b/submodules/GalleryUI/Sources/GalleryTitleView.swift
@@ -34,7 +34,7 @@ final class GalleryTitleView: UIView, NavigationBarTitleView {
func setMessage(_ message: Message, presentationData: PresentationData, accountPeerId: PeerId) {
let authorNameText = stringForFullAuthorName(message: message, strings: presentationData.strings, nameDisplayOrder: presentationData.nameDisplayOrder, accountPeerId: accountPeerId)
- let dateText = humanReadableStringForTimestamp(strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, timestamp: message.timestamp).0
+ let dateText = humanReadableStringForTimestamp(strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, timestamp: message.timestamp).string
self.authorNameNode.attributedText = NSAttributedString(string: authorNameText, font: titleFont, textColor: .white)
self.dateNode.attributedText = NSAttributedString(string: dateText, font: dateFont, textColor: .white)
diff --git a/submodules/GalleryUI/Sources/Items/ChatAnimationGalleryItem.swift b/submodules/GalleryUI/Sources/Items/ChatAnimationGalleryItem.swift
index 3deeab5929..87078d9697 100644
--- a/submodules/GalleryUI/Sources/Items/ChatAnimationGalleryItem.swift
+++ b/submodules/GalleryUI/Sources/Items/ChatAnimationGalleryItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Lottie
import TelegramPresentationData
import AnimationUI
diff --git a/submodules/GalleryUI/Sources/Items/ChatDocumentGalleryItem.swift b/submodules/GalleryUI/Sources/Items/ChatDocumentGalleryItem.swift
index 1bb838437d..12829f7c15 100644
--- a/submodules/GalleryUI/Sources/Items/ChatDocumentGalleryItem.swift
+++ b/submodules/GalleryUI/Sources/Items/ChatDocumentGalleryItem.swift
@@ -6,7 +6,6 @@ import Display
import SwiftSignalKit
import WebKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import RadialStatusNode
@@ -44,7 +43,7 @@ class ChatDocumentGalleryItem: GalleryItem {
}
if let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").string))
}
node.setMessage(self.message)
@@ -53,7 +52,7 @@ class ChatDocumentGalleryItem: GalleryItem {
func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? ChatDocumentGalleryItemNode, let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").string))
node.setMessage(self.message)
}
}
diff --git a/submodules/GalleryUI/Sources/Items/ChatExternalFileGalleryItem.swift b/submodules/GalleryUI/Sources/Items/ChatExternalFileGalleryItem.swift
index 620eefdffe..1dadd77a30 100644
--- a/submodules/GalleryUI/Sources/Items/ChatExternalFileGalleryItem.swift
+++ b/submodules/GalleryUI/Sources/Items/ChatExternalFileGalleryItem.swift
@@ -6,7 +6,6 @@ import Display
import SwiftSignalKit
import WebKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import RadialStatusNode
@@ -45,7 +44,7 @@ class ChatExternalFileGalleryItem: GalleryItem {
}
if let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").string))
}
node.setMessage(self.message)
@@ -54,7 +53,7 @@ class ChatExternalFileGalleryItem: GalleryItem {
func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? ChatExternalFileGalleryItemNode, let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").string))
node.setMessage(self.message)
}
}
diff --git a/submodules/GalleryUI/Sources/Items/ChatImageGalleryItem.swift b/submodules/GalleryUI/Sources/Items/ChatImageGalleryItem.swift
index 8699695bb8..c02208680d 100644
--- a/submodules/GalleryUI/Sources/Items/ChatImageGalleryItem.swift
+++ b/submodules/GalleryUI/Sources/Items/ChatImageGalleryItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import RadialStatusNode
@@ -142,7 +141,7 @@ class ChatImageGalleryItem: GalleryItem {
}
if let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").string))
}
if self.displayInfoOnTop {
@@ -155,7 +154,7 @@ class ChatImageGalleryItem: GalleryItem {
func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? ChatImageGalleryItemNode, let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.index + 1)", "\(location.count)").string))
if self.displayInfoOnTop {
node.titleContentView?.setMessage(self.message, presentationData: self.presentationData, accountPeerId: self.context.account.peerId)
diff --git a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift
index 980337b2a2..deaa3f35ac 100644
--- a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift
+++ b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Display
import Postbox
import TelegramPresentationData
@@ -81,7 +80,7 @@ public class UniversalVideoGalleryItem: GalleryItem {
let node = UniversalVideoGalleryItemNode(context: self.context, presentationData: self.presentationData, performAction: self.performAction, openActionOptions: self.openActionOptions, present: self.present)
if let indexData = self.indexData {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").string))
}
node.setupItem(self)
@@ -96,7 +95,7 @@ public class UniversalVideoGalleryItem: GalleryItem {
public func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? UniversalVideoGalleryItemNode {
if let indexData = self.indexData {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").string))
}
node.setupItem(self)
diff --git a/submodules/GalleryUI/Sources/SecretMediaPreviewController.swift b/submodules/GalleryUI/Sources/SecretMediaPreviewController.swift
index 2c13ac340f..53dc555da1 100644
--- a/submodules/GalleryUI/Sources/SecretMediaPreviewController.swift
+++ b/submodules/GalleryUI/Sources/SecretMediaPreviewController.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
@@ -314,12 +313,12 @@ public final class SecretMediaPreviewController: ViewController {
let text: String
if let file = media as? TelegramMediaFile {
if file.isAnimated {
- text = strongSelf.presentationData.strings.SecretGIF_NotViewedYet(peerTitle).0
+ text = strongSelf.presentationData.strings.SecretGIF_NotViewedYet(peerTitle).string
} else {
- text = strongSelf.presentationData.strings.SecretVideo_NotViewedYet(peerTitle).0
+ text = strongSelf.presentationData.strings.SecretVideo_NotViewedYet(peerTitle).string
}
} else {
- text = strongSelf.presentationData.strings.SecretImage_NotViewedYet(peerTitle).0
+ text = strongSelf.presentationData.strings.SecretImage_NotViewedYet(peerTitle).string
}
contentNode.setText(text)
strongSelf.controllerNode.updatePresentationState({
diff --git a/submodules/GalleryUI/Sources/SecretMediaPreviewFooterContentNode.swift b/submodules/GalleryUI/Sources/SecretMediaPreviewFooterContentNode.swift
index 137cb8362c..83c482b68f 100644
--- a/submodules/GalleryUI/Sources/SecretMediaPreviewFooterContentNode.swift
+++ b/submodules/GalleryUI/Sources/SecretMediaPreviewFooterContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
private let textFont = Font.regular(16.0)
diff --git a/submodules/GameUI/BUILD b/submodules/GameUI/BUILD
index 961e601e34..b12e125010 100644
--- a/submodules/GameUI/BUILD
+++ b/submodules/GameUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/ShareController:ShareController",
diff --git a/submodules/GameUI/Sources/GameController.swift b/submodules/GameUI/Sources/GameController.swift
index 5b77a2a9f8..5472afc754 100644
--- a/submodules/GameUI/Sources/GameController.swift
+++ b/submodules/GameUI/Sources/GameController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/GameUI/Sources/GameControllerNode.swift b/submodules/GameUI/Sources/GameControllerNode.swift
index 02ef5c9839..5a7a17d15a 100644
--- a/submodules/GameUI/Sources/GameControllerNode.swift
+++ b/submodules/GameUI/Sources/GameControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import WebKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/GameUI/Sources/GameControllerTitleView.swift b/submodules/GameUI/Sources/GameControllerTitleView.swift
index 6c565228a9..eec1b30b07 100644
--- a/submodules/GameUI/Sources/GameControllerTitleView.swift
+++ b/submodules/GameUI/Sources/GameControllerTitleView.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/GraphUI/BUILD b/submodules/GraphUI/BUILD
index c815a189db..376406b82d 100644
--- a/submodules/GraphUI/BUILD
+++ b/submodules/GraphUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/HashtagSearchUI/BUILD b/submodules/HashtagSearchUI/BUILD
index 40d2b21af0..76911cd41d 100644
--- a/submodules/HashtagSearchUI/BUILD
+++ b/submodules/HashtagSearchUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramBaseController:TelegramBaseController",
diff --git a/submodules/HashtagSearchUI/Sources/HashtagSearchController.swift b/submodules/HashtagSearchUI/Sources/HashtagSearchController.swift
index 982a409f23..2976f02ba7 100644
--- a/submodules/HashtagSearchUI/Sources/HashtagSearchController.swift
+++ b/submodules/HashtagSearchUI/Sources/HashtagSearchController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/HashtagSearchUI/Sources/HashtagSearchControllerNode.swift b/submodules/HashtagSearchUI/Sources/HashtagSearchControllerNode.swift
index b7b0f16a86..477a463690 100644
--- a/submodules/HashtagSearchUI/Sources/HashtagSearchControllerNode.swift
+++ b/submodules/HashtagSearchUI/Sources/HashtagSearchControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import ChatListUI
@@ -33,7 +32,7 @@ final class HashtagSearchControllerNode: ASDisplayNode {
self.query = query
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
self.toolbarBackgroundNode = NavigationBackgroundNode(color: theme.rootController.navigationBar.blurredBackgroundColor)
diff --git a/submodules/HorizontalPeerItem/BUILD b/submodules/HorizontalPeerItem/BUILD
index 2e07cf9c20..6fcfc15a69 100644
--- a/submodules/HorizontalPeerItem/BUILD
+++ b/submodules/HorizontalPeerItem/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/TelegramPresentationData:TelegramPresentationData",
diff --git a/submodules/HorizontalPeerItem/Sources/HorizontalPeerItem.swift b/submodules/HorizontalPeerItem/Sources/HorizontalPeerItem.swift
index c503696c27..fdb191dd2e 100644
--- a/submodules/HorizontalPeerItem/Sources/HorizontalPeerItem.swift
+++ b/submodules/HorizontalPeerItem/Sources/HorizontalPeerItem.swift
@@ -4,7 +4,6 @@ import Display
import Postbox
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramStringFormatting
diff --git a/submodules/ImportStickerPackUI/BUILD b/submodules/ImportStickerPackUI/BUILD
index dda51cbc8b..38960140a3 100644
--- a/submodules/ImportStickerPackUI/BUILD
+++ b/submodules/ImportStickerPackUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/ImportStickerPackUI/Sources/ImportStickerPackController.swift b/submodules/ImportStickerPackUI/Sources/ImportStickerPackController.swift
index b49309f8bd..4fb5ca1240 100644
--- a/submodules/ImportStickerPackUI/Sources/ImportStickerPackController.swift
+++ b/submodules/ImportStickerPackUI/Sources/ImportStickerPackController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/ImportStickerPackUI/Sources/ImportStickerPackControllerNode.swift b/submodules/ImportStickerPackUI/Sources/ImportStickerPackControllerNode.swift
index c2e27298a8..5e0010ada7 100644
--- a/submodules/ImportStickerPackUI/Sources/ImportStickerPackControllerNode.swift
+++ b/submodules/ImportStickerPackUI/Sources/ImportStickerPackControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
@@ -513,7 +512,7 @@ final class ImportStickerPackControllerNode: ViewControllerTracingNode, UIScroll
self.radialStatusText.attributedText = NSAttributedString(string: "\(Int(effectiveProgress * 100.0))%", font: Font.with(size: floor(36.0 * maxK), design: .round, weight: .semibold), textColor: self.presentationData.theme.list.itemPrimaryTextColor)
let radialStatusTextSize = self.radialStatusText.updateLayout(CGSize(width: 200.0, height: .greatestFiniteMagnitude))
- self.progressText.attributedText = NSAttributedString(string: self.presentationData.strings.ImportStickerPack_Of(String(count), String(total)).0, font: Font.semibold(17.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor)
+ self.progressText.attributedText = NSAttributedString(string: self.presentationData.strings.ImportStickerPack_Of(String(count), String(total)).string, font: Font.semibold(17.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor)
let progressTextSize = self.progressText.updateLayout(CGSize(width: layout.size.width - 16.0 * 2.0, height: .greatestFiniteMagnitude))
self.infoText.attributedText = NSAttributedString(string: self.presentationData.strings.ImportStickerPack_InProgress, font: Font.regular(17.0), textColor: self.presentationData.theme.list.itemSecondaryTextColor)
@@ -678,7 +677,7 @@ final class ImportStickerPackControllerNode: ViewControllerTracingNode, UIScroll
if let firstStickerItem = firstStickerItem, let resource = firstStickerItem.resource as? TelegramMediaResource {
firstItem = StickerPackItem(index: ItemCollectionItemIndex(index: 0, id: 0), file: TelegramMediaFile(fileId: MediaId(namespace: 0, id: 0), partialReference: nil, resource: resource, previewRepresentations: [], videoThumbnails: [], immediateThumbnailData: nil, mimeType: stickerPack.isAnimated ? "application/x-tgsticker": "image/png", size: nil, attributes: [.FileName(fileName: stickerPack.isAnimated ? "sticker.tgs" : "sticker.png"), .ImageSize(size: firstStickerItem.dimensions)]), indexKeys: [])
}
- strongSelf.presentInGlobalOverlay?(UndoOverlayController(presentationData: strongSelf.presentationData, content: .stickersModified(title: strongSelf.presentationData.strings.StickerPackActionInfo_AddedTitle, text: strongSelf.presentationData.strings.StickerPackActionInfo_AddedText(info.title).0, undo: false, info: info, topItem: firstItem ?? items.first, context: strongSelf.context), elevatedLayout: false, action: { action in
+ strongSelf.presentInGlobalOverlay?(UndoOverlayController(presentationData: strongSelf.presentationData, content: .stickersModified(title: strongSelf.presentationData.strings.StickerPackActionInfo_AddedTitle, text: strongSelf.presentationData.strings.StickerPackActionInfo_AddedText(info.title).string, undo: false, info: info, topItem: firstItem ?? items.first, context: strongSelf.context), elevatedLayout: false, action: { action in
if case .info = action {
(navigationController?.viewControllers.last as? ViewController)?.present(StickerPackScreen(context: context, mode: .settings, mainStickerPack: .id(id: info.id.id, accessHash: info.accessHash), stickerPacks: [], parentNavigationController: navigationController, actionPerformed: { _, _, _ in
}), in: .window(.root))
diff --git a/submodules/ImportStickerPackUI/Sources/ImportStickerPackTitleController.swift b/submodules/ImportStickerPackUI/Sources/ImportStickerPackTitleController.swift
index d07f6b3078..1b3ce7f95f 100644
--- a/submodules/ImportStickerPackUI/Sources/ImportStickerPackTitleController.swift
+++ b/submodules/ImportStickerPackUI/Sources/ImportStickerPackTitleController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import UrlEscaping
diff --git a/submodules/ImportStickerPackUI/Sources/StickerPackPreviewGridItem.swift b/submodules/ImportStickerPackUI/Sources/StickerPackPreviewGridItem.swift
index cf334e4a36..ae862e592c 100644
--- a/submodules/ImportStickerPackUI/Sources/StickerPackPreviewGridItem.swift
+++ b/submodules/ImportStickerPackUI/Sources/StickerPackPreviewGridItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/ImportStickerPackUI/Sources/StickerPreviewPeekContent.swift b/submodules/ImportStickerPackUI/Sources/StickerPreviewPeekContent.swift
index b0add8eb54..cac2126712 100644
--- a/submodules/ImportStickerPackUI/Sources/StickerPreviewPeekContent.swift
+++ b/submodules/ImportStickerPackUI/Sources/StickerPreviewPeekContent.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import StickerResources
import AnimatedStickerNode
diff --git a/submodules/InstantPageCache/BUILD b/submodules/InstantPageCache/BUILD
index 3294de3829..1dd01739ff 100644
--- a/submodules/InstantPageCache/BUILD
+++ b/submodules/InstantPageCache/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/InstantPageCache/Sources/CachedInstantPages.swift b/submodules/InstantPageCache/Sources/CachedInstantPages.swift
index f3e618d852..8b528633c6 100644
--- a/submodules/InstantPageCache/Sources/CachedInstantPages.swift
+++ b/submodules/InstantPageCache/Sources/CachedInstantPages.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import PersistentStringHash
diff --git a/submodules/InstantPageUI/BUILD b/submodules/InstantPageUI/BUILD
index b93d38409d..1a19aa0ed7 100644
--- a/submodules/InstantPageUI/BUILD
+++ b/submodules/InstantPageUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/GalleryUI:GalleryUI",
diff --git a/submodules/InstantPageUI/Sources/InstantImageGalleryItem.swift b/submodules/InstantPageUI/Sources/InstantImageGalleryItem.swift
index 1a743ad3c8..34845f3f13 100644
--- a/submodules/InstantPageUI/Sources/InstantImageGalleryItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantImageGalleryItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import PhotoResources
@@ -68,7 +67,7 @@ class InstantImageGalleryItem: GalleryItem {
node.setImage(imageReference: self.imageReference)
if let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.position + 1)", "\(location.totalCount)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.position + 1)", "\(location.totalCount)").string))
}
node.setCaption(self.caption, credit: self.credit)
@@ -79,7 +78,7 @@ class InstantImageGalleryItem: GalleryItem {
func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? InstantImageGalleryItemNode {
if let location = self.location {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.position + 1)", "\(location.totalCount)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(location.position + 1)", "\(location.totalCount)").string))
}
node.setCaption(self.caption, credit: self.credit)
diff --git a/submodules/InstantPageUI/Sources/InstantPageAnchorItem.swift b/submodules/InstantPageUI/Sources/InstantPageAnchorItem.swift
index 9dc2305790..44bbcd1fc4 100644
--- a/submodules/InstantPageUI/Sources/InstantPageAnchorItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageAnchorItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageArticleItem.swift b/submodules/InstantPageUI/Sources/InstantPageArticleItem.swift
index c188042ead..5e261f10e0 100644
--- a/submodules/InstantPageUI/Sources/InstantPageArticleItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageArticleItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageArticleNode.swift b/submodules/InstantPageUI/Sources/InstantPageArticleNode.swift
index 3173b5f033..7bde8c039c 100644
--- a/submodules/InstantPageUI/Sources/InstantPageArticleNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageArticleNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/InstantPageUI/Sources/InstantPageAudioItem.swift b/submodules/InstantPageUI/Sources/InstantPageAudioItem.swift
index 024b3148f7..f153258914 100644
--- a/submodules/InstantPageUI/Sources/InstantPageAudioItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageAudioItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageAudioNode.swift b/submodules/InstantPageUI/Sources/InstantPageAudioNode.swift
index b0e395ec01..b4d8b96eb1 100644
--- a/submodules/InstantPageUI/Sources/InstantPageAudioNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageAudioNode.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import AsyncDisplayKit
diff --git a/submodules/InstantPageUI/Sources/InstantPageContentNode.swift b/submodules/InstantPageUI/Sources/InstantPageContentNode.swift
index 897fba5a63..30026bb0e6 100644
--- a/submodules/InstantPageUI/Sources/InstantPageContentNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageController.swift b/submodules/InstantPageUI/Sources/InstantPageController.swift
index a4502426d2..776dcfb509 100644
--- a/submodules/InstantPageUI/Sources/InstantPageController.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageController.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
diff --git a/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift b/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift
index 19e09fbc4f..e032ada47b 100644
--- a/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Display
diff --git a/submodules/InstantPageUI/Sources/InstantPageDetailsItem.swift b/submodules/InstantPageUI/Sources/InstantPageDetailsItem.swift
index 681f993b8e..a6f7c8e0b6 100644
--- a/submodules/InstantPageUI/Sources/InstantPageDetailsItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageDetailsItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import Display
import TelegramPresentationData
diff --git a/submodules/InstantPageUI/Sources/InstantPageDetailsNode.swift b/submodules/InstantPageUI/Sources/InstantPageDetailsNode.swift
index 740e8c3f38..c7b3589573 100644
--- a/submodules/InstantPageUI/Sources/InstantPageDetailsNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageDetailsNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageFeedbackItem.swift b/submodules/InstantPageUI/Sources/InstantPageFeedbackItem.swift
index 6d7092f015..14cfe67406 100644
--- a/submodules/InstantPageUI/Sources/InstantPageFeedbackItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageFeedbackItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageFeedbackNode.swift b/submodules/InstantPageUI/Sources/InstantPageFeedbackNode.swift
index 02f155b17c..bc641baa98 100644
--- a/submodules/InstantPageUI/Sources/InstantPageFeedbackNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageFeedbackNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
@@ -73,8 +72,8 @@ final class InstantPageFeedbackNode: ASDisplayNode, InstantPageNode {
}
@objc func buttonPressed() {
- self.resolveDisposable.set((self.context.engine.peers.resolvePeerByName(name: "previews") |> deliverOnMainQueue).start(next: { [weak self] peerId in
- if let strongSelf = self, let _ = peerId, let webPageId = strongSelf.webPage.id?.id {
+ self.resolveDisposable.set((self.context.engine.peers.resolvePeerByName(name: "previews") |> deliverOnMainQueue).start(next: { [weak self] peer in
+ if let strongSelf = self, let _ = peer, let webPageId = strongSelf.webPage.id?.id {
strongSelf.openUrl(InstantPageUrlItem(url: "https://t.me/previews?start=webpage\(webPageId)", webpageId: nil))
}
}))
diff --git a/submodules/InstantPageUI/Sources/InstantPageGalleryController.swift b/submodules/InstantPageUI/Sources/InstantPageGalleryController.swift
index 5f9ec94ef5..4ff0a69ed9 100644
--- a/submodules/InstantPageUI/Sources/InstantPageGalleryController.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageGalleryController.swift
@@ -6,7 +6,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SafariServices
import TelegramPresentationData
import AccountContext
diff --git a/submodules/InstantPageUI/Sources/InstantPageGalleryFooterContentNode.swift b/submodules/InstantPageUI/Sources/InstantPageGalleryFooterContentNode.swift
index bd4b821ef2..e55f6ffdea 100644
--- a/submodules/InstantPageUI/Sources/InstantPageGalleryFooterContentNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageGalleryFooterContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Photos
import TelegramPresentationData
diff --git a/submodules/InstantPageUI/Sources/InstantPageImageItem.swift b/submodules/InstantPageUI/Sources/InstantPageImageItem.swift
index 3a6d1da89a..ac9f99c4fa 100644
--- a/submodules/InstantPageUI/Sources/InstantPageImageItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageImageItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageImageNode.swift b/submodules/InstantPageUI/Sources/InstantPageImageNode.swift
index a63f6dbc28..9d7eb5d2b0 100644
--- a/submodules/InstantPageUI/Sources/InstantPageImageNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageImageNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/InstantPageUI/Sources/InstantPageItem.swift b/submodules/InstantPageUI/Sources/InstantPageItem.swift
index 436678bf5a..9bf8e57fc9 100644
--- a/submodules/InstantPageUI/Sources/InstantPageItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageLayout.swift b/submodules/InstantPageUI/Sources/InstantPageLayout.swift
index a57edfc0ac..a802fc10a2 100644
--- a/submodules/InstantPageUI/Sources/InstantPageLayout.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageLayout.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import TelegramPresentationData
@@ -124,7 +123,7 @@ func layoutInstantPageBlock(webpage: TelegramMediaWebpage, rtl: Bool, block: Ins
} else {
if date != 0 {
let dateText = RichText.plain(stringForDate(date))
- let formatString = strings.InstantPage_AuthorAndDateTitle("%1$@", "%2$@").0
+ let formatString = strings.InstantPage_AuthorAndDateTitle("%1$@", "%2$@").string
let authorRange = formatString.range(of: "%1$@")!
let dateRange = formatString.range(of: "%2$@")!
@@ -780,7 +779,7 @@ func layoutInstantPageBlock(webpage: TelegramMediaWebpage, rtl: Bool, block: Ins
if article.author != nil || article.date != nil {
if let author = article.author {
if let date = article.date {
- subtext = strings.InstantPage_RelatedArticleAuthorAndDateTitle(author, stringForDate(date)).0
+ subtext = strings.InstantPage_RelatedArticleAuthorAndDateTitle(author, stringForDate(date)).string
} else {
subtext = author
}
diff --git a/submodules/InstantPageUI/Sources/InstantPageLayoutSpacings.swift b/submodules/InstantPageUI/Sources/InstantPageLayoutSpacings.swift
index 4690aede4f..0f95764937 100644
--- a/submodules/InstantPageUI/Sources/InstantPageLayoutSpacings.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageLayoutSpacings.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
func spacingBetweenBlocks(upper: InstantPageBlock?, lower: InstantPageBlock?) -> CGFloat {
if let upper = upper, let lower = lower {
diff --git a/submodules/InstantPageUI/Sources/InstantPageMedia.swift b/submodules/InstantPageUI/Sources/InstantPageMedia.swift
index a9f36fcbe7..757ba68a04 100644
--- a/submodules/InstantPageUI/Sources/InstantPageMedia.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageMedia.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
public struct InstantPageMedia: Equatable {
public let index: Int
diff --git a/submodules/InstantPageUI/Sources/InstantPageMediaPlaylist.swift b/submodules/InstantPageUI/Sources/InstantPageMediaPlaylist.swift
index 715812955f..25fdfb9d3c 100644
--- a/submodules/InstantPageUI/Sources/InstantPageMediaPlaylist.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageMediaPlaylist.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import AccountContext
import MusicAlbumArtResources
diff --git a/submodules/InstantPageUI/Sources/InstantPagePeerReferenceItem.swift b/submodules/InstantPageUI/Sources/InstantPagePeerReferenceItem.swift
index 86075eba4e..1337b368c4 100644
--- a/submodules/InstantPageUI/Sources/InstantPagePeerReferenceItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPagePeerReferenceItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPagePeerReferenceNode.swift b/submodules/InstantPageUI/Sources/InstantPagePeerReferenceNode.swift
index 642c6b5c51..93ab63ca74 100644
--- a/submodules/InstantPageUI/Sources/InstantPagePeerReferenceNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPagePeerReferenceNode.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import AsyncDisplayKit
@@ -152,11 +151,9 @@ final class InstantPagePeerReferenceNode: ASDisplayNode, InstantPageNode {
|> mapToSignal({ peer -> Signal in
if let peer = peer as? TelegramChannel, let username = peer.username, peer.accessHash == nil {
return .single(peer) |> then(context.engine.peers.resolvePeerByName(name: username)
- |> mapToSignal({ peerId -> Signal in
- if let peerId = peerId {
- return account.postbox.transaction({ transaction -> Peer in
- return transaction.getPeer(peerId) ?? peer
- })
+ |> mapToSignal({ updatedPeer -> Signal in
+ if let updatedPeer = updatedPeer {
+ return .single(updatedPeer._asPeer())
} else {
return .single(peer)
}
diff --git a/submodules/InstantPageUI/Sources/InstantPagePlayableVideoItem.swift b/submodules/InstantPageUI/Sources/InstantPagePlayableVideoItem.swift
index 82d0b9efeb..1058f5b778 100644
--- a/submodules/InstantPageUI/Sources/InstantPagePlayableVideoItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPagePlayableVideoItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift b/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift
index b9f1dc66d5..9303a2d30b 100644
--- a/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/InstantPageUI/Sources/InstantPageReferenceController.swift b/submodules/InstantPageUI/Sources/InstantPageReferenceController.swift
index fbf69ad4c7..825827066b 100644
--- a/submodules/InstantPageUI/Sources/InstantPageReferenceController.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageReferenceController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageReferenceControllerNode.swift b/submodules/InstantPageUI/Sources/InstantPageReferenceControllerNode.swift
index 02d1007769..548b6abe1a 100644
--- a/submodules/InstantPageUI/Sources/InstantPageReferenceControllerNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageReferenceControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SafariServices
import TelegramPresentationData
import AccountContext
diff --git a/submodules/InstantPageUI/Sources/InstantPageScrollableNode.swift b/submodules/InstantPageUI/Sources/InstantPageScrollableNode.swift
index 547ae8fbf7..ab221dac9f 100644
--- a/submodules/InstantPageUI/Sources/InstantPageScrollableNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageScrollableNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import TelegramPresentationData
diff --git a/submodules/InstantPageUI/Sources/InstantPageShapeItem.swift b/submodules/InstantPageUI/Sources/InstantPageShapeItem.swift
index fe506f8626..f4508b3269 100644
--- a/submodules/InstantPageUI/Sources/InstantPageShapeItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageShapeItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageSlideshowItem.swift b/submodules/InstantPageUI/Sources/InstantPageSlideshowItem.swift
index cf0f8a9d49..358134ecc5 100644
--- a/submodules/InstantPageUI/Sources/InstantPageSlideshowItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageSlideshowItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageSlideshowItemNode.swift b/submodules/InstantPageUI/Sources/InstantPageSlideshowItemNode.swift
index 624bf4501f..72b85c6bb2 100644
--- a/submodules/InstantPageUI/Sources/InstantPageSlideshowItemNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageSlideshowItemNode.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import Display
import TelegramPresentationData
diff --git a/submodules/InstantPageUI/Sources/InstantPageStoredState.swift b/submodules/InstantPageUI/Sources/InstantPageStoredState.swift
index a9203e830e..3334d421cb 100644
--- a/submodules/InstantPageUI/Sources/InstantPageStoredState.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageStoredState.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
public final class InstantPageStoredDetailsState: PostboxCoding {
diff --git a/submodules/InstantPageUI/Sources/InstantPageSubContentNode.swift b/submodules/InstantPageUI/Sources/InstantPageSubContentNode.swift
index 1b48fd5f8c..15312dfe68 100644
--- a/submodules/InstantPageUI/Sources/InstantPageSubContentNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageSubContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageTableItem.swift b/submodules/InstantPageUI/Sources/InstantPageTableItem.swift
index 8dd07125ee..3600c0ca44 100644
--- a/submodules/InstantPageUI/Sources/InstantPageTableItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageTableItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import TelegramPresentationData
diff --git a/submodules/InstantPageUI/Sources/InstantPageTextItem.swift b/submodules/InstantPageUI/Sources/InstantPageTextItem.swift
index 60e725ca0f..1fb5c42dda 100644
--- a/submodules/InstantPageUI/Sources/InstantPageTextItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageTextItem.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Display
import Postbox
import AsyncDisplayKit
diff --git a/submodules/InstantPageUI/Sources/InstantPageTextStyleStack.swift b/submodules/InstantPageUI/Sources/InstantPageTextStyleStack.swift
index 29378e7c38..335b66684f 100644
--- a/submodules/InstantPageUI/Sources/InstantPageTextStyleStack.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageTextStyleStack.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Display
enum InstantPageTextStyle {
diff --git a/submodules/InstantPageUI/Sources/InstantPageWebEmbedItem.swift b/submodules/InstantPageUI/Sources/InstantPageWebEmbedItem.swift
index 14f06fad3f..304e0311b5 100644
--- a/submodules/InstantPageUI/Sources/InstantPageWebEmbedItem.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageWebEmbedItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/InstantPageUI/Sources/InstantPageWebEmbedNode.swift b/submodules/InstantPageUI/Sources/InstantPageWebEmbedNode.swift
index be2a1e3e8b..300745d889 100644
--- a/submodules/InstantPageUI/Sources/InstantPageWebEmbedNode.swift
+++ b/submodules/InstantPageUI/Sources/InstantPageWebEmbedNode.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import WebKit
import AsyncDisplayKit
import Display
diff --git a/submodules/InviteLinksUI/BUILD b/submodules/InviteLinksUI/BUILD
index db21edb6c5..e2a50b05fe 100644
--- a/submodules/InviteLinksUI/BUILD
+++ b/submodules/InviteLinksUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/ItemListUI:ItemListUI",
diff --git a/submodules/InviteLinksUI/Sources/InviteLinkEditController.swift b/submodules/InviteLinksUI/Sources/InviteLinkEditController.swift
index 2502a6a12c..f1f3721795 100644
--- a/submodules/InviteLinksUI/Sources/InviteLinkEditController.swift
+++ b/submodules/InviteLinksUI/Sources/InviteLinkEditController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift b/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift
index 02985f64fe..702b661f9f 100644
--- a/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift
+++ b/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift
@@ -5,7 +5,6 @@ import TelegramPresentationData
import AppBundle
import AsyncDisplayKit
import Postbox
-import SyncCore
import TelegramCore
import Display
import AccountContext
@@ -320,7 +319,7 @@ public final class InviteLinkInviteController: ViewController {
self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3)
self.listNode.verticalScrollIndicatorFollowsOverscroll = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/InviteLinksUI/Sources/InviteLinkListController.swift b/submodules/InviteLinksUI/Sources/InviteLinkListController.swift
index 973d154cd1..ff3eb6d328 100644
--- a/submodules/InviteLinksUI/Sources/InviteLinkListController.swift
+++ b/submodules/InviteLinksUI/Sources/InviteLinkListController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -311,7 +310,7 @@ private func inviteLinkListControllerEntries(presentationData: PresentationData,
entries.append(.mainLink(presentationData.theme, mainInvite, importers?.importers.prefix(3).compactMap { $0.peer.peer } ?? [], importersCount, isPublic))
if let adminPeer = admin?.peer.peer, let peer = peerViewMainPeer(view) {
let string = presentationData.strings.InviteLink_OtherPermanentLinkInfo(adminPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder))
- entries.append(.mainLinkOtherInfo(presentationData.theme, string.0))
+ entries.append(.mainLinkOtherInfo(presentationData.theme, string.string))
}
var additionalInvites: [ExportedInvitation]?
diff --git a/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift b/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift
index a13cdeb9a7..3f9b799298 100644
--- a/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift
+++ b/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift
@@ -4,12 +4,12 @@ import SwiftSignalKit
import TelegramPresentationData
import AppBundle
import AsyncDisplayKit
-import SyncCore
import Display
import QrCode
import AccountContext
import SolidRoundedButtonNode
import AnimatedStickerNode
+import TelegramCore
private func shareQrCode(context: AccountContext, link: String, view: UIView) {
let _ = (qrCode(string: link, color: .black, backgroundColor: .white, icon: .custom(UIImage(bundleImageName: "Chat/Links/QrLogo")))
diff --git a/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift b/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift
index db9cef882d..0e48540ffd 100644
--- a/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift
+++ b/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift
@@ -5,7 +5,6 @@ import TelegramPresentationData
import AppBundle
import AsyncDisplayKit
import Postbox
-import SyncCore
import TelegramCore
import Display
import AccountContext
@@ -417,7 +416,7 @@ public final class InviteLinkViewController: ViewController {
self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3)
self.listNode.verticalScrollIndicatorFollowsOverscroll = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
@@ -839,9 +838,9 @@ public final class InviteLinkViewController: ViewController {
} else {
let elapsedTime = expireDate - currentTime
if elapsedTime >= 86400 {
- subtitleText = self.presentationData.strings.InviteLink_ExpiresIn(scheduledTimeIntervalString(strings: self.presentationData.strings, value: elapsedTime)).0
+ subtitleText = self.presentationData.strings.InviteLink_ExpiresIn(scheduledTimeIntervalString(strings: self.presentationData.strings, value: elapsedTime)).string
} else {
- subtitleText = self.presentationData.strings.InviteLink_ExpiresIn(textForTimeout(value: elapsedTime)).0
+ subtitleText = self.presentationData.strings.InviteLink_ExpiresIn(textForTimeout(value: elapsedTime)).string
if self.countdownTimer == nil {
let countdownTimer = SwiftSignalKit.Timer(timeout: 1.0, repeat: true, completion: { [weak self] in
if let strongSelf = self, let layout = strongSelf.validLayout {
diff --git a/submodules/InviteLinksUI/Sources/ItemListDatePickerItem.swift b/submodules/InviteLinksUI/Sources/ItemListDatePickerItem.swift
index 53df72d767..a67088f9a8 100644
--- a/submodules/InviteLinksUI/Sources/ItemListDatePickerItem.swift
+++ b/submodules/InviteLinksUI/Sources/ItemListDatePickerItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import SwiftSignalKit
-import SyncCore
import TelegramPresentationData
import ItemListUI
import DatePickerNode
diff --git a/submodules/InviteLinksUI/Sources/ItemListInviteLinkDateLimitItem.swift b/submodules/InviteLinksUI/Sources/ItemListInviteLinkDateLimitItem.swift
index 73f3d266ad..51150154bb 100644
--- a/submodules/InviteLinksUI/Sources/ItemListInviteLinkDateLimitItem.swift
+++ b/submodules/InviteLinksUI/Sources/ItemListInviteLinkDateLimitItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import LegacyComponents
diff --git a/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift b/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift
index ee217b013e..18042da0f4 100644
--- a/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift
+++ b/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift
@@ -3,10 +3,10 @@ import UIKit
import Display
import AsyncDisplayKit
import SwiftSignalKit
-import SyncCore
import TelegramPresentationData
import ItemListUI
import ShimmerEffect
+import TelegramCore
func invitationAvailability(_ invite: ExportedInvitation) -> CGFloat {
if invite.isRevoked {
@@ -392,9 +392,9 @@ public class ItemListInviteLinkItemNode: ListViewItemNode, ItemListItemNode {
}
let elapsedTime = expireDate - currentTime
if elapsedTime >= 86400 {
- subtitleText += item.presentationData.strings.InviteLink_ExpiresIn(scheduledTimeIntervalString(strings: item.presentationData.strings, value: elapsedTime)).0
+ subtitleText += item.presentationData.strings.InviteLink_ExpiresIn(scheduledTimeIntervalString(strings: item.presentationData.strings, value: elapsedTime)).string
} else {
- subtitleText += item.presentationData.strings.InviteLink_ExpiresIn(textForTimeout(value: elapsedTime)).0
+ subtitleText += item.presentationData.strings.InviteLink_ExpiresIn(textForTimeout(value: elapsedTime)).string
}
if timerValue == nil {
timerValue = .timestamp(creation: invite.startDate ?? invite.date, deadline: expireDate)
diff --git a/submodules/InviteLinksUI/Sources/ItemListInviteLinkUsageLimitItem.swift b/submodules/InviteLinksUI/Sources/ItemListInviteLinkUsageLimitItem.swift
index e9d9410d64..af2f0d18c2 100644
--- a/submodules/InviteLinksUI/Sources/ItemListInviteLinkUsageLimitItem.swift
+++ b/submodules/InviteLinksUI/Sources/ItemListInviteLinkUsageLimitItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import LegacyComponents
diff --git a/submodules/InviteLinksUI/Sources/ItemListPermanentInviteLinkItem.swift b/submodules/InviteLinksUI/Sources/ItemListPermanentInviteLinkItem.swift
index 41355a5eb1..15c89afb94 100644
--- a/submodules/InviteLinksUI/Sources/ItemListPermanentInviteLinkItem.swift
+++ b/submodules/InviteLinksUI/Sources/ItemListPermanentInviteLinkItem.swift
@@ -4,13 +4,13 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import Postbox
-import SyncCore
import AccountContext
import TelegramPresentationData
import ItemListUI
import SolidRoundedButtonNode
import AnimatedAvatarSetNode
import ShimmerEffect
+import TelegramCore
private func actionButtonImage(color: UIColor) -> UIImage? {
return generateImage(CGSize(width: 24.0, height: 24.0), contextGenerator: { size, context in
diff --git a/submodules/ItemListAvatarAndNameInfoItem/BUILD b/submodules/ItemListAvatarAndNameInfoItem/BUILD
index 85e56c9a4d..609528ece4 100644
--- a/submodules/ItemListAvatarAndNameInfoItem/BUILD
+++ b/submodules/ItemListAvatarAndNameInfoItem/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/PeerPresenceStatusManager:PeerPresenceStatusManager",
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
diff --git a/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameItem.swift b/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameItem.swift
index f924c08da9..714ca9efdb 100644
--- a/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameItem.swift
+++ b/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/ItemListPeerItem/BUILD b/submodules/ItemListPeerItem/BUILD
index 804ffb8a2f..9d3ee832e8 100644
--- a/submodules/ItemListPeerItem/BUILD
+++ b/submodules/ItemListPeerItem/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AvatarNode:AvatarNode",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
diff --git a/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift b/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift
index 5e11e84832..1e69a77038 100644
--- a/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift
+++ b/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -1375,6 +1374,14 @@ public final class ItemListPeerItemHeader: ListViewItemHeader {
self.actionTitle = actionTitle
self.action = action
}
+
+ public func combinesWith(other: ListViewItemHeader) -> Bool {
+ if let other = other as? ItemListPeerItemHeader, other.id == self.id {
+ return true
+ } else {
+ return false
+ }
+ }
public func node(synchronousLoad: Bool) -> ListViewItemHeaderNode {
return ItemListPeerItemHeaderNode(theme: self.theme, strings: self.strings, text: self.text, additionalText: self.additionalText, actionTitle: self.actionTitle, action: self.action)
diff --git a/submodules/ItemListStickerPackItem/BUILD b/submodules/ItemListStickerPackItem/BUILD
index 83a4ae4d6e..254167a8b7 100644
--- a/submodules/ItemListStickerPackItem/BUILD
+++ b/submodules/ItemListStickerPackItem/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/ItemListUI:ItemListUI",
"//submodules/StickerResources:StickerResources",
diff --git a/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift b/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift
index 85ad2f2bc4..514e53971a 100644
--- a/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift
+++ b/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/ItemListUI/Sources/ItemListControllerNode.swift b/submodules/ItemListUI/Sources/ItemListControllerNode.swift
index 1fc89122e8..47124521f3 100644
--- a/submodules/ItemListUI/Sources/ItemListControllerNode.swift
+++ b/submodules/ItemListUI/Sources/ItemListControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
@@ -705,7 +704,7 @@ open class ItemListControllerNode: ASDisplayNode {
}
self.listNode.accessibilityPageScrolledString = { row, count in
- return transition.strings.VoiceOver_ScrollStatus(row, count).0
+ return transition.strings.VoiceOver_ScrollStatus(row, count).string
}
var updateToolbarItem = false
diff --git a/submodules/ItemListVenueItem/BUILD b/submodules/ItemListVenueItem/BUILD
index 7ca5b05b58..622c8270aa 100644
--- a/submodules/ItemListVenueItem/BUILD
+++ b/submodules/ItemListVenueItem/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/ItemListUI:ItemListUI",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/ItemListVenueItem/Sources/ItemListVenueItem.swift b/submodules/ItemListVenueItem/Sources/ItemListVenueItem.swift
index 9b4765bbdd..80d2d84b5b 100644
--- a/submodules/ItemListVenueItem/Sources/ItemListVenueItem.swift
+++ b/submodules/ItemListVenueItem/Sources/ItemListVenueItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import LocationResources
diff --git a/submodules/JoinLinkPreviewUI/BUILD b/submodules/JoinLinkPreviewUI/BUILD
index a7fb398ee0..b94598cc1b 100644
--- a/submodules/JoinLinkPreviewUI/BUILD
+++ b/submodules/JoinLinkPreviewUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/AlertUI:AlertUI",
diff --git a/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewController.swift b/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewController.swift
index d7cbb6817b..1e85c9722c 100644
--- a/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewController.swift
+++ b/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewControllerNode.swift b/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewControllerNode.swift
index d8a237ee37..5b98b47408 100644
--- a/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewControllerNode.swift
+++ b/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import ShareController
diff --git a/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewPeerContentNode.swift b/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewPeerContentNode.swift
index 0d95a46cb5..e9d6c6cd83 100644
--- a/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewPeerContentNode.swift
+++ b/submodules/JoinLinkPreviewUI/Sources/JoinLinkPreviewPeerContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AvatarNode
import AccountContext
diff --git a/submodules/LanguageLinkPreviewUI/BUILD b/submodules/LanguageLinkPreviewUI/BUILD
index 78353c0b01..4e08005b17 100644
--- a/submodules/LanguageLinkPreviewUI/BUILD
+++ b/submodules/LanguageLinkPreviewUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TextFormat:TextFormat",
diff --git a/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewContentNode.swift b/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewContentNode.swift
index 84db84a984..15b8006cb9 100644
--- a/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewContentNode.swift
+++ b/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TextFormat
import AccountContext
@@ -36,13 +35,13 @@ final class LanguageLinkPreviewContentNode: ASDisplayNode, ShareContentContainer
let text: String
if localizationInfo.totalStringCount == 0 {
self.titleNode.attributedText = NSAttributedString(string: strings.ApplyLanguage_UnsufficientDataTitle, font: Font.medium(18.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
- text = strings.ApplyLanguage_UnsufficientDataText(localizationInfo.title).0
+ text = strings.ApplyLanguage_UnsufficientDataText(localizationInfo.title).string
} else {
self.titleNode.attributedText = NSAttributedString(string: strings.ApplyLanguage_ChangeLanguageTitle, font: Font.medium(18.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
if !localizationInfo.isOfficial {
- text = strings.ApplyLanguage_ChangeLanguageUnofficialText(localizationInfo.title, "\(completionScore)").0
+ text = strings.ApplyLanguage_ChangeLanguageUnofficialText(localizationInfo.title, "\(completionScore)").string
} else {
- text = strings.ApplyLanguage_ChangeLanguageOfficialText(localizationInfo.title).0
+ text = strings.ApplyLanguage_ChangeLanguageOfficialText(localizationInfo.title).string
}
}
let body = MarkdownAttributeSet(font: Font.regular(15.0), textColor: theme.actionSheet.primaryTextColor)
diff --git a/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewController.swift b/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewController.swift
index 56d168908f..7b324a3380 100644
--- a/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewController.swift
+++ b/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
@@ -71,7 +70,7 @@ public final class LanguageLinkPreviewController: ViewController {
return
}
if result.languageCode == strongSelf.presentationData.strings.primaryComponent.languageCode {
- strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.ApplyLanguage_ChangeLanguageAlreadyActive(result.localizedTitle).0, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
+ strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.ApplyLanguage_ChangeLanguageAlreadyActive(result.localizedTitle).string, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
strongSelf.dismiss()
} else {
strongSelf.localizationInfo = result
diff --git a/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewControllerNode.swift b/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewControllerNode.swift
index e5713c7bbc..c00b384e56 100644
--- a/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewControllerNode.swift
+++ b/submodules/LanguageLinkPreviewUI/Sources/LanguageLinkPreviewControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ActivityIndicator
import AccountContext
diff --git a/submodules/LanguageSuggestionUI/BUILD b/submodules/LanguageSuggestionUI/BUILD
index 62f2286d0a..9b716eb7d0 100644
--- a/submodules/LanguageSuggestionUI/BUILD
+++ b/submodules/LanguageSuggestionUI/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/ActivityIndicator:ActivityIndicator",
diff --git a/submodules/LanguageSuggestionUI/Sources/LanguageSuggestionController.swift b/submodules/LanguageSuggestionUI/Sources/LanguageSuggestionController.swift
index 0635c5b176..43607c18e5 100644
--- a/submodules/LanguageSuggestionUI/Sources/LanguageSuggestionController.swift
+++ b/submodules/LanguageSuggestionUI/Sources/LanguageSuggestionController.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ActivityIndicator
import AccountContext
diff --git a/submodules/LegacyMediaPickerUI/BUILD b/submodules/LegacyMediaPickerUI/BUILD
index 1ae531d0cf..db58fe1bdc 100644
--- a/submodules/LegacyMediaPickerUI/BUILD
+++ b/submodules/LegacyMediaPickerUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/LegacyComponents:LegacyComponents",
diff --git a/submodules/LegacyMediaPickerUI/Sources/LegacyAttachmentMenu.swift b/submodules/LegacyMediaPickerUI/Sources/LegacyAttachmentMenu.swift
index d6ee786284..66f5c574bd 100644
--- a/submodules/LegacyMediaPickerUI/Sources/LegacyAttachmentMenu.swift
+++ b/submodules/LegacyMediaPickerUI/Sources/LegacyAttachmentMenu.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import DeviceAccess
import AccountContext
diff --git a/submodules/LegacyMediaPickerUI/Sources/LegacyLiveUploadInterface.swift b/submodules/LegacyMediaPickerUI/Sources/LegacyLiveUploadInterface.swift
index dd9295eceb..645a7fca1a 100644
--- a/submodules/LegacyMediaPickerUI/Sources/LegacyLiveUploadInterface.swift
+++ b/submodules/LegacyMediaPickerUI/Sources/LegacyLiveUploadInterface.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import SwiftSignalKit
import AccountContext
diff --git a/submodules/LegacyMediaPickerUI/Sources/LegacyMediaPickers.swift b/submodules/LegacyMediaPickerUI/Sources/LegacyMediaPickers.swift
index 32a05ef281..a5ba83eb74 100644
--- a/submodules/LegacyMediaPickerUI/Sources/LegacyMediaPickers.swift
+++ b/submodules/LegacyMediaPickerUI/Sources/LegacyMediaPickers.swift
@@ -3,7 +3,6 @@ import UIKit
import LegacyComponents
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import SSignalKit
import Display
diff --git a/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickerView.swift b/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickerView.swift
index 36bdadbdb2..b38cef6f8f 100644
--- a/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickerView.swift
+++ b/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickerView.swift
@@ -1,6 +1,5 @@
import UIKit
import Display
-import SyncCore
import TelegramCore
import AccountContext
import SwiftSignalKit
diff --git a/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift b/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift
index 78fd73e01b..e5cf7c86b8 100644
--- a/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift
+++ b/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift
@@ -2,7 +2,6 @@ import LegacyComponents
import Display
import Postbox
import SwiftSignalKit
-import SyncCore
import TelegramCore
import AccountContext
import AnimatedStickerNode
diff --git a/submodules/LegacyMediaPickerUI/Sources/LegacySuggestionContext.swift b/submodules/LegacyMediaPickerUI/Sources/LegacySuggestionContext.swift
index 0f247d9fd5..6c2fb3f6f8 100644
--- a/submodules/LegacyMediaPickerUI/Sources/LegacySuggestionContext.swift
+++ b/submodules/LegacyMediaPickerUI/Sources/LegacySuggestionContext.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import LegacyComponents
@@ -17,7 +16,7 @@ public func legacySuggestionContext(context: AccountContext, peerId: PeerId, cha
let disposable = searchPeerMembers(context: context, peerId: peerId, chatLocation: chatLocation, query: query, scope: .mention).start(next: { peers in
let users = NSMutableArray()
for peer in peers {
- if let peer = peer as? TelegramUser {
+ if case let .user(peer) = peer {
let user = TGUser()
user.uid = peer.id.id._internalGetInt32Value()
user.firstName = peer.firstName
diff --git a/submodules/LegacyUI/BUILD b/submodules/LegacyUI/BUILD
index e23975b3a9..6ea7f61ce4 100644
--- a/submodules/LegacyUI/BUILD
+++ b/submodules/LegacyUI/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/LegacyUI/Sources/LegacyImageDownloadActor.swift b/submodules/LegacyUI/Sources/LegacyImageDownloadActor.swift
index 0292fe7891..d44e740e58 100644
--- a/submodules/LegacyUI/Sources/LegacyImageDownloadActor.swift
+++ b/submodules/LegacyUI/Sources/LegacyImageDownloadActor.swift
@@ -3,7 +3,6 @@ import UIKit
import LegacyComponents
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
final class LegacyImageDownloadActor: ASActor {
diff --git a/submodules/LegacyUI/Sources/LegacyMediaLocations.swift b/submodules/LegacyUI/Sources/LegacyMediaLocations.swift
index 92d1d6cf68..d45e9120ac 100644
--- a/submodules/LegacyUI/Sources/LegacyMediaLocations.swift
+++ b/submodules/LegacyUI/Sources/LegacyMediaLocations.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
public func legacyImageLocationUri(resource: MediaResource) -> String? {
if let resource = resource as? CloudPeerPhotoSizeMediaResource {
diff --git a/submodules/LegacyUI/Sources/LegacyPeerAvatarPlaceholderDataSource.swift b/submodules/LegacyUI/Sources/LegacyPeerAvatarPlaceholderDataSource.swift
index cce9f64a41..b3342df14a 100644
--- a/submodules/LegacyUI/Sources/LegacyPeerAvatarPlaceholderDataSource.swift
+++ b/submodules/LegacyUI/Sources/LegacyPeerAvatarPlaceholderDataSource.swift
@@ -3,7 +3,6 @@ import UIKit
import LegacyComponents
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
diff --git a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift
index 79984fa147..37a4682a61 100644
--- a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift
+++ b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import MtProtoKit
import Display
diff --git a/submodules/ListMessageItem/BUILD b/submodules/ListMessageItem/BUILD
index 46c2804980..79b42b21cd 100644
--- a/submodules/ListMessageItem/BUILD
+++ b/submodules/ListMessageItem/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/ItemListUI:ItemListUI",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/ListMessageItem/Sources/ListMessageDateHeader.swift b/submodules/ListMessageItem/Sources/ListMessageDateHeader.swift
index 99e90d504e..a6763f51d6 100644
--- a/submodules/ListMessageItem/Sources/ListMessageDateHeader.swift
+++ b/submodules/ListMessageItem/Sources/ListMessageDateHeader.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import Display
-import SyncCore
import AsyncDisplayKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -68,6 +67,14 @@ final class ListMessageDateHeader: ListViewItemHeader {
let stickOverInsets: Bool = true
let height: CGFloat = 28.0
+
+ public func combinesWith(other: ListViewItemHeader) -> Bool {
+ if let other = other as? ListMessageDateHeader, other.id == self.id {
+ return true
+ } else {
+ return false
+ }
+ }
func node(synchronousLoad: Bool) -> ListViewItemHeaderNode {
return ListMessageDateHeaderNode(theme: self.theme, strings: self.strings, fontSize: self.fontSize, roundedTimestamp: self.roundedTimestamp, month: self.month, year: self.year)
diff --git a/submodules/ListMessageItem/Sources/ListMessageFileItemNode.swift b/submodules/ListMessageItem/Sources/ListMessageFileItemNode.swift
index 846e318a9c..e1cd8a7656 100644
--- a/submodules/ListMessageItem/Sources/ListMessageFileItemNode.swift
+++ b/submodules/ListMessageItem/Sources/ListMessageFileItemNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift b/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift
index c81cffa44f..bb3e062657 100644
--- a/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift
+++ b/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
diff --git a/submodules/ListMessageItem/Sources/ListMessageItem.swift b/submodules/ListMessageItem/Sources/ListMessageItem.swift
index 4c51f87395..499a3e3304 100644
--- a/submodules/ListMessageItem/Sources/ListMessageItem.swift
+++ b/submodules/ListMessageItem/Sources/ListMessageItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/ListMessageItem/Sources/ListMessageSnippetItemNode.swift b/submodules/ListMessageItem/Sources/ListMessageSnippetItemNode.swift
index 209da15c40..1bbb8a5347 100644
--- a/submodules/ListMessageItem/Sources/ListMessageSnippetItemNode.swift
+++ b/submodules/ListMessageItem/Sources/ListMessageSnippetItemNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/LiveLocationManager/BUILD b/submodules/LiveLocationManager/BUILD
index 032a450dbd..48ab44440e 100644
--- a/submodules/LiveLocationManager/BUILD
+++ b/submodules/LiveLocationManager/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/DeviceLocationManager:DeviceLocationManager",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/LiveLocationManager/Sources/LiveLocationManager.swift b/submodules/LiveLocationManager/Sources/LiveLocationManager.swift
index 14e1fa6448..bc7be66cb0 100644
--- a/submodules/LiveLocationManager/Sources/LiveLocationManager.swift
+++ b/submodules/LiveLocationManager/Sources/LiveLocationManager.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import CoreLocation
diff --git a/submodules/LiveLocationManager/Sources/LiveLocationSummaryManager.swift b/submodules/LiveLocationManager/Sources/LiveLocationSummaryManager.swift
index db91916199..401833b4e9 100644
--- a/submodules/LiveLocationManager/Sources/LiveLocationSummaryManager.swift
+++ b/submodules/LiveLocationManager/Sources/LiveLocationSummaryManager.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
diff --git a/submodules/LiveLocationPositionNode/BUILD b/submodules/LiveLocationPositionNode/BUILD
index 205acff3d7..aeec919f5c 100644
--- a/submodules/LiveLocationPositionNode/BUILD
+++ b/submodules/LiveLocationPositionNode/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AvatarNode:AvatarNode",
"//submodules/AppBundle:AppBundle",
diff --git a/submodules/LiveLocationPositionNode/Sources/ChatMessageLiveLocationPositionNode.swift b/submodules/LiveLocationPositionNode/Sources/ChatMessageLiveLocationPositionNode.swift
index 4c671c379f..27c50023a5 100644
--- a/submodules/LiveLocationPositionNode/Sources/ChatMessageLiveLocationPositionNode.swift
+++ b/submodules/LiveLocationPositionNode/Sources/ChatMessageLiveLocationPositionNode.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import AvatarNode
diff --git a/submodules/LiveLocationTimerNode/Sources/ChatMessageLiveLocationTimerNode.swift b/submodules/LiveLocationTimerNode/Sources/ChatMessageLiveLocationTimerNode.swift
index 16ae49897a..0039970146 100644
--- a/submodules/LiveLocationTimerNode/Sources/ChatMessageLiveLocationTimerNode.swift
+++ b/submodules/LiveLocationTimerNode/Sources/ChatMessageLiveLocationTimerNode.swift
@@ -76,7 +76,7 @@ public final class ChatMessageLiveLocationTimerNode: ASDisplayNode {
let string: String
if intRemaining > 60 * 60 {
let hours = Int32(round(remaining / (60.0 * 60.0)))
- string = strings.Map_LiveLocationShortHour("\(hours)").0
+ string = strings.Map_LiveLocationShortHour("\(hours)").string
} else {
let minutes = Int32(round(remaining / (60.0)))
string = "\(minutes)"
diff --git a/submodules/LocalMediaResources/BUILD b/submodules/LocalMediaResources/BUILD
index 56dbb11ee2..25bf57a82a 100644
--- a/submodules/LocalMediaResources/BUILD
+++ b/submodules/LocalMediaResources/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/ImageCompression:ImageCompression",
],
visibility = [
diff --git a/submodules/LocalMediaResources/Sources/MediaResources.swift b/submodules/LocalMediaResources/Sources/MediaResources.swift
index bd56164cb5..ce75f53326 100644
--- a/submodules/LocalMediaResources/Sources/MediaResources.swift
+++ b/submodules/LocalMediaResources/Sources/MediaResources.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
public final class VideoMediaResourceAdjustments: PostboxCoding, Equatable {
public let data: MemoryBuffer
diff --git a/submodules/LocalizedPeerData/BUILD b/submodules/LocalizedPeerData/BUILD
index 9d3bb5514a..8b68782d66 100644
--- a/submodules/LocalizedPeerData/BUILD
+++ b/submodules/LocalizedPeerData/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/LocalizedPeerData/Sources/PeerTitle.swift b/submodules/LocalizedPeerData/Sources/PeerTitle.swift
index eab176ceb2..29578b4a0e 100644
--- a/submodules/LocalizedPeerData/Sources/PeerTitle.swift
+++ b/submodules/LocalizedPeerData/Sources/PeerTitle.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
@@ -61,3 +60,13 @@ public extension Peer {
}
}
}
+
+public extension EnginePeer {
+ var compactDisplayTitle: String {
+ return self._asPeer().compactDisplayTitle
+ }
+
+ func displayTitle(strings: PresentationStrings, displayOrder: PresentationPersonNameOrder) -> String {
+ return self._asPeer().displayTitle(strings: strings, displayOrder: displayOrder)
+ }
+}
diff --git a/submodules/LocationResources/BUILD b/submodules/LocationResources/BUILD
index 620e4d22d2..90aa14c29d 100644
--- a/submodules/LocationResources/BUILD
+++ b/submodules/LocationResources/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
diff --git a/submodules/LocationResources/Sources/MapResources.swift b/submodules/LocationResources/Sources/MapResources.swift
index 200bba1536..beaaedc854 100644
--- a/submodules/LocationResources/Sources/MapResources.swift
+++ b/submodules/LocationResources/Sources/MapResources.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import MapKit
import SwiftSignalKit
diff --git a/submodules/LocationResources/Sources/VenueIconResources.swift b/submodules/LocationResources/Sources/VenueIconResources.swift
index 4384acda86..797c814a8c 100644
--- a/submodules/LocationResources/Sources/VenueIconResources.swift
+++ b/submodules/LocationResources/Sources/VenueIconResources.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AppBundle
diff --git a/submodules/LocationUI/BUILD b/submodules/LocationUI/BUILD
index b13d234088..b004206519 100644
--- a/submodules/LocationUI/BUILD
+++ b/submodules/LocationUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/LegacyComponents:LegacyComponents",
"//submodules/ShareController:ShareController",
diff --git a/submodules/LocationUI/Sources/CachedGeocodes.swift b/submodules/LocationUI/Sources/CachedGeocodes.swift
index f21c09f237..bb2f6e9267 100644
--- a/submodules/LocationUI/Sources/CachedGeocodes.swift
+++ b/submodules/LocationUI/Sources/CachedGeocodes.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import PersistentStringHash
import AccountContext
diff --git a/submodules/LocationUI/Sources/LocationActionListItem.swift b/submodules/LocationUI/Sources/LocationActionListItem.swift
index be8b2fa37b..f2e7329d16 100644
--- a/submodules/LocationUI/Sources/LocationActionListItem.swift
+++ b/submodules/LocationUI/Sources/LocationActionListItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import LocationResources
diff --git a/submodules/LocationUI/Sources/LocationAnnotation.swift b/submodules/LocationUI/Sources/LocationAnnotation.swift
index 37aa915541..24d2a7a949 100644
--- a/submodules/LocationUI/Sources/LocationAnnotation.swift
+++ b/submodules/LocationUI/Sources/LocationAnnotation.swift
@@ -4,7 +4,6 @@ import MapKit
import Display
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import AvatarNode
import AppBundle
diff --git a/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift b/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift
index bb338c6e11..05024a4b27 100644
--- a/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift
+++ b/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import SolidRoundedButtonNode
@@ -394,10 +393,10 @@ class LocationDistancePickerScreenNode: ViewControllerTracingNode, UIScrollViewD
}
let distance = self.usesMetricSystem ? "\(formattedValue) \(self.presentationData.strings.Location_ProximityNotification_DistanceKM)" : "\(formattedValue) \(self.presentationData.strings.Location_ProximityNotification_DistanceMI)"
- let shortTitle = self.presentationData.strings.Location_ProximityNotification_Notify(distance).0
+ let shortTitle = self.presentationData.strings.Location_ProximityNotification_Notify(distance).string
var longTitle: String?
if let displayTitle = self.compactDisplayTitle, let (layout, _) = self.containerLayout {
- let title = self.presentationData.strings.Location_ProximityNotification_NotifyLong(displayTitle, distance).0
+ let title = self.presentationData.strings.Location_ProximityNotification_NotifyLong(displayTitle, distance).string
let width = horizontalContainerFillingSizeForLayout(layout: layout, sideInset: layout.safeInsets.left)
self.measureButtonTitleNode.attributedText = NSAttributedString(string: title, font: Font.semibold(17.0), textColor: .black)
@@ -408,7 +407,7 @@ class LocationDistancePickerScreenNode: ViewControllerTracingNode, UIScrollViewD
}
self.doneButton.title = longTitle ?? shortTitle
- self.textNode.attributedText = NSAttributedString(string: self.presentationData.strings.Location_ProximityNotification_AlreadyClose(distance).0, font: Font.regular(14.0), textColor: self.presentationData.theme.actionSheet.secondaryTextColor)
+ self.textNode.attributedText = NSAttributedString(string: self.presentationData.strings.Location_ProximityNotification_AlreadyClose(distance).string, font: Font.regular(14.0), textColor: self.presentationData.theme.actionSheet.secondaryTextColor)
if let (layout, navigationBarHeight) = self.containerLayout {
self.containerLayoutUpdated(layout, navigationBarHeight: navigationBarHeight, transition: .immediate)
}
diff --git a/submodules/LocationUI/Sources/LocationInfoListItem.swift b/submodules/LocationUI/Sources/LocationInfoListItem.swift
index 1d8c72338b..e8dc93c045 100644
--- a/submodules/LocationUI/Sources/LocationInfoListItem.swift
+++ b/submodules/LocationUI/Sources/LocationInfoListItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import LocationResources
diff --git a/submodules/LocationUI/Sources/LocationLiveListItem.swift b/submodules/LocationUI/Sources/LocationLiveListItem.swift
index 4823ad05de..f803c4cb66 100644
--- a/submodules/LocationUI/Sources/LocationLiveListItem.swift
+++ b/submodules/LocationUI/Sources/LocationLiveListItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import AccountContext
import TelegramPresentationData
import TelegramUIPreferences
@@ -178,7 +177,7 @@ final class LocationLiveListItemNode: ListViewItemNode {
var subtitle = timeString
if let distance = item.distance {
- let distanceString = item.presentationData.strings.Map_DistanceAway(shortStringForDistance(strings: item.presentationData.strings, distance: Int32(distance))).0
+ let distanceString = item.presentationData.strings.Map_DistanceAway(shortStringForDistance(strings: item.presentationData.strings, distance: Int32(distance))).string
subtitle = "\(timeString) • \(distanceString)"
}
diff --git a/submodules/LocationUI/Sources/LocationOptionsNode.swift b/submodules/LocationUI/Sources/LocationOptionsNode.swift
index 950f0df748..dceb5b2b8e 100644
--- a/submodules/LocationUI/Sources/LocationOptionsNode.swift
+++ b/submodules/LocationUI/Sources/LocationOptionsNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import SegmentedControlNode
diff --git a/submodules/LocationUI/Sources/LocationPickerController.swift b/submodules/LocationUI/Sources/LocationPickerController.swift
index cabb04b08d..f72261d9ab 100644
--- a/submodules/LocationUI/Sources/LocationPickerController.swift
+++ b/submodules/LocationUI/Sources/LocationPickerController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import LegacyComponents
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
@@ -127,7 +126,7 @@ public final class LocationPickerController: ViewController {
let controller = ActionSheetController(presentationData: strongSelf.presentationData)
var title = strongSelf.presentationData.strings.Map_LiveLocationGroupDescription
if case let .share(peer, _, _) = strongSelf.mode, let receiver = peer as? TelegramUser {
- title = strongSelf.presentationData.strings.Map_LiveLocationPrivateDescription(receiver.compactDisplayTitle).0
+ title = strongSelf.presentationData.strings.Map_LiveLocationPrivateDescription(receiver.compactDisplayTitle).string
}
controller.setItemGroups([
ActionSheetItemGroup(items: [
diff --git a/submodules/LocationUI/Sources/LocationPickerControllerNode.swift b/submodules/LocationUI/Sources/LocationPickerControllerNode.swift
index e43a09a232..6d0d0b47a4 100644
--- a/submodules/LocationUI/Sources/LocationPickerControllerNode.swift
+++ b/submodules/LocationUI/Sources/LocationPickerControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import LegacyComponents
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import MergeLists
@@ -286,7 +285,7 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM
self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3)
self.listNode.verticalScrollIndicatorFollowsOverscroll = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.emptyResultsTextNode = ImmediateTextNode()
@@ -489,7 +488,7 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM
case .pick:
title = presentationData.strings.Map_SetThisLocation
}
- entries.append(.location(presentationData.theme, title, (userLocation?.horizontalAccuracy).flatMap { presentationData.strings.Map_AccurateTo(stringForDistance(strings: presentationData.strings, distance: $0)).0 } ?? presentationData.strings.Map_Locating, nil, userLocation?.coordinate))
+ entries.append(.location(presentationData.theme, title, (userLocation?.horizontalAccuracy).flatMap { presentationData.strings.Map_AccurateTo(stringForDistance(strings: presentationData.strings, distance: $0)).string } ?? presentationData.strings.Map_Locating, nil, userLocation?.coordinate))
}
if case .share(_, _, true) = mode {
diff --git a/submodules/LocationUI/Sources/LocationSearchContainerNode.swift b/submodules/LocationUI/Sources/LocationSearchContainerNode.swift
index 75fe5a5e7c..e4f009ec12 100644
--- a/submodules/LocationUI/Sources/LocationSearchContainerNode.swift
+++ b/submodules/LocationUI/Sources/LocationSearchContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramStringFormatting
import TelegramUIPreferences
@@ -60,7 +59,7 @@ private struct LocationSearchEntry: Identifiable, Comparable {
subtitle = nil
} else {
header = ChatListSearchItemHeader(type: .mapAddress, theme: presentationData.theme, strings: presentationData.strings)
- subtitle = presentationData.strings.Map_DistanceAway(stringForDistance(strings: presentationData.strings, distance: self.distance)).0
+ subtitle = presentationData.strings.Map_DistanceAway(stringForDistance(strings: presentationData.strings, distance: self.distance)).string
}
return ItemListVenueItem(presentationData: ItemListPresentationData(presentationData), account: account, venue: self.location, title: self.title, subtitle: subtitle, style: .plain, action: {
sendVenue(venue)
@@ -124,7 +123,7 @@ final class LocationSearchContainerNode: ASDisplayNode {
self.listNode.backgroundColor = self.presentationData.theme.list.plainBackgroundColor
self.listNode.isHidden = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.emptyResultsTitleNode = ImmediateTextNode()
@@ -313,7 +312,7 @@ final class LocationSearchContainerNode: ASDisplayNode {
strongSelf.listNode.isHidden = !transition.isSearching
strongSelf.dimNode.isHidden = transition.isSearching
- strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.Map_SearchNoResultsDescription(transition.query).0, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
+ strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.Map_SearchNoResultsDescription(transition.query).string, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
let emptyResults = transition.isSearching && transition.isEmpty
strongSelf.emptyResultsTitleNode.isHidden = !emptyResults
diff --git a/submodules/LocationUI/Sources/LocationSearchNavigationContentNode.swift b/submodules/LocationUI/Sources/LocationSearchNavigationContentNode.swift
index 1ed628ab9b..6f1135bd74 100644
--- a/submodules/LocationUI/Sources/LocationSearchNavigationContentNode.swift
+++ b/submodules/LocationUI/Sources/LocationSearchNavigationContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import SearchBarNode
diff --git a/submodules/LocationUI/Sources/LocationUtils.swift b/submodules/LocationUI/Sources/LocationUtils.swift
index 604c803418..ae0e8f8f5a 100644
--- a/submodules/LocationUI/Sources/LocationUtils.swift
+++ b/submodules/LocationUI/Sources/LocationUtils.swift
@@ -1,6 +1,5 @@
import Foundation
import SwiftSignalKit
-import SyncCore
import TelegramCore
import TelegramPresentationData
import TelegramStringFormatting
@@ -39,11 +38,11 @@ public func nearbyVenues(context: AccountContext, latitude: Double, longitude: D
} |> mapToSignal { searchBotsConfiguration in
return context.engine.peers.resolvePeerByName(name: searchBotsConfiguration.venueBotUsername ?? "foursquare")
|> take(1)
- |> mapToSignal { peerId -> Signal in
- guard let peerId = peerId else {
+ |> mapToSignal { peer -> Signal in
+ guard let peer = peer else {
return .single(nil)
}
- return context.engine.messages.requestChatContextResults(botId: peerId, peerId: context.account.peerId, query: query ?? "", location: .single((latitude, longitude)), offset: "")
+ return context.engine.messages.requestChatContextResults(botId: peer.id, peerId: context.account.peerId, query: query ?? "", location: .single((latitude, longitude)), offset: "")
|> map { results -> ChatContextResultCollection? in
return results?.results
}
@@ -87,7 +86,7 @@ func stringForEstimatedDuration(strings: PresentationStrings, eta: Double) -> St
} else {
string = strings.Map_ETAMinutes(minutes)
}
- return strings.Map_DirectionsDriveEta(string).0
+ return strings.Map_DirectionsDriveEta(string).string
} else {
return nil
}
diff --git a/submodules/LocationUI/Sources/LocationViewController.swift b/submodules/LocationUI/Sources/LocationViewController.swift
index 54fcf2468a..0b45ccfc07 100644
--- a/submodules/LocationUI/Sources/LocationViewController.swift
+++ b/submodules/LocationUI/Sources/LocationViewController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import LegacyComponents
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
@@ -277,9 +276,9 @@ public final class LocationViewController: ViewController {
var text: String
let distanceString = shortStringForDistance(strings: strongSelf.presentationData.strings, distance: distance)
if let compactDisplayTitle = compactDisplayTitle {
- text = strongSelf.presentationData.strings.Location_ProximityAlertSetText(compactDisplayTitle, distanceString).0
+ text = strongSelf.presentationData.strings.Location_ProximityAlertSetText(compactDisplayTitle, distanceString).string
} else {
- text = strongSelf.presentationData.strings.Location_ProximityAlertSetTextGroup(distanceString).0
+ text = strongSelf.presentationData.strings.Location_ProximityAlertSetTextGroup(distanceString).string
}
strongSelf.dismissAllTooltips()
@@ -352,9 +351,9 @@ public final class LocationViewController: ViewController {
var text: String
let distanceString = shortStringForDistance(strings: strongSelf.presentationData.strings, distance: distance)
if let compactDisplayTitle = compactDisplayTitle {
- text = strongSelf.presentationData.strings.Location_ProximityAlertSetText(compactDisplayTitle, distanceString).0
+ text = strongSelf.presentationData.strings.Location_ProximityAlertSetText(compactDisplayTitle, distanceString).string
} else {
- text = strongSelf.presentationData.strings.Location_ProximityAlertSetTextGroup(distanceString).0
+ text = strongSelf.presentationData.strings.Location_ProximityAlertSetTextGroup(distanceString).string
}
strongSelf.dismissAllTooltips()
@@ -380,7 +379,7 @@ public final class LocationViewController: ViewController {
let controller = ActionSheetController(presentationData: strongSelf.presentationData)
var title = strongSelf.presentationData.strings.Map_LiveLocationGroupDescription
if let user = peer as? TelegramUser {
- title = strongSelf.presentationData.strings.Map_LiveLocationPrivateDescription(user.compactDisplayTitle).0
+ title = strongSelf.presentationData.strings.Map_LiveLocationPrivateDescription(user.compactDisplayTitle).string
}
let sendLiveLocationImpl: (Int32) -> Void = { [weak controller] period in
diff --git a/submodules/LocationUI/Sources/LocationViewControllerNode.swift b/submodules/LocationUI/Sources/LocationViewControllerNode.swift
index 179270366f..23b4965d89 100644
--- a/submodules/LocationUI/Sources/LocationViewControllerNode.swift
+++ b/submodules/LocationUI/Sources/LocationViewControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import LegacyComponents
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import MergeLists
@@ -122,7 +121,7 @@ private enum LocationViewEntry: Comparable, Identifiable {
}
let distanceString: String?
if let distance = distance {
- distanceString = distance < 10 ? presentationData.strings.Map_YouAreHere : presentationData.strings.Map_DistanceAway(stringForDistance(strings: presentationData.strings, distance: distance)).0
+ distanceString = distance < 10 ? presentationData.strings.Map_YouAreHere : presentationData.strings.Map_DistanceAway(stringForDistance(strings: presentationData.strings, distance: distance)).string
} else {
distanceString = nil
}
@@ -235,7 +234,7 @@ final class LocationViewControllerNode: ViewControllerTracingNode, CLLocationMan
self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3)
self.listNode.verticalScrollIndicatorFollowsOverscroll = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
var setupProximityNotificationImpl: ((Bool) -> Void)?
@@ -721,7 +720,7 @@ final class LocationViewControllerNode: ViewControllerTracingNode, CLLocationMan
var text: String = strongSelf.presentationData.strings.Location_ProximityGroupTip
if peer.id.namespace == Namespaces.Peer.CloudUser {
- text = strongSelf.presentationData.strings.Location_ProximityTip(peer.compactDisplayTitle).0
+ text = strongSelf.presentationData.strings.Location_ProximityTip(peer.compactDisplayTitle).string
}
strongSelf.interaction.present(TooltipScreen(text: text, icon: nil, location: .point(location.offsetBy(dx: -9.0, dy: 0.0), .right), displayDuration: .custom(3.0), shouldDismissOnTouch: { _ in
diff --git a/submodules/MapResourceToAvatarSizes/BUILD b/submodules/MapResourceToAvatarSizes/BUILD
index 5673928996..0aa34305f4 100644
--- a/submodules/MapResourceToAvatarSizes/BUILD
+++ b/submodules/MapResourceToAvatarSizes/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Display:Display",
],
visibility = [
diff --git a/submodules/MapResourceToAvatarSizes/Sources/MapResourceToAvatarSizes.swift b/submodules/MapResourceToAvatarSizes/Sources/MapResourceToAvatarSizes.swift
index c42f510e76..440581e686 100644
--- a/submodules/MapResourceToAvatarSizes/Sources/MapResourceToAvatarSizes.swift
+++ b/submodules/MapResourceToAvatarSizes/Sources/MapResourceToAvatarSizes.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Display
public func mapResourceToAvatarSizes(postbox: Postbox, resource: MediaResource, representations: [TelegramMediaImageRepresentation]) -> Signal<[Int: Data], NoError> {
diff --git a/submodules/MediaPlayer/BUILD b/submodules/MediaPlayer/BUILD
index 4b4fe5392c..8a6d60408d 100644
--- a/submodules/MediaPlayer/BUILD
+++ b/submodules/MediaPlayer/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
diff --git a/submodules/MediaPlayer/Sources/FFMpegMediaFrameSource.swift b/submodules/MediaPlayer/Sources/FFMpegMediaFrameSource.swift
index 83fb2ab4e5..6d37744bb5 100644
--- a/submodules/MediaPlayer/Sources/FFMpegMediaFrameSource.swift
+++ b/submodules/MediaPlayer/Sources/FFMpegMediaFrameSource.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
private final class ThreadTaskQueue: NSObject {
private var mutex: pthread_mutex_t
diff --git a/submodules/MediaPlayer/Sources/FFMpegMediaFrameSourceContext.swift b/submodules/MediaPlayer/Sources/FFMpegMediaFrameSourceContext.swift
index 713b0ae6ca..7663542c92 100644
--- a/submodules/MediaPlayer/Sources/FFMpegMediaFrameSourceContext.swift
+++ b/submodules/MediaPlayer/Sources/FFMpegMediaFrameSourceContext.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import CoreMedia
import TelegramCore
-import SyncCore
import FFMpegBinding
private struct StreamContext {
diff --git a/submodules/MediaPlayer/Sources/MediaPlayer.swift b/submodules/MediaPlayer/Sources/MediaPlayer.swift
index 72ea0fed6c..cea3926c49 100644
--- a/submodules/MediaPlayer/Sources/MediaPlayer.swift
+++ b/submodules/MediaPlayer/Sources/MediaPlayer.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import Postbox
import CoreMedia
import TelegramCore
-import SyncCore
import TelegramAudio
private let traceEvents = false
diff --git a/submodules/MediaPlayer/Sources/MediaPlayerAudioRenderer.swift b/submodules/MediaPlayer/Sources/MediaPlayerAudioRenderer.swift
index 876eeae33e..185b87a7a1 100644
--- a/submodules/MediaPlayer/Sources/MediaPlayerAudioRenderer.swift
+++ b/submodules/MediaPlayer/Sources/MediaPlayerAudioRenderer.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import CoreMedia
import AVFoundation
import TelegramCore
-import SyncCore
import TelegramAudio
private enum AudioPlayerRendererState {
diff --git a/submodules/MediaPlayer/Sources/MediaPlayerFramePreview.swift b/submodules/MediaPlayer/Sources/MediaPlayerFramePreview.swift
index a39362849d..47730aaa06 100644
--- a/submodules/MediaPlayer/Sources/MediaPlayerFramePreview.swift
+++ b/submodules/MediaPlayer/Sources/MediaPlayerFramePreview.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import FFMpegBinding
public enum FramePreviewResult {
diff --git a/submodules/MediaPlayer/Sources/TimeBasedVideoPreload.swift b/submodules/MediaPlayer/Sources/TimeBasedVideoPreload.swift
index bc6a8bc7ef..b19c78c554 100644
--- a/submodules/MediaPlayer/Sources/TimeBasedVideoPreload.swift
+++ b/submodules/MediaPlayer/Sources/TimeBasedVideoPreload.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import FFMpegBinding
public func preloadVideoResource(postbox: Postbox, resourceReference: MediaResourceReference, duration: Double) -> Signal {
diff --git a/submodules/MediaPlayer/Sources/UniversalSoftwareVideoSource.swift b/submodules/MediaPlayer/Sources/UniversalSoftwareVideoSource.swift
index e76e15b0b5..27a0a3f1c6 100644
--- a/submodules/MediaPlayer/Sources/UniversalSoftwareVideoSource.swift
+++ b/submodules/MediaPlayer/Sources/UniversalSoftwareVideoSource.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import FFMpegBinding
private func readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: UnsafeMutablePointer?, bufferSize: Int32) -> Int32 {
diff --git a/submodules/MediaResources/BUILD b/submodules/MediaResources/BUILD
index 7d8503018d..9bfc65e6e5 100644
--- a/submodules/MediaResources/BUILD
+++ b/submodules/MediaResources/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/MediaResources/Sources/MediaPlaybackStoredState.swift b/submodules/MediaResources/Sources/MediaPlaybackStoredState.swift
index 09a48aadd4..c3fb8009c6 100644
--- a/submodules/MediaResources/Sources/MediaPlaybackStoredState.swift
+++ b/submodules/MediaResources/Sources/MediaPlaybackStoredState.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
public final class MediaPlaybackStoredState: PostboxCoding {
diff --git a/submodules/MusicAlbumArtResources/BUILD b/submodules/MusicAlbumArtResources/BUILD
index 229ebaec88..e3ea1ddb2b 100644
--- a/submodules/MusicAlbumArtResources/BUILD
+++ b/submodules/MusicAlbumArtResources/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/UrlEscaping:UrlEscaping",
diff --git a/submodules/MusicAlbumArtResources/Sources/ExternalMusicAlbumArtResources.swift b/submodules/MusicAlbumArtResources/Sources/ExternalMusicAlbumArtResources.swift
index 3f45e62f37..f43869369d 100644
--- a/submodules/MusicAlbumArtResources/Sources/ExternalMusicAlbumArtResources.swift
+++ b/submodules/MusicAlbumArtResources/Sources/ExternalMusicAlbumArtResources.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import UrlEscaping
diff --git a/submodules/NotificationMuteSettingsUI/BUILD b/submodules/NotificationMuteSettingsUI/BUILD
index d810c8f4bf..df31e5c424 100644
--- a/submodules/NotificationMuteSettingsUI/BUILD
+++ b/submodules/NotificationMuteSettingsUI/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
],
diff --git a/submodules/NotificationMuteSettingsUI/Sources/NotificationMuteSettingsController.swift b/submodules/NotificationMuteSettingsUI/Sources/NotificationMuteSettingsController.swift
index 953e997502..9de968b3a3 100644
--- a/submodules/NotificationMuteSettingsUI/Sources/NotificationMuteSettingsController.swift
+++ b/submodules/NotificationMuteSettingsUI/Sources/NotificationMuteSettingsController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramStringFormatting
@@ -83,7 +82,7 @@ public func notificationMuteSettingsController(presentationData: PresentationDat
items.append(item)
}
if let soundSettings = soundSettings {
- items.append(ActionSheetButtonItem(title: soundSettings.value.flatMap({ presentationData.strings.Notification_Exceptions_Sound(localizedPeerNotificationSoundString(strings: presentationData.strings, sound: $0)).0 }) ?? presentationData.strings.GroupInfo_SetSound, action: {
+ items.append(ActionSheetButtonItem(title: soundSettings.value.flatMap({ presentationData.strings.Notification_Exceptions_Sound(localizedPeerNotificationSoundString(strings: presentationData.strings, sound: $0)).string }) ?? presentationData.strings.GroupInfo_SetSound, action: {
dismissAction()
openSoundSettings()
}))
diff --git a/submodules/NotificationSoundSelectionUI/BUILD b/submodules/NotificationSoundSelectionUI/BUILD
index 66f1b43188..87a3bc9db2 100644
--- a/submodules/NotificationSoundSelectionUI/BUILD
+++ b/submodules/NotificationSoundSelectionUI/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/ItemListUI:ItemListUI",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/NotificationSoundSelectionUI/Sources/NotificationSoundSelection.swift b/submodules/NotificationSoundSelectionUI/Sources/NotificationSoundSelection.swift
index 5a6806fcf7..4793b33ce5 100644
--- a/submodules/NotificationSoundSelectionUI/Sources/NotificationSoundSelection.swift
+++ b/submodules/NotificationSoundSelectionUI/Sources/NotificationSoundSelection.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AVFoundation
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/NumberPluralizationForm/PublicHeaders/NumberPluralizationForm/NumberPluralizationForm.h b/submodules/NumberPluralizationForm/PublicHeaders/NumberPluralizationForm/NumberPluralizationForm.h
index 8d72b8504f..d0cf6d7311 100644
--- a/submodules/NumberPluralizationForm/PublicHeaders/NumberPluralizationForm/NumberPluralizationForm.h
+++ b/submodules/NumberPluralizationForm/PublicHeaders/NumberPluralizationForm/NumberPluralizationForm.h
@@ -10,3 +10,5 @@ typedef NS_ENUM(int32_t, NumberPluralizationForm) {
};
NumberPluralizationForm numberPluralizationForm(unsigned int lc, int n);
+
+NSString * _Nonnull formatNumberWithGroupingSeparator(NSString * _Nonnull groupingSeparator, int32_t value);
diff --git a/submodules/NumberPluralizationForm/Sources/NumberPluralizationForm.m b/submodules/NumberPluralizationForm/Sources/NumberPluralizationForm.m
index e1b0035cc5..da54b6e72e 100644
--- a/submodules/NumberPluralizationForm/Sources/NumberPluralizationForm.m
+++ b/submodules/NumberPluralizationForm/Sources/NumberPluralizationForm.m
@@ -353,3 +353,24 @@ NumberPluralizationForm numberPluralizationForm(unsigned int lc, int n) {
return NumberPluralizationFormOther;
}
+
+NSString * _Nonnull formatNumberWithGroupingSeparator(NSString * _Nonnull groupingSeparator, int32_t value) {
+ NSString *string = [[NSString alloc] initWithFormat:@"%d", (int)value];
+
+ if (ABS(value) < 1000 || groupingSeparator.length == 0) {
+ return string;
+ } else {
+ NSMutableString *groupedString = [[NSMutableString alloc] init];
+
+ int numberOfPlaces = 0;
+ for (int i = ((int)string.length) - 1; i >= 0; i--) {
+ if (numberOfPlaces != 0 && numberOfPlaces % 3 == 0) {
+ [groupedString insertString:groupingSeparator atIndex:0];
+ }
+ [groupedString insertString:[string substringWithRange:NSMakeRange(i, 1)] atIndex:0];
+ numberOfPlaces++;
+ }
+
+ return groupedString;
+ }
+}
diff --git a/submodules/OpenInExternalAppUI/BUILD b/submodules/OpenInExternalAppUI/BUILD
index 11016974a2..9006bc6699 100644
--- a/submodules/OpenInExternalAppUI/BUILD
+++ b/submodules/OpenInExternalAppUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/PhotoResources:PhotoResources",
diff --git a/submodules/OpenInExternalAppUI/Sources/OpenInActionSheetController.swift b/submodules/OpenInExternalAppUI/Sources/OpenInActionSheetController.swift
index de2b23a9bb..63d8118788 100644
--- a/submodules/OpenInExternalAppUI/Sources/OpenInActionSheetController.swift
+++ b/submodules/OpenInExternalAppUI/Sources/OpenInActionSheetController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MapKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/OpenInExternalAppUI/Sources/OpenInAppIconResources.swift b/submodules/OpenInExternalAppUI/Sources/OpenInAppIconResources.swift
index 32f419a522..4c5379f68c 100644
--- a/submodules/OpenInExternalAppUI/Sources/OpenInAppIconResources.swift
+++ b/submodules/OpenInExternalAppUI/Sources/OpenInAppIconResources.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
diff --git a/submodules/OpenInExternalAppUI/Sources/OpenInOptions.swift b/submodules/OpenInExternalAppUI/Sources/OpenInOptions.swift
index 21117128d1..1c34056f43 100644
--- a/submodules/OpenInExternalAppUI/Sources/OpenInOptions.swift
+++ b/submodules/OpenInExternalAppUI/Sources/OpenInOptions.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import CoreLocation
import MapKit
import AccountContext
diff --git a/submodules/PasscodeUI/BUILD b/submodules/PasscodeUI/BUILD
index cadf3b48ea..46648d9edb 100644
--- a/submodules/PasscodeUI/BUILD
+++ b/submodules/PasscodeUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/PasscodeUI/Sources/PasscodeEntryControllerNode.swift b/submodules/PasscodeUI/Sources/PasscodeEntryControllerNode.swift
index 0050da048a..92709398a2 100644
--- a/submodules/PasscodeUI/Sources/PasscodeEntryControllerNode.swift
+++ b/submodules/PasscodeUI/Sources/PasscodeEntryControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import LocalAuth
diff --git a/submodules/PasscodeUI/Sources/PasscodeSetupController.swift b/submodules/PasscodeUI/Sources/PasscodeSetupController.swift
index 47873beb62..c57bef9e3e 100644
--- a/submodules/PasscodeUI/Sources/PasscodeSetupController.swift
+++ b/submodules/PasscodeUI/Sources/PasscodeSetupController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/PasscodeUI/Sources/PasscodeSetupControllerNode.swift b/submodules/PasscodeUI/Sources/PasscodeSetupControllerNode.swift
index 78e857ab8d..e03b10f4f5 100644
--- a/submodules/PasscodeUI/Sources/PasscodeSetupControllerNode.swift
+++ b/submodules/PasscodeUI/Sources/PasscodeSetupControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import PasscodeInputFieldNode
diff --git a/submodules/PassportUI/BUILD b/submodules/PassportUI/BUILD
index 5dae6de27e..bc03ee0145 100644
--- a/submodules/PassportUI/BUILD
+++ b/submodules/PassportUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/PhoneInputNode:PhoneInputNode",
"//submodules/CountrySelectionUI:CountrySelectionUI",
diff --git a/submodules/PassportUI/Sources/FindSecureIdValue.swift b/submodules/PassportUI/Sources/FindSecureIdValue.swift
index 7580149f6c..fbda63988a 100644
--- a/submodules/PassportUI/Sources/FindSecureIdValue.swift
+++ b/submodules/PassportUI/Sources/FindSecureIdValue.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
func findValue(_ values: [SecureIdValueWithContext], key: SecureIdValueKey) -> (Int, SecureIdValueWithContext)? {
for i in 0 ..< values.count {
diff --git a/submodules/PassportUI/Sources/Form/FormController.swift b/submodules/PassportUI/Sources/Form/FormController.swift
index aebd1cea99..4a1086b30b 100644
--- a/submodules/PassportUI/Sources/Form/FormController.swift
+++ b/submodules/PassportUI/Sources/Form/FormController.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
public class FormController>: ViewController {
diff --git a/submodules/PassportUI/Sources/Form/FormControllerNode.swift b/submodules/PassportUI/Sources/Form/FormControllerNode.swift
index 9d47a6f95a..cd76c108eb 100644
--- a/submodules/PassportUI/Sources/Form/FormControllerNode.swift
+++ b/submodules/PassportUI/Sources/Form/FormControllerNode.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
private func hasFirstResponder(_ view: UIView) -> Bool {
diff --git a/submodules/PassportUI/Sources/LegacySecureIdAttachmentMenu.swift b/submodules/PassportUI/Sources/LegacySecureIdAttachmentMenu.swift
index 6da5632fcf..3873b93559 100644
--- a/submodules/PassportUI/Sources/LegacySecureIdAttachmentMenu.swift
+++ b/submodules/PassportUI/Sources/LegacySecureIdAttachmentMenu.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import OverlayStatusController
import AccountContext
import LegacyUI
diff --git a/submodules/PassportUI/Sources/SecureIdAuthAcceptNode.swift b/submodules/PassportUI/Sources/SecureIdAuthAcceptNode.swift
index 376c52ec14..6bf9688bfb 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthAcceptNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthAcceptNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AppBundle
diff --git a/submodules/PassportUI/Sources/SecureIdAuthController.swift b/submodules/PassportUI/Sources/SecureIdAuthController.swift
index 6e224c3a08..429250b388 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthController.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TextFormat
import ProgressNavigationButtonNode
diff --git a/submodules/PassportUI/Sources/SecureIdAuthControllerNode.swift b/submodules/PassportUI/Sources/SecureIdAuthControllerNode.swift
index 030978b94c..f6b8151de6 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthControllerNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthControllerNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ActivityIndicator
diff --git a/submodules/PassportUI/Sources/SecureIdAuthControllerState.swift b/submodules/PassportUI/Sources/SecureIdAuthControllerState.swift
index ba9a0ab8fa..632a2de9bb 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthControllerState.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthControllerState.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
struct SecureIdEncryptedFormData {
let form: EncryptedSecureIdForm
diff --git a/submodules/PassportUI/Sources/SecureIdAuthFormContentNode.swift b/submodules/PassportUI/Sources/SecureIdAuthFormContentNode.swift
index 065f2749c1..ca0acecdc2 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthFormContentNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthFormContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TextFormat
@@ -58,13 +57,13 @@ final class SecureIdAuthFormContentNode: ASDisplayNode, SecureIdAuthContentNode,
let privacyPolicyAttributes = MarkdownAttributeSet(font: infoFont, textColor: theme.list.freeTextColor)
let privacyPolicyLinkAttributes = MarkdownAttributeSet(font: infoFont, textColor: theme.list.itemAccentColor, additionalAttributes: [NSAttributedString.Key.underlineStyle.rawValue: NSUnderlineStyle.single.rawValue as NSNumber, TelegramTextAttributes.URL: privacyPolicyUrl])
- text = parseMarkdownIntoAttributedString(strings.Passport_PrivacyPolicy(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder), (peer.addressName ?? "")).0.replacingOccurrences(of: "]", with: "]()"), attributes: MarkdownAttributes(body: privacyPolicyAttributes, bold: privacyPolicyAttributes, link: privacyPolicyLinkAttributes, linkAttribute: { _ in
+ text = parseMarkdownIntoAttributedString(strings.Passport_PrivacyPolicy(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder), (peer.addressName ?? "")).string.replacingOccurrences(of: "]", with: "]()"), attributes: MarkdownAttributes(body: privacyPolicyAttributes, bold: privacyPolicyAttributes, link: privacyPolicyLinkAttributes, linkAttribute: { _ in
return nil
}), textAlignment: .center)
} else {
- text = NSAttributedString(string: strings.Passport_AcceptHelp(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder), (peer.addressName ?? "")).0, font: infoFont, textColor: theme.list.freeTextColor, paragraphAlignment: .left)
+ text = NSAttributedString(string: strings.Passport_AcceptHelp(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder), (peer.addressName ?? "")).string, font: infoFont, textColor: theme.list.freeTextColor, paragraphAlignment: .left)
}
self.textNode.attributedText = text
diff --git a/submodules/PassportUI/Sources/SecureIdAuthFormFieldNode.swift b/submodules/PassportUI/Sources/SecureIdAuthFormFieldNode.swift
index fffaf5df94..d4bffe2264 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthFormFieldNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthFormFieldNode.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramStringFormatting
import CountrySelectionUI
@@ -491,7 +490,7 @@ private func placeholderForDocumentTypes(_ types: [SecureIdRequestedIdentityDocu
}
}
- return strings.Passport_Identity_UploadOneOfScan(string).0
+ return strings.Passport_Identity_UploadOneOfScan(string).string
}
private func placeholderForDocumentTypes(_ types: [SecureIdRequestedAddressDocumentWithAttributes], strings: PresentationStrings) -> String {
@@ -521,7 +520,7 @@ private func placeholderForDocumentTypes(_ types: [SecureIdRequestedAddressDocum
}
}
- return strings.Passport_Address_UploadOneOfScan(string).0
+ return strings.Passport_Address_UploadOneOfScan(string).string
}
private func stringForDocumentValue(_ value: SecureIdValue, strings: PresentationStrings) -> String? {
@@ -587,7 +586,7 @@ private func fieldTitleAndText(field: SecureIdParsedRequestedFormField, strings:
isOneOf = true
let typesArray = Array(types)
if typesArray.count == 2 {
- title = strings.Passport_FieldOneOf_Or(stringForDocumentType(typesArray[0].document, strings: strings), stringForDocumentType(typesArray[1].document, strings: strings)).0
+ title = strings.Passport_FieldOneOf_Or(stringForDocumentType(typesArray[0].document, strings: strings), stringForDocumentType(typesArray[1].document, strings: strings)).string
}
placeholder = placeholderForDocumentTypes(typesArray, strings: strings)
for type in types.sorted(by: { $0.document.valueKey.rawValue < $1.document.valueKey.rawValue }) {
@@ -638,7 +637,7 @@ private func fieldTitleAndText(field: SecureIdParsedRequestedFormField, strings:
isOneOf = true
let typesArray = Array(types)
if typesArray.count == 2 {
- title = strings.Passport_FieldOneOf_Or(stringForDocumentType(typesArray[0].document, strings: strings), stringForDocumentType(typesArray[1].document, strings: strings)).0
+ title = strings.Passport_FieldOneOf_Or(stringForDocumentType(typesArray[0].document, strings: strings), stringForDocumentType(typesArray[1].document, strings: strings)).string
}
placeholder = placeholderForDocumentTypes(typesArray, strings: strings)
for type in types.sorted(by: { $0.document.valueKey.rawValue < $1.document.valueKey.rawValue }) {
diff --git a/submodules/PassportUI/Sources/SecureIdAuthHeaderNode.swift b/submodules/PassportUI/Sources/SecureIdAuthHeaderNode.swift
index 81eb358d81..471a914f72 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthHeaderNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthHeaderNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -58,9 +57,9 @@ final class SecureIdAuthHeaderNode: ASDisplayNode {
let titleData = self.strings.Passport_RequestHeader(formData.servicePeer.displayTitle(strings: self.strings, displayOrder: self.nameDisplayOrder))
let titleString = NSMutableAttributedString()
- titleString.append(NSAttributedString(string: titleData.0, font: textFont, textColor: self.theme.list.freeTextColor))
- for (_, range) in titleData.1 {
- titleString.addAttribute(.font, value: titleFont, range: range)
+ titleString.append(NSAttributedString(string: titleData.string, font: textFont, textColor: self.theme.list.freeTextColor))
+ for range in titleData.ranges {
+ titleString.addAttribute(.font, value: titleFont, range: range.range)
}
self.titleNode.attributedText = titleString
self.iconNode.isHidden = true
diff --git a/submodules/PassportUI/Sources/SecureIdAuthListContentNode.swift b/submodules/PassportUI/Sources/SecureIdAuthListContentNode.swift
index a6d4df8bc6..5dc349a96d 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthListContentNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthListContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
final class SecureIdAuthListContentNode: ASDisplayNode, SecureIdAuthContentNode, UITextFieldDelegate {
diff --git a/submodules/PassportUI/Sources/SecureIdAuthListFieldNode.swift b/submodules/PassportUI/Sources/SecureIdAuthListFieldNode.swift
index d84fc5facc..c6fa7f6c8b 100644
--- a/submodules/PassportUI/Sources/SecureIdAuthListFieldNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdAuthListFieldNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import PhoneNumberFormat
diff --git a/submodules/PassportUI/Sources/SecureIdDocumentFormController.swift b/submodules/PassportUI/Sources/SecureIdDocumentFormController.swift
index 36889bccac..1cd73e5d88 100644
--- a/submodules/PassportUI/Sources/SecureIdDocumentFormController.swift
+++ b/submodules/PassportUI/Sources/SecureIdDocumentFormController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ProgressNavigationButtonNode
import AccountContext
diff --git a/submodules/PassportUI/Sources/SecureIdDocumentFormControllerNode.swift b/submodules/PassportUI/Sources/SecureIdDocumentFormControllerNode.swift
index 5ec8b56f37..0746379912 100644
--- a/submodules/PassportUI/Sources/SecureIdDocumentFormControllerNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdDocumentFormControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
@@ -1809,9 +1808,9 @@ enum SecureIdDocumentFormEntry: FormControllerEntry {
case .scanYourPassportInfo:
return FormControllerTextItem(text: strings.Passport_ScanPassportHelp)
case .scansHeader:
- return FormControllerHeaderItem(text: strings.Passport_Scans)
+ return FormControllerHeaderItem(text: strings.Passport_ScansHeader)
case let .scan(index, document, error):
- return SecureIdValueFormFileItem(account: params.account, context: params.context, document: document, placeholder: nil, title: strings.Passport_Scans_ScanIndex("\(index + 1)").0, label: error.flatMap(SecureIdValueFormFileItemLabel.error) ?? .timestamp, activated: {
+ return SecureIdValueFormFileItem(account: params.account, context: params.context, document: document, placeholder: nil, title: strings.Passport_Scans_ScanIndex("\(index + 1)").string, label: error.flatMap(SecureIdValueFormFileItemLabel.error) ?? .timestamp, activated: {
params.openDocument(document)
}, deleted: {
params.deleteDocument(document)
@@ -1876,7 +1875,7 @@ enum SecureIdDocumentFormEntry: FormControllerEntry {
}
if let value = value {
- title = strings.Passport_Identity_NativeNameTitle(value).0.uppercased()
+ title = strings.Passport_Identity_NativeNameTitle(value).string.uppercased()
} else {
title = strings.Passport_Identity_NativeNameGenericTitle
}
@@ -1916,7 +1915,7 @@ enum SecureIdDocumentFormEntry: FormControllerEntry {
text = strings.Passport_Identity_NativeNameHelp
} else {
let countryName = AuthorizationSequenceCountrySelectionController.lookupCountryNameById(countryCode.uppercased(), strings: strings) ?? ""
- text = strings.Passport_Identity_NativeNameGenericHelp(countryName).0
+ text = strings.Passport_Identity_NativeNameGenericHelp(countryName).string
}
return FormControllerTextItem(text: text)
case let .gender(value, error):
@@ -2115,7 +2114,7 @@ enum SecureIdDocumentFormEntry: FormControllerEntry {
case .translationsHeader:
return FormControllerHeaderItem(text: strings.Passport_Identity_Translations)
case let .translation(index, document, error):
- return SecureIdValueFormFileItem(account: params.account, context: params.context, document: document, placeholder: nil, title: strings.Passport_Scans_ScanIndex("\(index + 1)").0, label: error.flatMap(SecureIdValueFormFileItemLabel.error) ?? .timestamp, activated: {
+ return SecureIdValueFormFileItem(account: params.account, context: params.context, document: document, placeholder: nil, title: strings.Passport_Scans_ScanIndex("\(index + 1)").string, label: error.flatMap(SecureIdValueFormFileItemLabel.error) ?? .timestamp, activated: {
params.openDocument(document)
}, deleted: {
params.deleteDocument(document)
diff --git a/submodules/PassportUI/Sources/SecureIdDocumentGalleryController.swift b/submodules/PassportUI/Sources/SecureIdDocumentGalleryController.swift
index 8216885c40..ccea224d94 100644
--- a/submodules/PassportUI/Sources/SecureIdDocumentGalleryController.swift
+++ b/submodules/PassportUI/Sources/SecureIdDocumentGalleryController.swift
@@ -6,7 +6,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import GalleryUI
diff --git a/submodules/PassportUI/Sources/SecureIdDocumentGalleryFooterContentNode.swift b/submodules/PassportUI/Sources/SecureIdDocumentGalleryFooterContentNode.swift
index 269c1bdbdc..cdb9014d03 100644
--- a/submodules/PassportUI/Sources/SecureIdDocumentGalleryFooterContentNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdDocumentGalleryFooterContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Photos
import TelegramPresentationData
diff --git a/submodules/PassportUI/Sources/SecureIdDocumentImageGalleryItem.swift b/submodules/PassportUI/Sources/SecureIdDocumentImageGalleryItem.swift
index 3d3b692a44..45d6a4c48d 100644
--- a/submodules/PassportUI/Sources/SecureIdDocumentImageGalleryItem.swift
+++ b/submodules/PassportUI/Sources/SecureIdDocumentImageGalleryItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import PhotoResources
@@ -44,7 +43,7 @@ class SecureIdDocumentGalleryItem: GalleryItem {
node.setResource(secureIdContext: self.secureIdContext, resource: self.resource)
- node._title.set(.single(self.strings.Items_NOfM("\(self.location.position + 1)", "\(self.location.totalCount)").0))
+ node._title.set(.single(self.strings.Items_NOfM("\(self.location.position + 1)", "\(self.location.totalCount)").string))
node.setCaption(self.caption)
node.delete = self.delete
@@ -54,7 +53,7 @@ class SecureIdDocumentGalleryItem: GalleryItem {
func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? SecureIdDocumentGalleryItemNode {
- node._title.set(.single(self.strings.Items_NOfM("\(self.location.position + 1)", "\(self.location.totalCount)").0))
+ node._title.set(.single(self.strings.Items_NOfM("\(self.location.position + 1)", "\(self.location.totalCount)").string))
node.setCaption(self.caption)
node.delete = self.delete
diff --git a/submodules/PassportUI/Sources/SecureIdDocumentTypeSelectionController.swift b/submodules/PassportUI/Sources/SecureIdDocumentTypeSelectionController.swift
index 08b80c1d04..028eab0e19 100644
--- a/submodules/PassportUI/Sources/SecureIdDocumentTypeSelectionController.swift
+++ b/submodules/PassportUI/Sources/SecureIdDocumentTypeSelectionController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
diff --git a/submodules/PassportUI/Sources/SecureIdLocalResource.swift b/submodules/PassportUI/Sources/SecureIdLocalResource.swift
index 4df088ab91..dfb8a8ffce 100644
--- a/submodules/PassportUI/Sources/SecureIdLocalResource.swift
+++ b/submodules/PassportUI/Sources/SecureIdLocalResource.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
diff --git a/submodules/PassportUI/Sources/SecureIdPlaintextFormController.swift b/submodules/PassportUI/Sources/SecureIdPlaintextFormController.swift
index f4caf3c70f..e393672c69 100644
--- a/submodules/PassportUI/Sources/SecureIdPlaintextFormController.swift
+++ b/submodules/PassportUI/Sources/SecureIdPlaintextFormController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ProgressNavigationButtonNode
import AccountContext
diff --git a/submodules/PassportUI/Sources/SecureIdPlaintextFormControllerNode.swift b/submodules/PassportUI/Sources/SecureIdPlaintextFormControllerNode.swift
index bd1d58641a..558a92b562 100644
--- a/submodules/PassportUI/Sources/SecureIdPlaintextFormControllerNode.swift
+++ b/submodules/PassportUI/Sources/SecureIdPlaintextFormControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import CoreTelephony
@@ -570,7 +569,7 @@ public enum SecureIdPlaintextFormEntry: FormControllerEntry {
public func item(params: SecureIdPlaintextFormParams, strings: PresentationStrings) -> FormControllerItem {
switch self {
case let .immediatelyAvailablePhone(value):
- return FormControllerActionItem(type: .accent, title: strings.Passport_Phone_UseTelegramNumber(formatPhoneNumber(value)).0, activated: {
+ return FormControllerActionItem(type: .accent, title: strings.Passport_Phone_UseTelegramNumber(formatPhoneNumber(value)).string, activated: {
params.usePhone(value)
})
case .immediatelyAvailablePhoneInfo:
@@ -603,7 +602,7 @@ public enum SecureIdPlaintextFormEntry: FormControllerEntry {
case .numberVerifyInfo:
return FormControllerTextItem(text: strings.ChangePhoneNumberCode_Help)
case let .immediatelyAvailableEmail(value):
- return FormControllerActionItem(type: .accent, title: strings.Passport_Email_UseTelegramEmail(value).0, activated: {
+ return FormControllerActionItem(type: .accent, title: strings.Passport_Email_UseTelegramEmail(value).string, activated: {
params.useEmailAddress(value)
})
case .immediatelyAvailableEmailInfo:
@@ -625,7 +624,7 @@ public enum SecureIdPlaintextFormEntry: FormControllerEntry {
})
case let .emailVerifyInfo(address):
- return FormControllerTextItem(text: strings.Passport_Email_CodeHelp(address).0)
+ return FormControllerTextItem(text: strings.Passport_Email_CodeHelp(address).string)
}
}
}
diff --git a/submodules/PassportUI/Sources/SecureIdValueFormFileItem.swift b/submodules/PassportUI/Sources/SecureIdValueFormFileItem.swift
index 890c145641..87e8c3291a 100644
--- a/submodules/PassportUI/Sources/SecureIdValueFormFileItem.swift
+++ b/submodules/PassportUI/Sources/SecureIdValueFormFileItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PassportUI/Sources/SecureIdValueFormPhoneItem.swift b/submodules/PassportUI/Sources/SecureIdValueFormPhoneItem.swift
index 0d327ce953..51487c8ab3 100644
--- a/submodules/PassportUI/Sources/SecureIdValueFormPhoneItem.swift
+++ b/submodules/PassportUI/Sources/SecureIdValueFormPhoneItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import PhoneInputNode
diff --git a/submodules/PassportUI/Sources/SecureIdValues.swift b/submodules/PassportUI/Sources/SecureIdValues.swift
index ce13a43436..e3305225e7 100644
--- a/submodules/PassportUI/Sources/SecureIdValues.swift
+++ b/submodules/PassportUI/Sources/SecureIdValues.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
private let dateFormatter: DateFormatter = {
let formatter = DateFormatter()
diff --git a/submodules/PassportUI/Sources/SecureIdVerificationDocument.swift b/submodules/PassportUI/Sources/SecureIdVerificationDocument.swift
index 377ed144b5..ca8dafca8d 100644
--- a/submodules/PassportUI/Sources/SecureIdVerificationDocument.swift
+++ b/submodules/PassportUI/Sources/SecureIdVerificationDocument.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
enum SecureIdVerificationLocalDocumentState: Equatable {
case uploading(Float)
diff --git a/submodules/PassportUI/Sources/SecureIdVerificationDocumentsContext.swift b/submodules/PassportUI/Sources/SecureIdVerificationDocumentsContext.swift
index 3d585b6d32..9e60e8f3ff 100644
--- a/submodules/PassportUI/Sources/SecureIdVerificationDocumentsContext.swift
+++ b/submodules/PassportUI/Sources/SecureIdVerificationDocumentsContext.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
private final class DocumentContext {
diff --git a/submodules/PasswordSetupUI/BUILD b/submodules/PasswordSetupUI/BUILD
index 8aa23d5fdf..cbd779be7a 100644
--- a/submodules/PasswordSetupUI/BUILD
+++ b/submodules/PasswordSetupUI/BUILD
@@ -26,7 +26,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/ProgressNavigationButtonNode:ProgressNavigationButtonNode",
diff --git a/submodules/PasswordSetupUI/Sources/ResetPasswordController.swift b/submodules/PasswordSetupUI/Sources/ResetPasswordController.swift
index 18b071b38f..174a50aa75 100644
--- a/submodules/PasswordSetupUI/Sources/ResetPasswordController.swift
+++ b/submodules/PasswordSetupUI/Sources/ResetPasswordController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -71,14 +70,14 @@ private enum ResetPasswordEntry: ItemListNodeEntry, Equatable {
func item(presentationData: ItemListPresentationData, arguments: Any) -> ListViewItem {
let arguments = arguments as! ResetPasswordControllerArguments
switch self {
- case let .code(theme, strings, text, value):
+ case let .code(theme, _, text, value):
return ItemListSingleLineInputItem(presentationData: presentationData, title: NSAttributedString(string: text, textColor: theme.list.itemPrimaryTextColor), text: value, placeholder: "", type: .number, spacing: 10.0, tag: ResetPasswordEntryTag.code, sectionId: self.section, textUpdated: { updatedText in
arguments.updateCodeText(updatedText)
}, action: {
})
- case let .codeInfo(theme, text):
+ case let .codeInfo(_, text):
return ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: self.section)
- case let .helpInfo(theme, text):
+ case let .helpInfo(_, text):
return ItemListTextItem(presentationData: presentationData, text: .markdown(text), sectionId: self.section, linkAction: { action in
if case .tap = action {
arguments.openHelp()
@@ -100,10 +99,10 @@ private func resetPasswordControllerEntries(presentationData: PresentationData,
entries.append(.codeInfo(presentationData.theme, presentationData.strings.TwoStepAuth_RecoveryCodeHelp))
let stringData = presentationData.strings.TwoStepAuth_RecoveryEmailUnavailable(pattern)
- var string = stringData.0
- if let (_, range) = stringData.1.first {
- string.insert(contentsOf: "]()", at: string.index(string.startIndex, offsetBy: range.upperBound))
- string.insert(contentsOf: "[", at: string.index(string.startIndex, offsetBy: range.lowerBound))
+ var string = stringData.string
+ if let range = stringData.ranges.first {
+ string.insert(contentsOf: "]()", at: string.index(string.startIndex, offsetBy: range.range.upperBound))
+ string.insert(contentsOf: "[", at: string.index(string.startIndex, offsetBy: range.range.lowerBound))
}
entries.append(.helpInfo(presentationData.theme, string))
diff --git a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationController.swift b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationController.swift
index 478e8abc9d..33768b8952 100644
--- a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationController.swift
+++ b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ProgressNavigationButtonNode
import AccountContext
diff --git a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift
index 8fe2f2b704..2a9f9ee4b9 100644
--- a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift
+++ b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ActivityIndicator
@@ -380,7 +379,7 @@ final class SetupTwoStepVerificationControllerNode: ViewControllerTracingNode {
case let .confirm(_, _, pattern, _):
emailPattern = pattern
}
- subtitle = self.presentationData.strings.TwoStepAuth_ConfirmEmailDescription(emailPattern).0
+ subtitle = self.presentationData.strings.TwoStepAuth_ConfirmEmailDescription(emailPattern).string
inputType = .code
inputPlaceholder = self.presentationData.strings.TwoStepAuth_ConfirmEmailCodePlaceholder
inputText = code
diff --git a/submodules/PasswordSetupUI/Sources/TwoFactorAuthDataInputScreen.swift b/submodules/PasswordSetupUI/Sources/TwoFactorAuthDataInputScreen.swift
index 92e4fa5323..ce057a6901 100644
--- a/submodules/PasswordSetupUI/Sources/TwoFactorAuthDataInputScreen.swift
+++ b/submodules/PasswordSetupUI/Sources/TwoFactorAuthDataInputScreen.swift
@@ -639,7 +639,7 @@ public final class TwoFactorDataInputScreen: ViewController {
case let .limitExceeded(retryAtTimestamp):
if let retryAtTimestamp = retryAtTimestamp {
let remainingSeconds = retryAtTimestamp - Int32(Date().timeIntervalSince1970)
- text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).0
+ text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).string
} else {
text = presentationData.strings.TwoStepAuth_FloodError
}
@@ -679,7 +679,7 @@ public final class TwoFactorDataInputScreen: ViewController {
case let .limitExceeded(retryAtTimestamp):
if let retryAtTimestamp = retryAtTimestamp {
let remainingSeconds = retryAtTimestamp - Int32(Date().timeIntervalSince1970)
- text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).0
+ text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).string
} else {
text = presentationData.strings.TwoStepAuth_FloodError
}
@@ -743,7 +743,7 @@ public final class TwoFactorDataInputScreen: ViewController {
case let .limitExceeded(retryAtTimestamp):
if let retryAtTimestamp = retryAtTimestamp {
let remainingSeconds = retryAtTimestamp - Int32(Date().timeIntervalSince1970)
- text = strongSelf.presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: strongSelf.presentationData.strings, value: remainingSeconds)).0
+ text = strongSelf.presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: strongSelf.presentationData.strings, value: remainingSeconds)).string
} else {
text = strongSelf.presentationData.strings.TwoStepAuth_FloodError
}
@@ -1378,12 +1378,12 @@ private final class TwoFactorDataInputScreenNode: ViewControllerTracingNode, UIS
]
case let .passwordRecoveryEmail(emailPattern, _):
title = presentationData.strings.TwoFactorSetup_EmailVerification_Title
- let (rawText, ranges) = presentationData.strings.TwoFactorSetup_EmailVerification_Text(emailPattern)
+ let formattedString = presentationData.strings.TwoFactorSetup_EmailVerification_Text(emailPattern)
let string = NSMutableAttributedString()
- string.append(NSAttributedString(string: rawText, font: Font.regular(16.0), textColor: presentationData.theme.list.itemPrimaryTextColor))
- for (_, range) in ranges {
- string.addAttribute(.font, value: Font.semibold(16.0), range: range)
+ string.append(NSAttributedString(string: formattedString.string, font: Font.regular(16.0), textColor: presentationData.theme.list.itemPrimaryTextColor))
+ for range in formattedString.ranges {
+ string.addAttribute(.font, value: Font.semibold(16.0), range: range.range)
}
text = string
@@ -1405,12 +1405,12 @@ private final class TwoFactorDataInputScreenNode: ViewControllerTracingNode, UIS
]
case let .emailConfirmation(_, emailPattern, _):
title = presentationData.strings.TwoFactorSetup_EmailVerification_Title
- let (rawText, ranges) = presentationData.strings.TwoFactorSetup_EmailVerification_Text(emailPattern)
+ let formattedString = presentationData.strings.TwoFactorSetup_EmailVerification_Text(emailPattern)
let string = NSMutableAttributedString()
- string.append(NSAttributedString(string: rawText, font: Font.regular(16.0), textColor: presentationData.theme.list.itemPrimaryTextColor))
- for (_, range) in ranges {
- string.addAttribute(.font, value: Font.semibold(16.0), range: range)
+ string.append(NSAttributedString(string: formattedString.string, font: Font.regular(16.0), textColor: presentationData.theme.list.itemPrimaryTextColor))
+ for range in formattedString.ranges {
+ string.addAttribute(.font, value: Font.semibold(16.0), range: range.range)
}
text = string
diff --git a/submodules/PeerAvatarGalleryUI/BUILD b/submodules/PeerAvatarGalleryUI/BUILD
index 401cd954bb..347f0abd24 100644
--- a/submodules/PeerAvatarGalleryUI/BUILD
+++ b/submodules/PeerAvatarGalleryUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/GalleryUI:GalleryUI",
diff --git a/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryController.swift b/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryController.swift
index 89171cffca..6c3b315f8e 100644
--- a/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryController.swift
+++ b/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryController.swift
@@ -6,7 +6,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import GalleryUI
diff --git a/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryItemFooterContentNode.swift b/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryItemFooterContentNode.swift
index 55dec58bb0..aedbe340bb 100644
--- a/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryItemFooterContentNode.swift
+++ b/submodules/PeerAvatarGalleryUI/Sources/AvatarGalleryItemFooterContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Photos
import TelegramPresentationData
@@ -110,7 +109,7 @@ final class AvatarGalleryItemFooterContentNode: GalleryFooterContentNode {
case let .image(_, _, _, videoRepresentations, peer, date, _, _, _, _):
nameText = peer?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? ""
if let date = date {
- dateText = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: date).0
+ dateText = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: date).string
}
if (!videoRepresentations.isEmpty) {
diff --git a/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift b/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift
index 7a9a47e931..d11fa6453a 100644
--- a/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift
+++ b/submodules/PeerAvatarGalleryUI/Sources/PeerAvatarImageGalleryItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import RadialStatusNode
@@ -71,7 +70,7 @@ class PeerAvatarImageGalleryItem: GalleryItem {
let node = PeerAvatarImageGalleryItemNode(context: self.context, presentationData: self.presentationData, peer: self.peer, sourceCorners: self.sourceCorners)
if let indexData = self.entry.indexData {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").string))
}
node.setEntry(self.entry, synchronous: synchronous)
@@ -85,7 +84,7 @@ class PeerAvatarImageGalleryItem: GalleryItem {
func updateNode(node: GalleryItemNode, synchronous: Bool) {
if let node = node as? PeerAvatarImageGalleryItemNode {
if let indexData = self.entry.indexData {
- node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").0))
+ node._title.set(.single(self.presentationData.strings.Items_NOfM("\(indexData.position + 1)", "\(indexData.totalCount)").string))
}
let previousContentAnimations = node.imageNode.contentAnimations
if synchronous {
diff --git a/submodules/PeerInfoAvatarListNode/BUILD b/submodules/PeerInfoAvatarListNode/BUILD
index 0eaab52961..edff292ed4 100644
--- a/submodules/PeerInfoAvatarListNode/BUILD
+++ b/submodules/PeerInfoAvatarListNode/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AvatarNode:AvatarNode",
"//submodules/PhotoResources:PhotoResources",
diff --git a/submodules/PeerInfoAvatarListNode/Sources/PeerInfoAvatarListNode.swift b/submodules/PeerInfoAvatarListNode/Sources/PeerInfoAvatarListNode.swift
index 7677c2afd9..9c22371c91 100644
--- a/submodules/PeerInfoAvatarListNode/Sources/PeerInfoAvatarListNode.swift
+++ b/submodules/PeerInfoAvatarListNode/Sources/PeerInfoAvatarListNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import SwiftSignalKit
-import SyncCore
import Postbox
import TelegramCore
import AccountContext
diff --git a/submodules/PeerInfoUI/BUILD b/submodules/PeerInfoUI/BUILD
index 2f8447fa6b..9695768934 100644
--- a/submodules/PeerInfoUI/BUILD
+++ b/submodules/PeerInfoUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/ItemListUI:ItemListUI",
diff --git a/submodules/PeerInfoUI/Sources/ChannelAdminController.swift b/submodules/PeerInfoUI/Sources/ChannelAdminController.swift
index 2c3c31104b..7ad49ac1e4 100644
--- a/submodules/PeerInfoUI/Sources/ChannelAdminController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelAdminController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -736,7 +735,7 @@ private func channelAdminControllerEntries(presentationData: PresentationData, s
let rankEnabled = !state.updating && canEdit
entries.append(.rankTitle(presentationData.theme, presentationData.strings.Group_EditAdmin_RankTitle.uppercased(), rankEnabled && state.focusedOnRank ? Int32(currentRank?.count ?? 0) : nil, rankMaxLength))
entries.append(.rank(presentationData.theme, presentationData.strings, isCreator ? presentationData.strings.Group_EditAdmin_RankOwnerPlaceholder : presentationData.strings.Group_EditAdmin_RankAdminPlaceholder, currentRank ?? "", rankEnabled))
- entries.append(.rankInfo(presentationData.theme, presentationData.strings.Group_EditAdmin_RankInfo(placeholder).0))
+ entries.append(.rankInfo(presentationData.theme, presentationData.strings.Group_EditAdmin_RankInfo(placeholder).string))
}
if canDismiss {
@@ -1059,9 +1058,9 @@ public func channelAdminController(context: AccountContext, peerId: PeerId, admi
if let admin = adminView.peers[adminView.peerId] {
switch channel.info {
case .broadcast:
- text = presentationData.strings.Privacy_GroupsAndChannels_InviteToChannelError(admin.compactDisplayTitle, admin.compactDisplayTitle).0
+ text = presentationData.strings.Privacy_GroupsAndChannels_InviteToChannelError(admin.compactDisplayTitle, admin.compactDisplayTitle).string
case .group:
- text = presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).0
+ text = presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).string
}
}
case .notMutualContact:
@@ -1143,9 +1142,9 @@ public func channelAdminController(context: AccountContext, peerId: PeerId, admi
case .restricted:
switch channel.info {
case .broadcast:
- text = presentationData.strings.Privacy_GroupsAndChannels_InviteToChannelError(admin.compactDisplayTitle, admin.compactDisplayTitle).0
+ text = presentationData.strings.Privacy_GroupsAndChannels_InviteToChannelError(admin.compactDisplayTitle, admin.compactDisplayTitle).string
case .group:
- text = presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).0
+ text = presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).string
}
case .notMutualContact:
if case .broadcast = channel.info {
@@ -1204,7 +1203,7 @@ public func channelAdminController(context: AccountContext, peerId: PeerId, admi
updateRightsDisposable.set((context.engine.peers.addGroupAdmin(peerId: peerId, adminId: adminId)
|> deliverOnMainQueue).start(error: { error in
if case let .addMemberError(error) = error, case .privacy = error, let admin = adminView.peers[adminView.peerId] {
- presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
+ presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
} else if case .adminsTooMuch = error {
presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.Group_ErrorAdminsTooMuch, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
}
@@ -1264,7 +1263,7 @@ public func channelAdminController(context: AccountContext, peerId: PeerId, admi
if case let .addMemberError(error) = error {
var text = presentationData.strings.Login_UnknownError
if case .restricted = error, let admin = adminView.peers[adminView.peerId] {
- text = presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).0
+ text = presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(admin.compactDisplayTitle, admin.compactDisplayTitle).string
} else if case .tooMuchJoined = error {
text = presentationData.strings.Invite_ChannelsTooMuch
}
diff --git a/submodules/PeerInfoUI/Sources/ChannelAdminsController.swift b/submodules/PeerInfoUI/Sources/ChannelAdminsController.swift
index d0b16d3986..2ce7af4502 100644
--- a/submodules/PeerInfoUI/Sources/ChannelAdminsController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelAdminsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -222,7 +221,7 @@ private enum ChannelAdminsEntry: ItemListNodeEntry {
if peer.id == participant.peer.id {
peerText = strings.Channel_Management_LabelAdministrator
} else {
- peerText = strings.Channel_Management_PromotedBy(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder)).0
+ peerText = strings.Channel_Management_PromotedBy(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder)).string
}
} else {
peerText = ""
@@ -545,7 +544,7 @@ public func channelAdminsController(context: AccountContext, peerId initialPeerI
guard let peer = peer, let user = user else {
return
}
- presentControllerImpl?(UndoOverlayController(presentationData: context.sharedContext.currentPresentationData.with { $0 }, content: .succeed(text: presentationData.strings.Channel_OwnershipTransfer_TransferCompleted(user.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0), elevatedLayout: false, action: { _ in return false }), nil)
+ presentControllerImpl?(UndoOverlayController(presentationData: context.sharedContext.currentPresentationData.with { $0 }, content: .succeed(text: presentationData.strings.Channel_OwnershipTransfer_TransferCompleted(user.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string), elevatedLayout: false, action: { _ in return false }), nil)
})
}
diff --git a/submodules/PeerInfoUI/Sources/ChannelBannedMemberController.swift b/submodules/PeerInfoUI/Sources/ChannelBannedMemberController.swift
index 6b5a47e44b..b5ef77db87 100644
--- a/submodules/PeerInfoUI/Sources/ChannelBannedMemberController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelBannedMemberController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -318,7 +317,7 @@ private func channelBannedMemberControllerEntries(presentationData: Presentation
entries.append(.timeout(presentationData.theme, presentationData.strings.GroupPermission_Duration, currentTimeoutString))
if let initialParticipant = initialParticipant, case let .member(member) = initialParticipant, let banInfo = member.banInfo, let initialBannedBy = initialBannedBy {
- entries.append(.exceptionInfo(presentationData.theme, presentationData.strings.GroupPermission_AddedInfo(initialBannedBy.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), stringForRelativeSymbolicTimestamp(strings: presentationData.strings, relativeTimestamp: banInfo.timestamp, relativeTo: state.referenceTimestamp, dateTimeFormat: presentationData.dateTimeFormat)).0))
+ entries.append(.exceptionInfo(presentationData.theme, presentationData.strings.GroupPermission_AddedInfo(initialBannedBy.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), stringForRelativeSymbolicTimestamp(strings: presentationData.strings, relativeTimestamp: banInfo.timestamp, relativeTo: state.referenceTimestamp, dateTimeFormat: presentationData.dateTimeFormat)).string))
entries.append(.delete(presentationData.theme, presentationData.strings.GroupPermission_Delete))
}
} else if let group = channelView.peers[channelView.peerId] as? TelegramGroup, let member = memberView.peers[memberView.peerId] {
@@ -364,7 +363,7 @@ private func channelBannedMemberControllerEntries(presentationData: Presentation
entries.append(.timeout(presentationData.theme, presentationData.strings.GroupPermission_Duration, currentTimeoutString))
if let initialParticipant = initialParticipant, case let .member(member) = initialParticipant, let banInfo = member.banInfo, let initialBannedBy = initialBannedBy {
- entries.append(.exceptionInfo(presentationData.theme, presentationData.strings.GroupPermission_AddedInfo(initialBannedBy.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), stringForRelativeSymbolicTimestamp(strings: presentationData.strings, relativeTimestamp: banInfo.timestamp, relativeTo: state.referenceTimestamp, dateTimeFormat: presentationData.dateTimeFormat)).0))
+ entries.append(.exceptionInfo(presentationData.theme, presentationData.strings.GroupPermission_AddedInfo(initialBannedBy.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), stringForRelativeSymbolicTimestamp(strings: presentationData.strings, relativeTimestamp: banInfo.timestamp, relativeTo: state.referenceTimestamp, dateTimeFormat: presentationData.dateTimeFormat)).string))
entries.append(.delete(presentationData.theme, presentationData.strings.GroupPermission_Delete))
}
}
@@ -717,7 +716,7 @@ public func channelBannedMemberController(context: AccountContext, peerId: PeerI
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
let actionSheet = ActionSheetController(presentationData: presentationData)
var items: [ActionSheetItem] = []
- items.append(ActionSheetTextItem(title: presentationData.strings.GroupPermission_ApplyAlertText(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0))
+ items.append(ActionSheetTextItem(title: presentationData.strings.GroupPermission_ApplyAlertText(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string))
items.append(ActionSheetButtonItem(title: presentationData.strings.GroupPermission_ApplyAlertAction, color: .accent, font: .default, enabled: true, action: { [weak actionSheet] in
actionSheet?.dismissAnimated()
applyRights()
diff --git a/submodules/PeerInfoUI/Sources/ChannelBlacklistController.swift b/submodules/PeerInfoUI/Sources/ChannelBlacklistController.swift
index 9a180f0474..16c1ce0581 100644
--- a/submodules/PeerInfoUI/Sources/ChannelBlacklistController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelBlacklistController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -164,7 +163,7 @@ private enum ChannelBlacklistEntry: ItemListNodeEntry {
switch participant.participant {
case let .member(_, _, _, banInfo, _):
if let banInfo = banInfo, let peer = participant.peers[banInfo.restrictedBy] {
- text = .text(strings.Channel_Management_RemovedBy(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder)).0, .secondary)
+ text = .text(strings.Channel_Management_RemovedBy(peer.displayTitle(strings: strings, displayOrder: nameDisplayOrder)).string, .secondary)
}
default:
break
diff --git a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupActionSheetItem.swift b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupActionSheetItem.swift
index 8a089dab3d..a485d192bd 100644
--- a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupActionSheetItem.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupActionSheetItem.swift
@@ -5,7 +5,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AvatarNode
@@ -69,7 +68,7 @@ private final class ChannelDiscussionGroupActionSheetItemNode: ActionSheetItemNo
self.channelAvatarNode.setPeer(context: context, theme: (context.sharedContext.currentPresentationData.with { $0 }).theme, peer: channelPeer)
self.groupAvatarNode.setPeer(context: context, theme: (context.sharedContext.currentPresentationData.with { $0 }).theme, peer: groupPeer)
- let text: (String, [(Int, NSRange)])
+ let text: PresentationStrings.FormattedString
if let channelPeer = channelPeer as? TelegramChannel, let addressName = channelPeer.addressName, !addressName.isEmpty {
text = strings.Channel_DiscussionGroup_PublicChannelLink(groupPeer.displayTitle(strings: strings, displayOrder: nameDisplayOrder), channelPeer.displayTitle(strings: strings, displayOrder: nameDisplayOrder))
} else {
@@ -79,9 +78,9 @@ private final class ChannelDiscussionGroupActionSheetItemNode: ActionSheetItemNo
let textFont = Font.regular(floor(theme.baseFontSize * 14.0 / 17.0))
let boldFont = Font.semibold(floor(theme.baseFontSize * 14.0 / 17.0))
- let attributedText = NSMutableAttributedString(attributedString: NSAttributedString(string: text.0, font: textFont, textColor: theme.primaryTextColor))
- for (_, range) in text.1 {
- attributedText.addAttribute(.font, value: boldFont, range: range)
+ let attributedText = NSMutableAttributedString(attributedString: NSAttributedString(string: text.string, font: textFont, textColor: theme.primaryTextColor))
+ for range in text.ranges {
+ attributedText.addAttribute(.font, value: boldFont, range: range.range)
}
self.textNode.attributedText = attributedText
diff --git a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift
index 37ce4689be..1f93629c74 100644
--- a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSearchContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
@@ -132,7 +131,7 @@ final class ChannelDiscussionGroupSearchContainerNode: SearchDisplayControllerCo
self.dimNode = ASDisplayNode()
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupController.swift b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupController.swift
index dc2e738bf6..ba557ede27 100644
--- a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -136,9 +135,9 @@ private enum ChannelDiscussionGroupSetupControllerEntry: ItemListNodeEntry {
let text: String
if let title = title {
if isGroup {
- text = presentationData.strings.Channel_CommentsGroup_HeaderGroupSet(title).0
+ text = presentationData.strings.Channel_CommentsGroup_HeaderGroupSet(title).string
} else {
- text = presentationData.strings.Channel_CommentsGroup_HeaderSet(title).0
+ text = presentationData.strings.Channel_CommentsGroup_HeaderSet(title).string
}
} else {
text = presentationData.strings.Channel_CommentsGroup_Header
diff --git a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupHeaderItem.swift b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupHeaderItem.swift
index c1e2859d9f..904d8c20c1 100644
--- a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupHeaderItem.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupHeaderItem.swift
@@ -132,7 +132,7 @@ class ChannelDiscussionGroupSetupHeaderItemNode: ListViewItemNode {
let bold = MarkdownAttributeSet(font: titleBoldFont, textColor: item.theme.list.sectionHeaderTextColor)
let string: NSAttributedString
if let title = item.title {
- string = addAttributesToStringWithRanges(item.isGroup ? item.strings.Channel_CommentsGroup_HeaderGroupSet(title) : item.strings.Channel_CommentsGroup_HeaderSet(title), body: body, argumentAttributes: [0: bold])
+ string = addAttributesToStringWithRanges(item.isGroup ? item.strings.Channel_CommentsGroup_HeaderGroupSet(title)._tuple : item.strings.Channel_CommentsGroup_HeaderSet(title)._tuple, body: body, argumentAttributes: [0: bold])
} else {
string = NSAttributedString(string: item.strings.Channel_CommentsGroup_Header, font: titleFont, textColor: item.theme.list.sectionHeaderTextColor)
}
diff --git a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupSearchItem.swift b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupSearchItem.swift
index 3c1189a27f..637245089b 100644
--- a/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupSearchItem.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelDiscussionGroupSetupSearchItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/PeerInfoUI/Sources/ChannelInfoController.swift b/submodules/PeerInfoUI/Sources/ChannelInfoController.swift
index ce61260895..cfdba3954f 100644
--- a/submodules/PeerInfoUI/Sources/ChannelInfoController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelInfoController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/PeerInfoUI/Sources/ChannelMembersController.swift b/submodules/PeerInfoUI/Sources/ChannelMembersController.swift
index dc424cb6ad..aed5d89d34 100644
--- a/submodules/PeerInfoUI/Sources/ChannelMembersController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelMembersController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift b/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift
index fe3b052e30..8035635042 100644
--- a/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelMembersSearchContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
@@ -337,12 +336,12 @@ public final class ChannelMembersSearchContainerNode: SearchDisplayControllerCon
self.emptyQueryListNode = ListView()
self.emptyQueryListNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.emptyResultsTitleNode = ImmediateTextNode()
@@ -817,7 +816,7 @@ public final class ChannelMembersSearchContainerNode: SearchDisplayControllerCon
if peer.id == participant.peer.id {
label = presentationData.strings.Channel_Management_LabelAdministrator
} else {
- label = presentationData.strings.Channel_Management_PromotedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ label = presentationData.strings.Channel_Management_PromotedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
}
}
@@ -844,7 +843,7 @@ public final class ChannelMembersSearchContainerNode: SearchDisplayControllerCon
switch participant.participant {
case let .member(_, _, _, banInfo, _):
if let banInfo = banInfo, let peer = participant.peers[banInfo.restrictedBy] {
- label = presentationData.strings.Channel_Management_RemovedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ label = presentationData.strings.Channel_Management_RemovedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
default:
break
@@ -1121,7 +1120,7 @@ public final class ChannelMembersSearchContainerNode: SearchDisplayControllerCon
if peer.id == participant.peer.id {
label = presentationData.strings.Channel_Management_LabelAdministrator
} else {
- label = presentationData.strings.Channel_Management_PromotedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ label = presentationData.strings.Channel_Management_PromotedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
}
}
@@ -1148,7 +1147,7 @@ public final class ChannelMembersSearchContainerNode: SearchDisplayControllerCon
switch participant.participant {
case let .member(_, _, _, banInfo, _):
if let banInfo = banInfo, let peer = participant.peers[banInfo.restrictedBy] {
- label = presentationData.strings.Channel_Management_RemovedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ label = presentationData.strings.Channel_Management_RemovedBy(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
default:
break
@@ -1351,7 +1350,7 @@ public final class ChannelMembersSearchContainerNode: SearchDisplayControllerCon
strongSelf.listNode.isHidden = !isSearching
strongSelf.emptyQueryListNode.isHidden = isSearching
- strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.ChatList_Search_NoResultsQueryDescription(transition.query).0, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
+ strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.ChatList_Search_NoResultsQueryDescription(transition.query).string, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
let emptyResults = transition.isSearching && transition.isEmpty
strongSelf.emptyResultsTitleNode.isHidden = !emptyResults
diff --git a/submodules/PeerInfoUI/Sources/ChannelMembersSearchController.swift b/submodules/PeerInfoUI/Sources/ChannelMembersSearchController.swift
index e0b9298316..7bbdc8eda3 100644
--- a/submodules/PeerInfoUI/Sources/ChannelMembersSearchController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelMembersSearchController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift b/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift
index 0ae15a0ed8..c39a065c98 100644
--- a/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelMembersSearchControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -213,7 +212,7 @@ class ChannelMembersSearchControllerNode: ASDisplayNode {
}
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/PeerInfoUI/Sources/ChannelOwnershipTransferController.swift b/submodules/PeerInfoUI/Sources/ChannelOwnershipTransferController.swift
index bd93b2c704..e84e6d3f9f 100644
--- a/submodules/PeerInfoUI/Sources/ChannelOwnershipTransferController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelOwnershipTransferController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ActivityIndicator
import TextFormat
@@ -542,10 +541,10 @@ private func confirmChannelOwnershipTransferController(context: AccountContext,
var text: String
if isGroup {
title = presentationData.strings.Group_OwnershipTransfer_Title
- text = presentationData.strings.Group_OwnershipTransfer_DescriptionInfo(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), member.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.Group_OwnershipTransfer_DescriptionInfo(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), member.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
} else {
title = presentationData.strings.Channel_OwnershipTransfer_Title
- text = presentationData.strings.Channel_OwnershipTransfer_DescriptionInfo(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), member.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.Channel_OwnershipTransfer_DescriptionInfo(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder), member.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
let attributedTitle = NSAttributedString(string: title, font: Font.medium(17.0), textColor: theme.primaryColor, paragraphAlignment: .center)
diff --git a/submodules/PeerInfoUI/Sources/ChannelPermissionsController.swift b/submodules/PeerInfoUI/Sources/ChannelPermissionsController.swift
index b2b2d60479..4af5f039cf 100644
--- a/submodules/PeerInfoUI/Sources/ChannelPermissionsController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelPermissionsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -451,7 +450,7 @@ private func channelPermissionsControllerEntries(context: AccountContext, presen
if channel.flags.contains(.isCreator) && !channel.flags.contains(.isGigagroup), let memberCount = cachedData.participantsSummary.memberCount, memberCount > participantsLimit - 1000 {
entries.append(.conversionHeader(presentationData.theme, presentationData.strings.GroupInfo_Permissions_BroadcastTitle.uppercased()))
entries.append(.conversion(presentationData.theme, presentationData.strings.GroupInfo_Permissions_BroadcastConvert))
- entries.append(.conversionInfo(presentationData.theme, presentationData.strings.GroupInfo_Permissions_BroadcastConvertInfo(presentationStringsFormattedNumber(participantsLimit, presentationData.dateTimeFormat.groupingSeparator)).0))
+ entries.append(.conversionInfo(presentationData.theme, presentationData.strings.GroupInfo_Permissions_BroadcastConvertInfo(presentationStringsFormattedNumber(participantsLimit, presentationData.dateTimeFormat.groupingSeparator)).string))
}
entries.append(.slowmodeHeader(presentationData.theme, presentationData.strings.GroupInfo_Permissions_SlowmodeHeader))
@@ -753,7 +752,7 @@ public func channelPermissionsController(context: AccountContext, peerId origina
let _ = (convertGroupToGigagroup(account: context.account, peerId: originalPeerId)
|> deliverOnMainQueue).start(completed: {
let participantsLimit = context.currentLimitsConfiguration.with { $0 }.maxSupergroupMemberCount
- presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .gigagroupConversion(text: presentationData.strings.BroadcastGroups_Success(presentationStringsFormattedNumber(participantsLimit, presentationData.dateTimeFormat.decimalSeparator)).0), elevatedLayout: true, action: { _ in return false }), nil)
+ presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .gigagroupConversion(text: presentationData.strings.BroadcastGroups_Success(presentationStringsFormattedNumber(participantsLimit, presentationData.dateTimeFormat.decimalSeparator)).string), elevatedLayout: true, action: { _ in return false }), nil)
dismissToChatController?()
})
@@ -762,9 +761,9 @@ public func channelPermissionsController(context: AccountContext, peerId origina
}
pushControllerImpl?(controller)
}, openChannelExample: {
- resolveDisposable.set((context.engine.peers.resolvePeerByName(name: "durov") |> deliverOnMainQueue).start(next: { peerId in
- if let peerId = peerId {
- navigateToChatControllerImpl?(peerId)
+ resolveDisposable.set((context.engine.peers.resolvePeerByName(name: "durov") |> deliverOnMainQueue).start(next: { peer in
+ if let peer = peer {
+ navigateToChatControllerImpl?(peer.id)
}
}))
}, updateSlowmode: { value in
diff --git a/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift b/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift
index d73f4ef204..5b51dff0a7 100644
--- a/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -576,7 +575,7 @@ private func channelVisibilityControllerEntries(presentationData: PresentationDa
case let .availability(availability):
switch availability {
case .available:
- text = presentationData.strings.Channel_Username_UsernameIsAvailable(currentAddressName).0
+ text = presentationData.strings.Channel_Username_UsernameIsAvailable(currentAddressName).string
case .invalid:
text = presentationData.strings.Channel_Username_InvalidCharacters
case .taken:
@@ -708,7 +707,7 @@ private func channelVisibilityControllerEntries(presentationData: PresentationDa
case let .availability(availability):
switch availability {
case .available:
- text = presentationData.strings.Channel_Username_UsernameIsAvailable(currentAddressName).0
+ text = presentationData.strings.Channel_Username_UsernameIsAvailable(currentAddressName).string
case .invalid:
text = presentationData.strings.Channel_Username_InvalidCharacters
case .taken:
diff --git a/submodules/PeerInfoUI/Sources/ChatSlowmodeItem.swift b/submodules/PeerInfoUI/Sources/ChatSlowmodeItem.swift
index 61066bd280..05a4025bdc 100644
--- a/submodules/PeerInfoUI/Sources/ChatSlowmodeItem.swift
+++ b/submodules/PeerInfoUI/Sources/ChatSlowmodeItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import LegacyComponents
diff --git a/submodules/PeerInfoUI/Sources/ConvertToSupergroupController.swift b/submodules/PeerInfoUI/Sources/ConvertToSupergroupController.swift
index b1dbe193b9..5b4bcfe908 100644
--- a/submodules/PeerInfoUI/Sources/ConvertToSupergroupController.swift
+++ b/submodules/PeerInfoUI/Sources/ConvertToSupergroupController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/DeviceContactInfoController.swift b/submodules/PeerInfoUI/Sources/DeviceContactInfoController.swift
index eba9713cee..b07b78ad3e 100644
--- a/submodules/PeerInfoUI/Sources/DeviceContactInfoController.swift
+++ b/submodules/PeerInfoUI/Sources/DeviceContactInfoController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MessageUI
import TelegramPresentationData
import ItemListUI
@@ -690,11 +689,11 @@ private func deviceContactInfoEntries(account: Account, presentationData: Presen
}
if contactData.basicData.phoneNumbers.isEmpty {
- entries.append(.phoneNumberSharingInfo(entries.count, presentationData.theme, presentationData.strings.AddContact_ContactWillBeSharedAfterMutual(personCompactName).0))
+ entries.append(.phoneNumberSharingInfo(entries.count, presentationData.theme, presentationData.strings.AddContact_ContactWillBeSharedAfterMutual(personCompactName).string))
}
if shareViaException {
entries.append(.phoneNumberShareViaException(entries.count, presentationData.theme, presentationData.strings.AddContact_SharedContactException, state.addToPrivacyExceptions))
- entries.append(.phoneNumberShareViaExceptionInfo(entries.count, presentationData.theme, presentationData.strings.AddContact_SharedContactExceptionInfo(personCompactName).0))
+ entries.append(.phoneNumberShareViaExceptionInfo(entries.count, presentationData.theme, presentationData.strings.AddContact_SharedContactExceptionInfo(personCompactName).string))
}
}
} else {
@@ -798,7 +797,7 @@ private final class DeviceContactInfoController: ItemListController, MFMessageCo
composer.messageComposeDelegate = self
composer.recipients = Array(Set(numbers))
let url = presentationData.strings.InviteText_URL
- let body = presentationData.strings.InviteText_SingleContact(url).0
+ let body = presentationData.strings.InviteText_SingleContact(url).string
composer.body = body
self.composer = composer
if let window = self.view.window {
diff --git a/submodules/PeerInfoUI/Sources/GroupInfoSearchItem.swift b/submodules/PeerInfoUI/Sources/GroupInfoSearchItem.swift
index d5b2afdfa5..d4c9836e35 100644
--- a/submodules/PeerInfoUI/Sources/GroupInfoSearchItem.swift
+++ b/submodules/PeerInfoUI/Sources/GroupInfoSearchItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/GroupInfoSearchNavigationContentNode.swift b/submodules/PeerInfoUI/Sources/GroupInfoSearchNavigationContentNode.swift
index 42168c45cc..16c072a390 100644
--- a/submodules/PeerInfoUI/Sources/GroupInfoSearchNavigationContentNode.swift
+++ b/submodules/PeerInfoUI/Sources/GroupInfoSearchNavigationContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/GroupPreHistorySetupController.swift b/submodules/PeerInfoUI/Sources/GroupPreHistorySetupController.swift
index 7468d566f6..05aedd3fac 100644
--- a/submodules/PeerInfoUI/Sources/GroupPreHistorySetupController.swift
+++ b/submodules/PeerInfoUI/Sources/GroupPreHistorySetupController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/GroupStickerPackCurrentItem.swift b/submodules/PeerInfoUI/Sources/GroupStickerPackCurrentItem.swift
index 03d7e7795f..886357fe9e 100644
--- a/submodules/PeerInfoUI/Sources/GroupStickerPackCurrentItem.swift
+++ b/submodules/PeerInfoUI/Sources/GroupStickerPackCurrentItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/GroupStickerPackSetupController.swift b/submodules/PeerInfoUI/Sources/GroupStickerPackSetupController.swift
index 8c465147ca..b10071abf6 100644
--- a/submodules/PeerInfoUI/Sources/GroupStickerPackSetupController.swift
+++ b/submodules/PeerInfoUI/Sources/GroupStickerPackSetupController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -402,10 +401,10 @@ public func groupStickerPackSetupController(context: AccountContext, peerId: Pee
}, updateSearchText: { text in
searchText.set(text)
}, openStickersBot: {
- resolveDisposable.set((context.engine.peers.resolvePeerByName(name: "stickers") |> deliverOnMainQueue).start(next: { peerId in
- if let peerId = peerId {
+ resolveDisposable.set((context.engine.peers.resolvePeerByName(name: "stickers") |> deliverOnMainQueue).start(next: { peer in
+ if let peer = peer {
dismissImpl?()
- navigateToChatControllerImpl?(peerId)
+ navigateToChatControllerImpl?(peer.id)
}
}))
})
diff --git a/submodules/PeerInfoUI/Sources/ItemListCallListItem.swift b/submodules/PeerInfoUI/Sources/ItemListCallListItem.swift
index d53ab1f45c..ebc3b19887 100644
--- a/submodules/PeerInfoUI/Sources/ItemListCallListItem.swift
+++ b/submodules/PeerInfoUI/Sources/ItemListCallListItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/ItemListSecretChatKeyItem.swift b/submodules/PeerInfoUI/Sources/ItemListSecretChatKeyItem.swift
index fd8f048e69..c4d4c86e1f 100644
--- a/submodules/PeerInfoUI/Sources/ItemListSecretChatKeyItem.swift
+++ b/submodules/PeerInfoUI/Sources/ItemListSecretChatKeyItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/OldChannelsController.swift b/submodules/PeerInfoUI/Sources/OldChannelsController.swift
index 3a4edeb23e..4ccdc1b042 100644
--- a/submodules/PeerInfoUI/Sources/OldChannelsController.swift
+++ b/submodules/PeerInfoUI/Sources/OldChannelsController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/OldChannelsSearch.swift b/submodules/PeerInfoUI/Sources/OldChannelsSearch.swift
index 685ca8cfc0..c508d602f8 100644
--- a/submodules/PeerInfoUI/Sources/OldChannelsSearch.swift
+++ b/submodules/PeerInfoUI/Sources/OldChannelsSearch.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import MergeLists
@@ -190,7 +189,7 @@ private final class OldChannelsSearchContainerNode: SearchDisplayControllerConte
self.listNode.backgroundColor = self.presentationData.theme.chatList.backgroundColor
self.listNode.isHidden = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/PeerInfoUI/Sources/PeerAutoremoveSetupScreen.swift b/submodules/PeerInfoUI/Sources/PeerAutoremoveSetupScreen.swift
index 6767eab567..67ab548d2f 100644
--- a/submodules/PeerInfoUI/Sources/PeerAutoremoveSetupScreen.swift
+++ b/submodules/PeerInfoUI/Sources/PeerAutoremoveSetupScreen.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/PeerAutoremoveTimeoutItem.swift b/submodules/PeerInfoUI/Sources/PeerAutoremoveTimeoutItem.swift
index 7546bc7ac9..1e47daee98 100644
--- a/submodules/PeerInfoUI/Sources/PeerAutoremoveTimeoutItem.swift
+++ b/submodules/PeerInfoUI/Sources/PeerAutoremoveTimeoutItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import LegacyComponents
@@ -196,7 +195,7 @@ class PeerRemoveTimeoutItemNode: ListViewItemNode, ItemListItemNode {
if item.availableValues[index] == Int32.max {
text = item.presentationData.strings.AutoremoveSetup_TimerValueNever
} else {
- text = item.presentationData.strings.AutoremoveSetup_TimerValueAfter(timeIntervalString(strings: item.presentationData.strings, value: item.availableValues[index])).0
+ text = item.presentationData.strings.AutoremoveSetup_TimerValueAfter(timeIntervalString(strings: item.presentationData.strings, value: item.availableValues[index])).string
}
return makeLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: text, font: Font.regular(13.0), textColor: item.presentationData.theme.list.itemSecondaryTextColor), maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: 100.0, height: 100.0)))
}
diff --git a/submodules/PeerInfoUI/Sources/PeerBanTimeoutController.swift b/submodules/PeerInfoUI/Sources/PeerBanTimeoutController.swift
index 8649bcbb49..9b2c85082d 100644
--- a/submodules/PeerInfoUI/Sources/PeerBanTimeoutController.swift
+++ b/submodules/PeerInfoUI/Sources/PeerBanTimeoutController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import UIKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramStringFormatting
import AccountContext
diff --git a/submodules/PeerInfoUI/Sources/PeerReportController.swift b/submodules/PeerInfoUI/Sources/PeerReportController.swift
index d13701fb43..41d3965468 100644
--- a/submodules/PeerInfoUI/Sources/PeerReportController.swift
+++ b/submodules/PeerInfoUI/Sources/PeerReportController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/PhoneLabelController.swift b/submodules/PeerInfoUI/Sources/PhoneLabelController.swift
index d0e1659679..1b7765e3b2 100644
--- a/submodules/PeerInfoUI/Sources/PhoneLabelController.swift
+++ b/submodules/PeerInfoUI/Sources/PhoneLabelController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/PeerInfoUI/Sources/ReportPeerDetailsActionSheetItem.swift b/submodules/PeerInfoUI/Sources/ReportPeerDetailsActionSheetItem.swift
index 28c4cf0171..6e4b2ff456 100644
--- a/submodules/PeerInfoUI/Sources/ReportPeerDetailsActionSheetItem.swift
+++ b/submodules/PeerInfoUI/Sources/ReportPeerDetailsActionSheetItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/PeerInfoUI/Sources/ReportPeerHeaderActionSheetItem.swift b/submodules/PeerInfoUI/Sources/ReportPeerHeaderActionSheetItem.swift
index 22b2888e0a..8fd1972cd4 100644
--- a/submodules/PeerInfoUI/Sources/ReportPeerHeaderActionSheetItem.swift
+++ b/submodules/PeerInfoUI/Sources/ReportPeerHeaderActionSheetItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/PeerInfoUI/Sources/SecretChatKeyController.swift b/submodules/PeerInfoUI/Sources/SecretChatKeyController.swift
index a5a15bbc79..120e211973 100644
--- a/submodules/PeerInfoUI/Sources/SecretChatKeyController.swift
+++ b/submodules/PeerInfoUI/Sources/SecretChatKeyController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import AccountContext
diff --git a/submodules/PeerInfoUI/Sources/SecretChatKeyControllerNode.swift b/submodules/PeerInfoUI/Sources/SecretChatKeyControllerNode.swift
index 8c8fa3ec47..f69303f09f 100644
--- a/submodules/PeerInfoUI/Sources/SecretChatKeyControllerNode.swift
+++ b/submodules/PeerInfoUI/Sources/SecretChatKeyControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TextFormat
@@ -119,14 +118,14 @@ final class SecretChatKeyControllerNode: ViewControllerTracingNode {
let (keyTextLayout, keyTextApply) = makeKeyTextLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: text, font: Font.semiboldMonospace(15.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor), backgroundColor: nil, maximumNumberOfLines: 0, truncationType: .end, constrainedSize: CGSize(width: layout.size.width - sideInset * 2.0, height: CGFloat.greatestFiniteMagnitude), alignment: .left, lineSpacing: 0.0, cutout: nil, insets: UIEdgeInsets()))
- let (infoRaw, infoRanges) = self.presentationData.strings.EncryptionKey_Description(self.peer.compactDisplayTitle, self.peer.compactDisplayTitle)
- let infoText = NSMutableAttributedString(string: infoRaw, attributes: [.font: Font.regular(14.0), .foregroundColor: self.presentationData.theme.list.itemPrimaryTextColor])
+ let infoString = self.presentationData.strings.EncryptionKey_Description(self.peer.compactDisplayTitle, self.peer.compactDisplayTitle)
+ let infoText = NSMutableAttributedString(string: infoString.string, attributes: [.font: Font.regular(14.0), .foregroundColor: self.presentationData.theme.list.itemPrimaryTextColor])
- for (_, range) in infoRanges {
- infoText.addAttributes([.font: Font.semibold(14.0)], range: range)
+ for range in infoString.ranges {
+ infoText.addAttributes([.font: Font.semibold(14.0)], range: range.range)
}
- let linkRange = (infoRaw as NSString).range(of: "telegram.org")
+ let linkRange = (infoString.string as NSString).range(of: "telegram.org")
if linkRange.location != NSNotFound {
infoText.addAttributes([.foregroundColor: self.presentationData.theme.list.itemAccentColor, NSAttributedString.Key(rawValue: TelegramTextAttributes.URL): "https://telegram.org/faq#secret-chats"], range: linkRange)
}
diff --git a/submodules/PeerInfoUI/Sources/UserInfoController.swift b/submodules/PeerInfoUI/Sources/UserInfoController.swift
index 07faaa9665..7a212fa4e5 100644
--- a/submodules/PeerInfoUI/Sources/UserInfoController.swift
+++ b/submodules/PeerInfoUI/Sources/UserInfoController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramPresentationData
import ItemListUI
@@ -62,7 +61,7 @@ public func openAddPersonContactImpl(context: AccountContext, peerId: PeerId, pu
}
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
- present(OverlayStatusController(theme: presentationData.theme, type: .genericSuccess(presentationData.strings.AddContact_StatusSuccess(peer.compactDisplayTitle).0, true)), nil)
+ present(OverlayStatusController(theme: presentationData.theme, type: .genericSuccess(presentationData.strings.AddContact_StatusSuccess(peer.compactDisplayTitle).string, true)), nil)
}
}), completed: nil, cancelled: nil))
})
diff --git a/submodules/PeerPresenceStatusManager/BUILD b/submodules/PeerPresenceStatusManager/BUILD
index 7c2895612e..afd5f24931 100644
--- a/submodules/PeerPresenceStatusManager/BUILD
+++ b/submodules/PeerPresenceStatusManager/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
],
visibility = [
"//visibility:public",
diff --git a/submodules/PeerPresenceStatusManager/Sources/PeerPresenceStatusManager.swift b/submodules/PeerPresenceStatusManager/Sources/PeerPresenceStatusManager.swift
index 1389239a93..c846cc22cd 100644
--- a/submodules/PeerPresenceStatusManager/Sources/PeerPresenceStatusManager.swift
+++ b/submodules/PeerPresenceStatusManager/Sources/PeerPresenceStatusManager.swift
@@ -1,8 +1,6 @@
import Foundation
import SwiftSignalKit
import TelegramCore
-import SyncCore
-import SyncCore
private func suggestedUserPresenceStringRefreshTimeout(_ presence: TelegramUserPresence, relativeTo timestamp: Int32, isOnline: Bool?) -> Double {
switch presence.status {
diff --git a/submodules/PeersNearbyUI/BUILD b/submodules/PeersNearbyUI/BUILD
index 507d9c8e97..aae93d7ed4 100644
--- a/submodules/PeersNearbyUI/BUILD
+++ b/submodules/PeersNearbyUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/PeersNearbyUI/Sources/PeersNearbyController.swift b/submodules/PeersNearbyUI/Sources/PeersNearbyController.swift
index 25e2a0983a..f7dbecbfad 100644
--- a/submodules/PeersNearbyUI/Sources/PeersNearbyController.swift
+++ b/submodules/PeersNearbyUI/Sources/PeersNearbyController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MapKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -226,10 +225,10 @@ private enum PeersNearbyEntry: ItemListNodeEntry {
arguments.toggleVisibility(!stop)
})
case let .user(_, _, strings, dateTimeFormat, nameDisplayOrder, peer):
- var text = strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).0
+ var text = strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).string
let isSelfPeer = peer.peer.0.id == arguments.context.account.peerId
if isSelfPeer {
- text = strings.PeopleNearby_VisibleUntil(humanReadableStringForTimestamp(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: peer.expires).0).0
+ text = strings.PeopleNearby_VisibleUntil(humanReadableStringForTimestamp(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: peer.expires).string).string
}
return ItemListPeerItem(presentationData: presentationData, dateTimeFormat: dateTimeFormat, nameDisplayOrder: nameDisplayOrder, context: arguments.context, peer: peer.peer.0, aliasHandling: .standard, nameColor: .primary, nameStyle: .distinctBold, presence: nil, text: .text(text, .secondary), label: .none, editing: ItemListPeerItemEditing(editable: false, editing: false, revealed: false), revealOptions: nil, switchValue: nil, enabled: true, selectable: !isSelfPeer, sectionId: self.section, action: {
if !isSelfPeer {
@@ -251,9 +250,9 @@ private enum PeersNearbyEntry: ItemListNodeEntry {
case let .group(_, _, strings, dateTimeFormat, nameDisplayOrder, peer, highlighted):
var text: ItemListPeerItemText
if let cachedData = peer.peer.1 as? CachedChannelData, let memberCount = cachedData.participantsSummary.memberCount {
- text = .text("\(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).0), \(memberCount > 0 ? strings.Conversation_StatusMembers(memberCount) : strings.PeopleNearby_NoMembers)", .secondary)
+ text = .text("\(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).string), \(memberCount > 0 ? strings.Conversation_StatusMembers(memberCount) : strings.PeopleNearby_NoMembers)", .secondary)
} else {
- text = .text(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).0, .secondary)
+ text = .text(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).string, .secondary)
}
return ItemListPeerItem(presentationData: presentationData, dateTimeFormat: dateTimeFormat, nameDisplayOrder: nameDisplayOrder, context: arguments.context, peer: peer.peer.0, aliasHandling: .standard, nameColor: .primary, nameStyle: .distinctBold, presence: nil, text: text, label: .none, editing: ItemListPeerItemEditing(editable: false, editing: false, revealed: false), revealOptions: nil, switchValue: nil, enabled: true, highlighted: highlighted, selectable: true, sectionId: self.section, action: {
arguments.openChat(peer.peer.0)
@@ -265,9 +264,9 @@ private enum PeersNearbyEntry: ItemListNodeEntry {
case let .channel(_, _, strings, dateTimeFormat, nameDisplayOrder, peer, highlighted):
var text: ItemListPeerItemText
if let cachedData = peer.peer.1 as? CachedChannelData, let memberCount = cachedData.participantsSummary.memberCount {
- text = .text("\(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).0), \(strings.Conversation_StatusSubscribers(memberCount))", .secondary)
+ text = .text("\(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).string), \(strings.Conversation_StatusSubscribers(memberCount))", .secondary)
} else {
- text = .text(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).0, .secondary)
+ text = .text(strings.Map_DistanceAway(shortStringForDistance(strings: strings, distance: peer.distance)).string, .secondary)
}
return ItemListPeerItem(presentationData: presentationData, dateTimeFormat: dateTimeFormat, nameDisplayOrder: nameDisplayOrder, context: arguments.context, peer: peer.peer.0, aliasHandling: .standard, nameColor: .primary, nameStyle: .distinctBold, presence: nil, text: text, label: .none, editing: ItemListPeerItemEditing(editable: false, editing: false, revealed: false), revealOptions: nil, switchValue: nil, enabled: true, highlighted: highlighted, selectable: true, sectionId: self.section, action: {
arguments.openChat(peer.peer.0)
diff --git a/submodules/PhotoResources/BUILD b/submodules/PhotoResources/BUILD
index 6d3e633ed1..8fd840bad4 100644
--- a/submodules/PhotoResources/BUILD
+++ b/submodules/PhotoResources/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
diff --git a/submodules/PhotoResources/Sources/PhotoResources.swift b/submodules/PhotoResources/Sources/PhotoResources.swift
index d56431a40b..9c719cb833 100644
--- a/submodules/PhotoResources/Sources/PhotoResources.swift
+++ b/submodules/PhotoResources/Sources/PhotoResources.swift
@@ -6,7 +6,6 @@ import Display
import AVFoundation
import ImageIO
import TelegramCore
-import SyncCore
import WebPBinding
import TelegramUIPreferences
import MediaResources
diff --git a/submodules/PlatformRestrictionMatching/BUILD b/submodules/PlatformRestrictionMatching/BUILD
index bc4aa3f64f..38a989db14 100644
--- a/submodules/PlatformRestrictionMatching/BUILD
+++ b/submodules/PlatformRestrictionMatching/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
],
visibility = [
"//visibility:public",
diff --git a/submodules/PlatformRestrictionMatching/Sources/PlatformRestrictionMatching.swift b/submodules/PlatformRestrictionMatching/Sources/PlatformRestrictionMatching.swift
index c20aade7be..5412e6466e 100644
--- a/submodules/PlatformRestrictionMatching/Sources/PlatformRestrictionMatching.swift
+++ b/submodules/PlatformRestrictionMatching/Sources/PlatformRestrictionMatching.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
public extension RestrictedContentMessageAttribute {
func platformText(platform: String, contentSettings: ContentSettings) -> String? {
diff --git a/submodules/PresentationDataUtils/Sources/OpenUrl.swift b/submodules/PresentationDataUtils/Sources/OpenUrl.swift
index 8ab09feb64..3223522788 100644
--- a/submodules/PresentationDataUtils/Sources/OpenUrl.swift
+++ b/submodules/PresentationDataUtils/Sources/OpenUrl.swift
@@ -55,7 +55,7 @@ public func openUserGeneratedUrl(context: AccountContext, peerId: PeerId?, url:
}
var displayUrl = rawDisplayUrl
displayUrl = displayUrl.replacingOccurrences(of: "\u{202e}", with: "")
- present(textAlertController(context: context, title: nil, text: presentationData.strings.Generic_OpenHiddenLinkAlert(displayUrl).0, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_No, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Yes, action: {
+ present(textAlertController(context: context, title: nil, text: presentationData.strings.Generic_OpenHiddenLinkAlert(displayUrl).string, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_No, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Yes, action: {
openImpl()
})]))
} else {
diff --git a/submodules/ReactionSelectionNode/BUILD b/submodules/ReactionSelectionNode/BUILD
index 1e5ce472f8..c3d3459fc4 100644
--- a/submodules/ReactionSelectionNode/BUILD
+++ b/submodules/ReactionSelectionNode/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
diff --git a/submodules/ReactionSelectionNode/Sources/ReactionAttachedNode.swift b/submodules/ReactionSelectionNode/Sources/ReactionAttachedNode.swift
index 105a011ad0..3056366991 100644
--- a/submodules/ReactionSelectionNode/Sources/ReactionAttachedNode.swift
+++ b/submodules/ReactionSelectionNode/Sources/ReactionAttachedNode.swift
@@ -4,7 +4,6 @@ import AnimatedStickerNode
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AppBundle
diff --git a/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift b/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift
index fcbe5bcdd9..e0270afa8f 100644
--- a/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift
+++ b/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift
@@ -3,7 +3,6 @@ import AsyncDisplayKit
import Display
import AnimatedStickerNode
import TelegramCore
-import SyncCore
import TelegramPresentationData
public final class ReactionContextItem {
diff --git a/submodules/ReactionSelectionNode/Sources/ReactionGestureItem.swift b/submodules/ReactionSelectionNode/Sources/ReactionGestureItem.swift
index bfc2c858c9..e1adfa2fe8 100644
--- a/submodules/ReactionSelectionNode/Sources/ReactionGestureItem.swift
+++ b/submodules/ReactionSelectionNode/Sources/ReactionGestureItem.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
public enum ReactionGestureItem {
case like
diff --git a/submodules/ReactionSelectionNode/Sources/ReactionSelectionNode.swift b/submodules/ReactionSelectionNode/Sources/ReactionSelectionNode.swift
index ac5fe31631..b6e96b6f7f 100644
--- a/submodules/ReactionSelectionNode/Sources/ReactionSelectionNode.swift
+++ b/submodules/ReactionSelectionNode/Sources/ReactionSelectionNode.swift
@@ -3,7 +3,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AppBundle
import AnimatedStickerNode
diff --git a/submodules/ReactionSelectionNode/Sources/ReactionSelectionParentNode.swift b/submodules/ReactionSelectionNode/Sources/ReactionSelectionParentNode.swift
index acecea37f4..7c3889ce76 100644
--- a/submodules/ReactionSelectionNode/Sources/ReactionSelectionParentNode.swift
+++ b/submodules/ReactionSelectionNode/Sources/ReactionSelectionParentNode.swift
@@ -3,7 +3,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
public final class ReactionSelectionParentNode: ASDisplayNode {
diff --git a/submodules/SaveToCameraRoll/BUILD b/submodules/SaveToCameraRoll/BUILD
index 91ad8ae4bc..7776ead2dc 100644
--- a/submodules/SaveToCameraRoll/BUILD
+++ b/submodules/SaveToCameraRoll/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Display:Display",
"//submodules/AccountContext:AccountContext",
"//submodules/DeviceAccess:DeviceAccess",
diff --git a/submodules/SaveToCameraRoll/Sources/SaveToCameraRoll.swift b/submodules/SaveToCameraRoll/Sources/SaveToCameraRoll.swift
index b9a2d40f90..3defd26afc 100644
--- a/submodules/SaveToCameraRoll/Sources/SaveToCameraRoll.swift
+++ b/submodules/SaveToCameraRoll/Sources/SaveToCameraRoll.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Photos
import Display
import MobileCoreServices
diff --git a/submodules/SearchPeerMembers/BUILD b/submodules/SearchPeerMembers/BUILD
index 34c37c3b0c..cb4a8fb27a 100644
--- a/submodules/SearchPeerMembers/BUILD
+++ b/submodules/SearchPeerMembers/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AccountContext:AccountContext",
],
visibility = [
diff --git a/submodules/SearchPeerMembers/Sources/SearchPeerMembers.swift b/submodules/SearchPeerMembers/Sources/SearchPeerMembers.swift
index 23329b5e41..351de0f580 100644
--- a/submodules/SearchPeerMembers/Sources/SearchPeerMembers.swift
+++ b/submodules/SearchPeerMembers/Sources/SearchPeerMembers.swift
@@ -1,7 +1,5 @@
import Foundation
-import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
@@ -10,32 +8,32 @@ public enum SearchPeerMembersScope {
case mention
}
-public func searchPeerMembers(context: AccountContext, peerId: PeerId, chatLocation: ChatLocation, query: String, scope: SearchPeerMembersScope) -> Signal<[Peer], NoError> {
+public func searchPeerMembers(context: AccountContext, peerId: EnginePeer.Id, chatLocation: ChatLocation, query: String, scope: SearchPeerMembersScope) -> Signal<[EnginePeer], NoError> {
if peerId.namespace == Namespaces.Peer.CloudChannel {
- return context.account.postbox.transaction { transaction -> CachedChannelData? in
- return transaction.getPeerCachedData(peerId: peerId) as? CachedChannelData
- }
- |> mapToSignal { cachedData -> Signal<([Peer], Bool), NoError> in
- if case .peer = chatLocation, let cachedData = cachedData, let memberCount = cachedData.participantsSummary.memberCount, memberCount <= 64 {
+ return context.engine.data.get(
+ TelegramEngine.EngineData.Item.Peer.ParticipantCount(id: peerId)
+ )
+ |> mapToSignal { participantCount -> Signal<([EnginePeer], Bool), NoError> in
+ if case .peer = chatLocation, let memberCount = participantCount, memberCount <= 64 {
return Signal { subscriber in
let (disposable, _) = context.peerChannelMemberCategoriesContextsManager.recent(engine: context.engine, postbox: context.account.postbox, network: context.account.network, accountPeerId: context.account.peerId, peerId: peerId, searchQuery: nil, requestUpdate: false, updated: { state in
if case .ready = state.loadingState {
let normalizedQuery = query.lowercased()
- subscriber.putNext((state.list.compactMap { participant -> Peer? in
+ subscriber.putNext((state.list.compactMap { participant -> EnginePeer? in
if participant.peer.isDeleted {
return nil
}
if normalizedQuery.isEmpty {
- return participant.peer
+ return EnginePeer(participant.peer)
}
if normalizedQuery.isEmpty {
- return participant.peer
+ return EnginePeer(participant.peer)
} else {
if participant.peer.indexName.matchesByTokens(normalizedQuery) {
- return participant.peer
+ return EnginePeer(participant.peer)
}
if let addressName = participant.peer.addressName, addressName.lowercased().hasPrefix(normalizedQuery) {
- return participant.peer
+ return EnginePeer(participant.peer)
}
return nil
@@ -60,7 +58,7 @@ public func searchPeerMembers(context: AccountContext, peerId: PeerId, chatLocat
if participant.peer.isDeleted {
return nil
}
- return participant.peer
+ return EnginePeer(participant.peer)
}, true))
}
})
@@ -75,7 +73,7 @@ public func searchPeerMembers(context: AccountContext, peerId: PeerId, chatLocat
if participant.peer.isDeleted {
return nil
}
- return participant.peer
+ return EnginePeer(participant.peer)
}, true))
}
})
@@ -86,16 +84,19 @@ public func searchPeerMembers(context: AccountContext, peerId: PeerId, chatLocat
}
} |> runOn(Queue.mainQueue())
}
- |> mapToSignal { result, isReady -> Signal<[Peer], NoError> in
+ |> mapToSignal { result, isReady -> Signal<[EnginePeer], NoError> in
switch scope {
case .mention:
return .single(result)
case .memberSuggestion:
- return context.account.postbox.transaction { transaction -> [Peer] in
+ return context.engine.data.get(
+ TelegramEngine.EngineData.Item.Peer.Peer(id: peerId)
+ )
+ |> map { peer -> [EnginePeer] in
var result = result
let normalizedQuery = query.lowercased()
if isReady {
- if let channel = transaction.getPeer(peerId) as? TelegramChannel, case .group = channel.info {
+ if case let .channel(channel) = peer, case .group = channel.info {
var matches = false
if normalizedQuery.isEmpty {
matches = true
@@ -108,7 +109,7 @@ public func searchPeerMembers(context: AccountContext, peerId: PeerId, chatLocat
}
}
if matches {
- result.insert(channel, at: 0)
+ result.insert(.channel(channel), at: 0)
}
}
}
@@ -118,5 +119,8 @@ public func searchPeerMembers(context: AccountContext, peerId: PeerId, chatLocat
}
} else {
return context.engine.peers.searchGroupMembers(peerId: peerId, query: query)
+ |> map { peers -> [EnginePeer] in
+ return peers.map(EnginePeer.init)
+ }
}
}
diff --git a/submodules/SelectablePeerNode/BUILD b/submodules/SelectablePeerNode/BUILD
index 7b47a6b2fd..d770eaf552 100644
--- a/submodules/SelectablePeerNode/BUILD
+++ b/submodules/SelectablePeerNode/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/TelegramPresentationData:TelegramPresentationData",
diff --git a/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift b/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift
index 5042a4a69b..95daf00db5 100644
--- a/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift
+++ b/submodules/SelectablePeerNode/Sources/SelectablePeerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AvatarNode
diff --git a/submodules/SettingsUI/BUILD b/submodules/SettingsUI/BUILD
index aef7b6fda1..5a22cf2187 100644
--- a/submodules/SettingsUI/BUILD
+++ b/submodules/SettingsUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/MtProtoKit:MtProtoKit",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/SettingsUI/Sources/BubbleSettings/BubbleSettingsController.swift b/submodules/SettingsUI/Sources/BubbleSettings/BubbleSettingsController.swift
index 06bce910f7..d49b8588aa 100644
--- a/submodules/SettingsUI/Sources/BubbleSettings/BubbleSettingsController.swift
+++ b/submodules/SettingsUI/Sources/BubbleSettings/BubbleSettingsController.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/SettingsUI/Sources/CachedFaqInstantPage.swift b/submodules/SettingsUI/Sources/CachedFaqInstantPage.swift
index 30fecbd5b5..cd108a673f 100644
--- a/submodules/SettingsUI/Sources/CachedFaqInstantPage.swift
+++ b/submodules/SettingsUI/Sources/CachedFaqInstantPage.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
import InstantPageUI
import InstantPageCache
diff --git a/submodules/SettingsUI/Sources/ChangePhoneNumberCodeController.swift b/submodules/SettingsUI/Sources/ChangePhoneNumberCodeController.swift
index 0dd32295e6..da25b216a6 100644
--- a/submodules/SettingsUI/Sources/ChangePhoneNumberCodeController.swift
+++ b/submodules/SettingsUI/Sources/ChangePhoneNumberCodeController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/SettingsUI/Sources/ChangePhoneNumberController.swift b/submodules/SettingsUI/Sources/ChangePhoneNumberController.swift
index 05aac53984..d4c4c62c47 100644
--- a/submodules/SettingsUI/Sources/ChangePhoneNumberController.swift
+++ b/submodules/SettingsUI/Sources/ChangePhoneNumberController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ProgressNavigationButtonNode
@@ -144,7 +143,7 @@ final class ChangePhoneNumberController: ViewController, MFMailComposeViewContro
text = presentationData.strings.Login_InvalidPhoneError
actions.append(TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {}))
case .phoneNumberOccupied:
- text = presentationData.strings.ChangePhone_ErrorOccupied(formatPhoneNumber(phoneNumber)).0
+ text = presentationData.strings.ChangePhone_ErrorOccupied(formatPhoneNumber(phoneNumber)).string
actions.append(TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {}))
case .phoneBanned:
text = presentationData.strings.Login_PhoneBannedError
@@ -160,7 +159,7 @@ final class ChangePhoneNumberController: ViewController, MFMailComposeViewContro
let carrier = CTCarrier()
let mnc = carrier.mobileNetworkCode ?? "none"
- strongSelf.presentEmailComposeController(address: "login@stel.com", subject: presentationData.strings.Login_PhoneBannedEmailSubject(formattedNumber).0, body: presentationData.strings.Login_PhoneBannedEmailBody(formattedNumber, appVersion, systemVersion, locale, mnc).0)
+ strongSelf.presentEmailComposeController(address: "login@stel.com", subject: presentationData.strings.Login_PhoneBannedEmailSubject(formattedNumber).string, body: presentationData.strings.Login_PhoneBannedEmailBody(formattedNumber, appVersion, systemVersion, locale, mnc).string)
}))
case .generic:
text = presentationData.strings.Login_UnknownError
diff --git a/submodules/SettingsUI/Sources/ChangePhoneNumberControllerNode.swift b/submodules/SettingsUI/Sources/ChangePhoneNumberControllerNode.swift
index 80f22d8b4b..9903e8b9ff 100644
--- a/submodules/SettingsUI/Sources/ChangePhoneNumberControllerNode.swift
+++ b/submodules/SettingsUI/Sources/ChangePhoneNumberControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import CoreTelephony
import TelegramPresentationData
import PhoneInputNode
diff --git a/submodules/SettingsUI/Sources/ChangePhoneNumberIntroController.swift b/submodules/SettingsUI/Sources/ChangePhoneNumberIntroController.swift
index 06b2801b5a..7ed7e6d773 100644
--- a/submodules/SettingsUI/Sources/ChangePhoneNumberIntroController.swift
+++ b/submodules/SettingsUI/Sources/ChangePhoneNumberIntroController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TextFormat
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadConnectionTypeController.swift b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadConnectionTypeController.swift
index a3405f6639..284d5ed22b 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadConnectionTypeController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadConnectionTypeController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -202,7 +201,7 @@ private func stringForAutomaticDownloadPeers(strings: PresentationStrings, decim
if peers.contacts && peers.otherPrivate && peers.groups && peers.channels {
if let size = size {
- return strings.AutoDownloadSettings_UpToForAll(size).0
+ return strings.AutoDownloadSettings_UpToForAll(size).string
} else {
return strings.AutoDownloadSettings_OnForAll
}
@@ -238,9 +237,9 @@ private func stringForAutomaticDownloadPeers(strings: PresentationStrings, decim
}
if let size = size {
- return strings.AutoDownloadSettings_UpToFor(size, string).0
+ return strings.AutoDownloadSettings_UpToFor(size, string).string
} else {
- return strings.AutoDownloadSettings_OnFor(string).0
+ return strings.AutoDownloadSettings_OnFor(string).string
}
}
}
diff --git a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadDataUsagePickerItem.swift b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadDataUsagePickerItem.swift
index 2a9b8983ee..2b4f91cd5b 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadDataUsagePickerItem.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadDataUsagePickerItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import LegacyComponents
diff --git a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadMediaCategoryController.swift b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadMediaCategoryController.swift
index c0054bdbfc..9b3ef25c59 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadMediaCategoryController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadMediaCategoryController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -276,11 +275,11 @@ private func autodownloadMediaCategoryControllerEntries(presentationData: Presen
} else {
sizeText = autodownloadDataSizeString(Int64(size), decimalSeparator: presentationData.dateTimeFormat.decimalSeparator)
}
- let text = presentationData.strings.AutoDownloadSettings_UpTo(sizeText).0
+ let text = presentationData.strings.AutoDownloadSettings_UpTo(sizeText).string
entries.append(.sizeItem(presentationData.theme, presentationData.strings, presentationData.dateTimeFormat.decimalSeparator, text, size))
if #available(iOSApplicationExtension 10.3, *), category == .video {
entries.append(.sizePreload(presentationData.theme, presentationData.strings.AutoDownloadSettings_PreloadVideo, predownload, size > 2 * 1024 * 1024))
- entries.append(.sizePreloadInfo(presentationData.theme, presentationData.strings.AutoDownloadSettings_PreloadVideoInfo(sizeText).0))
+ entries.append(.sizePreloadInfo(presentationData.theme, presentationData.strings.AutoDownloadSettings_PreloadVideoInfo(sizeText).string))
}
default:
break
diff --git a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadSizeLimitItem.swift b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadSizeLimitItem.swift
index fdd1b17419..9ad5a4e0bb 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/AutodownloadSizeLimitItem.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/AutodownloadSizeLimitItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import LegacyComponents
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift b/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift
index d446034172..d9432a7a70 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramPresentationData
import TelegramUIPreferences
@@ -439,10 +438,10 @@ private func stringForAutoDownloadTypes(strings: PresentationStrings, decimalSep
types.append(strings.ChatSettings_AutoDownloadSettings_TypePhoto)
}
if let videoSize = videoSize {
- types.append(strings.ChatSettings_AutoDownloadSettings_TypeVideo(autodownloadDataSizeString(Int64(videoSize), decimalSeparator: decimalSeparator)).0)
+ types.append(strings.ChatSettings_AutoDownloadSettings_TypeVideo(autodownloadDataSizeString(Int64(videoSize), decimalSeparator: decimalSeparator)).string)
}
if let fileSize = fileSize {
- types.append(strings.ChatSettings_AutoDownloadSettings_TypeFile(autodownloadDataSizeString(Int64(fileSize), decimalSeparator: decimalSeparator)).0)
+ types.append(strings.ChatSettings_AutoDownloadSettings_TypeFile(autodownloadDataSizeString(Int64(fileSize), decimalSeparator: decimalSeparator)).string)
}
if types.isEmpty {
diff --git a/submodules/SettingsUI/Sources/Data and Storage/KeepMediaDurationPickerItem.swift b/submodules/SettingsUI/Sources/Data and Storage/KeepMediaDurationPickerItem.swift
index fbdb36c8fd..575a85d06c 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/KeepMediaDurationPickerItem.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/KeepMediaDurationPickerItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import LegacyComponents
diff --git a/submodules/SettingsUI/Sources/Data and Storage/MaximumCacheSizePickerItem.swift b/submodules/SettingsUI/Sources/Data and Storage/MaximumCacheSizePickerItem.swift
index 7b26b8b274..1b7f603eb2 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/MaximumCacheSizePickerItem.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/MaximumCacheSizePickerItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import LegacyComponents
diff --git a/submodules/SettingsUI/Sources/Data and Storage/NetworkUsageStatsController.swift b/submodules/SettingsUI/Sources/Data and Storage/NetworkUsageStatsController.swift
index df38d5e13d..aba9c011ec 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/NetworkUsageStatsController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/NetworkUsageStatsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -341,7 +340,7 @@ private func networkUsageStatsControllerEntries(presentationData: PresentationDa
formatter.dateFormat = "E, d MMM yyyy HH:mm"
let dateStringPlain = formatter.string(from: Date(timeIntervalSince1970: Double(stats.resetCellularTimestamp)))
- entries.append(.resetTimestamp(presentationData.theme, presentationData.strings.NetworkUsageSettings_CellularUsageSince(dateStringPlain).0))
+ entries.append(.resetTimestamp(presentationData.theme, presentationData.strings.NetworkUsageSettings_CellularUsageSince(dateStringPlain).string))
}
case .wifi:
entries.append(.messagesHeader(presentationData.theme, presentationData.strings.NetworkUsageSettings_GeneralDataSection))
@@ -374,7 +373,7 @@ private func networkUsageStatsControllerEntries(presentationData: PresentationDa
formatter.dateFormat = "E, d MMM yyyy HH:mm"
let dateStringPlain = formatter.string(from: Date(timeIntervalSince1970: Double(stats.resetWifiTimestamp)))
- entries.append(.resetTimestamp(presentationData.theme, presentationData.strings.NetworkUsageSettings_WifiUsageSince(dateStringPlain).0))
+ entries.append(.resetTimestamp(presentationData.theme, presentationData.strings.NetworkUsageSettings_WifiUsageSince(dateStringPlain).string))
}
}
diff --git a/submodules/SettingsUI/Sources/Data and Storage/ProxyListSettingsController.swift b/submodules/SettingsUI/Sources/Data and Storage/ProxyListSettingsController.swift
index ee3490cc09..eb26e53988 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/ProxyListSettingsController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/ProxyListSettingsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MtProtoKit
import ItemListUI
@@ -259,7 +258,7 @@ private func proxySettingsControllerEntries(theme: PresentationTheme, strings: P
var text = strings.SocksProxySetup_ProxyStatusConnected
if case let .available(rtt) = status {
let pingTime: Int = Int(rtt * 1000.0)
- text = text + ", \(strings.SocksProxySetup_ProxyStatusPing("\(pingTime)").0)"
+ text = text + ", \(strings.SocksProxySetup_ProxyStatusPing("\(pingTime)").string)"
}
displayStatus = DisplayProxyServerStatus(activity: false, text: text, textActive: true)
}
@@ -280,7 +279,7 @@ private func proxySettingsControllerEntries(theme: PresentationTheme, strings: P
displayStatus = DisplayProxyServerStatus(activity: false, text: text, textActive: false)
case let .available(rtt):
let pingTime: Int = Int(rtt * 1000.0)
- text = text + ", \(strings.SocksProxySetup_ProxyStatusPing("\(pingTime)").0)"
+ text = text + ", \(strings.SocksProxySetup_ProxyStatusPing("\(pingTime)").string)"
displayStatus = DisplayProxyServerStatus(activity: false, text: text, textActive: false)
}
}
diff --git a/submodules/SettingsUI/Sources/Data and Storage/ProxyServerActionSheetController.swift b/submodules/SettingsUI/Sources/Data and Storage/ProxyServerActionSheetController.swift
index 48b0ac5ebf..2da448a17a 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/ProxyServerActionSheetController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/ProxyServerActionSheetController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import AsyncDisplayKit
import UIKit
@@ -222,7 +221,7 @@ private final class ProxyServerInfoItemNode: ActionSheetItemNode {
statusType = .generic(strongSelf.strings.SocksProxySetup_ProxyStatusChecking)
case let .available(rtt):
let pingTime = Int(rtt * 1000.0)
- statusType = .generic(strongSelf.strings.SocksProxySetup_ProxyStatusPing("\(pingTime)").0)
+ statusType = .generic(strongSelf.strings.SocksProxySetup_ProxyStatusPing("\(pingTime)").string)
case .notAvailable:
statusType = .failed(strongSelf.strings.SocksProxySetup_ProxyStatusUnavailable)
}
diff --git a/submodules/SettingsUI/Sources/Data and Storage/ProxyServerSettingsController.swift b/submodules/SettingsUI/Sources/Data and Storage/ProxyServerSettingsController.swift
index dd60a5ba52..10257c7264 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/ProxyServerSettingsController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/ProxyServerSettingsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MtProtoKit
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Data and Storage/ProxySettingsServerItem.swift b/submodules/SettingsUI/Sources/Data and Storage/ProxySettingsServerItem.swift
index 3e68942278..d82ea03994 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/ProxySettingsServerItem.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/ProxySettingsServerItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/SettingsUI/Sources/Data and Storage/SaveIncomingMediaController.swift b/submodules/SettingsUI/Sources/Data and Storage/SaveIncomingMediaController.swift
index 695c8f7ddb..be37e859fd 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/SaveIncomingMediaController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/SaveIncomingMediaController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift b/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift
index b0c88d9c7e..322a22c1f6 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import AsyncDisplayKit
import UIKit
diff --git a/submodules/SettingsUI/Sources/Data and Storage/StorageUsageController.swift b/submodules/SettingsUI/Sources/Data and Storage/StorageUsageController.swift
index 2b63878ba5..92dbf9794b 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/StorageUsageController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/StorageUsageController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramStringFormatting
@@ -297,7 +296,7 @@ private func storageUsageControllerEntries(presentationData: PresentationData, c
var addedHeader = false
- entries.append(.storageHeader(presentationData.theme, presentationData.strings.ClearCache_StorageTitle(stringForDeviceType().uppercased()).0))
+ entries.append(.storageHeader(presentationData.theme, presentationData.strings.ClearCache_StorageTitle(stringForDeviceType().uppercased()).string))
if let cacheStats = cacheStats, case let .result(stats) = cacheStats {
var peerSizes: Int64 = 0
var statsByPeerId: [(PeerId, Int64)] = []
@@ -490,7 +489,7 @@ public func storageUsageController(context: AccountContext, cacheUsagePromise: P
if filteredSize == 0 {
title = presentationData.strings.Cache_ClearNone
} else {
- title = presentationData.strings.Cache_Clear("\(dataSizeString(filteredSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").0
+ title = presentationData.strings.Cache_Clear("\(dataSizeString(filteredSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").string
}
if let item = item as? ActionSheetButtonItem {
@@ -545,7 +544,7 @@ public func storageUsageController(context: AccountContext, cacheUsagePromise: P
selectedSize = totalSize
if !items.isEmpty {
- items.append(ActionSheetButtonItem(title: presentationData.strings.Cache_Clear("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").0, action: {
+ items.append(ActionSheetButtonItem(title: presentationData.strings.Cache_Clear("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").string, action: {
if let statsPromise = statsPromise {
let clearCategories = sizeIndex.keys.filter({ sizeIndex[$0]!.0 })
@@ -637,7 +636,7 @@ public func storageUsageController(context: AccountContext, cacheUsagePromise: P
clearDisposable.set((signal
|> deliverOnMainQueue).start(completed: {
statsPromise.set(.single(.result(resultStats)))
- presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(selectedSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).0), elevatedLayout: false, action: { _ in return false }), .current, nil)
+ presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(selectedSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).string), elevatedLayout: false, action: { _ in return false }), .current, nil)
}))
}
@@ -692,7 +691,7 @@ public func storageUsageController(context: AccountContext, cacheUsagePromise: P
if filteredSize == 0 {
title = presentationData.strings.Cache_ClearNone
} else {
- title = presentationData.strings.Cache_Clear("\(dataSizeString(filteredSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").0
+ title = presentationData.strings.Cache_Clear("\(dataSizeString(filteredSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").string
}
if let item = item as? ActionSheetButtonItem {
@@ -742,7 +741,7 @@ public func storageUsageController(context: AccountContext, cacheUsagePromise: P
selectedSize = totalSize
if !items.isEmpty {
- items.append(ActionSheetButtonItem(title: presentationData.strings.Cache_Clear("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").0, action: {
+ items.append(ActionSheetButtonItem(title: presentationData.strings.Cache_Clear("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").string, action: {
if let statsPromise = statsPromise {
let clearCategories = sizeIndex.keys.filter({ sizeIndex[$0]!.0 })
var clearMediaIds = Set()
@@ -818,7 +817,7 @@ public func storageUsageController(context: AccountContext, cacheUsagePromise: P
clearDisposable.set((signal
|> deliverOnMainQueue).start(completed: {
statsPromise.set(.single(.result(resultStats)))
- presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(selectedSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).0), elevatedLayout: false, action: { _ in return false }), .current, nil)
+ presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(selectedSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).string), elevatedLayout: false, action: { _ in return false }), .current, nil)
}))
}
@@ -945,7 +944,7 @@ public func storageUsageController(context: AccountContext, cacheUsagePromise: P
clearDisposable.set((signal
|> deliverOnMainQueue).start(completed: {
statsPromise.set(.single(.result(resultStats)))
- presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).0), elevatedLayout: false, action: { _ in return false }), .current, nil)
+ presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).string), elevatedLayout: false, action: { _ in return false }), .current, nil)
}))
}
}
diff --git a/submodules/SettingsUI/Sources/Data and Storage/StorageUsageItem.swift b/submodules/SettingsUI/Sources/Data and Storage/StorageUsageItem.swift
index 3c4d8770d6..b15d078237 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/StorageUsageItem.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/StorageUsageItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Data and Storage/VoiceCallDataSavingController.swift b/submodules/SettingsUI/Sources/Data and Storage/VoiceCallDataSavingController.swift
index c773aefaef..9144bd3b83 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/VoiceCallDataSavingController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/VoiceCallDataSavingController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Language Selection/LocalizationListController.swift b/submodules/SettingsUI/Sources/Language Selection/LocalizationListController.swift
index f96efea62d..bb6825a4f6 100644
--- a/submodules/SettingsUI/Sources/Language Selection/LocalizationListController.swift
+++ b/submodules/SettingsUI/Sources/Language Selection/LocalizationListController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import SearchUI
diff --git a/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift b/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift
index 0328661f80..6eee101e54 100644
--- a/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Language Selection/LocalizationListControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import MergeLists
@@ -111,7 +110,7 @@ private final class LocalizationListSearchContainerNode: SearchDisplayController
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
@@ -315,7 +314,7 @@ final class LocalizationListControllerNode: ViewControllerTracingNode {
self.listNode = ListView()
self.listNode.keepTopItemOverscrollBackground = ListViewKeepTopItemOverscrollBackground(color: presentationData.theme.chatList.backgroundColor, direction: true)
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/SettingsUI/Sources/LogoutOptionsController.swift b/submodules/SettingsUI/Sources/LogoutOptionsController.swift
index 7a68f36c76..737a864dda 100644
--- a/submodules/SettingsUI/Sources/LogoutOptionsController.swift
+++ b/submodules/SettingsUI/Sources/LogoutOptionsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift
index 7689a657cd..2186263bdb 100644
--- a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -344,7 +343,7 @@ private func notificationsExceptionEntries(presentationData: PresentationData, s
let dateString = formatter.string(from: Date(timeIntervalSince1970: Double(until)))
- title = presentationData.strings.Notification_Exceptions_MutedUntil(dateString).0
+ title = presentationData.strings.Notification_Exceptions_MutedUntil(dateString).string
} else {
muted = true
title = presentationData.strings.Notification_Exceptions_AlwaysOff
@@ -363,7 +362,7 @@ private func notificationsExceptionEntries(presentationData: PresentationData, s
break
default:
let soundName = localizedPeerNotificationSoundString(strings: presentationData.strings, sound: value.settings.messageSound)
- title += (title.isEmpty ? presentationData.strings.Notification_Exceptions_Sound(soundName).0 : ", \(presentationData.strings.Notification_Exceptions_Sound(soundName).0)")
+ title += (title.isEmpty ? presentationData.strings.Notification_Exceptions_Sound(soundName).string : ", \(presentationData.strings.Notification_Exceptions_Sound(soundName).string)")
}
switch value.settings.displayPreviews {
case .default:
@@ -717,7 +716,7 @@ final class NotificationExceptionsControllerNode: ViewControllerTracingNode {
self.listNode = ListView()
self.listNode.keepTopItemOverscrollBackground = ListViewKeepTopItemOverscrollBackground(color: presentationData.theme.chatList.backgroundColor, direction: true)
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
@@ -1165,7 +1164,7 @@ private final class NotificationExceptionsSearchContainerNode: SearchDisplayCont
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionSettingsController.swift b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionSettingsController.swift
index 1d7fe9f682..9e6c9ab6cb 100644
--- a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionSettingsController.swift
+++ b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptionSettingsController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptions.swift b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptions.swift
index 566da4ec52..d4c623d5b2 100644
--- a/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptions.swift
+++ b/submodules/SettingsUI/Sources/Notifications/Exceptions/NotificationExceptions.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import SearchUI
diff --git a/submodules/SettingsUI/Sources/Notifications/NotificationsAndSounds.swift b/submodules/SettingsUI/Sources/Notifications/NotificationsAndSounds.swift
index 545d26e11e..1c03975877 100644
--- a/submodules/SettingsUI/Sources/Notifications/NotificationsAndSounds.swift
+++ b/submodules/SettingsUI/Sources/Notifications/NotificationsAndSounds.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import DeviceAccess
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/BlockedPeersController.swift b/submodules/SettingsUI/Sources/Privacy and Security/BlockedPeersController.swift
index b9a73aec81..dec04096e9 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/BlockedPeersController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/BlockedPeersController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/ConfirmPhoneNumberController.swift b/submodules/SettingsUI/Sources/Privacy and Security/ConfirmPhoneNumberController.swift
index e0b7c6dee5..9de89ca41a 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/ConfirmPhoneNumberController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/ConfirmPhoneNumberController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -98,7 +97,7 @@ private enum ConfirmPhoneNumberCodeEntry: ItemListNodeEntry {
let formattedNumber = formatPhoneNumber(phoneNumber)
let stringAndRanges = strings.CancelResetAccount_TextSMS(formattedNumber)
var result = ""
- result += stringAndRanges.0
+ result += stringAndRanges.string
if let range = result.range(of: formattedNumber) {
result.insert("*", at: range.upperBound)
result.insert("*", at: range.upperBound)
@@ -269,7 +268,7 @@ public func confirmPhoneNumberCodeController(context: AccountContext, phoneNumbe
return state
}
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
- presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.CancelResetAccount_Success(formatPhoneNumber(phoneNumber)).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
+ presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.CancelResetAccount_Success(formatPhoneNumber(phoneNumber)).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
dismissImpl?()
}))
}
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/CreatePasswordController.swift b/submodules/SettingsUI/Sources/Privacy and Security/CreatePasswordController.swift
index f8d3dc0936..6e2853753c 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/CreatePasswordController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/CreatePasswordController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/DataPrivacySettingsController.swift b/submodules/SettingsUI/Sources/Privacy and Security/DataPrivacySettingsController.swift
index f8803407b2..2c19e29e1e 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/DataPrivacySettingsController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/DataPrivacySettingsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/ForwardPrivacyChatPreviewItem.swift b/submodules/SettingsUI/Sources/Privacy and Security/ForwardPrivacyChatPreviewItem.swift
index 000b2d8d36..751669efed 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/ForwardPrivacyChatPreviewItem.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/ForwardPrivacyChatPreviewItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
@@ -191,7 +190,7 @@ class ForwardPrivacyChatPreviewItemNode: ListViewItemNode {
var authorNameCenter: CGFloat?
- let forwardedString = item.strings.Message_ForwardedMessage("").0
+ let forwardedString = item.strings.Message_ForwardedMessage("").string
var fromString: String?
if let newlineRange = forwardedString.range(of: "\n") {
let from = forwardedString[newlineRange.upperBound...]
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/PasscodeOptionsController.swift b/submodules/SettingsUI/Sources/Privacy and Security/PasscodeOptionsController.swift
index 7b4c6980d7..672935076e 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/PasscodeOptionsController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/PasscodeOptionsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import LocalAuthentication
import TelegramPresentationData
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/PrivacyAndSecurityController.swift b/submodules/SettingsUI/Sources/Privacy and Security/PrivacyAndSecurityController.swift
index ab2508baa9..28207189e0 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/PrivacyAndSecurityController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/PrivacyAndSecurityController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramCallsUI
@@ -374,21 +373,21 @@ private func stringForSelectiveSettings(strings: PresentationStrings, settings:
if enableFor.isEmpty {
return strings.PrivacySettings_LastSeenNobody
} else {
- return strings.PrivacySettings_LastSeenNobodyPlus("\(countForSelectivePeers(enableFor))").0
+ return strings.PrivacySettings_LastSeenNobodyPlus("\(countForSelectivePeers(enableFor))").string
}
case let .enableEveryone(disableFor):
if disableFor.isEmpty {
return strings.PrivacySettings_LastSeenEverybody
} else {
- return strings.PrivacySettings_LastSeenEverybodyMinus("\(countForSelectivePeers(disableFor))").0
+ return strings.PrivacySettings_LastSeenEverybodyMinus("\(countForSelectivePeers(disableFor))").string
}
case let .enableContacts(enableFor, disableFor):
if !enableFor.isEmpty && !disableFor.isEmpty {
- return strings.PrivacySettings_LastSeenContactsMinusPlus("\(countForSelectivePeers(disableFor))", "\(countForSelectivePeers(enableFor))").0
+ return strings.PrivacySettings_LastSeenContactsMinusPlus("\(countForSelectivePeers(disableFor))", "\(countForSelectivePeers(enableFor))").string
} else if !enableFor.isEmpty {
- return strings.PrivacySettings_LastSeenContactsPlus("\(countForSelectivePeers(enableFor))").0
+ return strings.PrivacySettings_LastSeenContactsPlus("\(countForSelectivePeers(enableFor))").string
} else if !disableFor.isEmpty {
- return strings.PrivacySettings_LastSeenContactsMinus("\(countForSelectivePeers(disableFor))").0
+ return strings.PrivacySettings_LastSeenContactsMinus("\(countForSelectivePeers(disableFor))").string
} else {
return strings.PrivacySettings_LastSeenContacts
}
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroController.swift b/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroController.swift
index 76c2e339a9..88ffd820f2 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import AppBundle
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroControllerNode.swift b/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroControllerNode.swift
index ab70359164..83fbd17d5c 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/PrivacyIntroControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListRecentSessionItem.swift b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListRecentSessionItem.swift
index f5d2d61013..b16c3f3f3e 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListRecentSessionItem.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListRecentSessionItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListWebsiteItem.swift b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListWebsiteItem.swift
index 802c7bac02..1cb821a38b 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListWebsiteItem.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/ItemListWebsiteItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsController.swift b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsController.swift
index 639413cb04..b739dc8d07 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsController.swift b/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsController.swift
index 9d71c8b993..76a093fb66 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsPeersController.swift b/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsPeersController.swift
index 8107a0f1e7..7fb0f87d32 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsPeersController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/SelectivePrivacySettingsPeersController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Privacy and Security/TwoStepVerificationUnlockController.swift b/submodules/SettingsUI/Sources/Privacy and Security/TwoStepVerificationUnlockController.swift
index dd2af7c141..117c00bcb9 100644
--- a/submodules/SettingsUI/Sources/Privacy and Security/TwoStepVerificationUnlockController.swift
+++ b/submodules/SettingsUI/Sources/Privacy and Security/TwoStepVerificationUnlockController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -205,7 +204,7 @@ private func twoStepVerificationUnlockSettingsControllerEntries(presentationData
switch configuration {
case let .notSet(pendingEmail):
if let pendingEmail = pendingEmail {
- entries.append(.pendingEmailConfirmInfo(presentationData.theme, presentationData.strings.TwoStepAuth_SetupPendingEmail(pendingEmail.email.pattern).0))
+ entries.append(.pendingEmailConfirmInfo(presentationData.theme, presentationData.strings.TwoStepAuth_SetupPendingEmail(pendingEmail.email.pattern).string))
entries.append(.pendingEmailConfirmCode(presentationData.theme, presentationData.strings, presentationData.strings.TwoStepAuth_RecoveryCode, state.emailCode))
entries.append(.pendingEmailInfo(presentationData.theme, "[" + presentationData.strings.TwoStepAuth_ConfirmationAbort + "]()"))
@@ -218,7 +217,7 @@ private func twoStepVerificationUnlockSettingsControllerEntries(presentationData
entries.append(.passwordEntry(presentationData.theme, presentationData.strings, presentationData.strings.TwoStepAuth_EnterPasswordPassword, state.passwordText))
var text: String = ""
if !hint.isEmpty {
- text += presentationData.strings.TwoStepAuth_EnterPasswordHint(escapedPlaintextForMarkdown(hint)).0
+ text += presentationData.strings.TwoStepAuth_EnterPasswordHint(escapedPlaintextForMarkdown(hint)).string
}
if let pendingResetTimestamp = pendingResetTimestamp {
@@ -227,7 +226,7 @@ private func twoStepVerificationUnlockSettingsControllerEntries(presentationData
if remainingSeconds <= 0 {
text += "[" + presentationData.strings.TwoStepAuth_ResetAction + "](reset)"
} else {
- text.append(presentationData.strings.TwoStepAuth_ResetPendingText(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).0)
+ text.append(presentationData.strings.TwoStepAuth_ResetPendingText(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).string)
text.append("\n[\(presentationData.strings.TwoStepAuth_CancelResetTitle)](declineReset)")
}
} else {
@@ -557,7 +556,7 @@ public func twoStepVerificationUnlockSettingsController(context: AccountContext,
case let .limitExceeded(retryAtTimestamp):
if let retryAtTimestamp = retryAtTimestamp {
let remainingSeconds = retryAtTimestamp - Int32(Date().timeIntervalSince1970)
- text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).0
+ text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).string
} else {
text = presentationData.strings.TwoStepAuth_FloodError
}
@@ -585,7 +584,7 @@ public func twoStepVerificationUnlockSettingsController(context: AccountContext,
case let .limitExceeded(retryAtTimestamp):
if let retryAtTimestamp = retryAtTimestamp {
let remainingSeconds = retryAtTimestamp - Int32(Date().timeIntervalSince1970)
- text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).0
+ text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).string
} else {
text = presentationData.strings.TwoStepAuth_FloodError
}
@@ -888,7 +887,7 @@ public func twoStepVerificationUnlockSettingsController(context: AccountContext,
case let .limitExceeded(retryAtTimestamp):
if let retryAtTimestamp = retryAtTimestamp {
let remainingSeconds = retryAtTimestamp - Int32(Date().timeIntervalSince1970)
- text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).0
+ text = presentationData.strings.TwoFactorSetup_ResetFloodWait(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).string
} else {
text = presentationData.strings.TwoStepAuth_FloodError
}
diff --git a/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift b/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift
index 4c1d7bb5b8..a63dcee4ab 100644
--- a/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift
+++ b/submodules/SettingsUI/Sources/Search/SettingsSearchItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import MergeLists
@@ -371,14 +370,14 @@ public final class SettingsSearchContainerNode: SearchDisplayControllerContentNo
self.listNode.backgroundColor = self.presentationData.theme.chatList.backgroundColor
self.listNode.isHidden = true
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.recentListNode = ListView()
self.recentListNode.backgroundColor = self.presentationData.theme.chatList.backgroundColor
self.recentListNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
self.recentListNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/SettingsUI/Sources/Search/SettingsSearchRecentItem.swift b/submodules/SettingsUI/Sources/Search/SettingsSearchRecentItem.swift
index 22dfb3b3d4..6ee7a4f1c9 100644
--- a/submodules/SettingsUI/Sources/Search/SettingsSearchRecentItem.swift
+++ b/submodules/SettingsUI/Sources/Search/SettingsSearchRecentItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/SettingsUI/Sources/Search/SettingsSearchableItems.swift b/submodules/SettingsUI/Sources/Search/SettingsSearchableItems.swift
index ddb16e8422..9f5c93c37f 100644
--- a/submodules/SettingsUI/Sources/Search/SettingsSearchableItems.swift
+++ b/submodules/SettingsUI/Sources/Search/SettingsSearchableItems.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramCallsUI
import OverlayStatusController
diff --git a/submodules/SettingsUI/Sources/SettingsController.swift b/submodules/SettingsUI/Sources/SettingsController.swift
index d790a2a138..8338d432df 100644
--- a/submodules/SettingsUI/Sources/SettingsController.swift
+++ b/submodules/SettingsUI/Sources/SettingsController.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
public protocol SettingsController: class {
diff --git a/submodules/SettingsUI/Sources/Stickers/ArchivedStickerPacksController.swift b/submodules/SettingsUI/Sources/Stickers/ArchivedStickerPacksController.swift
index 9ab2596ff6..3818ec06c1 100644
--- a/submodules/SettingsUI/Sources/Stickers/ArchivedStickerPacksController.swift
+++ b/submodules/SettingsUI/Sources/Stickers/ArchivedStickerPacksController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -335,7 +334,7 @@ public func archivedStickerPacksController(context: AccountContext, mode: Archiv
}
}
- presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).0, undo: false, info: info, topItem: items.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
+ presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).string, undo: false, info: info, topItem: items.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
return true
}), nil)
diff --git a/submodules/SettingsUI/Sources/Stickers/FeaturedStickerPacksController.swift b/submodules/SettingsUI/Sources/Stickers/FeaturedStickerPacksController.swift
index b460f6c795..6c57829354 100644
--- a/submodules/SettingsUI/Sources/Stickers/FeaturedStickerPacksController.swift
+++ b/submodules/SettingsUI/Sources/Stickers/FeaturedStickerPacksController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Stickers/InstalledStickerPacksController.swift b/submodules/SettingsUI/Sources/Stickers/InstalledStickerPacksController.swift
index d0c6783df5..2bf1143f04 100644
--- a/submodules/SettingsUI/Sources/Stickers/InstalledStickerPacksController.swift
+++ b/submodules/SettingsUI/Sources/Stickers/InstalledStickerPacksController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -548,7 +547,7 @@ public func installedStickerPacksController(context: AccountContext, mode: Insta
}
}
- navigationControllerImpl?()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: action == .archive ? presentationData.strings.StickerPackActionInfo_ArchivedTitle : presentationData.strings.StickerPackActionInfo_RemovedTitle, text: presentationData.strings.StickerPackActionInfo_RemovedText(archivedItem.info.title).0, undo: true, info: archivedItem.info, topItem: archivedItem.topItems.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { action in
+ navigationControllerImpl?()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: action == .archive ? presentationData.strings.StickerPackActionInfo_ArchivedTitle : presentationData.strings.StickerPackActionInfo_RemovedTitle, text: presentationData.strings.StickerPackActionInfo_RemovedText(archivedItem.info.title).string, undo: true, info: archivedItem.info, topItem: archivedItem.topItems.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { action in
if case .undo = action {
let _ = context.engine.stickers.addStickerPackInteractively(info: archivedItem.info, items: items, positionInList: positionInList).start()
}
@@ -581,9 +580,9 @@ public func installedStickerPacksController(context: AccountContext, mode: Insta
])
presentControllerImpl?(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
}, openStickersBot: {
- resolveDisposable.set((context.engine.peers.resolvePeerByName(name: "stickers") |> deliverOnMainQueue).start(next: { peerId in
- if let peerId = peerId {
- navigateToChatControllerImpl?(peerId)
+ resolveDisposable.set((context.engine.peers.resolvePeerByName(name: "stickers") |> deliverOnMainQueue).start(next: { peer in
+ if let peer = peer {
+ navigateToChatControllerImpl?(peer.id)
}
}))
}, openMasks: {
@@ -976,11 +975,11 @@ public func installedStickerPacksController(context: AccountContext, mode: Insta
}
switch action {
case .add:
- navigationControllerImpl?()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).0, undo: false, info: info, topItem: items.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
+ navigationControllerImpl?()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).string, undo: false, info: info, topItem: items.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
return true
}))
case let .remove(positionInList):
- navigationControllerImpl?()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_RemovedTitle, text: presentationData.strings.StickerPackActionInfo_RemovedText(info.title).0, undo: true, info: info, topItem: items.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { action in
+ navigationControllerImpl?()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_RemovedTitle, text: presentationData.strings.StickerPackActionInfo_RemovedText(info.title).string, undo: true, info: info, topItem: items.first, context: context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { action in
if case .undo = action {
let _ = context.engine.stickers.addStickerPackInteractively(info: info, items: items, positionInList: positionInList).start()
}
diff --git a/submodules/SettingsUI/Sources/TabBarAccountSwitchController.swift b/submodules/SettingsUI/Sources/TabBarAccountSwitchController.swift
index 055521ced2..6c3beaa573 100644
--- a/submodules/SettingsUI/Sources/TabBarAccountSwitchController.swift
+++ b/submodules/SettingsUI/Sources/TabBarAccountSwitchController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/SettingsUI/Sources/TabBarAccountSwitchControllerNode.swift b/submodules/SettingsUI/Sources/TabBarAccountSwitchControllerNode.swift
index 0c509ba19a..e5583881d4 100644
--- a/submodules/SettingsUI/Sources/TabBarAccountSwitchControllerNode.swift
+++ b/submodules/SettingsUI/Sources/TabBarAccountSwitchControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AvatarNode
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceController.swift b/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceController.swift
index 3b10fd385c..1fda1a5129 100644
--- a/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceController.swift
+++ b/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceController.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
@@ -125,8 +124,7 @@ public class TermsOfServiceController: ViewController, StandalonePresentableCont
}
if let ageConfirmation = strongSelf.ageConfirmation {
- let theme: PresentationTheme = strongSelf.presentationData.theme
- strongSelf.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: strongSelf.presentationData), title: strongSelf.presentationData.strings.PrivacyPolicy_AgeVerificationTitle, text: strongSelf.presentationData.strings.PrivacyPolicy_AgeVerificationMessage("\(ageConfirmation)").0, actions: [TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.PrivacyPolicy_AgeVerificationAgree, action: {
+ strongSelf.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: strongSelf.presentationData), title: strongSelf.presentationData.strings.PrivacyPolicy_AgeVerificationTitle, text: strongSelf.presentationData.strings.PrivacyPolicy_AgeVerificationMessage("\(ageConfirmation)").string, actions: [TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.PrivacyPolicy_AgeVerificationAgree, action: {
self?.accept(self?.proccessBotNameAfterAccept)
})]), in: .window(.root))
} else {
diff --git a/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceControllerNode.swift b/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceControllerNode.swift
index 5a75ca945e..fe3797b498 100644
--- a/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Terms of Service/TermsOfServiceControllerNode.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
@@ -141,7 +140,7 @@ final class TermsOfServiceControllerNode: ViewControllerTracingNode {
let theme: PresentationTheme = strongSelf.presentationData.theme
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
actionSheet.setItemGroups([ActionSheetItemGroup(items: [
- ActionSheetTextItem(title: strongSelf.presentationData.strings.Login_TermsOfService_ProceedBot(mention).0),
+ ActionSheetTextItem(title: strongSelf.presentationData.strings.Login_TermsOfService_ProceedBot(mention).string),
ActionSheetButtonItem(title: strongSelf.presentationData.strings.PrivacyPolicy_Accept, color: .accent, action: { [weak actionSheet] in
actionSheet?.dismissAnimated()
setToProcceedBot(mention)
diff --git a/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionController.swift b/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionController.swift
index ecff3147ef..b2a4ed06b3 100644
--- a/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionController.swift
+++ b/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionController.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionItem.swift b/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionItem.swift
index cecb92ba28..92f7e711bb 100644
--- a/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionItem.swift
+++ b/submodules/SettingsUI/Sources/Text Size/TextSizeSelectionItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import LegacyComponents
diff --git a/submodules/SettingsUI/Sources/Themes/CustomWallpaperPicker.swift b/submodules/SettingsUI/Sources/Themes/CustomWallpaperPicker.swift
index c706d19b1a..bab6a9ad5c 100644
--- a/submodules/SettingsUI/Sources/Themes/CustomWallpaperPicker.swift
+++ b/submodules/SettingsUI/Sources/Themes/CustomWallpaperPicker.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramUIPreferences
import MediaResources
diff --git a/submodules/SettingsUI/Sources/Themes/EditThemeController.swift b/submodules/SettingsUI/Sources/Themes/EditThemeController.swift
index fc6d82f5d3..2b6b8237eb 100644
--- a/submodules/SettingsUI/Sources/Themes/EditThemeController.swift
+++ b/submodules/SettingsUI/Sources/Themes/EditThemeController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Themes/SettingsThemeWallpaperNode.swift b/submodules/SettingsUI/Sources/Themes/SettingsThemeWallpaperNode.swift
index d4cd1100ed..641ede3a5c 100644
--- a/submodules/SettingsUI/Sources/Themes/SettingsThemeWallpaperNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/SettingsThemeWallpaperNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift b/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift
index b193e7982a..34479b9e34 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeAccentColorControllerNode.swift b/submodules/SettingsUI/Sources/Themes/ThemeAccentColorControllerNode.swift
index b27204c058..7e3eb52b5d 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeAccentColorControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeAccentColorControllerNode.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ChatListUI
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeAutoNightSettingsController.swift b/submodules/SettingsUI/Sources/Themes/ThemeAutoNightSettingsController.swift
index 77649ecce7..2064eeab5f 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeAutoNightSettingsController.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeAutoNightSettingsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
@@ -297,7 +296,7 @@ private func themeAutoNightSettingsControllerEntries(theme: PresentationTheme, s
entries.append(.timeBasedAutomaticLocationValue(theme, strings.AutoNightTheme_UpdateLocation, localizedName))
if sunset != 0 || sunrise != 0 {
- entries.append(.settingInfo(theme, strings.AutoNightTheme_LocationHelp(stringForMessageTimestamp(timestamp: sunset, dateTimeFormat: dateTimeFormat, local: false), stringForMessageTimestamp(timestamp: sunrise, dateTimeFormat: dateTimeFormat, local: false)).0))
+ entries.append(.settingInfo(theme, strings.AutoNightTheme_LocationHelp(stringForMessageTimestamp(timestamp: sunset, dateTimeFormat: dateTimeFormat, local: false), stringForMessageTimestamp(timestamp: sunrise, dateTimeFormat: dateTimeFormat, local: false)).string))
}
case let .manual(fromSeconds, toSeconds):
entries.append(.timeBasedManualFrom(theme, strings.AutoNightTheme_ScheduledFrom, stringForMessageTimestamp(timestamp: fromSeconds, dateTimeFormat: dateTimeFormat, local: false)))
@@ -306,7 +305,7 @@ private func themeAutoNightSettingsControllerEntries(theme: PresentationTheme, s
case let .brightness(threshold):
entries.append(.settingsHeader(theme, strings.AutoNightTheme_AutomaticSection))
entries.append(.brightnessValue(theme, threshold))
- entries.append(.settingInfo(theme, strings.AutoNightTheme_AutomaticHelp("\(Int(threshold * 100.0))").0.replacingOccurrences(of: "%%", with: "%")))
+ entries.append(.settingInfo(theme, strings.AutoNightTheme_AutomaticHelp("\(Int(threshold * 100.0))").string.replacingOccurrences(of: "%%", with: "%")))
}
switch switchSetting.trigger {
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeAutoNightTimeSelectionActionSheet.swift b/submodules/SettingsUI/Sources/Themes/ThemeAutoNightTimeSelectionActionSheet.swift
index 8f550268eb..b71ed79464 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeAutoNightTimeSelectionActionSheet.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeAutoNightTimeSelectionActionSheet.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import UIKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramStringFormatting
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeColorPresets.swift b/submodules/SettingsUI/Sources/Themes/ThemeColorPresets.swift
index 98410c1f7b..4fce8c0eb4 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeColorPresets.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeColorPresets.swift
@@ -1,8 +1,8 @@
import Foundation
import Postbox
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
+import TelegramCore
private func patternWallpaper(data: BuiltinWallpaperData, colors: [UInt32], intensity: Int32?, rotation: Int32?) -> TelegramWallpaper {
return defaultBuiltinWallpaper(data: data, colors: colors, intensity: intensity ?? 50, rotation: rotation)
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeColorsGridController.swift b/submodules/SettingsUI/Sources/Themes/ThemeColorsGridController.swift
index 1d7670f305..54640c18c0 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeColorsGridController.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeColorsGridController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import LegacyComponents
import TelegramPresentationData
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerItem.swift
index b2c1cbcdb1..7b3b91c209 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerNode.swift b/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerNode.swift
index f0206397e9..e531bbb151 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeColorsGridControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import MergeLists
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeGridController.swift b/submodules/SettingsUI/Sources/Themes/ThemeGridController.swift
index 8f6be20568..355a2be23d 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeGridController.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeGridController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import LegacyComponents
import TelegramPresentationData
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeGridControllerItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeGridControllerItem.swift
index 0652c21f76..12117ce26c 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeGridControllerItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeGridControllerItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeGridControllerNode.swift b/submodules/SettingsUI/Sources/Themes/ThemeGridControllerNode.swift
index 0e39a2108a..733c7b4174 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeGridControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeGridControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import UniversalMediaPlayer
import TelegramPresentationData
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeGridSearchColorsItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeGridSearchColorsItem.swift
index 4f2c87afe8..d02bdf36a4 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeGridSearchColorsItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeGridSearchColorsItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ListSectionHeaderNode
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeGridSearchContentNode.swift b/submodules/SettingsUI/Sources/Themes/ThemeGridSearchContentNode.swift
index 0862763d18..17c57e9400 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeGridSearchContentNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeGridSearchContentNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
import AccountContext
@@ -384,7 +383,7 @@ final class ThemeGridSearchContentNode: SearchDisplayControllerContentNode {
self.recentListNode = ListView()
self.recentListNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
self.recentListNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.gridNode = GridNode()
@@ -498,13 +497,9 @@ final class ThemeGridSearchContentNode: SearchDisplayControllerContentNode {
return .single(nil)
}
return context.engine.peers.resolvePeerByName(name: name)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return context.account.postbox.loadedPeerWithId(peerId)
- |> map { peer -> Peer? in
- return peer
- }
- |> take(1)
+ |> mapToSignal { peer -> Signal in
+ if let peer = peer {
+ return .single(peer._asPeer())
} else {
return .single(nil)
}
@@ -782,7 +777,7 @@ final class ThemeGridSearchContentNode: SearchDisplayControllerContentNode {
strongSelf.dimNode.isHidden = displayingResults
strongSelf.backgroundColor = strongSelf.presentationData.theme.chatList.backgroundColor
- strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.WebSearch_SearchNoResultsDescription(transition.query).0, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
+ strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.WebSearch_SearchNoResultsDescription(transition.query).string, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
let emptyResults = displayingResults && transition.isEmpty
strongSelf.emptyResultsTitleNode.isHidden = !emptyResults
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeGridSearchItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeGridSearchItem.swift
index 4d4383553f..0e506ac10b 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeGridSearchItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeGridSearchItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeGridSelectionPanelNode.swift b/submodules/SettingsUI/Sources/Themes/ThemeGridSelectionPanelNode.swift
index 0d7500fbf6..856ae1ae6e 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeGridSelectionPanelNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeGridSelectionPanelNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AppBundle
diff --git a/submodules/SettingsUI/Sources/Themes/ThemePreviewController.swift b/submodules/SettingsUI/Sources/Themes/ThemePreviewController.swift
index dd72374307..162f11d443 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemePreviewController.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemePreviewController.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Themes/ThemePreviewControllerNode.swift b/submodules/SettingsUI/Sources/Themes/ThemePreviewControllerNode.swift
index 82d7f5f0a0..3a88403acc 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemePreviewControllerNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemePreviewControllerNode.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift
index 0a49aeec75..d3a27127ca 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsAccentColorItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsAppIconItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsAppIconItem.swift
index d88914ce70..e6ff3204de 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsAppIconItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsAppIconItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsBrightnessItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsBrightnessItem.swift
index 098410162a..774d83e30e 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsBrightnessItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsBrightnessItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import LegacyComponents
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsChatPreviewItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsChatPreviewItem.swift
index 5a07d05a5e..19eea55b97 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsChatPreviewItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsChatPreviewItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsController.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsController.swift
index 7f7047442f..b36f14acef 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsController.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsFontSizeItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsFontSizeItem.swift
index 61b07eabff..f751209181 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsFontSizeItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsFontSizeItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import LegacyComponents
diff --git a/submodules/SettingsUI/Sources/Themes/ThemeSettingsThemeItem.swift b/submodules/SettingsUI/Sources/Themes/ThemeSettingsThemeItem.swift
index db8b0f5436..31869598e4 100644
--- a/submodules/SettingsUI/Sources/Themes/ThemeSettingsThemeItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/ThemeSettingsThemeItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
import TelegramUIPreferences
diff --git a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift
index 9973dfafe9..2182bc581b 100644
--- a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift
+++ b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift
@@ -6,7 +6,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Photos
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift
index e9cc0bce08..2d85647375 100644
--- a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift
+++ b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/SettingsUI/Sources/Themes/WallpaperPatternPanelNode.swift b/submodules/SettingsUI/Sources/Themes/WallpaperPatternPanelNode.swift
index fa972c2292..b9027cbba3 100644
--- a/submodules/SettingsUI/Sources/Themes/WallpaperPatternPanelNode.swift
+++ b/submodules/SettingsUI/Sources/Themes/WallpaperPatternPanelNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import LegacyComponents
import AccountContext
diff --git a/submodules/SettingsUI/Sources/UsernameSetupController.swift b/submodules/SettingsUI/Sources/UsernameSetupController.swift
index 26789fa576..7deddbc21e 100644
--- a/submodules/SettingsUI/Sources/UsernameSetupController.swift
+++ b/submodules/SettingsUI/Sources/UsernameSetupController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
@@ -203,7 +202,7 @@ private func usernameSetupControllerEntries(presentationData: PresentationData,
case let .availability(availability):
switch availability {
case .available:
- statusText = presentationData.strings.Username_UsernameIsAvailable(currentAddressName).0
+ statusText = presentationData.strings.Username_UsernameIsAvailable(currentAddressName).string
case .invalid:
statusText = presentationData.strings.Username_InvalidCharacters
case .taken:
@@ -217,7 +216,7 @@ private func usernameSetupControllerEntries(presentationData: PresentationData,
var infoText = presentationData.strings.Username_Help
infoText += "\n\n"
- let hintText = presentationData.strings.Username_LinkHint(currentAddressName.replacingOccurrences(of: "[", with: "").replacingOccurrences(of: "]", with: "")).0.replacingOccurrences(of: "]", with: "]()")
+ let hintText = presentationData.strings.Username_LinkHint(currentAddressName.replacingOccurrences(of: "[", with: "").replacingOccurrences(of: "]", with: "")).string.replacingOccurrences(of: "]", with: "]()")
infoText += hintText
entries.append(.publicLinkInfo(presentationData.theme, infoText))
}
diff --git a/submodules/SettingsUI/Sources/Watch/WatchSettingsController.swift b/submodules/SettingsUI/Sources/Watch/WatchSettingsController.swift
index 6e6da3a112..6327a204fe 100644
--- a/submodules/SettingsUI/Sources/Watch/WatchSettingsController.swift
+++ b/submodules/SettingsUI/Sources/Watch/WatchSettingsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/ShareController/BUILD b/submodules/ShareController/BUILD
index d86123a68d..44333ca34d 100644
--- a/submodules/ShareController/BUILD
+++ b/submodules/ShareController/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/SaveToCameraRoll:SaveToCameraRoll",
"//submodules/StickerResources:StickerResources",
"//submodules/UrlEscaping:UrlEscaping",
diff --git a/submodules/ShareController/Sources/ShareController.swift b/submodules/ShareController/Sources/ShareController.swift
index b2ebd337a7..d836ddb15c 100644
--- a/submodules/ShareController/Sources/ShareController.swift
+++ b/submodules/ShareController/Sources/ShareController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/ShareController/Sources/ShareControllerNode.swift b/submodules/ShareController/Sources/ShareControllerNode.swift
index 9608e6275e..56fce91c05 100644
--- a/submodules/ShareController/Sources/ShareControllerNode.swift
+++ b/submodules/ShareController/Sources/ShareControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import TelegramIntents
diff --git a/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift b/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift
index b65267d704..09636a9dc6 100644
--- a/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift
+++ b/submodules/ShareController/Sources/ShareControllerPeerGridItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/ShareController/Sources/ShareControllerRecentPeersGridItem.swift b/submodules/ShareController/Sources/ShareControllerRecentPeersGridItem.swift
index 3a229ba33f..b0f39917d7 100644
--- a/submodules/ShareController/Sources/ShareControllerRecentPeersGridItem.swift
+++ b/submodules/ShareController/Sources/ShareControllerRecentPeersGridItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/ShareController/Sources/SharePeersContainerNode.swift b/submodules/ShareController/Sources/SharePeersContainerNode.swift
index 381beb78e5..8811f62f31 100644
--- a/submodules/ShareController/Sources/SharePeersContainerNode.swift
+++ b/submodules/ShareController/Sources/SharePeersContainerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import TelegramPresentationData
diff --git a/submodules/ShareController/Sources/ShareSearchContainerNode.swift b/submodules/ShareController/Sources/ShareSearchContainerNode.swift
index 51dac1c75d..6580453523 100644
--- a/submodules/ShareController/Sources/ShareSearchContainerNode.swift
+++ b/submodules/ShareController/Sources/ShareSearchContainerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import TelegramPresentationData
diff --git a/submodules/ShareItems/BUILD b/submodules/ShareItems/BUILD
index 55ffcf3d8d..b660a08c21 100644
--- a/submodules/ShareItems/BUILD
+++ b/submodules/ShareItems/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/MtProtoKit:MtProtoKit",
"//submodules/Display:Display",
"//submodules/LegacyComponents:LegacyComponents",
diff --git a/submodules/ShareItems/Sources/ShareItems.swift b/submodules/ShareItems/Sources/ShareItems.swift
index a91ec1dec9..422b6a56cf 100644
--- a/submodules/ShareItems/Sources/ShareItems.swift
+++ b/submodules/ShareItems/Sources/ShareItems.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MtProtoKit
import Display
import AccountContext
diff --git a/submodules/SinglePhoneInputNode/Sources/SinglePhoneInputNode.swift b/submodules/SinglePhoneInputNode/Sources/SinglePhoneInputNode.swift
index f38575990d..6e8976c3a9 100644
--- a/submodules/SinglePhoneInputNode/Sources/SinglePhoneInputNode.swift
+++ b/submodules/SinglePhoneInputNode/Sources/SinglePhoneInputNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramStringFormatting
import PhoneNumberFormat
diff --git a/submodules/SlotMachineAnimationNode/BUILD b/submodules/SlotMachineAnimationNode/BUILD
index 851987b338..1d83bf32ee 100644
--- a/submodules/SlotMachineAnimationNode/BUILD
+++ b/submodules/SlotMachineAnimationNode/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramCore:TelegramCore",
"//submodules/AccountContext:AccountContext",
"//submodules/StickerResources:StickerResources",
diff --git a/submodules/SlotMachineAnimationNode/Sources/SlotMachineAnimationNode.swift b/submodules/SlotMachineAnimationNode/Sources/SlotMachineAnimationNode.swift
index fa49ee8f4c..ed20d0b6f7 100644
--- a/submodules/SlotMachineAnimationNode/Sources/SlotMachineAnimationNode.swift
+++ b/submodules/SlotMachineAnimationNode/Sources/SlotMachineAnimationNode.swift
@@ -2,7 +2,6 @@ import Foundation
import Display
import AsyncDisplayKit
import Postbox
-import SyncCore
import TelegramCore
import SwiftSignalKit
import StickerResources
diff --git a/submodules/StatisticsUI/BUILD b/submodules/StatisticsUI/BUILD
index 8578f67bbf..1bbd44f86b 100644
--- a/submodules/StatisticsUI/BUILD
+++ b/submodules/StatisticsUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/StatisticsUI/Sources/ChannelStatsController.swift b/submodules/StatisticsUI/Sources/ChannelStatsController.swift
index 649297977a..beea2c2d31 100644
--- a/submodules/StatisticsUI/Sources/ChannelStatsController.swift
+++ b/submodules/StatisticsUI/Sources/ChannelStatsController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramStringFormatting
diff --git a/submodules/StatisticsUI/Sources/GroupStatsController.swift b/submodules/StatisticsUI/Sources/GroupStatsController.swift
index d2fc365197..cf4652dc43 100644
--- a/submodules/StatisticsUI/Sources/GroupStatsController.swift
+++ b/submodules/StatisticsUI/Sources/GroupStatsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramStringFormatting
diff --git a/submodules/StatisticsUI/Sources/MessageStatsController.swift b/submodules/StatisticsUI/Sources/MessageStatsController.swift
index 3eebe518d1..81b1fa6dd4 100644
--- a/submodules/StatisticsUI/Sources/MessageStatsController.swift
+++ b/submodules/StatisticsUI/Sources/MessageStatsController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramStringFormatting
diff --git a/submodules/StatisticsUI/Sources/MessageStatsOverviewItem.swift b/submodules/StatisticsUI/Sources/MessageStatsOverviewItem.swift
index 339fc1a3f7..51de36f047 100644
--- a/submodules/StatisticsUI/Sources/MessageStatsOverviewItem.swift
+++ b/submodules/StatisticsUI/Sources/MessageStatsOverviewItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/StatisticsUI/Sources/StatsGraphItem.swift b/submodules/StatisticsUI/Sources/StatsGraphItem.swift
index 102ac63a32..46404eb5c0 100644
--- a/submodules/StatisticsUI/Sources/StatsGraphItem.swift
+++ b/submodules/StatisticsUI/Sources/StatsGraphItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/StatisticsUI/Sources/StatsMessageItem.swift b/submodules/StatisticsUI/Sources/StatsMessageItem.swift
index c097cecdb8..7229f6488c 100644
--- a/submodules/StatisticsUI/Sources/StatsMessageItem.swift
+++ b/submodules/StatisticsUI/Sources/StatsMessageItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
import TelegramPresentationData
import TelegramStringFormatting
diff --git a/submodules/StatisticsUI/Sources/StatsOverviewItem.swift b/submodules/StatisticsUI/Sources/StatsOverviewItem.swift
index 9d5212b23b..6687feacf8 100644
--- a/submodules/StatisticsUI/Sources/StatsOverviewItem.swift
+++ b/submodules/StatisticsUI/Sources/StatsOverviewItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/StickerPackPreviewUI/BUILD b/submodules/StickerPackPreviewUI/BUILD
index d844048b4d..328333dfcd 100644
--- a/submodules/StickerPackPreviewUI/BUILD
+++ b/submodules/StickerPackPreviewUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewController.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewController.swift
index 4cfa82d782..d53eb66333 100644
--- a/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewController.swift
+++ b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramUIPreferences
import AccountContext
@@ -133,10 +132,9 @@ public final class StickerPackPreviewController: ViewController, StandalonePrese
let account = strongSelf.context.account
strongSelf.openMentionDisposable.set((strongSelf.context.engine.peers.resolvePeerByName(name: mention)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return account.postbox.loadedPeerWithId(peerId)
- |> map(Optional.init)
+ |> mapToSignal { peer -> Signal in
+ if let peer = peer {
+ return .single(peer._asPeer())
} else {
return .single(nil)
}
diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewControllerNode.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewControllerNode.swift
index 68ddba3a16..c1e5d016ba 100644
--- a/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewControllerNode.swift
+++ b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewGridItem.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewGridItem.swift
index a8264e8032..5f40225493 100644
--- a/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewGridItem.swift
+++ b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewGridItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift
index e7ad90f035..aa10218b2d 100644
--- a/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift
+++ b/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import TelegramPresentationData
diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPreviewController.swift b/submodules/StickerPackPreviewUI/Sources/StickerPreviewController.swift
index 7281977304..9d39bd02fa 100644
--- a/submodules/StickerPackPreviewUI/Sources/StickerPreviewController.swift
+++ b/submodules/StickerPackPreviewUI/Sources/StickerPreviewController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPreviewControllerNode.swift b/submodules/StickerPackPreviewUI/Sources/StickerPreviewControllerNode.swift
index edc6b01210..a0f91ddc6f 100644
--- a/submodules/StickerPackPreviewUI/Sources/StickerPreviewControllerNode.swift
+++ b/submodules/StickerPackPreviewUI/Sources/StickerPreviewControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import StickerResources
diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPreviewPeekContent.swift b/submodules/StickerPackPreviewUI/Sources/StickerPreviewPeekContent.swift
index 38ee9a8531..50f5d7fe0f 100644
--- a/submodules/StickerPackPreviewUI/Sources/StickerPreviewPeekContent.swift
+++ b/submodules/StickerPackPreviewUI/Sources/StickerPreviewPeekContent.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import StickerResources
import AnimatedStickerNode
diff --git a/submodules/StickerResources/BUILD b/submodules/StickerResources/BUILD
index fbc63bf800..a8ed7fe661 100644
--- a/submodules/StickerResources/BUILD
+++ b/submodules/StickerResources/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
diff --git a/submodules/StickerResources/Sources/StickerResources.swift b/submodules/StickerResources/Sources/StickerResources.swift
index 7e907abb57..3bba99d499 100644
--- a/submodules/StickerResources/Sources/StickerResources.swift
+++ b/submodules/StickerResources/Sources/StickerResources.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import MediaResources
import Tuples
import ImageBlur
diff --git a/submodules/SyncCore/BUILD b/submodules/SyncCore/BUILD
deleted file mode 100644
index a157f44704..0000000000
--- a/submodules/SyncCore/BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
-
-swift_library(
- name = "SyncCore",
- module_name = "SyncCore",
- srcs = glob([
- "Sources/**/*.swift",
- ]),
- deps = [
- "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
- "//submodules/Postbox:Postbox",
- ],
- visibility = [
- "//visibility:public",
- ],
-)
diff --git a/submodules/TelegramAnimatedStickerNode/BUILD b/submodules/TelegramAnimatedStickerNode/BUILD
index 0049c24af9..bfb4779824 100644
--- a/submodules/TelegramAnimatedStickerNode/BUILD
+++ b/submodules/TelegramAnimatedStickerNode/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/StickerResources:StickerResources",
"//submodules/MediaResources:MediaResources",
"//submodules/Tuples:Tuples",
diff --git a/submodules/TelegramAnimatedStickerNode/Sources/AnimatedStickerUtils.swift b/submodules/TelegramAnimatedStickerNode/Sources/AnimatedStickerUtils.swift
index a12fc19c98..bc5316602b 100644
--- a/submodules/TelegramAnimatedStickerNode/Sources/AnimatedStickerUtils.swift
+++ b/submodules/TelegramAnimatedStickerNode/Sources/AnimatedStickerUtils.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import Postbox
import Display
import TelegramCore
-import SyncCore
import Compression
import GZip
import RLottieBinding
diff --git a/submodules/TelegramAnimatedStickerNode/Sources/TelegramAnimatedStickerNode.swift b/submodules/TelegramAnimatedStickerNode/Sources/TelegramAnimatedStickerNode.swift
index 6947908e03..1de547d18e 100644
--- a/submodules/TelegramAnimatedStickerNode/Sources/TelegramAnimatedStickerNode.swift
+++ b/submodules/TelegramAnimatedStickerNode/Sources/TelegramAnimatedStickerNode.swift
@@ -3,7 +3,6 @@ import AnimatedStickerNode
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MediaResources
import StickerResources
diff --git a/submodules/TelegramBaseController/BUILD b/submodules/TelegramBaseController/BUILD
index 7d1c7d3d24..5dd334fcf5 100644
--- a/submodules/TelegramBaseController/BUILD
+++ b/submodules/TelegramBaseController/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Display:Display",
"//submodules/AvatarNode:AvatarNode",
diff --git a/submodules/TelegramBaseController/Sources/LocationBroadcastActionSheetItem.swift b/submodules/TelegramBaseController/Sources/LocationBroadcastActionSheetItem.swift
index a652416203..054ab6a489 100644
--- a/submodules/TelegramBaseController/Sources/LocationBroadcastActionSheetItem.swift
+++ b/submodules/TelegramBaseController/Sources/LocationBroadcastActionSheetItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramBaseController/Sources/LocationBroadcastNavigationAccessoryPanel.swift b/submodules/TelegramBaseController/Sources/LocationBroadcastNavigationAccessoryPanel.swift
index d99edd3a58..e15d47c31d 100644
--- a/submodules/TelegramBaseController/Sources/LocationBroadcastNavigationAccessoryPanel.swift
+++ b/submodules/TelegramBaseController/Sources/LocationBroadcastNavigationAccessoryPanel.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
@@ -119,7 +118,7 @@ final class LocationBroadcastNavigationAccessoryPanel: ASDisplayNode {
case .summary:
let text: String
if peers.count == 1 {
- text = self.strings.DialogList_LiveLocationSharingTo(peers[0].displayTitle(strings: self.strings, displayOrder: self.nameDisplayOrder)).0
+ text = self.strings.DialogList_LiveLocationSharingTo(peers[0].displayTitle(strings: self.strings, displayOrder: self.nameDisplayOrder)).string
} else {
text = self.strings.DialogList_LiveLocationChatsCount(Int32(peers.count))
}
@@ -140,7 +139,7 @@ final class LocationBroadcastNavigationAccessoryPanel: ASDisplayNode {
}
let rawText: String
if filteredPeers.count != peers.count {
- rawText = self.strings.Conversation_LiveLocationYouAndOther(otherString).0
+ rawText = self.strings.Conversation_LiveLocationYouAndOther(otherString).string
} else {
rawText = otherString
}
diff --git a/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryContainerNode.swift b/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryContainerNode.swift
index ee4211ad3a..ba6070ab82 100644
--- a/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryContainerNode.swift
+++ b/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryContainerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryHeaderNode.swift b/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryHeaderNode.swift
index 2816162c63..f7cbb240a7 100644
--- a/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryHeaderNode.swift
+++ b/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryHeaderNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import UniversalMediaPlayer
@@ -80,7 +79,7 @@ private class MediaHeaderItemNode: ASDisplayNode {
}
if titleText == subtitleText {
- subtitleText = humanReadableStringForTimestamp(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: timestamp).0
+ subtitleText = humanReadableStringForTimestamp(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: timestamp).string
}
titleString = NSAttributedString(string: titleText, font: titleFont, textColor: theme.rootController.navigationBar.primaryTextColor)
diff --git a/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryPanel.swift b/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryPanel.swift
index 04ef455bf7..9e1e41a976 100644
--- a/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryPanel.swift
+++ b/submodules/TelegramBaseController/Sources/MediaNavigationAccessoryPanel.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import AccountContext
public final class MediaNavigationAccessoryPanel: ASDisplayNode {
diff --git a/submodules/TelegramBaseController/Sources/TelegramBaseController.swift b/submodules/TelegramBaseController/Sources/TelegramBaseController.swift
index 16e3e6bd81..a48571c327 100644
--- a/submodules/TelegramBaseController/Sources/TelegramBaseController.swift
+++ b/submodules/TelegramBaseController/Sources/TelegramBaseController.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramCallsUI/BUILD b/submodules/TelegramCallsUI/BUILD
index 57dca2b206..24b48b2c18 100644
--- a/submodules/TelegramCallsUI/BUILD
+++ b/submodules/TelegramCallsUI/BUILD
@@ -91,6 +91,7 @@ swift_library(
"//submodules/TextFormat:TextFormat",
"//submodules/Markdown:Markdown",
"//submodules/ChatTitleActivityNode:ChatTitleActivityNode",
+ "//third-party/libyuv:LibYuvBinding",
],
visibility = [
"//visibility:public",
diff --git a/submodules/TelegramCallsUI/Sources/CallController.swift b/submodules/TelegramCallsUI/Sources/CallController.swift
index 3fde19a833..0f13530122 100644
--- a/submodules/TelegramCallsUI/Sources/CallController.swift
+++ b/submodules/TelegramCallsUI/Sources/CallController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramCallsUI/Sources/CallControllerNode.swift b/submodules/TelegramCallsUI/Sources/CallControllerNode.swift
index 6c38c737c8..b4f29eb2a5 100644
--- a/submodules/TelegramCallsUI/Sources/CallControllerNode.swift
+++ b/submodules/TelegramCallsUI/Sources/CallControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -756,7 +755,7 @@ final class CallControllerNode: ViewControllerTracingNode, CallControllerNodePro
self.toastNode.title = peer.compactDisplayTitle
self.statusNode.title = peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)
if hasOther {
- self.statusNode.subtitle = self.presentationData.strings.Call_AnsweringWithAccount(accountPeer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ self.statusNode.subtitle = self.presentationData.strings.Call_AnsweringWithAccount(accountPeer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
if let callState = self.callState {
self.updateCallState(callState)
@@ -832,7 +831,7 @@ final class CallControllerNode: ViewControllerTracingNode, CallControllerNodePro
strongSelf.maybeScheduleUIHidingForActiveVideoCall()
}
- let incomingVideoNode = CallVideoNode(videoView: incomingVideoView, disabledText: strongSelf.presentationData.strings.Call_RemoteVideoPaused(strongSelf.peer?.compactDisplayTitle ?? "").0, assumeReadyAfterTimeout: false, isReadyUpdated: {
+ let incomingVideoNode = CallVideoNode(videoView: incomingVideoView, disabledText: strongSelf.presentationData.strings.Call_RemoteVideoPaused(strongSelf.peer?.compactDisplayTitle ?? "").string, assumeReadyAfterTimeout: false, isReadyUpdated: {
if delayUntilInitialized {
Queue.mainQueue().after(0.1, {
applyNode()
@@ -1027,9 +1026,9 @@ final class CallControllerNode: ViewControllerTracingNode, CallControllerNodePro
let text: String
if isVideo {
- text = self.presentationData.strings.Call_ParticipantVideoVersionOutdatedError(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ text = self.presentationData.strings.Call_ParticipantVideoVersionOutdatedError(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
} else {
- text = self.presentationData.strings.Call_ParticipantVersionOutdatedError(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ text = self.presentationData.strings.Call_ParticipantVersionOutdatedError(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
}
self.present?(textAlertController(sharedContext: self.sharedContext, title: nil, text: text, actions: [TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: {
@@ -1703,7 +1702,7 @@ final class CallControllerNode: ViewControllerTracingNode, CallControllerNodePro
@objc func keyPressed() {
if self.keyPreviewNode == nil, let keyText = self.keyTextData?.1, let peer = self.peer {
- let keyPreviewNode = CallControllerKeyPreviewNode(keyText: keyText, infoText: self.presentationData.strings.Call_EmojiDescription(peer.compactDisplayTitle).0.replacingOccurrences(of: "%%", with: "%"), dismiss: { [weak self] in
+ let keyPreviewNode = CallControllerKeyPreviewNode(keyText: keyText, infoText: self.presentationData.strings.Call_EmojiDescription(peer.compactDisplayTitle).string.replacingOccurrences(of: "%%", with: "%"), dismiss: { [weak self] in
if let _ = self?.keyPreviewNode {
self?.backPressed()
}
diff --git a/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift b/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift
index ddcb9aa279..45c6a617d2 100644
--- a/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift
+++ b/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift
@@ -117,13 +117,13 @@ final class CallControllerToastContainerNode: ASDisplayNode {
toastContent = CallControllerToastItemNode.Content(
key: .camera,
image: .camera,
- text: strings.Call_CameraOff(self.title).0
+ text: strings.Call_CameraOff(self.title).string
)
case .microphone:
toastContent = CallControllerToastItemNode.Content(
key: .microphone,
image: .microphone,
- text: strings.Call_MicrophoneOff(self.title).0
+ text: strings.Call_MicrophoneOff(self.title).string
)
case .mute:
toastContent = CallControllerToastItemNode.Content(
@@ -135,7 +135,7 @@ final class CallControllerToastContainerNode: ASDisplayNode {
toastContent = CallControllerToastItemNode.Content(
key: .battery,
image: .battery,
- text: strings.Call_BatteryLow(self.title).0
+ text: strings.Call_BatteryLow(self.title).string
)
}
let toastHeight = toastNode.update(width: width, content: toastContent, transition: toastTransition)
diff --git a/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift b/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift
index d21e7b7cd1..4a47a8b88b 100644
--- a/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift
+++ b/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift b/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift
index e816f62270..44e39cf5e3 100644
--- a/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift
+++ b/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift
@@ -5,7 +5,6 @@ import Intents
import AVFoundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AppBundle
diff --git a/submodules/TelegramCallsUI/Sources/CallRatingController.swift b/submodules/TelegramCallsUI/Sources/CallRatingController.swift
index 961f02c7a6..e79ce92ec5 100644
--- a/submodules/TelegramCallsUI/Sources/CallRatingController.swift
+++ b/submodules/TelegramCallsUI/Sources/CallRatingController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramVoip
import AccountContext
diff --git a/submodules/TelegramCallsUI/Sources/CallStatusBarNode.swift b/submodules/TelegramCallsUI/Sources/CallStatusBarNode.swift
index f02ecdc0ad..a1dcb9e96d 100644
--- a/submodules/TelegramCallsUI/Sources/CallStatusBarNode.swift
+++ b/submodules/TelegramCallsUI/Sources/CallStatusBarNode.swift
@@ -396,12 +396,12 @@ public class CallStatusBarNodeImpl: CallStatusBarNode {
let elapsedTime = scheduleTime - currentTime
let timerText: String
if elapsedTime >= 86400 {
- timerText = presentationData.strings.VoiceChat_StatusStartsIn(scheduledTimeIntervalString(strings: presentationData.strings, value: elapsedTime)).0
+ timerText = presentationData.strings.VoiceChat_StatusStartsIn(scheduledTimeIntervalString(strings: presentationData.strings, value: elapsedTime)).string
} else if elapsedTime < 0 {
isLate = true
- timerText = presentationData.strings.VoiceChat_StatusLateBy(textForTimeout(value: abs(elapsedTime))).0
+ timerText = presentationData.strings.VoiceChat_StatusLateBy(textForTimeout(value: abs(elapsedTime))).string
} else {
- timerText = presentationData.strings.VoiceChat_StatusStartsIn(textForTimeout(value: elapsedTime)).0
+ timerText = presentationData.strings.VoiceChat_StatusStartsIn(textForTimeout(value: elapsedTime)).string
}
segments.append(.text(0, NSAttributedString(string: timerText, font: textFont, textColor: textColor)))
} else if let membersCount = membersCount {
@@ -415,24 +415,25 @@ public class CallStatusBarNodeImpl: CallStatusBarNode {
}
let rawTextAndRanges = presentationData.strings.VoiceChat_Status_MembersFormat("\(membersCount)", membersPart)
-
- let (rawText, ranges) = rawTextAndRanges
+
var textIndex = 0
var latestIndex = 0
- for (index, range) in ranges {
+ for rangeItem in rawTextAndRanges.ranges {
+ let index = rangeItem.index
+ let range = rangeItem.range
var lowerSegmentIndex = range.lowerBound
if index != 0 {
lowerSegmentIndex = min(lowerSegmentIndex, latestIndex)
} else {
if latestIndex < range.lowerBound {
- let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: latestIndex) ..< rawText.index(rawText.startIndex, offsetBy: range.lowerBound)])
+ let part = String(rawTextAndRanges.string[rawTextAndRanges.string.index(rawTextAndRanges.string.startIndex, offsetBy: latestIndex) ..< rawTextAndRanges.string.index(rawTextAndRanges.string.startIndex, offsetBy: range.lowerBound)])
segments.append(.text(textIndex, NSAttributedString(string: part, font: textFont, textColor: textColor)))
textIndex += 1
}
}
latestIndex = range.upperBound
- let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: lowerSegmentIndex) ..< rawText.index(rawText.startIndex, offsetBy: range.upperBound)])
+ let part = String(rawTextAndRanges.string[rawTextAndRanges.string.index(rawTextAndRanges.string.startIndex, offsetBy: lowerSegmentIndex) ..< rawTextAndRanges.string.index(rawTextAndRanges.string.startIndex, offsetBy: range.upperBound)])
if index == 0 {
segments.append(.number(Int(membersCount), NSAttributedString(string: part, font: textFont, textColor: textColor)))
} else {
@@ -440,8 +441,8 @@ public class CallStatusBarNodeImpl: CallStatusBarNode {
textIndex += 1
}
}
- if latestIndex < rawText.count {
- let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: latestIndex)...])
+ if latestIndex < rawTextAndRanges.string.count {
+ let part = String(rawTextAndRanges.string[rawTextAndRanges.string.index(rawTextAndRanges.string.startIndex, offsetBy: latestIndex)...])
segments.append(.text(textIndex, NSAttributedString(string: part, font: textFont, textColor: textColor)))
textIndex += 1
}
diff --git a/submodules/TelegramCallsUI/Sources/CallSuggestTabController.swift b/submodules/TelegramCallsUI/Sources/CallSuggestTabController.swift
index 1026980ca3..2d3cfa2218 100644
--- a/submodules/TelegramCallsUI/Sources/CallSuggestTabController.swift
+++ b/submodules/TelegramCallsUI/Sources/CallSuggestTabController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/TelegramCallsUI/Sources/GroupCallNavigationAccessoryPanel.swift b/submodules/TelegramCallsUI/Sources/GroupCallNavigationAccessoryPanel.swift
index 12e61cca8d..d5b992caed 100644
--- a/submodules/TelegramCallsUI/Sources/GroupCallNavigationAccessoryPanel.swift
+++ b/submodules/TelegramCallsUI/Sources/GroupCallNavigationAccessoryPanel.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
@@ -531,10 +530,10 @@ public final class GroupCallNavigationAccessoryPanel: ASDisplayNode {
isScheduled = true
if let voiceChatTitle = self.currentData?.info.title {
title = voiceChatTitle
- text = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: scheduleTime, alwaysShowTime: true, format: HumanReadableStringFormat(dateFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsOn($0) }, tomorrowFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsTomorrow($0) }, todayFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsToday($0) })).0
+ text = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: scheduleTime, alwaysShowTime: true, format: HumanReadableStringFormat(dateFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsOn($0) }, tomorrowFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsTomorrow($0) }, todayFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsToday($0) })).string
} else {
title = self.strings.Conversation_ScheduledVoiceChat
- text = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: scheduleTime, alwaysShowTime: true, format: HumanReadableStringFormat(dateFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsOnShort($0) }, tomorrowFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsTomorrowShort($0) }, todayFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsTodayShort($0) })).0
+ text = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: scheduleTime, alwaysShowTime: true, format: HumanReadableStringFormat(dateFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsOnShort($0) }, tomorrowFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsTomorrowShort($0) }, todayFormatString: { self.strings.Conversation_ScheduledVoiceChatStartsTodayShort($0) })).string
}
let currentTime = Int32(CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970)
diff --git a/submodules/TelegramCallsUI/Sources/LegacyCallControllerNode.swift b/submodules/TelegramCallsUI/Sources/LegacyCallControllerNode.swift
index deb241f38d..47189cc186 100644
--- a/submodules/TelegramCallsUI/Sources/LegacyCallControllerNode.swift
+++ b/submodules/TelegramCallsUI/Sources/LegacyCallControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -181,7 +180,7 @@ final class LegacyCallControllerNode: ASDisplayNode, CallControllerNodeProtocol
self.statusNode.title = peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)
if hasOther {
- self.statusNode.subtitle = self.presentationData.strings.Call_AnsweringWithAccount(accountPeer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ self.statusNode.subtitle = self.presentationData.strings.Call_AnsweringWithAccount(accountPeer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
if let callState = callState {
self.updateCallState(callState)
@@ -250,7 +249,7 @@ final class LegacyCallControllerNode: ASDisplayNode, CallControllerNodeProtocol
if isReconnecting {
return strings.Call_StatusConnecting
} else {
- return strings.Call_StatusOngoing(value).0
+ return strings.Call_StatusOngoing(value).string
}
}, timestamp)
if self.keyTextData?.0 != keyVisualHash {
@@ -444,7 +443,7 @@ final class LegacyCallControllerNode: ASDisplayNode, CallControllerNodeProtocol
@objc func keyPressed() {
if self.keyPreviewNode == nil, let keyText = self.keyTextData?.1, let peer = self.peer {
- let keyPreviewNode = CallControllerKeyPreviewNode(keyText: keyText, infoText: self.presentationData.strings.Call_EmojiDescription(peer.compactDisplayTitle).0.replacingOccurrences(of: "%%", with: "%"), dismiss: { [weak self] in
+ let keyPreviewNode = CallControllerKeyPreviewNode(keyText: keyText, infoText: self.presentationData.strings.Call_EmojiDescription(peer.compactDisplayTitle).string.replacingOccurrences(of: "%%", with: "%"), dismiss: { [weak self] in
if let _ = self?.keyPreviewNode {
self?.backPressed()
}
diff --git a/submodules/TelegramCallsUI/Sources/PresentationCall.swift b/submodules/TelegramCallsUI/Sources/PresentationCall.swift
index 77788a7da1..099c91fced 100644
--- a/submodules/TelegramCallsUI/Sources/PresentationCall.swift
+++ b/submodules/TelegramCallsUI/Sources/PresentationCall.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import AVFoundation
diff --git a/submodules/TelegramCallsUI/Sources/PresentationCallManager.swift b/submodules/TelegramCallsUI/Sources/PresentationCallManager.swift
index f0d671d9ca..8fb15a8256 100644
--- a/submodules/TelegramCallsUI/Sources/PresentationCallManager.swift
+++ b/submodules/TelegramCallsUI/Sources/PresentationCallManager.swift
@@ -2,7 +2,6 @@ import Foundation
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import DeviceAccess
diff --git a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift
index 36a3c47ba1..ddcff8958e 100644
--- a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift
+++ b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import AVFoundation
@@ -1920,7 +1919,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
let text: String
if let title = title {
- text = presentationData.strings.VoiceChat_YouCanNowSpeakIn(title).0
+ text = presentationData.strings.VoiceChat_YouCanNowSpeakIn(title).string
} else {
text = presentationData.strings.VoiceChat_YouCanNowSpeak
}
diff --git a/submodules/TelegramCallsUI/Sources/SampleBufferVideoRenderingView.swift b/submodules/TelegramCallsUI/Sources/SampleBufferVideoRenderingView.swift
index a6dd976c83..a21f3859a0 100644
--- a/submodules/TelegramCallsUI/Sources/SampleBufferVideoRenderingView.swift
+++ b/submodules/TelegramCallsUI/Sources/SampleBufferVideoRenderingView.swift
@@ -6,6 +6,7 @@ import SwiftSignalKit
import AccountContext
import TelegramVoip
import AVFoundation
+import LibYuvBinding
private func sampleBufferFromPixelBuffer(pixelBuffer: CVPixelBuffer) -> CMSampleBuffer? {
var maybeFormat: CMVideoFormatDescription?
@@ -40,6 +41,68 @@ private func sampleBufferFromPixelBuffer(pixelBuffer: CVPixelBuffer) -> CMSample
return sampleBuffer
}
+private func copyI420BufferToNV12Buffer(buffer: OngoingGroupCallContext.VideoFrameData.I420Buffer, pixelBuffer: CVPixelBuffer) -> Bool {
+ guard CVPixelBufferGetPixelFormatType(pixelBuffer) == kCVPixelFormatType_420YpCbCr8BiPlanarFullRange else {
+ return false
+ }
+ guard CVPixelBufferGetWidthOfPlane(pixelBuffer, 0) == buffer.width else {
+ return false
+ }
+ guard CVPixelBufferGetHeightOfPlane(pixelBuffer, 0) == buffer.height else {
+ return false
+ }
+
+ let cvRet = CVPixelBufferLockBaseAddress(pixelBuffer, [])
+ if cvRet != kCVReturnSuccess {
+ return false
+ }
+ defer {
+ CVPixelBufferUnlockBaseAddress(pixelBuffer, [])
+ }
+
+ guard let dstY = CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0) else {
+ return false
+ }
+ let dstStrideY = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0)
+
+ guard let dstUV = CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 1) else {
+ return false
+ }
+ let dstStrideUV = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 1)
+
+ buffer.y.withUnsafeBytes { srcYBuffer in
+ guard let srcY = srcYBuffer.baseAddress else {
+ return
+ }
+ buffer.u.withUnsafeBytes { srcUBuffer in
+ guard let srcU = srcUBuffer.baseAddress else {
+ return
+ }
+ buffer.v.withUnsafeBytes { srcVBuffer in
+ guard let srcV = srcVBuffer.baseAddress else {
+ return
+ }
+ libyuv_I420ToNV12(
+ srcY.assumingMemoryBound(to: UInt8.self),
+ Int32(buffer.strideY),
+ srcU.assumingMemoryBound(to: UInt8.self),
+ Int32(buffer.strideU),
+ srcV.assumingMemoryBound(to: UInt8.self),
+ Int32(buffer.strideV),
+ dstY.assumingMemoryBound(to: UInt8.self),
+ Int32(dstStrideY),
+ dstUV.assumingMemoryBound(to: UInt8.self),
+ Int32(dstStrideUV),
+ Int32(buffer.width),
+ Int32(buffer.height)
+ )
+ }
+ }
+ }
+
+ return true
+}
+
final class SampleBufferVideoRenderingView: UIView, VideoRenderingView {
static override var layerClass: AnyClass {
return AVSampleBufferDisplayLayer.self
@@ -111,6 +174,28 @@ final class SampleBufferVideoRenderingView: UIView, VideoRenderingView {
if let sampleBuffer = sampleBufferFromPixelBuffer(pixelBuffer: buffer.pixelBuffer) {
self.sampleBufferLayer.enqueue(sampleBuffer)
}
+ case let .i420(buffer):
+ let ioSurfaceProperties = NSMutableDictionary()
+ let options = NSMutableDictionary()
+ options.setObject(ioSurfaceProperties, forKey: kCVPixelBufferIOSurfacePropertiesKey as NSString)
+
+ var pixelBuffer: CVPixelBuffer?
+ CVPixelBufferCreate(
+ kCFAllocatorDefault,
+ buffer.width,
+ buffer.height,
+ kCVPixelFormatType_420YpCbCr8BiPlanarFullRange,
+ options,
+ &pixelBuffer
+ )
+
+ if let pixelBuffer = pixelBuffer {
+ if copyI420BufferToNV12Buffer(buffer: buffer, pixelBuffer: pixelBuffer) {
+ if let sampleBuffer = sampleBufferFromPixelBuffer(pixelBuffer: pixelBuffer) {
+ self.sampleBufferLayer.enqueue(sampleBuffer)
+ }
+ }
+ }
default:
break
}
diff --git a/submodules/TelegramCallsUI/Sources/VideoRenderingContext.swift b/submodules/TelegramCallsUI/Sources/VideoRenderingContext.swift
index e9bb3e13cd..b4d66797fd 100644
--- a/submodules/TelegramCallsUI/Sources/VideoRenderingContext.swift
+++ b/submodules/TelegramCallsUI/Sources/VideoRenderingContext.swift
@@ -35,11 +35,17 @@ class VideoRenderingContext {
func makeView(input: Signal, blur: Bool) -> VideoRenderingView? {
#if targetEnvironment(simulator)
+ if blur {
+ return nil
+ }
return SampleBufferVideoRenderingView(input: input)
#else
if #available(iOS 13.0, *) {
return MetalVideoRenderingView(renderingContext: self.metalContext, input: input, blur: blur)
} else {
+ if blur {
+ return nil
+ }
return SampleBufferVideoRenderingView(input: input)
}
#endif
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatAccountHeaderActionSheetItem.swift b/submodules/TelegramCallsUI/Sources/VoiceChatAccountHeaderActionSheetItem.swift
index db68dfd3d9..86fffedf79 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatAccountHeaderActionSheetItem.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatAccountHeaderActionSheetItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatCameraPreviewController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatCameraPreviewController.swift
index f2cfea7c54..3dd1d89890 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatCameraPreviewController.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatCameraPreviewController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import TelegramPresentationData
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift
index ad5129c780..68f4f30e93 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift
@@ -11,7 +11,6 @@ import TelegramAudio
import AccountContext
import Postbox
import TelegramCore
-import SyncCore
import MergeLists
import ItemListUI
import AppBundle
@@ -492,7 +491,7 @@ public final class VoiceChatController: ViewController {
}
let volumeValue = peerEntry.volume.flatMap { $0 / 100 }
if let volume = volumeValue, volume != 100 {
- text = .text( presentationData.strings.VoiceChat_StatusSpeakingVolume("\(volume)%").0, textIcon, .constructive)
+ text = .text( presentationData.strings.VoiceChat_StatusSpeakingVolume("\(volume)%").string, textIcon, .constructive)
} else {
text = .text(presentationData.strings.VoiceChat_StatusSpeaking, textIcon, .constructive)
}
@@ -583,7 +582,7 @@ public final class VoiceChatController: ViewController {
}
let volumeValue = peerEntry.volume.flatMap { $0 / 100 }
if let volume = volumeValue, volume != 100 {
- text = .text( presentationData.strings.VoiceChat_StatusSpeakingVolume("\(volume)%").0, textIcon, .constructive)
+ text = .text( presentationData.strings.VoiceChat_StatusSpeakingVolume("\(volume)%").string, textIcon, .constructive)
} else {
text = .text(presentationData.strings.VoiceChat_StatusSpeaking, textIcon, .constructive)
}
@@ -705,7 +704,7 @@ public final class VoiceChatController: ViewController {
}
let volumeValue = peerEntry.volume.flatMap { $0 / 100 }
if let volume = volumeValue, volume != 100 {
- text = .text( presentationData.strings.VoiceChat_StatusSpeakingVolume("\(volume)%").0, textIcon, .constructive)
+ text = .text( presentationData.strings.VoiceChat_StatusSpeakingVolume("\(volume)%").string, textIcon, .constructive)
} else {
text = .text(presentationData.strings.VoiceChat_StatusSpeaking, textIcon, .constructive)
}
@@ -1002,7 +1001,7 @@ public final class VoiceChatController: ViewController {
self.listNode.clipsToBounds = true
self.listNode.scroller.bounces = false
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.fullscreenListContainer = ASDisplayNode()
@@ -1012,7 +1011,7 @@ public final class VoiceChatController: ViewController {
self.fullscreenListNode.transform = CATransform3DMakeRotation(-CGFloat(CGFloat.pi / 2.0), 0.0, 0.0, 1.0)
self.fullscreenListNode.clipsToBounds = true
self.fullscreenListNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.tileGridNode = VoiceChatTileGridNode(context: self.context)
@@ -1255,11 +1254,11 @@ public final class VoiceChatController: ViewController {
dismissController?()
if strongSelf.call.invitePeer(participant.peer.id) {
- strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: participant.peer, text: strongSelf.presentationData.strings.VoiceChat_InvitedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return false })
+ strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: participant.peer, text: strongSelf.presentationData.strings.VoiceChat_InvitedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return false })
}
} else {
if let groupPeer = groupPeer as? TelegramChannel, let listenerLink = inviteLinks?.listenerLink, !groupPeer.hasPermission(.inviteMembers) {
- let text = strongSelf.presentationData.strings.VoiceChat_SendPublicLinkText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder), groupPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0
+ let text = strongSelf.presentationData.strings.VoiceChat_SendPublicLinkText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder), groupPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string
strongSelf.controller?.present(textAlertController(context: strongSelf.context, forceTheme: strongSelf.darkTheme, title: nil, text: text, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.VoiceChat_SendPublicLinkSend, action: { [weak self] in
dismissController?()
@@ -1268,7 +1267,7 @@ public final class VoiceChatController: ViewController {
let _ = (enqueueMessages(account: strongSelf.context.account, peerId: peer.id, messages: [.message(text: listenerLink, attributes: [], mediaReference: nil, replyToMessageId: nil, localGroupingKey: nil, correlationId: nil)])
|> deliverOnMainQueue).start(next: { [weak self] _ in
if let strongSelf = self {
- strongSelf.presentUndoOverlay(content: .forward(savedMessages: false, text: strongSelf.presentationData.strings.UserInfo_LinkForwardTooltip_Chat_One(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return true })
+ strongSelf.presentUndoOverlay(content: .forward(savedMessages: false, text: strongSelf.presentationData.strings.UserInfo_LinkForwardTooltip_Chat_One(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return true })
}
})
}
@@ -1276,9 +1275,9 @@ public final class VoiceChatController: ViewController {
} else {
let text: String
if let groupPeer = groupPeer as? TelegramChannel, case .broadcast = groupPeer.info {
- text = strongSelf.presentationData.strings.VoiceChat_InviteMemberToChannelFirstText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder), groupPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0
+ text = strongSelf.presentationData.strings.VoiceChat_InviteMemberToChannelFirstText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder), groupPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string
} else {
- text = strongSelf.presentationData.strings.VoiceChat_InviteMemberToGroupFirstText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder), groupPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0
+ text = strongSelf.presentationData.strings.VoiceChat_InviteMemberToGroupFirstText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder), groupPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string
}
strongSelf.controller?.present(textAlertController(context: strongSelf.context, forceTheme: strongSelf.darkTheme, title: nil, text: text, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.VoiceChat_InviteMemberToGroupFirstAdd, action: {
@@ -1355,7 +1354,7 @@ public final class VoiceChatController: ViewController {
dismissController?()
if strongSelf.call.invitePeer(peer.id) {
- strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: peer, text: strongSelf.presentationData.strings.VoiceChat_InvitedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return false })
+ strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: peer, text: strongSelf.presentationData.strings.VoiceChat_InvitedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return false })
}
}))
} else if let groupPeer = groupPeer as? TelegramGroup {
@@ -1400,7 +1399,7 @@ public final class VoiceChatController: ViewController {
case .privacy:
let _ = (strongSelf.context.account.postbox.loadedPeerWithId(peer.id)
|> deliverOnMainQueue).start(next: { peer in
- self?.controller?.present(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(peer.compactDisplayTitle, peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
+ self?.controller?.present(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(peer.compactDisplayTitle, peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
})
case .notMutualContact:
strongSelf.controller?.present(textAlertController(context: context, title: nil, text: presentationData.strings.GroupInfo_AddUserLeftError, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
@@ -1417,7 +1416,7 @@ public final class VoiceChatController: ViewController {
dismissController?()
if strongSelf.call.invitePeer(peer.id) {
- strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: peer, text: strongSelf.presentationData.strings.VoiceChat_InvitedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return false })
+ strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: peer, text: strongSelf.presentationData.strings.VoiceChat_InvitedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return false })
}
}))
}
@@ -1615,7 +1614,7 @@ public final class VoiceChatController: ViewController {
let _ = strongSelf.call.updateMuteState(peerId: peer.id, isMuted: false)
f(.default)
- strongSelf.presentUndoOverlay(content: .voiceChatCanSpeak(text: presentationData.strings.VoiceChat_UserCanNowSpeak(entry.peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return true })
+ strongSelf.presentUndoOverlay(content: .voiceChatCanSpeak(text: presentationData.strings.VoiceChat_UserCanNowSpeak(entry.peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return true })
})))
} else {
items.append(.action(ContextMenuActionItem(text: strongSelf.presentationData.strings.VoiceChat_MutePeer, icon: { theme in
@@ -1717,7 +1716,7 @@ public final class VoiceChatController: ViewController {
let _ = strongSelf.context.peerChannelMemberCategoriesContextsManager.updateMemberBannedRights(engine: strongSelf.context.engine, peerId: strongSelf.call.peerId, memberId: peer.id, bannedRights: TelegramChatBannedRights(flags: [.banReadMessages], untilDate: Int32.max)).start()
strongSelf.call.removedPeer(peer.id)
- strongSelf.presentUndoOverlay(content: .banned(text: strongSelf.presentationData.strings.VoiceChat_RemovedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return false })
+ strongSelf.presentUndoOverlay(content: .banned(text: strongSelf.presentationData.strings.VoiceChat_RemovedPeerText(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return false })
}))
actionSheet.setItemGroups([
@@ -2194,7 +2193,7 @@ public final class VoiceChatController: ViewController {
return
}
if event.joined {
- strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: event.peer, text: strongSelf.presentationData.strings.VoiceChat_PeerJoinedText(event.peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return false })
+ strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: event.peer, text: strongSelf.presentationData.strings.VoiceChat_PeerJoinedText(event.peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return false })
}
}))
@@ -2203,7 +2202,7 @@ public final class VoiceChatController: ViewController {
guard let strongSelf = self else {
return
}
- strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: peer, text: strongSelf.presentationData.strings.VoiceChat_DisplayAsSuccess(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), action: { _ in return false })
+ strongSelf.presentUndoOverlay(content: .invitedToVoiceChat(context: strongSelf.context, peer: peer, text: strongSelf.presentationData.strings.VoiceChat_DisplayAsSuccess(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), action: { _ in return false })
}))
self.stateVersionDisposable.set((self.call.stateVersion
@@ -2497,8 +2496,19 @@ public final class VoiceChatController: ViewController {
}
let isScheduled = strongSelf.isScheduled
+
+ let canSpeak: Bool
+ if let callState = strongSelf.callState {
+ if let muteState = callState.muteState {
+ canSpeak = muteState.canUnmute
+ } else {
+ canSpeak = true
+ }
+ } else {
+ canSpeak = false
+ }
- if !isScheduled {
+ if !isScheduled && canSpeak {
items.append(.action(ContextMenuActionItem(text: strongSelf.presentationData.strings.VoiceChat_NoiseSuppression, textColor: .primary, textLayout: .secondLineWithValue(strongSelf.isNoiseSuppressionEnabled ? strongSelf.presentationData.strings.VoiceChat_NoiseSuppressionEnabled : strongSelf.presentationData.strings.VoiceChat_NoiseSuppressionDisabled), icon: { theme in
return generateTintedImage(image: UIImage(bundleImageName: "Call/Context Menu/Noise"), color: theme.actionSheet.primaryTextColor)
}, action: { _, f in
@@ -2913,11 +2923,11 @@ public final class VoiceChatController: ViewController {
let time = stringForMessageTimestamp(timestamp: timestamp, dateTimeFormat: self.presentationData.dateTimeFormat)
let buttonTitle: String
if calendar.isDateInToday(date) {
- buttonTitle = self.presentationData.strings.ScheduleVoiceChat_ScheduleToday(time).0
+ buttonTitle = self.presentationData.strings.ScheduleVoiceChat_ScheduleToday(time).string
} else if calendar.isDateInTomorrow(date) {
- buttonTitle = self.presentationData.strings.ScheduleVoiceChat_ScheduleTomorrow(time).0
+ buttonTitle = self.presentationData.strings.ScheduleVoiceChat_ScheduleTomorrow(time).string
} else {
- buttonTitle = self.presentationData.strings.ScheduleVoiceChat_ScheduleOn(self.dateFormatter.string(from: date), time).0
+ buttonTitle = self.presentationData.strings.ScheduleVoiceChat_ScheduleOn(self.dateFormatter.string(from: date), time).string
}
self.scheduleButtonTitle = buttonTitle
@@ -2928,7 +2938,7 @@ public final class VoiceChatController: ViewController {
isGroup = false
}
let intervalString = scheduledTimeIntervalString(strings: self.presentationData.strings, value: max(60, delta))
- self.scheduleTextNode.attributedText = NSAttributedString(string: isGroup ? self.presentationData.strings.ScheduleVoiceChat_GroupText(intervalString).0 : self.presentationData.strings.ScheduleVoiceChat_ChannelText(intervalString).0, font: Font.regular(14.0), textColor: UIColor(rgb: 0x8e8e93))
+ self.scheduleTextNode.attributedText = NSAttributedString(string: isGroup ? self.presentationData.strings.ScheduleVoiceChat_GroupText(intervalString).string : self.presentationData.strings.ScheduleVoiceChat_ChannelText(intervalString).string, font: Font.regular(14.0), textColor: UIColor(rgb: 0x8e8e93))
if let (layout, navigationHeight) = self.validLayout {
self.containerLayoutUpdated(layout, navigationHeight: navigationHeight, transition: .animated(duration: 0.3, curve: .spring))
@@ -3194,14 +3204,14 @@ public final class VoiceChatController: ViewController {
if peers.count == 1, let peer = peers.first {
isSavedMessages = peer.id == strongSelf.context.account.peerId
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.VoiceChat_ForwardTooltip_Chat(peerName).0
+ text = presentationData.strings.VoiceChat_ForwardTooltip_Chat(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.VoiceChat_ForwardTooltip_TwoChats(firstPeerName, secondPeerName).0
+ text = presentationData.strings.VoiceChat_ForwardTooltip_TwoChats(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.VoiceChat_ForwardTooltip_ManyChats(peerName, "\(peers.count - 1)").0
+ text = presentationData.strings.VoiceChat_ForwardTooltip_ManyChats(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -5822,7 +5832,7 @@ public final class VoiceChatController: ViewController {
if let strongSelf = self, let title = title, title != initialTitle {
strongSelf.call.updateTitle(title)
- strongSelf.presentUndoOverlay(content: .voiceChatFlag(text: title.isEmpty ? strongSelf.presentationData.strings.VoiceChat_EditTitleRemoveSuccess : strongSelf.presentationData.strings.VoiceChat_EditTitleSuccess(title).0), action: { _ in return false })
+ strongSelf.presentUndoOverlay(content: .voiceChatFlag(text: title.isEmpty ? strongSelf.presentationData.strings.VoiceChat_EditTitleRemoveSuccess : strongSelf.presentationData.strings.VoiceChat_EditTitleSuccess(title).string), action: { _ in return false })
}
})
strongSelf.controller?.present(controller, in: .window(.root))
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatFullscreenParticipantItem.swift b/submodules/TelegramCallsUI/Sources/VoiceChatFullscreenParticipantItem.swift
index 4ba7b1c7cb..e7fa1d94ed 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatFullscreenParticipantItem.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatFullscreenParticipantItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatJoinScreen.swift b/submodules/TelegramCallsUI/Sources/VoiceChatJoinScreen.swift
index 2c1ecb5060..19adc39f85 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatJoinScreen.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatJoinScreen.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatMainStageNode.swift b/submodules/TelegramCallsUI/Sources/VoiceChatMainStageNode.swift
index 4b1225344d..fe25af4cf8 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatMainStageNode.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatMainStageNode.swift
@@ -11,7 +11,6 @@ import TelegramAudio
import AccountContext
import Postbox
import TelegramCore
-import SyncCore
import AppBundle
import PresentationDataUtils
import AvatarNode
@@ -633,7 +632,7 @@ final class VoiceChatMainStageNode: ASDisplayNode {
let bodyAttributes = MarkdownAttributeSet(font: Font.regular(15.0), textColor: .white, additionalAttributes: [:])
let boldAttributes = MarkdownAttributeSet(font: Font.semibold(15.0), textColor: .white, additionalAttributes: [:])
- let attributedText = addAttributesToStringWithRanges(presentationData.strings.VoiceChat_ParticipantIsSpeaking(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)), body: bodyAttributes, argumentAttributes: [0: boldAttributes])
+ let attributedText = addAttributesToStringWithRanges(presentationData.strings.VoiceChat_ParticipantIsSpeaking(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder))._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
strongSelf.speakingTitleNode.attributedText = attributedText
strongSelf.speakingContainerNode.alpha = 0.0
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatOverlayController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatOverlayController.swift
index ba6f4787df..4b0ea7ee4c 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatOverlayController.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatOverlayController.swift
@@ -10,7 +10,6 @@ import TelegramAudio
import AccountContext
import Postbox
import TelegramCore
-import SyncCore
import AppBundle
import ContextUI
import PresentationDataUtils
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift b/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift
index e2bcb6bed8..9bf559bcea 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatPeerActionSheetItem.swift b/submodules/TelegramCallsUI/Sources/VoiceChatPeerActionSheetItem.swift
index 20f285ea2c..12419fd9fa 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatPeerActionSheetItem.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatPeerActionSheetItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import AvatarNode
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatPeerProfileNode.swift b/submodules/TelegramCallsUI/Sources/VoiceChatPeerProfileNode.swift
index 61472fcb1f..40e0728036 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatPeerProfileNode.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatPeerProfileNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import PresentationDataUtils
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatTileItemNode.swift b/submodules/TelegramCallsUI/Sources/VoiceChatTileItemNode.swift
index f51e3c71ce..fe02c08b24 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatTileItemNode.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatTileItemNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import AccountContext
import TelegramUIPreferences
@@ -413,7 +412,7 @@ final class VoiceChatTileItemNode: ASDisplayNode {
var showPlaceholder = false
if item.isVideoLimit {
- self.placeholderTextNode.attributedText = NSAttributedString(string: item.strings.VoiceChat_VideoParticipantsLimitExceeded(String(item.videoLimit)).0, font: Font.semibold(13.0), textColor: .white)
+ self.placeholderTextNode.attributedText = NSAttributedString(string: item.strings.VoiceChat_VideoParticipantsLimitExceeded(String(item.videoLimit)).string, font: Font.semibold(13.0), textColor: .white)
self.placeholderIconNode.image = generateTintedImage(image: UIImage(bundleImageName: "Call/VideoUnavailable"), color: .white)
showPlaceholder = true
} else if item.isOwnScreencast {
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatTimerNode.swift b/submodules/TelegramCallsUI/Sources/VoiceChatTimerNode.swift
index 9ae4a52d95..56f3ae3a9a 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatTimerNode.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatTimerNode.swift
@@ -156,7 +156,7 @@ final class VoiceChatTimerNode: ASDisplayNode {
timer.start()
}
- let subtitle = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: scheduleTime, alwaysShowTime: true).0
+ let subtitle = humanReadableStringForTimestamp(strings: self.strings, dateTimeFormat: self.dateTimeFormat, timestamp: scheduleTime, alwaysShowTime: true).string
self.titleNode.attributedText = NSAttributedString(string: elapsedTime < 0 ? self.strings.VoiceChat_LateBy : self.strings.VoiceChat_StartsIn, font: Font.with(size: 23.0, design: .round, weight: .semibold, traits: []), textColor: .white)
let titleSize = self.titleNode.updateLayout(size)
diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatTitleEditController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatTitleEditController.swift
index 0f4f27e534..f558c9f634 100644
--- a/submodules/TelegramCallsUI/Sources/VoiceChatTitleEditController.swift
+++ b/submodules/TelegramCallsUI/Sources/VoiceChatTitleEditController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import UrlEscaping
diff --git a/submodules/TelegramCore/BUILD b/submodules/TelegramCore/BUILD
index 8d28b82d2e..f3c1fbc643 100644
--- a/submodules/TelegramCore/BUILD
+++ b/submodules/TelegramCore/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/MtProtoKit:MtProtoKit",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
- "//submodules/SyncCore:SyncCore",
"//submodules/CloudData:CloudData",
"//submodules/EncryptionProvider:EncryptionProvider",
"//submodules/CryptoUtils:CryptoUtils",
diff --git a/submodules/TelegramCore/Sources/Account/Account.swift b/submodules/TelegramCore/Sources/Account/Account.swift
index 3c269a5ee9..3eb5a09d43 100644
--- a/submodules/TelegramCore/Sources/Account/Account.swift
+++ b/submodules/TelegramCore/Sources/Account/Account.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import MtProtoKit
import TelegramApi
import CryptoUtils
-import SyncCore
import EncryptionProvider
private let accountRecordToActiveKeychainId = Atomic<[AccountRecordId: Int]>(value: [:])
diff --git a/submodules/TelegramCore/Sources/Account/AccountIntermediateState.swift b/submodules/TelegramCore/Sources/Account/AccountIntermediateState.swift
index dcce140d9e..5f394fb703 100644
--- a/submodules/TelegramCore/Sources/Account/AccountIntermediateState.swift
+++ b/submodules/TelegramCore/Sources/Account/AccountIntermediateState.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
struct PeerChatInfo {
var notificationSettings: PeerNotificationSettings
diff --git a/submodules/TelegramCore/Sources/Account/AccountManager.swift b/submodules/TelegramCore/Sources/Account/AccountManager.swift
index b1e3d106d0..ceb438a8bb 100644
--- a/submodules/TelegramCore/Sources/Account/AccountManager.swift
+++ b/submodules/TelegramCore/Sources/Account/AccountManager.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private enum AccountKind {
case authorized
diff --git a/submodules/TelegramCore/Sources/ApiUtils/ApiGroupOrChannel.swift b/submodules/TelegramCore/Sources/ApiUtils/ApiGroupOrChannel.swift
index bb4734b39a..197ba7a61e 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/ApiGroupOrChannel.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/ApiGroupOrChannel.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func imageRepresentationsForApiChatPhoto(_ photo: Api.ChatPhoto) -> [TelegramMediaImageRepresentation] {
var representations: [TelegramMediaImageRepresentation] = []
diff --git a/submodules/TelegramCore/Sources/ApiUtils/ApiUtils.swift b/submodules/TelegramCore/Sources/ApiUtils/ApiUtils.swift
index 9f9ffc38f9..7511586eb5 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/ApiUtils.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/ApiUtils.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
public extension PeerReference {
var id: PeerId {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/BotInfo.swift b/submodules/TelegramCore/Sources/ApiUtils/BotInfo.swift
index f39d6b38af..2be1beccda 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/BotInfo.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/BotInfo.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension BotInfo {
convenience init(apiBotInfo: Api.BotInfo) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/CachedChannelParticipants.swift b/submodules/TelegramCore/Sources/ApiUtils/CachedChannelParticipants.swift
index 8964880bd0..9308fcc9ee 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/CachedChannelParticipants.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/CachedChannelParticipants.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
private enum ChannelParticipantValue: Int32 {
case member = 0
diff --git a/submodules/TelegramCore/Sources/ApiUtils/CachedGroupParticipants.swift b/submodules/TelegramCore/Sources/ApiUtils/CachedGroupParticipants.swift
index c536963ca3..75705d1f95 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/CachedGroupParticipants.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/CachedGroupParticipants.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension GroupParticipant {
init(apiParticipant: Api.ChatParticipant) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/ChatContextResult.swift b/submodules/TelegramCore/Sources/ApiUtils/ChatContextResult.swift
index 1a1668cb64..4b8832f4f3 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/ChatContextResult.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/ChatContextResult.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum ChatContextResultMessageDecodingError: Error {
case generic
diff --git a/submodules/TelegramCore/Sources/ApiUtils/CloudFileMediaResource.swift b/submodules/TelegramCore/Sources/ApiUtils/CloudFileMediaResource.swift
index 57dc51dc09..11c8209b9c 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/CloudFileMediaResource.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/CloudFileMediaResource.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
protocol TelegramCloudMediaResource: TelegramMediaResource {
func apiInputLocation(fileReference: Data?) -> Api.InputFileLocation?
diff --git a/submodules/TelegramCore/Sources/ApiUtils/CloudMediaResourceParameters.swift b/submodules/TelegramCore/Sources/ApiUtils/CloudMediaResourceParameters.swift
index a572e568bf..e9e165bf24 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/CloudMediaResourceParameters.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/CloudMediaResourceParameters.swift
@@ -1,5 +1,4 @@
import Foundation
-import SyncCore
public enum CloudMediaResourceLocation: Equatable {
case photo(id: Int64, accessHash: Int64, fileReference: Data, thumbSize: String)
diff --git a/submodules/TelegramCore/Sources/ApiUtils/ExportedInvitation.swift b/submodules/TelegramCore/Sources/ApiUtils/ExportedInvitation.swift
index 48b008b36c..ce25d8aaf3 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/ExportedInvitation.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/ExportedInvitation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension ExportedInvitation {
init(apiExportedInvite: Api.ExportedChatInvite) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/ImageRepresentationWithReference.swift b/submodules/TelegramCore/Sources/ApiUtils/ImageRepresentationWithReference.swift
index 5262bd91e0..b91df37a4f 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/ImageRepresentationWithReference.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/ImageRepresentationWithReference.swift
@@ -1,5 +1,4 @@
import Foundation
-import SyncCore
public struct ImageRepresentationWithReference: Equatable {
public let representation: TelegramMediaImageRepresentation
diff --git a/submodules/TelegramCore/Sources/ApiUtils/InstantPage.swift b/submodules/TelegramCore/Sources/ApiUtils/InstantPage.swift
index a6c168189c..09360ff164 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/InstantPage.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/InstantPage.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension InstantPageCaption {
convenience init(apiCaption: Api.PageCaption) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/MediaResourceApiUtils.swift b/submodules/TelegramCore/Sources/ApiUtils/MediaResourceApiUtils.swift
index d3afe47d15..d3471fd83c 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/MediaResourceApiUtils.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/MediaResourceApiUtils.swift
@@ -1,5 +1,4 @@
import Foundation
-import SyncCore
extension SecretChatFileReference {
func resource(key: SecretFileEncryptionKey, decryptedSize: Int32) -> SecretFileMediaResource {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift b/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift
index f0d56ab74b..ec42c80376 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension RestrictionRule {
convenience init(apiReason: Api.RestrictionReason) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/PeerGeoLocation.swift b/submodules/TelegramCore/Sources/ApiUtils/PeerGeoLocation.swift
index 3653967727..7461a50e5a 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/PeerGeoLocation.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/PeerGeoLocation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension PeerGeoLocation {
init?(apiLocation: Api.ChannelLocation) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift b/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift
index 86658a5ccb..b435a2919a 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
/*extension ReactionsMessageAttribute {
func withUpdatedResults(_ reactions: Api.MessageReactions) -> ReactionsMessageAttribute {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/RemoteStorageConfiguration.swift b/submodules/TelegramCore/Sources/ApiUtils/RemoteStorageConfiguration.swift
index 90a45f895d..a7bf1c4d06 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/RemoteStorageConfiguration.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/RemoteStorageConfiguration.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func currentWebDocumentsHostDatacenterId(postbox: Postbox, isTestingEnvironment: Bool) -> Signal {
return postbox.transaction { transaction -> Int32 in
diff --git a/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift b/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift
index 02917a8b14..6068ef3655 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension ReplyMarkupButton {
init(apiButton: Api.KeyboardButton) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/RichText.swift b/submodules/TelegramCore/Sources/ApiUtils/RichText.swift
index dba1487045..04fb00e791 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/RichText.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/RichText.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension RichText {
init(apiText: Api.RichText) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift b/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift
index 19efa3f4c5..5d0776dd35 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
public func tagsForStoreMessage(incoming: Bool, attributes: [MessageAttribute], media: [Media], textEntities: [MessageTextEntity]?, isPinned: Bool) -> (MessageTags, GlobalMessageTags) {
var isSecret = false
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramChannel.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramChannel.swift
index 5316741597..18d9fda103 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramChannel.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramChannel.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
public enum TelegramChannelPermission {
case sendMessages
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelAdminRights.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelAdminRights.swift
index 4241640408..d31969cd4e 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelAdminRights.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelAdminRights.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension TelegramChatAdminRights {
init?(apiAdminRights: Api.ChatAdminRights) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelBannedRights.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelBannedRights.swift
index 1c9c2dd520..48d4ae7795 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelBannedRights.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramChannelBannedRights.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension TelegramChatBannedRights {
init(apiBannedRights: Api.ChatBannedRights) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramGroup.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramGroup.swift
index ab1b39589b..b06f2ed5e9 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramGroup.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramGroup.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
// Incuding at least one Objective-C class in a swift file ensures that it doesn't get stripped by the linker
private final class LinkHelperClass: NSObject {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaAction.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaAction.swift
index d21d94f107..8243b1f614 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaAction.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaAction.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func telegramMediaActionFromApiAction(_ action: Api.MessageAction) -> TelegramMediaAction? {
switch action {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaFile.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaFile.swift
index 02a0afa129..759d4fb034 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaFile.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaFile.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func dimensionsForFileAttributes(_ attributes: [TelegramMediaFileAttribute]) -> PixelDimensions? {
for attribute in attributes {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaGame.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaGame.swift
index 373c9790f4..31d988351b 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaGame.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaGame.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension TelegramMediaGame {
convenience init(apiGame: Api.Game) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaImage.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaImage.swift
index f0bbd3e317..f9ac725e8e 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaImage.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaImage.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func telegramMediaImageRepresentationsFromApiSizes(datacenterId: Int32, photoId: Int64, accessHash: Int64, fileReference: Data?, sizes: [Api.PhotoSize]) -> (immediateThumbnail: Data?, representations: [TelegramMediaImageRepresentation]) {
var immediateThumbnailData: Data?
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaMap.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaMap.swift
index b0326ec4e4..f0e9de92ef 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaMap.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaMap.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func telegramMediaMapFromApiGeoPoint(_ geo: Api.GeoPoint, title: String?, address: String?, provider: String?, venueId: String?, venueType: String?, liveBroadcastingTimeout: Int32?, liveProximityNotificationRadius: Int32?, heading: Int32?) -> TelegramMediaMap {
var venue: MapVenue?
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaPoll.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaPoll.swift
index 2d45433129..0316add8e5 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaPoll.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaPoll.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension TelegramMediaPollOption {
init(apiOption: Api.PollAnswer) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebDocument.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebDocument.swift
index 5908010814..43929f371f 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebDocument.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebDocument.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension TelegramMediaWebFile {
convenience init(_ document: Api.WebDocument) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebFile.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebFile.swift
index 7c87514738..205b0b5667 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebFile.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebFile.swift
@@ -1,5 +1,4 @@
import Postbox
-import SyncCore
public extension TelegramMediaWebFile {
var dimensions: PixelDimensions? {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebpage.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebpage.swift
index 75e7098d06..3cfe144dd5 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebpage.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramMediaWebpage.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func telegramMediaWebpageAttributeFromApiWebpageAttribute(_ attribute: Api.WebPageAttribute) -> TelegramMediaWebpageAttribute? {
switch attribute {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramPeerNotificationSettings.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramPeerNotificationSettings.swift
index e1316054e2..c4f35eb3ed 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramPeerNotificationSettings.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramPeerNotificationSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension TelegramPeerNotificationSettings {
convenience init(apiSettings: Api.PeerNotifySettings) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramUser.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramUser.swift
index 83cbbca4f8..822edcf0e1 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramUser.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramUser.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func parsedTelegramProfilePhoto(_ photo: Api.UserProfilePhoto) -> [TelegramMediaImageRepresentation] {
var representations: [TelegramMediaImageRepresentation] = []
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TelegramUserPresence.swift b/submodules/TelegramCore/Sources/ApiUtils/TelegramUserPresence.swift
index 4093901a79..b7fe3509d1 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TelegramUserPresence.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TelegramUserPresence.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension TelegramUserPresence {
convenience init(apiStatus: Api.UserStatus) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/TextEntitiesMessageAttribute.swift b/submodules/TelegramCore/Sources/ApiUtils/TextEntitiesMessageAttribute.swift
index 1702002184..1879a9c4ef 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/TextEntitiesMessageAttribute.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/TextEntitiesMessageAttribute.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func apiEntitiesFromMessageTextEntities(_ entities: [MessageTextEntity], associatedPeers: SimpleDictionary) -> [Api.MessageEntity] {
var apiEntities: [Api.MessageEntity] = []
diff --git a/submodules/TelegramCore/Sources/ApiUtils/Theme.swift b/submodules/TelegramCore/Sources/ApiUtils/Theme.swift
index f2f41f65bc..2fb3916c78 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/Theme.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/Theme.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
extension TelegramTheme {
convenience init?(apiTheme: Api.Theme) {
diff --git a/submodules/TelegramCore/Sources/ApiUtils/Wallpaper.swift b/submodules/TelegramCore/Sources/ApiUtils/Wallpaper.swift
index d4fab6e8c0..d535d5fd15 100644
--- a/submodules/TelegramCore/Sources/ApiUtils/Wallpaper.swift
+++ b/submodules/TelegramCore/Sources/ApiUtils/Wallpaper.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
extension WallpaperSettings {
init(apiWallpaperSettings: Api.WallPaperSettings) {
diff --git a/submodules/TelegramCore/Sources/Authorization.swift b/submodules/TelegramCore/Sources/Authorization.swift
index ce58de6028..9845a8d692 100644
--- a/submodules/TelegramCore/Sources/Authorization.swift
+++ b/submodules/TelegramCore/Sources/Authorization.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum AuthorizationCodeRequestError {
case invalidPhoneNumber
diff --git a/submodules/TelegramCore/Sources/LoadedPeer.swift b/submodules/TelegramCore/Sources/LoadedPeer.swift
index bc1ba40ed2..14f8603421 100644
--- a/submodules/TelegramCore/Sources/LoadedPeer.swift
+++ b/submodules/TelegramCore/Sources/LoadedPeer.swift
@@ -2,7 +2,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public func actualizedPeer(postbox: Postbox, network: Network, peer: Peer) -> Signal {
return postbox.transaction { transaction -> Signal in
diff --git a/submodules/TelegramCore/Sources/LoadedPeerFromMessage.swift b/submodules/TelegramCore/Sources/LoadedPeerFromMessage.swift
index 6234fd44bc..a2e5f42fc8 100644
--- a/submodules/TelegramCore/Sources/LoadedPeerFromMessage.swift
+++ b/submodules/TelegramCore/Sources/LoadedPeerFromMessage.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public func loadedPeerFromMessage(account: Account, peerId: PeerId, messageId: MessageId) -> Signal {
return account.postbox.transaction { transaction -> Signal in
diff --git a/submodules/TelegramCore/Sources/MacOS/MacInternalUpdater.swift b/submodules/TelegramCore/Sources/MacOS/MacInternalUpdater.swift
index a54dd51ab4..ee2d9f5345 100644
--- a/submodules/TelegramCore/Sources/MacOS/MacInternalUpdater.swift
+++ b/submodules/TelegramCore/Sources/MacOS/MacInternalUpdater.swift
@@ -3,7 +3,6 @@
import TelegramApi
import SwiftSignalKit
import Postbox
-import SyncCore
public enum InternalUpdaterError {
case generic
@@ -14,10 +13,8 @@ public enum InternalUpdaterError {
public func requestUpdatesXml(account: Account, source: String) -> Signal {
return TelegramEngine(account: account).peers.resolvePeerByName(name: source)
|> castError(InternalUpdaterError.self)
- |> mapToSignal { peerId -> Signal in
- return account.postbox.transaction { transaction in
- return peerId != nil ? transaction.getPeer(peerId!) : nil
- } |> castError(InternalUpdaterError.self)
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
|> mapToSignal { peer in
if let peer = peer, let inputPeer = apiInputPeer(peer) {
@@ -81,10 +78,8 @@ public enum AppUpdateDownloadResult {
public func downloadAppUpdate(account: Account, source: String, messageId: Int32) -> Signal {
return TelegramEngine(account: account).peers.resolvePeerByName(name: source)
|> castError(InternalUpdaterError.self)
- |> mapToSignal { peerId -> Signal in
- return account.postbox.transaction { transaction in
- return peerId != nil ? transaction.getPeer(peerId!) : nil
- } |> castError(InternalUpdaterError.self)
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
|> mapToSignal { peer in
if let peer = peer, let inputChannel = apiInputChannel(peer) {
diff --git a/submodules/TelegramCore/Sources/MessageStatistics.swift b/submodules/TelegramCore/Sources/MessageStatistics.swift
index 2c4ec7e8cd..54c9ab9f5c 100644
--- a/submodules/TelegramCore/Sources/MessageStatistics.swift
+++ b/submodules/TelegramCore/Sources/MessageStatistics.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
import MtProtoKit
-import SyncCore
public struct MessageStats: Equatable {
public let views: Int
diff --git a/submodules/TelegramCore/Sources/Network/FetchedMediaResource.swift b/submodules/TelegramCore/Sources/Network/FetchedMediaResource.swift
index e45786cfe8..22dd00e4a1 100644
--- a/submodules/TelegramCore/Sources/Network/FetchedMediaResource.swift
+++ b/submodules/TelegramCore/Sources/Network/FetchedMediaResource.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
extension MediaResourceReference {
var apiFileReference: Data? {
diff --git a/submodules/TelegramCore/Sources/Network/MultipartFetch.swift b/submodules/TelegramCore/Sources/Network/MultipartFetch.swift
index c5f525144e..0b0568b657 100644
--- a/submodules/TelegramCore/Sources/Network/MultipartFetch.swift
+++ b/submodules/TelegramCore/Sources/Network/MultipartFetch.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private typealias SignalKitTimer = SwiftSignalKit.Timer
diff --git a/submodules/TelegramCore/Sources/Network/MultipartUpload.swift b/submodules/TelegramCore/Sources/Network/MultipartUpload.swift
index 7ac8cb2005..3a40dc91da 100644
--- a/submodules/TelegramCore/Sources/Network/MultipartUpload.swift
+++ b/submodules/TelegramCore/Sources/Network/MultipartUpload.swift
@@ -4,7 +4,6 @@ import TelegramApi
import SwiftSignalKit
import MtProtoKit
import CryptoUtils
-import SyncCore
private typealias SignalKitTimer = SwiftSignalKit.Timer
diff --git a/submodules/TelegramCore/Sources/Network/Network.swift b/submodules/TelegramCore/Sources/Network/Network.swift
index 57edafa585..16d14bf580 100644
--- a/submodules/TelegramCore/Sources/Network/Network.swift
+++ b/submodules/TelegramCore/Sources/Network/Network.swift
@@ -9,7 +9,6 @@ import NetworkLogging
import CloudData
#endif
-import SyncCore
import EncryptionProvider
public enum ConnectionStatus: Equatable {
diff --git a/submodules/TelegramCore/Sources/Network/ProxyServersStatuses.swift b/submodules/TelegramCore/Sources/Network/ProxyServersStatuses.swift
index bd6c75c7fd..a0814e6b31 100644
--- a/submodules/TelegramCore/Sources/Network/ProxyServersStatuses.swift
+++ b/submodules/TelegramCore/Sources/Network/ProxyServersStatuses.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public enum ProxyServerStatus: Equatable {
case checking
diff --git a/submodules/TelegramCore/Sources/PeerStatistics.swift b/submodules/TelegramCore/Sources/PeerStatistics.swift
index 21726144ca..f3282247c4 100644
--- a/submodules/TelegramCore/Sources/PeerStatistics.swift
+++ b/submodules/TelegramCore/Sources/PeerStatistics.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
import MtProtoKit
-import SyncCore
public struct StatsDateRange: Equatable {
public let minDate: Int32
diff --git a/submodules/TelegramCore/Sources/PendingMessages/ChatUpdatingMessageMedia.swift b/submodules/TelegramCore/Sources/PendingMessages/ChatUpdatingMessageMedia.swift
index fec9229846..55ead0e540 100644
--- a/submodules/TelegramCore/Sources/PendingMessages/ChatUpdatingMessageMedia.swift
+++ b/submodules/TelegramCore/Sources/PendingMessages/ChatUpdatingMessageMedia.swift
@@ -1,6 +1,5 @@
import Foundation
import Postbox
-import SyncCore
public final class ChatUpdatingMessageMedia: Equatable {
public let text: String
diff --git a/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift b/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift
index c664d3e96a..85e8bd8a4e 100644
--- a/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift
+++ b/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public enum EnqueueMessageGrouping {
case none
diff --git a/submodules/TelegramCore/Sources/PendingMessages/PendingMessageUploadedContent.swift b/submodules/TelegramCore/Sources/PendingMessages/PendingMessageUploadedContent.swift
index 08dc51b7df..e1b71406a3 100644
--- a/submodules/TelegramCore/Sources/PendingMessages/PendingMessageUploadedContent.swift
+++ b/submodules/TelegramCore/Sources/PendingMessages/PendingMessageUploadedContent.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
import CryptoUtils
-import SyncCore
enum PendingMessageUploadedContent {
case text(String)
diff --git a/submodules/TelegramCore/Sources/PendingMessages/PendingUpdateMessageManager.swift b/submodules/TelegramCore/Sources/PendingMessages/PendingUpdateMessageManager.swift
index f4e6adbe11..44df047ecf 100644
--- a/submodules/TelegramCore/Sources/PendingMessages/PendingUpdateMessageManager.swift
+++ b/submodules/TelegramCore/Sources/PendingMessages/PendingUpdateMessageManager.swift
@@ -1,6 +1,5 @@
import Foundation
import SwiftSignalKit
-import SyncCore
import Postbox
private final class PendingUpdateMessageContext {
diff --git a/submodules/TelegramCore/Sources/PendingMessages/RequestEditMessage.swift b/submodules/TelegramCore/Sources/PendingMessages/RequestEditMessage.swift
index a97ce331bb..d567df6d1f 100644
--- a/submodules/TelegramCore/Sources/PendingMessages/RequestEditMessage.swift
+++ b/submodules/TelegramCore/Sources/PendingMessages/RequestEditMessage.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum RequestEditMessageMedia : Equatable {
case keep
diff --git a/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift b/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift
index bbba34b3a7..1651211765 100644
--- a/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift
+++ b/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum StandaloneMedia {
case image(Data)
diff --git a/submodules/TelegramCore/Sources/PendingMessages/StandaloneUploadedMedia.swift b/submodules/TelegramCore/Sources/PendingMessages/StandaloneUploadedMedia.swift
index 16831f3f70..8f2e3a2516 100644
--- a/submodules/TelegramCore/Sources/PendingMessages/StandaloneUploadedMedia.swift
+++ b/submodules/TelegramCore/Sources/PendingMessages/StandaloneUploadedMedia.swift
@@ -3,7 +3,6 @@ import TelegramApi
import Postbox
import SwiftSignalKit
-import SyncCore
public enum StandaloneUploadMediaError {
case generic
diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift
index d559f9eb2f..a46edde5f6 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import MtProtoKit
-import SyncCore
private func messageKey(key: SecretChatKey, msgKey: UnsafeRawPointer, mode: SecretChatEncryptionMode) -> (aesKey: Data, aesIv: Data) {
switch mode {
diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryptionConfig.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryptionConfig.swift
index 5475efc558..934a4df8cc 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryptionConfig.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryptionConfig.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func validatedEncryptionConfig(postbox: Postbox, network: Network) -> Signal {
return network.request(Api.functions.messages.getDhConfig(version: 0, randomLength: 0))
diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatFileReference.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatFileReference.swift
index c6cd02e3fd..c95992feb4 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SecretChatFileReference.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatFileReference.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension SecretChatFileReference {
convenience init?(_ file: Api.EncryptedFile) {
diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatIncomingEncryptedOperation.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatIncomingEncryptedOperation.swift
index 6977f48dad..ac12d5a720 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SecretChatIncomingEncryptedOperation.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatIncomingEncryptedOperation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
private func keyFingerprintFromBytes(_ bytes: Buffer) -> Int64 {
if let memory = bytes.data, bytes.size >= 4 {
diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatLayerNegotiation.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatLayerNegotiation.swift
index 474b62523c..9a322c7b98 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SecretChatLayerNegotiation.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatLayerNegotiation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private let topSupportedLayer: SecretChatSequenceBasedLayer = .layer101
diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatOutgoingOperation.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatOutgoingOperation.swift
index 7baaa3bef0..42f3c2ee36 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SecretChatOutgoingOperation.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatOutgoingOperation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension SecretChatOutgoingFileReference {
init?(_ apiFile: Api.InputEncryptedFile) {
diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatRekeySession.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatRekeySession.swift
index d6feff50bf..35aa275bd8 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SecretChatRekeySession.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatRekeySession.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import MtProtoKit
-import SyncCore
import EncryptionProvider
private let keyUseCountThreshold: Int32 = 100
diff --git a/submodules/TelegramCore/Sources/SecretChats/SetSecretChatMessageAutoremoveTimeoutInteractively.swift b/submodules/TelegramCore/Sources/SecretChats/SetSecretChatMessageAutoremoveTimeoutInteractively.swift
index 8dba9e3b3c..1dce974d06 100644
--- a/submodules/TelegramCore/Sources/SecretChats/SetSecretChatMessageAutoremoveTimeoutInteractively.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/SetSecretChatMessageAutoremoveTimeoutInteractively.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_setSecretChatMessageAutoremoveTimeoutInteractively(account: Account, peerId: PeerId, timeout: Int32?) -> Signal {
return account.postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/SecretChats/UpdateSecretChat.swift b/submodules/TelegramCore/Sources/SecretChats/UpdateSecretChat.swift
index b3bcc86e9f..95d67a7b84 100644
--- a/submodules/TelegramCore/Sources/SecretChats/UpdateSecretChat.swift
+++ b/submodules/TelegramCore/Sources/SecretChats/UpdateSecretChat.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
struct SecretChatRequestData {
let g: Int32
diff --git a/submodules/TelegramCore/Sources/Settings/AutodownloadSettings.swift b/submodules/TelegramCore/Sources/Settings/AutodownloadSettings.swift
index ff23b1d15c..513a055822 100644
--- a/submodules/TelegramCore/Sources/Settings/AutodownloadSettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/AutodownloadSettings.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public func updateAutodownloadSettingsInteractively(accountManager: AccountManager, _ f: @escaping (AutodownloadSettings) -> AutodownloadSettings) -> Signal {
return accountManager.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/Settings/CacheStorageSettings.swift b/submodules/TelegramCore/Sources/Settings/CacheStorageSettings.swift
index 5253e81003..6eaa896346 100644
--- a/submodules/TelegramCore/Sources/Settings/CacheStorageSettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/CacheStorageSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
public func updateCacheStorageSettingsInteractively(accountManager: AccountManager, _ f: @escaping (CacheStorageSettings) -> CacheStorageSettings) -> Signal {
return accountManager.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/Settings/ContentPrivacySettings.swift b/submodules/TelegramCore/Sources/Settings/ContentPrivacySettings.swift
index 8fade1383e..d189f84ab9 100644
--- a/submodules/TelegramCore/Sources/Settings/ContentPrivacySettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/ContentPrivacySettings.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public func updateContentPrivacySettings(postbox: Postbox, _ f: @escaping (ContentPrivacySettings) -> ContentPrivacySettings) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/Settings/ContentSettings.swift b/submodules/TelegramCore/Sources/Settings/ContentSettings.swift
index 6801fa8ecc..ba16ddabe3 100644
--- a/submodules/TelegramCore/Sources/Settings/ContentSettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/ContentSettings.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramApi
-import SyncCore
import SwiftSignalKit
public struct ContentSettings: Equatable {
diff --git a/submodules/TelegramCore/Sources/Settings/GlobalNotificationSettings.swift b/submodules/TelegramCore/Sources/Settings/GlobalNotificationSettings.swift
index e94f5f9610..538815b37b 100644
--- a/submodules/TelegramCore/Sources/Settings/GlobalNotificationSettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/GlobalNotificationSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension MessageNotificationSettings {
init(apiSettings: Api.PeerNotifySettings) {
diff --git a/submodules/TelegramCore/Sources/Settings/LimitsConfiguration.swift b/submodules/TelegramCore/Sources/Settings/LimitsConfiguration.swift
index f276164a35..b4df728d36 100644
--- a/submodules/TelegramCore/Sources/Settings/LimitsConfiguration.swift
+++ b/submodules/TelegramCore/Sources/Settings/LimitsConfiguration.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
public func currentLimitsConfiguration(transaction: Transaction) -> LimitsConfiguration {
if let entry = transaction.getPreferencesEntry(key: PreferencesKeys.limitsConfiguration) as? LimitsConfiguration {
diff --git a/submodules/TelegramCore/Sources/Settings/LoggingSettings.swift b/submodules/TelegramCore/Sources/Settings/LoggingSettings.swift
index e76881ccf5..40865e6458 100644
--- a/submodules/TelegramCore/Sources/Settings/LoggingSettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/LoggingSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public func updateLoggingSettings(accountManager: AccountManager, _ f: @escaping (LoggingSettings) -> LoggingSettings) -> Signal {
return accountManager.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/Settings/NetworkSettings.swift b/submodules/TelegramCore/Sources/Settings/NetworkSettings.swift
index 8e5f9b27d6..92f42158a5 100644
--- a/submodules/TelegramCore/Sources/Settings/NetworkSettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/NetworkSettings.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public func updateNetworkSettingsInteractively(postbox: Postbox, network: Network, _ f: @escaping (NetworkSettings) -> NetworkSettings) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/Settings/PeerContactSettings.swift b/submodules/TelegramCore/Sources/Settings/PeerContactSettings.swift
index d2ac0d1a85..a2e8e788c5 100644
--- a/submodules/TelegramCore/Sources/Settings/PeerContactSettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/PeerContactSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
extension PeerStatusSettings {
init(apiSettings: Api.PeerSettings) {
diff --git a/submodules/TelegramCore/Sources/Settings/PrivacySettings.swift b/submodules/TelegramCore/Sources/Settings/PrivacySettings.swift
index 3f44df44b3..07aed7e121 100644
--- a/submodules/TelegramCore/Sources/Settings/PrivacySettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/PrivacySettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
public final class SelectivePrivacyPeer: Equatable {
public let peer: Peer
diff --git a/submodules/TelegramCore/Sources/Settings/ProxySettings.swift b/submodules/TelegramCore/Sources/Settings/ProxySettings.swift
index 933f79dc14..4f15b8df39 100644
--- a/submodules/TelegramCore/Sources/Settings/ProxySettings.swift
+++ b/submodules/TelegramCore/Sources/Settings/ProxySettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public func updateProxySettingsInteractively(accountManager: AccountManager, _ f: @escaping (ProxySettings) -> ProxySettings) -> Signal {
return accountManager.transaction { transaction -> Bool in
diff --git a/submodules/TelegramCore/Sources/Settings/VoipConfiguration.swift b/submodules/TelegramCore/Sources/Settings/VoipConfiguration.swift
index dfe85231fc..6c34f4bb1f 100644
--- a/submodules/TelegramCore/Sources/Settings/VoipConfiguration.swift
+++ b/submodules/TelegramCore/Sources/Settings/VoipConfiguration.swift
@@ -1,5 +1,4 @@
import Postbox
-import SyncCore
public func currentVoipConfiguration(transaction: Transaction) -> VoipConfiguration {
if let entry = transaction.getPreferencesEntry(key: PreferencesKeys.voipConfiguration) as? VoipConfiguration {
diff --git a/submodules/TelegramCore/Sources/SplitTest.swift b/submodules/TelegramCore/Sources/SplitTest.swift
index c0f8938470..84f6211ee6 100644
--- a/submodules/TelegramCore/Sources/SplitTest.swift
+++ b/submodules/TelegramCore/Sources/SplitTest.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
public protocol SplitTestEvent: RawRepresentable where RawValue == String {
}
diff --git a/submodules/TelegramCore/Sources/State/AccountState.swift b/submodules/TelegramCore/Sources/State/AccountState.swift
index 8d5956e6ea..5660db71be 100644
--- a/submodules/TelegramCore/Sources/State/AccountState.swift
+++ b/submodules/TelegramCore/Sources/State/AccountState.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension UnauthorizedAccountTermsOfService {
init?(apiTermsOfService: Api.help.TermsOfService) {
diff --git a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift
index 5004e5bb9d..e7b767d019 100644
--- a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift
+++ b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private func peerIdsFromUpdateGroups(_ groups: [UpdateGroup]) -> Set {
var peerIds = Set()
diff --git a/submodules/TelegramCore/Sources/State/AccountStateManager.swift b/submodules/TelegramCore/Sources/State/AccountStateManager.swift
index 94a7e191a0..f619487341 100644
--- a/submodules/TelegramCore/Sources/State/AccountStateManager.swift
+++ b/submodules/TelegramCore/Sources/State/AccountStateManager.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private enum AccountStateManagerOperationContent {
case pollDifference(AccountFinalStateEvents)
diff --git a/submodules/TelegramCore/Sources/State/AccountViewTracker.swift b/submodules/TelegramCore/Sources/State/AccountViewTracker.swift
index 8dd610993c..ef5b142044 100644
--- a/submodules/TelegramCore/Sources/State/AccountViewTracker.swift
+++ b/submodules/TelegramCore/Sources/State/AccountViewTracker.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum CallListViewType {
case all
diff --git a/submodules/TelegramCore/Sources/State/AppChangelog.swift b/submodules/TelegramCore/Sources/State/AppChangelog.swift
index cde72fe2d7..502a510c7f 100644
--- a/submodules/TelegramCore/Sources/State/AppChangelog.swift
+++ b/submodules/TelegramCore/Sources/State/AppChangelog.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import MtProtoKit
import TelegramApi
-import SyncCore
func managedAppChangelog(postbox: Postbox, network: Network, stateManager: AccountStateManager, appVersion: String) -> Signal {
return stateManager.pollStateUpdateCompletion()
diff --git a/submodules/TelegramCore/Sources/State/AppChangelogState.swift b/submodules/TelegramCore/Sources/State/AppChangelogState.swift
index 8e229d22fc..7fd5abe35f 100644
--- a/submodules/TelegramCore/Sources/State/AppChangelogState.swift
+++ b/submodules/TelegramCore/Sources/State/AppChangelogState.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
func updateAppChangelogState(transaction: Transaction, _ f: @escaping (AppChangelogState) -> AppChangelogState) {
transaction.updatePreferencesEntry(key: PreferencesKeys.appChangelogState, { current in
diff --git a/submodules/TelegramCore/Sources/State/AppConfiguration.swift b/submodules/TelegramCore/Sources/State/AppConfiguration.swift
index 1599a52130..73b8a16032 100644
--- a/submodules/TelegramCore/Sources/State/AppConfiguration.swift
+++ b/submodules/TelegramCore/Sources/State/AppConfiguration.swift
@@ -1,5 +1,4 @@
import Postbox
-import SyncCore
private func currentAppConfiguration(transaction: Transaction) -> AppConfiguration {
if let entry = transaction.getPreferencesEntry(key: PreferencesKeys.appConfiguration) as? AppConfiguration {
diff --git a/submodules/TelegramCore/Sources/State/AppUpdate.swift b/submodules/TelegramCore/Sources/State/AppUpdate.swift
index 546b6b8778..b7f99f5037 100644
--- a/submodules/TelegramCore/Sources/State/AppUpdate.swift
+++ b/submodules/TelegramCore/Sources/State/AppUpdate.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import MtProtoKit
import TelegramApi
-import SyncCore
public struct AppUpdateInfo: Equatable {
public let blocking: Bool
diff --git a/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift b/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift
index c0e0d03f79..57de860b2e 100644
--- a/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift
+++ b/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift
@@ -3,7 +3,6 @@ import TelegramApi
import Postbox
import SwiftSignalKit
-import SyncCore
private func copyOrMoveResourceData(from fromResource: MediaResource, to toResource: MediaResource, mediaBox: MediaBox) {
if fromResource is CloudFileMediaResource || fromResource is CloudDocumentMediaResource || fromResource is SecretFileMediaResource {
diff --git a/submodules/TelegramCore/Sources/State/CachedSentMediaReferences.swift b/submodules/TelegramCore/Sources/State/CachedSentMediaReferences.swift
index bd975a161d..4f112c6fd5 100644
--- a/submodules/TelegramCore/Sources/State/CachedSentMediaReferences.swift
+++ b/submodules/TelegramCore/Sources/State/CachedSentMediaReferences.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private let cachedSentMediaCollectionSpec = ItemCacheCollectionSpec(lowWaterItemCount: 10000, highWaterItemCount: 20000)
diff --git a/submodules/TelegramCore/Sources/State/CallSessionManager.swift b/submodules/TelegramCore/Sources/State/CallSessionManager.swift
index 7d6cdfde5a..42352162fa 100644
--- a/submodules/TelegramCore/Sources/State/CallSessionManager.swift
+++ b/submodules/TelegramCore/Sources/State/CallSessionManager.swift
@@ -4,7 +4,6 @@ import MtProtoKit
import SwiftSignalKit
import TelegramApi
-import SyncCore
private let minLayer: Int32 = 65
diff --git a/submodules/TelegramCore/Sources/State/ChannelState.swift b/submodules/TelegramCore/Sources/State/ChannelState.swift
index effa4e6c62..a8a60781ec 100644
--- a/submodules/TelegramCore/Sources/State/ChannelState.swift
+++ b/submodules/TelegramCore/Sources/State/ChannelState.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
struct ChannelUpdate {
let update: Api.Update
diff --git a/submodules/TelegramCore/Sources/State/ChatHistoryPreloadManager.swift b/submodules/TelegramCore/Sources/State/ChatHistoryPreloadManager.swift
index 569571ae66..f20a18ac61 100644
--- a/submodules/TelegramCore/Sources/State/ChatHistoryPreloadManager.swift
+++ b/submodules/TelegramCore/Sources/State/ChatHistoryPreloadManager.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
public struct HistoryPreloadIndex: Hashable, Comparable, CustomStringConvertible {
public let index: ChatListIndex?
diff --git a/submodules/TelegramCore/Sources/State/CloudChatRemoveMessagesOperation.swift b/submodules/TelegramCore/Sources/State/CloudChatRemoveMessagesOperation.swift
index 5815d12880..73639fcae5 100644
--- a/submodules/TelegramCore/Sources/State/CloudChatRemoveMessagesOperation.swift
+++ b/submodules/TelegramCore/Sources/State/CloudChatRemoveMessagesOperation.swift
@@ -1,5 +1,4 @@
import Postbox
-import SyncCore
func cloudChatAddRemoveMessagesOperation(transaction: Transaction, peerId: PeerId, messageIds: [MessageId], type: CloudChatRemoveMessagesType) {
transaction.operationLogAddEntry(peerId: peerId, tag: OperationLogTags.CloudChatRemoveMessages, tagLocalIndex: .automatic, tagMergedIndex: .automatic, contents: CloudChatRemoveMessagesOperation(messageIds: messageIds, type: type))
diff --git a/submodules/TelegramCore/Sources/State/ContactSyncManager.swift b/submodules/TelegramCore/Sources/State/ContactSyncManager.swift
index b5b4aca039..dc8fd6edfe 100644
--- a/submodules/TelegramCore/Sources/State/ContactSyncManager.swift
+++ b/submodules/TelegramCore/Sources/State/ContactSyncManager.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
private func normalizedPhoneNumber(_ value: String) -> String {
var result = ""
diff --git a/submodules/TelegramCore/Sources/State/Fetch.swift b/submodules/TelegramCore/Sources/State/Fetch.swift
index a8a796d242..7b5bceb377 100644
--- a/submodules/TelegramCore/Sources/State/Fetch.swift
+++ b/submodules/TelegramCore/Sources/State/Fetch.swift
@@ -6,7 +6,6 @@ import SwiftSignalKit
import Photos
#endif
-import SyncCore
private final class MediaResourceDataCopyFile : MediaResourceDataFetchCopyLocalItem {
let path: String
diff --git a/submodules/TelegramCore/Sources/State/FetchChatList.swift b/submodules/TelegramCore/Sources/State/FetchChatList.swift
index 1fdf736c59..933f493ccf 100644
--- a/submodules/TelegramCore/Sources/State/FetchChatList.swift
+++ b/submodules/TelegramCore/Sources/State/FetchChatList.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
enum FetchChatListLocation {
case general
diff --git a/submodules/TelegramCore/Sources/State/FetchSecretFileResource.swift b/submodules/TelegramCore/Sources/State/FetchSecretFileResource.swift
index 2de2c1caa1..780db00d48 100644
--- a/submodules/TelegramCore/Sources/State/FetchSecretFileResource.swift
+++ b/submodules/TelegramCore/Sources/State/FetchSecretFileResource.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
func fetchSecretFileResource(account: Account, resource: SecretFileMediaResource, intervals: Signal<[(Range, MediaBoxFetchPriority)], NoError>, parameters: MediaResourceFetchParameters?) -> Signal {
return multipartFetch(postbox: account.postbox, network: account.network, mediaReferenceRevalidationContext: account.mediaReferenceRevalidationContext, resource: resource, datacenterId: resource.datacenterId, size: resource.size, intervals: intervals, parameters: parameters, encryptionKey: resource.key, decryptedSize: resource.decryptedSize)
diff --git a/submodules/TelegramCore/Sources/State/HistoryViewStateValidation.swift b/submodules/TelegramCore/Sources/State/HistoryViewStateValidation.swift
index 9dfa747529..cdfa7ccda3 100644
--- a/submodules/TelegramCore/Sources/State/HistoryViewStateValidation.swift
+++ b/submodules/TelegramCore/Sources/State/HistoryViewStateValidation.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class HistoryStateValidationBatch {
private let disposable: Disposable
diff --git a/submodules/TelegramCore/Sources/State/Holes.swift b/submodules/TelegramCore/Sources/State/Holes.swift
index 946a9faea0..492af14958 100644
--- a/submodules/TelegramCore/Sources/State/Holes.swift
+++ b/submodules/TelegramCore/Sources/State/Holes.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func messageFilterForTagMask(_ tagMask: MessageTags) -> Api.MessagesFilter? {
if tagMask == .photoOrVideo {
diff --git a/submodules/TelegramCore/Sources/State/InitializeAccountAfterLogin.swift b/submodules/TelegramCore/Sources/State/InitializeAccountAfterLogin.swift
index 22c47f26f3..946c40d2c0 100644
--- a/submodules/TelegramCore/Sources/State/InitializeAccountAfterLogin.swift
+++ b/submodules/TelegramCore/Sources/State/InitializeAccountAfterLogin.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
func initializedAppSettingsAfterLogin(transaction: Transaction, appVersion: String, syncContacts: Bool) {
updateAppChangelogState(transaction: transaction, { state in
diff --git a/submodules/TelegramCore/Sources/State/ManagedAppConfigurationUpdates.swift b/submodules/TelegramCore/Sources/State/ManagedAppConfigurationUpdates.swift
index eb4fab79b5..badf81f425 100644
--- a/submodules/TelegramCore/Sources/State/ManagedAppConfigurationUpdates.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedAppConfigurationUpdates.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func updateAppConfigurationOnce(postbox: Postbox, network: Network) -> Signal {
return network.request(Api.functions.help.getAppConfig())
diff --git a/submodules/TelegramCore/Sources/State/ManagedAutodownloadSettingsUpdates.swift b/submodules/TelegramCore/Sources/State/ManagedAutodownloadSettingsUpdates.swift
index e68464b5db..4de3ecf5d3 100644
--- a/submodules/TelegramCore/Sources/State/ManagedAutodownloadSettingsUpdates.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedAutodownloadSettingsUpdates.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func managedAutodownloadSettingsUpdates(accountManager: AccountManager, network: Network) -> Signal {
let poll = Signal { subscriber in
diff --git a/submodules/TelegramCore/Sources/State/ManagedAutoremoveMessageOperations.swift b/submodules/TelegramCore/Sources/State/ManagedAutoremoveMessageOperations.swift
index cb3cb92aad..4c7fe80a0c 100644
--- a/submodules/TelegramCore/Sources/State/ManagedAutoremoveMessageOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedAutoremoveMessageOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private typealias SignalKitTimer = SwiftSignalKit.Timer
diff --git a/submodules/TelegramCore/Sources/State/ManagedChatListHoles.swift b/submodules/TelegramCore/Sources/State/ManagedChatListHoles.swift
index e943f93d8a..eecc2c16ca 100644
--- a/submodules/TelegramCore/Sources/State/ManagedChatListHoles.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedChatListHoles.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
import TelegramApi
private final class ManagedChatListHolesState {
diff --git a/submodules/TelegramCore/Sources/State/ManagedCloudChatRemoveMessagesOperations.swift b/submodules/TelegramCore/Sources/State/ManagedCloudChatRemoveMessagesOperations.swift
index eb40e138ec..3888eb3484 100644
--- a/submodules/TelegramCore/Sources/State/ManagedCloudChatRemoveMessagesOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedCloudChatRemoveMessagesOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedCloudChatRemoveMessagesOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedConfigurationUpdates.swift b/submodules/TelegramCore/Sources/State/ManagedConfigurationUpdates.swift
index 4818ad8f99..3ed8038358 100644
--- a/submodules/TelegramCore/Sources/State/ManagedConfigurationUpdates.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedConfigurationUpdates.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func managedConfigurationUpdates(accountManager: AccountManager, postbox: Postbox, network: Network) -> Signal {
let poll = Signal { subscriber in
diff --git a/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift b/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift
index ec65e673ce..6b124c2cb7 100644
--- a/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedConsumePersonalMessagesActionsHelper {
var operationDisposables: [MessageId: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift b/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift
index 59a36400ff..105a232349 100644
--- a/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public func updateGlobalNotificationSettingsInteractively(postbox: Postbox, _ f: @escaping (GlobalNotificationSettingsSet) -> GlobalNotificationSettingsSet) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/State/ManagedLocalInputActivities.swift b/submodules/TelegramCore/Sources/State/ManagedLocalInputActivities.swift
index c422460cf4..2965982be2 100644
--- a/submodules/TelegramCore/Sources/State/ManagedLocalInputActivities.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedLocalInputActivities.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public struct PeerActivitySpace: Hashable {
public enum Category: Equatable, Hashable {
diff --git a/submodules/TelegramCore/Sources/State/ManagedLocalizationUpdatesOperations.swift b/submodules/TelegramCore/Sources/State/ManagedLocalizationUpdatesOperations.swift
index 68157e0cfd..fa6f69621d 100644
--- a/submodules/TelegramCore/Sources/State/ManagedLocalizationUpdatesOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedLocalizationUpdatesOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedLocalizationUpdatesOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedNotificationSettingsBehaviors.swift b/submodules/TelegramCore/Sources/State/ManagedNotificationSettingsBehaviors.swift
index 8e05df8933..7427b23970 100644
--- a/submodules/TelegramCore/Sources/State/ManagedNotificationSettingsBehaviors.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedNotificationSettingsBehaviors.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func managedNotificationSettingsBehaviors(postbox: Postbox) -> Signal {
return postbox.combinedView(keys: [.peerNotificationSettingsBehaviorTimestampView])
diff --git a/submodules/TelegramCore/Sources/State/ManagedPendingPeerNotificationSettings.swift b/submodules/TelegramCore/Sources/State/ManagedPendingPeerNotificationSettings.swift
index 40de26d393..c3f1bedbb4 100644
--- a/submodules/TelegramCore/Sources/State/ManagedPendingPeerNotificationSettings.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedPendingPeerNotificationSettings.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedPendingPeerNotificationSettingsHelper {
var operationDisposables: [PeerId: (PeerNotificationSettings, Disposable)] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedProxyInfoUpdates.swift b/submodules/TelegramCore/Sources/State/ManagedProxyInfoUpdates.swift
index 155073b2a1..9d1f803070 100644
--- a/submodules/TelegramCore/Sources/State/ManagedProxyInfoUpdates.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedProxyInfoUpdates.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public final class PromoChatListItem: AdditionalChatListItem {
public enum Kind: Equatable {
diff --git a/submodules/TelegramCore/Sources/State/ManagedRecentStickers.swift b/submodules/TelegramCore/Sources/State/ManagedRecentStickers.swift
index d1f3c2d489..ab6ba118be 100644
--- a/submodules/TelegramCore/Sources/State/ManagedRecentStickers.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedRecentStickers.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
private func hashForIds(_ ids: [Int64]) -> Int32 {
var acc: UInt32 = 0
diff --git a/submodules/TelegramCore/Sources/State/ManagedSecretChatOutgoingOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSecretChatOutgoingOperations.swift
index 56262edfa6..e498b2cc0c 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSecretChatOutgoingOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSecretChatOutgoingOperations.swift
@@ -4,7 +4,6 @@ import TelegramApi
import SwiftSignalKit
import MtProtoKit
-import SyncCore
func addSecretChatOutgoingOperation(transaction: Transaction, peerId: PeerId, operation: SecretChatOutgoingOperationContents, state: SecretChatState) -> SecretChatState {
var updatedState = state
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeAppLogEventsOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeAppLogEventsOperations.swift
index 74d8e82257..e9c912e3aa 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeAppLogEventsOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeAppLogEventsOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeAppLogEventsOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeChatInputStateOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeChatInputStateOperations.swift
index a24cc86557..817beee648 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeChatInputStateOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeChatInputStateOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeChatInputStateOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeConsumeMessageContentsOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeConsumeMessageContentsOperations.swift
index 0c3e326348..5274d71aa6 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeConsumeMessageContentsOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeConsumeMessageContentsOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeConsumeMessageContentsOperationHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeEmojiKeywordsOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeEmojiKeywordsOperations.swift
index 3f3266990e..f8bcb958b3 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeEmojiKeywordsOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeEmojiKeywordsOperations.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeEmojiKeywordsOperationHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupMessageStats.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupMessageStats.swift
index 6971259ca5..f780347062 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupMessageStats.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupMessageStats.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
private final class ManagedSynchronizeGroupMessageStatsState {
private var synchronizeDisposables: [PeerGroupAndNamespace: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupedPeersOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupedPeersOperations.swift
index 1a286a5da9..55f3de99f6 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupedPeersOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeGroupedPeersOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeGroupedPeersOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeInstalledStickerPacksOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeInstalledStickerPacksOperations.swift
index 9c5fd947a2..dea3b12676 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeInstalledStickerPacksOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeInstalledStickerPacksOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeInstalledStickerPacksOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkAllUnseenPersonalMessagesOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkAllUnseenPersonalMessagesOperations.swift
index 3eb8ea5242..e2955b7659 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkAllUnseenPersonalMessagesOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkAllUnseenPersonalMessagesOperations.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeMarkAllUnseenPersonalMessagesOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkFeaturedStickerPacksAsSeenOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkFeaturedStickerPacksAsSeenOperations.swift
index 174ee4d9e3..09a7ab13b8 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkFeaturedStickerPacksAsSeenOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeMarkFeaturedStickerPacksAsSeenOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeMarkFeaturedStickerPacksAsSeenOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift
index 90280571f0..479b4b9019 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizePinnedChatsOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeRecentlyUsedMediaOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeRecentlyUsedMediaOperations.swift
index f451b9f4c1..8ba6b7bce0 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeRecentlyUsedMediaOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeRecentlyUsedMediaOperations.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeRecentlyUsedMediaOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedGifsOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedGifsOperations.swift
index f82c9b2fce..d3eb590859 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedGifsOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedGifsOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeSavedGifsOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedStickersOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedStickersOperations.swift
index 3026b42eb1..179ebd4170 100644
--- a/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedStickersOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizeSavedStickersOperations.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class ManagedSynchronizeSavedStickersOperationsHelper {
var operationDisposables: [Int32: Disposable] = [:]
diff --git a/submodules/TelegramCore/Sources/State/MessageMediaPreuploadManager.swift b/submodules/TelegramCore/Sources/State/MessageMediaPreuploadManager.swift
index dedd571f41..1e7d98d153 100644
--- a/submodules/TelegramCore/Sources/State/MessageMediaPreuploadManager.swift
+++ b/submodules/TelegramCore/Sources/State/MessageMediaPreuploadManager.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private func localIdForResource(_ resource: MediaResource) -> Int64? {
if let resource = resource as? LocalFileMediaResource {
diff --git a/submodules/TelegramCore/Sources/State/MessageReactions.swift b/submodules/TelegramCore/Sources/State/MessageReactions.swift
index 139ef2e43e..87d43ad2d6 100644
--- a/submodules/TelegramCore/Sources/State/MessageReactions.swift
+++ b/submodules/TelegramCore/Sources/State/MessageReactions.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public func updateMessageReactionsInteractively(postbox: Postbox, messageId: MessageId, reaction: String?) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/State/PendingMessageManager.swift b/submodules/TelegramCore/Sources/State/PendingMessageManager.swift
index 7ae1f9580f..9e5b584ad5 100644
--- a/submodules/TelegramCore/Sources/State/PendingMessageManager.swift
+++ b/submodules/TelegramCore/Sources/State/PendingMessageManager.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public struct PendingMessageStatus: Equatable {
public let isRunning: Bool
diff --git a/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingDecryptedOperations.swift b/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingDecryptedOperations.swift
index d9f28c1f79..54a0e8843c 100644
--- a/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingDecryptedOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingDecryptedOperations.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
import EncryptionProvider
private enum MessageParsingError: Error {
diff --git a/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingEncryptedOperations.swift b/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingEncryptedOperations.swift
index 3c2e0dd103..64ecb95b29 100644
--- a/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingEncryptedOperations.swift
+++ b/submodules/TelegramCore/Sources/State/ProcessSecretChatIncomingEncryptedOperations.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
private enum MessagePreParsingError: Error {
case invalidChatState
diff --git a/submodules/TelegramCore/Sources/State/StickerManagement.swift b/submodules/TelegramCore/Sources/State/StickerManagement.swift
index 4aefb157f1..9a745f00c8 100644
--- a/submodules/TelegramCore/Sources/State/StickerManagement.swift
+++ b/submodules/TelegramCore/Sources/State/StickerManagement.swift
@@ -3,7 +3,6 @@ import TelegramApi
import Postbox
import SwiftSignalKit
-import SyncCore
private func hashForIdsReverse(_ ids: [Int64]) -> Int32 {
var acc: UInt32 = 0
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeAppLogEventsOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeAppLogEventsOperation.swift
index 7ab8ac4b8f..2a537b4eca 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeAppLogEventsOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeAppLogEventsOperation.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public func addAppLogEvent(postbox: Postbox, time: Double = Date().timeIntervalSince1970, type: String, peerId: PeerId? = nil, data: JSON = .dictionary([:])) {
let tag: PeerOperationLogTag = OperationLogTags.SynchronizeAppLogEvents
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeChatInputStateOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeChatInputStateOperation.swift
index e00abb7bb5..7c49544c23 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeChatInputStateOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeChatInputStateOperation.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
func addSynchronizeChatInputStateOperation(transaction: Transaction, peerId: PeerId) {
var updateLocalIndex: Int32?
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeConsumeMessageContentsOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeConsumeMessageContentsOperation.swift
index 01c0b0cf4d..62b40f9239 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeConsumeMessageContentsOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeConsumeMessageContentsOperation.swift
@@ -1,5 +1,4 @@
import Postbox
-import SyncCore
func addSynchronizeConsumeMessageContentsOperation(transaction: Transaction, messageIds: [MessageId]) {
for (peerId, messageIds) in messagesIdsGroupedByPeerId(Set(messageIds)) {
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeEmojiKeywordsOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeEmojiKeywordsOperation.swift
index 7baa130399..f4d43adf56 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeEmojiKeywordsOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeEmojiKeywordsOperation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import MurMurHash32
-import SyncCore
func addSynchronizeEmojiKeywordsOperation(transaction: Transaction, inputLanguageCode: String, languageCode: String?, fromVersion: Int32?) {
let tag = OperationLogTags.SynchronizeEmojiKeywords
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeGroupedPeersOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeGroupedPeersOperation.swift
index ee66d432f9..26eeb4b465 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeGroupedPeersOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeGroupedPeersOperation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
public func updatePeerGroupIdInteractively(postbox: Postbox, peerId: PeerId, groupId: PeerGroupId) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeInstalledStickerPacksOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeInstalledStickerPacksOperation.swift
index 0cb242c17f..30939ae228 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeInstalledStickerPacksOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeInstalledStickerPacksOperation.swift
@@ -1,5 +1,4 @@
import Postbox
-import SyncCore
public enum AddSynchronizeInstalledStickerPacksOperationContent {
case sync
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeLocalizationUpdatesOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeLocalizationUpdatesOperation.swift
index b2e72b4a2a..e0d9c66374 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeLocalizationUpdatesOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeLocalizationUpdatesOperation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func addSynchronizeLocalizationUpdatesOperation(transaction: Transaction) {
let tag: PeerOperationLogTag = OperationLogTags.SynchronizeLocalizationUpdates
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeMarkAllUnseenPersonalMessagesOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeMarkAllUnseenPersonalMessagesOperation.swift
index 143893c3ba..9b962f5347 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeMarkAllUnseenPersonalMessagesOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeMarkAllUnseenPersonalMessagesOperation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func addSynchronizeMarkAllUnseenPersonalMessagesOperation(transaction: Transaction, peerId: PeerId, maxId: MessageId.Id) {
let tag: PeerOperationLogTag = OperationLogTags.SynchronizeMarkAllUnseenPersonalMessages
diff --git a/submodules/TelegramCore/Sources/State/SynchronizePeerReadState.swift b/submodules/TelegramCore/Sources/State/SynchronizePeerReadState.swift
index 46d81f30be..9f213ac37e 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizePeerReadState.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizePeerReadState.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
private enum PeerReadStateMarker: Equatable {
case Global(Int32)
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeRecentlyUsedMediaOperations.swift b/submodules/TelegramCore/Sources/State/SynchronizeRecentlyUsedMediaOperations.swift
index ab5ca09fab..867364f432 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeRecentlyUsedMediaOperations.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeRecentlyUsedMediaOperations.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
enum RecentlyUsedMediaCategory {
case stickers
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeSavedGifsOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeSavedGifsOperation.swift
index 2b4c00961a..5d2ea8bd2d 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeSavedGifsOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeSavedGifsOperation.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func addSynchronizeSavedGifsOperation(transaction: Transaction, operation: SynchronizeSavedGifsOperationContent) {
let tag: PeerOperationLogTag = OperationLogTags.SynchronizeSavedGifs
diff --git a/submodules/TelegramCore/Sources/State/SynchronizeSavedStickersOperation.swift b/submodules/TelegramCore/Sources/State/SynchronizeSavedStickersOperation.swift
index 5eb5ea9075..cb24371e7f 100644
--- a/submodules/TelegramCore/Sources/State/SynchronizeSavedStickersOperation.swift
+++ b/submodules/TelegramCore/Sources/State/SynchronizeSavedStickersOperation.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func addSynchronizeSavedStickersOperation(transaction: Transaction, operation: SynchronizeSavedStickersOperationContent) {
let tag: PeerOperationLogTag = OperationLogTags.SynchronizeSavedStickers
diff --git a/submodules/TelegramCore/Sources/State/UnauthorizedAccountStateManager.swift b/submodules/TelegramCore/Sources/State/UnauthorizedAccountStateManager.swift
index 57895597f9..7feccde0c8 100644
--- a/submodules/TelegramCore/Sources/State/UnauthorizedAccountStateManager.swift
+++ b/submodules/TelegramCore/Sources/State/UnauthorizedAccountStateManager.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
private final class UnauthorizedUpdateMessageService: NSObject, MTMessageService {
let pipe: ValuePipe<[Api.Update]> = ValuePipe()
diff --git a/submodules/TelegramCore/Sources/State/UpdatesApiUtils.swift b/submodules/TelegramCore/Sources/State/UpdatesApiUtils.swift
index e32acae449..bf8183fa99 100644
--- a/submodules/TelegramCore/Sources/State/UpdatesApiUtils.swift
+++ b/submodules/TelegramCore/Sources/State/UpdatesApiUtils.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
private func collectPreCachedResources(for photo: Api.Photo) -> [(MediaResource, Data)]? {
switch photo {
diff --git a/submodules/TelegramCore/Sources/Suggestions.swift b/submodules/TelegramCore/Sources/Suggestions.swift
index 1703b0316d..36906c406f 100644
--- a/submodules/TelegramCore/Sources/Suggestions.swift
+++ b/submodules/TelegramCore/Sources/Suggestions.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
public enum ServerProvidedSuggestion: String {
case autoarchivePopular = "AUTOARCHIVE_POPULAR"
diff --git a/submodules/SyncCore/Sources/AccountBackupDataAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AccountBackupDataAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AccountBackupDataAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AccountBackupDataAttribute.swift
diff --git a/submodules/SyncCore/Sources/AccountEnvironmentAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AccountEnvironmentAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AccountEnvironmentAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AccountEnvironmentAttribute.swift
diff --git a/submodules/SyncCore/Sources/AccountSortOrderAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AccountSortOrderAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AccountSortOrderAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AccountSortOrderAttribute.swift
diff --git a/submodules/SyncCore/Sources/AppChangelogState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AppChangelogState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AppChangelogState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AppChangelogState.swift
diff --git a/submodules/SyncCore/Sources/AppConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AppConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AppConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AppConfiguration.swift
diff --git a/submodules/SyncCore/Sources/ArchivedStickerPacksInfo.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ArchivedStickerPacksInfo.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ArchivedStickerPacksInfo.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ArchivedStickerPacksInfo.swift
diff --git a/submodules/SyncCore/Sources/AuthorSignatureMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AuthorSignatureMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AuthorSignatureMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AuthorSignatureMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/AuthorizedAccountState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AuthorizedAccountState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AuthorizedAccountState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AuthorizedAccountState.swift
diff --git a/submodules/SyncCore/Sources/AutodownloadSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AutodownloadSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AutodownloadSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AutodownloadSettings.swift
diff --git a/submodules/SyncCore/Sources/AutoremoveTimeoutMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_AutoremoveTimeoutMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/AutoremoveTimeoutMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_AutoremoveTimeoutMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/BotInfo.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_BotInfo.swift
similarity index 100%
rename from submodules/SyncCore/Sources/BotInfo.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_BotInfo.swift
diff --git a/submodules/SyncCore/Sources/CacheStorageSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CacheStorageSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CacheStorageSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CacheStorageSettings.swift
diff --git a/submodules/SyncCore/Sources/CachedChannelData.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedChannelData.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedChannelData.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedChannelData.swift
diff --git a/submodules/SyncCore/Sources/CachedGroupData.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedGroupData.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedGroupData.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedGroupData.swift
diff --git a/submodules/SyncCore/Sources/CachedGroupParticipants.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedGroupParticipants.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedGroupParticipants.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedGroupParticipants.swift
diff --git a/submodules/SyncCore/Sources/CachedLocalizationInfos.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedLocalizationInfos.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedLocalizationInfos.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedLocalizationInfos.swift
diff --git a/submodules/SyncCore/Sources/CachedRecentPeers.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedRecentPeers.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedRecentPeers.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedRecentPeers.swift
diff --git a/submodules/SyncCore/Sources/CachedResolvedByNamePeer.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedResolvedByNamePeer.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedResolvedByNamePeer.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedResolvedByNamePeer.swift
diff --git a/submodules/SyncCore/Sources/CachedSecureIdConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedSecureIdConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedSecureIdConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedSecureIdConfiguration.swift
diff --git a/submodules/SyncCore/Sources/CachedStickerPack.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedStickerPack.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedStickerPack.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedStickerPack.swift
diff --git a/submodules/SyncCore/Sources/CachedStickerQueryResult.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedStickerQueryResult.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedStickerQueryResult.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedStickerQueryResult.swift
diff --git a/submodules/SyncCore/Sources/CachedThemesConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedThemesConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedThemesConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedThemesConfiguration.swift
diff --git a/submodules/SyncCore/Sources/CachedUserData.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedUserData.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedUserData.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedUserData.swift
diff --git a/submodules/SyncCore/Sources/CachedWallpapersConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedWallpapersConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CachedWallpapersConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CachedWallpapersConfiguration.swift
diff --git a/submodules/SyncCore/Sources/ChannelMessageStateVersionAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ChannelMessageStateVersionAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ChannelMessageStateVersionAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ChannelMessageStateVersionAttribute.swift
diff --git a/submodules/SyncCore/Sources/ChannelState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ChannelState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ChannelState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ChannelState.swift
diff --git a/submodules/SyncCore/Sources/CloudChatRemoveMessagesOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CloudChatRemoveMessagesOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CloudChatRemoveMessagesOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CloudChatRemoveMessagesOperation.swift
diff --git a/submodules/SyncCore/Sources/CloudFileMediaResource.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_CloudFileMediaResource.swift
similarity index 100%
rename from submodules/SyncCore/Sources/CloudFileMediaResource.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_CloudFileMediaResource.swift
diff --git a/submodules/SyncCore/Sources/ConsumableContentMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ConsumableContentMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ConsumableContentMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ConsumableContentMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ConsumablePersonalMentionMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ConsumablePersonalMentionMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ConsumablePersonalMentionMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ConsumablePersonalMentionMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ConsumePersonalMessageAction.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ConsumePersonalMessageAction.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ConsumePersonalMessageAction.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ConsumePersonalMessageAction.swift
diff --git a/submodules/SyncCore/Sources/ContactsSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ContactsSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ContactsSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ContactsSettings.swift
diff --git a/submodules/SyncCore/Sources/ContentPrivacySettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ContentPrivacySettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ContentPrivacySettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ContentPrivacySettings.swift
diff --git a/submodules/SyncCore/Sources/ContentRequiresValidationMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ContentRequiresValidationMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ContentRequiresValidationMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ContentRequiresValidationMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/EditedMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_EditedMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/EditedMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_EditedMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/EmbeddedMediaStickersMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_EmbeddedMediaStickersMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/EmbeddedMediaStickersMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_EmbeddedMediaStickersMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/EmojiKeywordCollectionInfo.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_EmojiKeywordCollectionInfo.swift
similarity index 100%
rename from submodules/SyncCore/Sources/EmojiKeywordCollectionInfo.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_EmojiKeywordCollectionInfo.swift
diff --git a/submodules/SyncCore/Sources/EmojiKeywordItem.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_EmojiKeywordItem.swift
similarity index 100%
rename from submodules/SyncCore/Sources/EmojiKeywordItem.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_EmojiKeywordItem.swift
diff --git a/submodules/SyncCore/Sources/EmojiSearchQueryMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_EmojiSearchQueryMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/EmojiSearchQueryMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_EmojiSearchQueryMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ExportedInvitation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ExportedInvitation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ExportedInvitation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ExportedInvitation.swift
diff --git a/submodules/SyncCore/Sources/FeaturedStickerPack.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_FeaturedStickerPack.swift
similarity index 100%
rename from submodules/SyncCore/Sources/FeaturedStickerPack.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_FeaturedStickerPack.swift
diff --git a/submodules/SyncCore/Sources/ForwardCountMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ForwardCountMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ForwardCountMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ForwardCountMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ForwardSourceInfoAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ForwardSourceInfoAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ForwardSourceInfoAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ForwardSourceInfoAttribute.swift
diff --git a/submodules/SyncCore/Sources/GlobalNotificationSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_GlobalNotificationSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/GlobalNotificationSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_GlobalNotificationSettings.swift
diff --git a/submodules/SyncCore/Sources/ImportableDeviceContactData.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ImportableDeviceContactData.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ImportableDeviceContactData.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ImportableDeviceContactData.swift
diff --git a/submodules/SyncCore/Sources/InlineBotMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_InlineBotMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/InlineBotMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_InlineBotMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/InstantPage.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_InstantPage.swift
similarity index 100%
rename from submodules/SyncCore/Sources/InstantPage.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_InstantPage.swift
diff --git a/submodules/SyncCore/Sources/JSON.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_JSON.swift
similarity index 100%
rename from submodules/SyncCore/Sources/JSON.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_JSON.swift
diff --git a/submodules/SyncCore/Sources/LimitsConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_LimitsConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/LimitsConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_LimitsConfiguration.swift
diff --git a/submodules/SyncCore/Sources/Localization.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_Localization.swift
similarity index 100%
rename from submodules/SyncCore/Sources/Localization.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_Localization.swift
diff --git a/submodules/SyncCore/Sources/LocalizationInfo.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_LocalizationInfo.swift
similarity index 100%
rename from submodules/SyncCore/Sources/LocalizationInfo.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_LocalizationInfo.swift
diff --git a/submodules/SyncCore/Sources/LocalizationListState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_LocalizationListState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/LocalizationListState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_LocalizationListState.swift
diff --git a/submodules/SyncCore/Sources/LocalizationSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_LocalizationSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/LocalizationSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_LocalizationSettings.swift
diff --git a/submodules/SyncCore/Sources/LoggedOutAccountAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_LoggedOutAccountAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/LoggedOutAccountAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_LoggedOutAccountAttribute.swift
diff --git a/submodules/SyncCore/Sources/LoggingSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_LoggingSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/LoggingSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_LoggingSettings.swift
diff --git a/submodules/SyncCore/Sources/MediaReference.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_MediaReference.swift
similarity index 100%
rename from submodules/SyncCore/Sources/MediaReference.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_MediaReference.swift
diff --git a/submodules/SyncCore/Sources/Namespaces.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_Namespaces.swift
similarity index 100%
rename from submodules/SyncCore/Sources/Namespaces.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_Namespaces.swift
diff --git a/submodules/SyncCore/Sources/NetworkSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_NetworkSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/NetworkSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_NetworkSettings.swift
diff --git a/submodules/SyncCore/Sources/NotificationInfoMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_NotificationInfoMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/NotificationInfoMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_NotificationInfoMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/OutgoingChatContextResultMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingChatContextResultMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/OutgoingChatContextResultMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingChatContextResultMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/OutgoingContentInfoMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingContentInfoMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/OutgoingContentInfoMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingContentInfoMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/OutgoingMessageInfoAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingMessageInfoAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/OutgoingMessageInfoAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingMessageInfoAttribute.swift
diff --git a/submodules/SyncCore/Sources/OutgoingScheduleInfoMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingScheduleInfoMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/OutgoingScheduleInfoMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_OutgoingScheduleInfoMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/PeerAccessHash.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerAccessHash.swift
similarity index 100%
rename from submodules/SyncCore/Sources/PeerAccessHash.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerAccessHash.swift
diff --git a/submodules/SyncCore/Sources/PeerAccessRestrictionInfo.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerAccessRestrictionInfo.swift
similarity index 100%
rename from submodules/SyncCore/Sources/PeerAccessRestrictionInfo.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerAccessRestrictionInfo.swift
diff --git a/submodules/SyncCore/Sources/PeerGroupMessageStateVersionAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerGroupMessageStateVersionAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/PeerGroupMessageStateVersionAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerGroupMessageStateVersionAttribute.swift
diff --git a/submodules/SyncCore/Sources/PeerReference.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerReference.swift
similarity index 100%
rename from submodules/SyncCore/Sources/PeerReference.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerReference.swift
diff --git a/submodules/SyncCore/Sources/PeerStatusSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerStatusSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/PeerStatusSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_PeerStatusSettings.swift
diff --git a/submodules/SyncCore/Sources/PixelDimensions.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_PixelDimensions.swift
similarity index 100%
rename from submodules/SyncCore/Sources/PixelDimensions.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_PixelDimensions.swift
diff --git a/submodules/SyncCore/Sources/ProxySettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ProxySettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ProxySettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ProxySettings.swift
diff --git a/submodules/SyncCore/Sources/ReactionsMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ReactionsMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ReactionsMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ReactionsMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/RecentHashtagItem.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_RecentHashtagItem.swift
similarity index 100%
rename from submodules/SyncCore/Sources/RecentHashtagItem.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_RecentHashtagItem.swift
diff --git a/submodules/SyncCore/Sources/RecentMediaItem.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_RecentMediaItem.swift
similarity index 100%
rename from submodules/SyncCore/Sources/RecentMediaItem.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_RecentMediaItem.swift
diff --git a/submodules/SyncCore/Sources/RecentPeerItem.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_RecentPeerItem.swift
similarity index 100%
rename from submodules/SyncCore/Sources/RecentPeerItem.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_RecentPeerItem.swift
diff --git a/submodules/SyncCore/Sources/RegularChatState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_RegularChatState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/RegularChatState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_RegularChatState.swift
diff --git a/submodules/SyncCore/Sources/RemoteStorageConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_RemoteStorageConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/RemoteStorageConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_RemoteStorageConfiguration.swift
diff --git a/submodules/SyncCore/Sources/ReplyMarkupMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ReplyMarkupMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ReplyMarkupMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ReplyMarkupMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ReplyMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ReplyMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ReplyMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ReplyMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ReplyThreadMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ReplyThreadMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ReplyThreadMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ReplyThreadMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/RestrictedContentMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_RestrictedContentMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/RestrictedContentMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_RestrictedContentMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/RichText.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_RichText.swift
similarity index 100%
rename from submodules/SyncCore/Sources/RichText.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_RichText.swift
diff --git a/submodules/SyncCore/Sources/SavedStickerItem.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SavedStickerItem.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SavedStickerItem.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SavedStickerItem.swift
diff --git a/submodules/SyncCore/Sources/SearchBotsConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SearchBotsConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SearchBotsConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SearchBotsConfiguration.swift
diff --git a/submodules/SyncCore/Sources/SecretChatEncryptionConfig.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatEncryptionConfig.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatEncryptionConfig.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatEncryptionConfig.swift
diff --git a/submodules/SyncCore/Sources/SecretChatFileReference.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatFileReference.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatFileReference.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatFileReference.swift
diff --git a/submodules/SyncCore/Sources/SecretChatIncomingDecryptedOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatIncomingDecryptedOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatIncomingDecryptedOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatIncomingDecryptedOperation.swift
diff --git a/submodules/SyncCore/Sources/SecretChatIncomingEncryptedOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatIncomingEncryptedOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatIncomingEncryptedOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatIncomingEncryptedOperation.swift
diff --git a/submodules/SyncCore/Sources/SecretChatKeychain.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatKeychain.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatKeychain.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatKeychain.swift
diff --git a/submodules/SyncCore/Sources/SecretChatOutgoingOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatOutgoingOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatOutgoingOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatOutgoingOperation.swift
diff --git a/submodules/SyncCore/Sources/SecretChatSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatSettings.swift
diff --git a/submodules/SyncCore/Sources/SecretChatState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretChatState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretChatState.swift
diff --git a/submodules/SyncCore/Sources/SecretFileEncryptionKey.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretFileEncryptionKey.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecretFileEncryptionKey.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecretFileEncryptionKey.swift
diff --git a/submodules/SyncCore/Sources/SecureFileMediaResource.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecureFileMediaResource.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecureFileMediaResource.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecureFileMediaResource.swift
diff --git a/submodules/SyncCore/Sources/SecureIdFileReference.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SecureIdFileReference.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SecureIdFileReference.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SecureIdFileReference.swift
diff --git a/submodules/SyncCore/Sources/SendScheduledMessageImmediatelyAction.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SendScheduledMessageImmediatelyAction.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SendScheduledMessageImmediatelyAction.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SendScheduledMessageImmediatelyAction.swift
diff --git a/submodules/SyncCore/Sources/SourceReferenceMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SourceReferenceMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SourceReferenceMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SourceReferenceMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/StandaloneAccountTransaction.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_StandaloneAccountTransaction.swift
similarity index 97%
rename from submodules/SyncCore/Sources/StandaloneAccountTransaction.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_StandaloneAccountTransaction.swift
index d9b8c07eb7..3fa2fbac52 100644
--- a/submodules/SyncCore/Sources/StandaloneAccountTransaction.swift
+++ b/submodules/TelegramCore/Sources/SyncCore/SyncCore_StandaloneAccountTransaction.swift
@@ -2,10 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
-private func accountRecordIdPathName(_ id: AccountRecordId) -> String {
- return "account-\(UInt64(bitPattern: id.int64))"
-}
-
public let telegramPostboxSeedConfiguration: SeedConfiguration = {
var messageHoles: [PeerId.Namespace: [MessageId.Namespace: Set]] = [:]
for peerNamespace in peerIdNamespacesWithInitialCloudMessageHoles {
diff --git a/submodules/SyncCore/Sources/StickerPackCollectionInfo.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_StickerPackCollectionInfo.swift
similarity index 100%
rename from submodules/SyncCore/Sources/StickerPackCollectionInfo.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_StickerPackCollectionInfo.swift
diff --git a/submodules/SyncCore/Sources/StickerPackItem.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_StickerPackItem.swift
similarity index 100%
rename from submodules/SyncCore/Sources/StickerPackItem.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_StickerPackItem.swift
diff --git a/submodules/SyncCore/Sources/SuggestedLocalizationEntry.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SuggestedLocalizationEntry.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SuggestedLocalizationEntry.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SuggestedLocalizationEntry.swift
diff --git a/submodules/SyncCore/Sources/SuggestedLocalizationUpdatesOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SuggestedLocalizationUpdatesOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SuggestedLocalizationUpdatesOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SuggestedLocalizationUpdatesOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeAppLogEventsOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeAppLogEventsOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeAppLogEventsOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeAppLogEventsOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeChatInputStateOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeChatInputStateOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeChatInputStateOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeChatInputStateOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeConsumeMessageContentsOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeConsumeMessageContentsOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeConsumeMessageContentsOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeConsumeMessageContentsOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeEmojiKeywordsOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeEmojiKeywordsOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeEmojiKeywordsOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeEmojiKeywordsOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeGroupedPeersOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeGroupedPeersOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeGroupedPeersOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeGroupedPeersOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeInstalledStickerPacksOperations.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeInstalledStickerPacksOperations.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeInstalledStickerPacksOperations.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeInstalledStickerPacksOperations.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeMarkAllUnseenPersonalMessagesOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeMarkAllUnseenPersonalMessagesOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeMarkAllUnseenPersonalMessagesOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeMarkAllUnseenPersonalMessagesOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizePinnedChatsOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizePinnedChatsOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizePinnedChatsOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizePinnedChatsOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeRecentlyUsedMediaOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeRecentlyUsedMediaOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeRecentlyUsedMediaOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeRecentlyUsedMediaOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeSavedGifsOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeSavedGifsOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeSavedGifsOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeSavedGifsOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeSavedStickersOperation.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeSavedStickersOperation.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeSavedStickersOperation.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeSavedStickersOperation.swift
diff --git a/submodules/SyncCore/Sources/SynchronizeableChatInputState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeableChatInputState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/SynchronizeableChatInputState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_SynchronizeableChatInputState.swift
diff --git a/submodules/SyncCore/Sources/TelegramChannel.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramChannel.swift
similarity index 94%
rename from submodules/SyncCore/Sources/TelegramChannel.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramChannel.swift
index a0e6792b48..ac8faf4f24 100644
--- a/submodules/SyncCore/Sources/TelegramChannel.swift
+++ b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramChannel.swift
@@ -147,7 +147,7 @@ public struct TelegramChannelFlags: OptionSet {
public static let isGigagroup = TelegramChannelFlags(rawValue: 1 << 7)
}
-public final class TelegramChannel: Peer {
+public final class TelegramChannel: Peer, Equatable {
public let id: PeerId
public let accessHash: TelegramPeerAccessHash?
public let title: String
@@ -267,30 +267,34 @@ public final class TelegramChannel: Peer {
return false
}
- if self.id != other.id || self.accessHash != other.accessHash || self.title != other.title || self.username != other.username || self.photo != other.photo {
+ return self == other
+ }
+
+ public static func ==(lhs: TelegramChannel, rhs: TelegramChannel) -> Bool {
+ if lhs.id != rhs.id || lhs.accessHash != rhs.accessHash || lhs.title != rhs.title || lhs.username != rhs.username || lhs.photo != rhs.photo {
return false
}
-
- if self.creationDate != other.creationDate || self.version != other.version || self.participationStatus != other.participationStatus {
+
+ if lhs.creationDate != rhs.creationDate || lhs.version != rhs.version || lhs.participationStatus != rhs.participationStatus {
return false
}
-
- if self.info != other.info || self.flags != other.flags || self.restrictionInfo != other.restrictionInfo {
+
+ if lhs.info != rhs.info || lhs.flags != rhs.flags || lhs.restrictionInfo != rhs.restrictionInfo {
return false
}
-
- if self.adminRights != other.adminRights {
+
+ if lhs.adminRights != rhs.adminRights {
return false
}
-
- if self.bannedRights != other.bannedRights {
+
+ if lhs.bannedRights != rhs.bannedRights {
return false
}
-
- if self.defaultBannedRights != other.defaultBannedRights {
+
+ if lhs.defaultBannedRights != rhs.defaultBannedRights {
return false
}
-
+
return true
}
diff --git a/submodules/SyncCore/Sources/TelegramChatAdminRights.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramChatAdminRights.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramChatAdminRights.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramChatAdminRights.swift
diff --git a/submodules/SyncCore/Sources/TelegramChatBannedRights.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramChatBannedRights.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramChatBannedRights.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramChatBannedRights.swift
diff --git a/submodules/SyncCore/Sources/TelegramDeviceContactImportedData.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramDeviceContactImportedData.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramDeviceContactImportedData.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramDeviceContactImportedData.swift
diff --git a/submodules/SyncCore/Sources/TelegramGroup.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramGroup.swift
similarity index 87%
rename from submodules/SyncCore/Sources/TelegramGroup.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramGroup.swift
index 07e15aa413..686ed9353f 100644
--- a/submodules/SyncCore/Sources/TelegramGroup.swift
+++ b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramGroup.swift
@@ -74,7 +74,7 @@ public struct TelegramGroupToChannelMigrationReference: Equatable {
}
}
-public final class TelegramGroup: Peer {
+public final class TelegramGroup: Peer, Equatable {
public let id: PeerId
public let title: String
public let photo: [TelegramMediaImageRepresentation]
@@ -159,45 +159,49 @@ public final class TelegramGroup: Peer {
public func isEqual(_ other: Peer) -> Bool {
if let other = other as? TelegramGroup {
- if self.id != other.id {
- return false
- }
- if self.title != other.title {
- return false
- }
- if self.photo != other.photo {
- return false
- }
- if self.membership != other.membership {
- return false
- }
- if self.version != other.version {
- return false
- }
- if self.participantCount != other.participantCount {
- return false
- }
- if self.role != other.role {
- return false
- }
- if self.defaultBannedRights != other.defaultBannedRights {
- return false
- }
- if self.migrationReference != other.migrationReference {
- return false
- }
- if self.creationDate != other.creationDate {
- return false
- }
- if self.flags != other.flags {
- return false
- }
- return true
+ return self == other
} else {
return false
}
}
+ public static func ==(lhs: TelegramGroup, rhs: TelegramGroup) -> Bool {
+ if lhs.id != rhs.id {
+ return false
+ }
+ if lhs.title != rhs.title {
+ return false
+ }
+ if lhs.photo != rhs.photo {
+ return false
+ }
+ if lhs.membership != rhs.membership {
+ return false
+ }
+ if lhs.version != rhs.version {
+ return false
+ }
+ if lhs.participantCount != rhs.participantCount {
+ return false
+ }
+ if lhs.role != rhs.role {
+ return false
+ }
+ if lhs.defaultBannedRights != rhs.defaultBannedRights {
+ return false
+ }
+ if lhs.migrationReference != rhs.migrationReference {
+ return false
+ }
+ if lhs.creationDate != rhs.creationDate {
+ return false
+ }
+ if lhs.flags != rhs.flags {
+ return false
+ }
+ return true
+ }
+
public func updateFlags(flags: TelegramGroupFlags, version: Int) -> TelegramGroup {
return TelegramGroup(id: self.id, title: self.title, photo: self.photo, participantCount: self.participantCount, role: self.role, membership: self.membership, flags: flags, defaultBannedRights: self.defaultBannedRights, migrationReference: self.migrationReference, creationDate: self.creationDate, version: version)
}
diff --git a/submodules/SyncCore/Sources/TelegramMediaAction.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaAction.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaAction.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaAction.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaContact.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaContact.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaContact.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaContact.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaDice.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaDice.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaDice.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaDice.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaExpiredContent.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaExpiredContent.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaExpiredContent.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaExpiredContent.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaFile.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaFile.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaFile.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaFile.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaGame.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaGame.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaGame.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaGame.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaImage.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaImage.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaImage.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaImage.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaInvoice.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaInvoice.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaInvoice.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaInvoice.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaMap.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaMap.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaMap.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaMap.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaPoll.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaPoll.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaPoll.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaPoll.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaResource.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaResource.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaResource.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaResource.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaUnsupported.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaUnsupported.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaUnsupported.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaUnsupported.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaWebFile.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaWebFile.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaWebFile.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaWebFile.swift
diff --git a/submodules/SyncCore/Sources/TelegramMediaWebpage.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaWebpage.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramMediaWebpage.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramMediaWebpage.swift
diff --git a/submodules/SyncCore/Sources/TelegramPeerNotificationSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramPeerNotificationSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramPeerNotificationSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramPeerNotificationSettings.swift
diff --git a/submodules/SyncCore/Sources/TelegramSecretChat.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramSecretChat.swift
similarity index 91%
rename from submodules/SyncCore/Sources/TelegramSecretChat.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramSecretChat.swift
index afe2550db9..d5a5301ea8 100644
--- a/submodules/SyncCore/Sources/TelegramSecretChat.swift
+++ b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramSecretChat.swift
@@ -1,7 +1,7 @@
import Foundation
import Postbox
-public final class TelegramSecretChat: Peer {
+public final class TelegramSecretChat: Peer, Equatable {
public let id: PeerId
public let regularPeerId: PeerId
public let accessHash: Int64
@@ -57,11 +57,15 @@ public final class TelegramSecretChat: Peer {
public func isEqual(_ other: Peer) -> Bool {
if let other = other as? TelegramSecretChat {
- return self.id == other.id && self.regularPeerId == other.regularPeerId && self.accessHash == other.accessHash && self.embeddedState == other.embeddedState && self.messageAutoremoveTimeout == other.messageAutoremoveTimeout && self.creationDate == other.creationDate && self.role == other.role
+ return self == other
} else {
return false
}
}
+
+ public static func ==(lhs: TelegramSecretChat, rhs: TelegramSecretChat) -> Bool {
+ return lhs.id == rhs.id && lhs.regularPeerId == rhs.regularPeerId && lhs.accessHash == rhs.accessHash && lhs.embeddedState == rhs.embeddedState && lhs.messageAutoremoveTimeout == rhs.messageAutoremoveTimeout && lhs.creationDate == rhs.creationDate && lhs.role == rhs.role
+ }
public func withUpdatedEmbeddedState(_ embeddedState: SecretChatEmbeddedPeerState) -> TelegramSecretChat {
return TelegramSecretChat(id: self.id, creationDate: self.creationDate, regularPeerId: self.regularPeerId, accessHash: self.accessHash, role: self.role, embeddedState: embeddedState, messageAutoremoveTimeout: self.messageAutoremoveTimeout)
diff --git a/submodules/SyncCore/Sources/TelegramTheme.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramTheme.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramTheme.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramTheme.swift
diff --git a/submodules/SyncCore/Sources/TelegramUser.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramUser.swift
similarity index 88%
rename from submodules/SyncCore/Sources/TelegramUser.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramUser.swift
index c8adbbee9d..06bd57ad56 100644
--- a/submodules/SyncCore/Sources/TelegramUser.swift
+++ b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramUser.swift
@@ -57,7 +57,7 @@ public struct BotUserInfo: PostboxCoding, Equatable {
}
}
-public final class TelegramUser: Peer {
+public final class TelegramUser: Peer, Equatable {
public let id: PeerId
public let accessHash: TelegramPeerAccessHash?
public let firstName: String?
@@ -198,45 +198,49 @@ public final class TelegramUser: Peer {
public func isEqual(_ other: Peer) -> Bool {
if let other = other as? TelegramUser {
- if self.id != other.id {
- return false
- }
- if self.accessHash != other.accessHash {
- return false
- }
- if self.firstName != other.firstName {
- return false
- }
- if self.lastName != other.lastName {
- return false
- }
- if self.phone != other.phone {
- return false
- }
- if self.photo.count != other.photo.count {
- return false
- }
- for i in 0 ..< self.photo.count {
- if self.photo[i] != other.photo[i] {
- return false
- }
- }
- if self.botInfo != other.botInfo {
- return false
- }
- if self.restrictionInfo != other.restrictionInfo {
- return false
- }
-
- if self.flags != other.flags {
- return false
- }
-
- return true
+ return self == other
} else {
return false
}
}
+
+ public static func ==(lhs: TelegramUser, rhs: TelegramUser) -> Bool {
+ if lhs.id != rhs.id {
+ return false
+ }
+ if lhs.accessHash != rhs.accessHash {
+ return false
+ }
+ if lhs.firstName != rhs.firstName {
+ return false
+ }
+ if lhs.lastName != rhs.lastName {
+ return false
+ }
+ if lhs.phone != rhs.phone {
+ return false
+ }
+ if lhs.photo.count != rhs.photo.count {
+ return false
+ }
+ for i in 0 ..< lhs.photo.count {
+ if lhs.photo[i] != rhs.photo[i] {
+ return false
+ }
+ }
+ if lhs.botInfo != rhs.botInfo {
+ return false
+ }
+ if lhs.restrictionInfo != rhs.restrictionInfo {
+ return false
+ }
+
+ if lhs.flags != rhs.flags {
+ return false
+ }
+
+ return true
+ }
public func withUpdatedUsername(_ username:String?) -> TelegramUser {
return TelegramUser(id: self.id, accessHash: self.accessHash, firstName: self.firstName, lastName: self.lastName, username: username, phone: self.phone, photo: self.photo, botInfo: self.botInfo, restrictionInfo: self.restrictionInfo, flags: self.flags)
diff --git a/submodules/SyncCore/Sources/TelegramUserPresence.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramUserPresence.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramUserPresence.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramUserPresence.swift
diff --git a/submodules/SyncCore/Sources/TelegramWallpaper.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramWallpaper.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TelegramWallpaper.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TelegramWallpaper.swift
diff --git a/submodules/SyncCore/Sources/TemporaryTwoStepPasswordToken.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TemporaryTwoStepPasswordToken.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TemporaryTwoStepPasswordToken.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TemporaryTwoStepPasswordToken.swift
diff --git a/submodules/SyncCore/Sources/TextEntitiesMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_TextEntitiesMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/TextEntitiesMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_TextEntitiesMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ThemeSettings.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ThemeSettings.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ThemeSettings.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ThemeSettings.swift
diff --git a/submodules/SyncCore/Sources/UnauthorizedAccountState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_UnauthorizedAccountState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/UnauthorizedAccountState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_UnauthorizedAccountState.swift
diff --git a/submodules/SyncCore/Sources/UpdateMessageReactionsAction.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_UpdateMessageReactionsAction.swift
similarity index 100%
rename from submodules/SyncCore/Sources/UpdateMessageReactionsAction.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_UpdateMessageReactionsAction.swift
diff --git a/submodules/SyncCore/Sources/ValidationMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ValidationMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ValidationMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ValidationMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/ViewCountMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_ViewCountMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/ViewCountMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_ViewCountMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/VoipConfiguration.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_VoipConfiguration.swift
similarity index 100%
rename from submodules/SyncCore/Sources/VoipConfiguration.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_VoipConfiguration.swift
diff --git a/submodules/SyncCore/Sources/WalletCollection.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_WalletCollection.swift
similarity index 100%
rename from submodules/SyncCore/Sources/WalletCollection.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_WalletCollection.swift
diff --git a/submodules/SyncCore/Sources/WasScheduledMessageAttribute.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_WasScheduledMessageAttribute.swift
similarity index 100%
rename from submodules/SyncCore/Sources/WasScheduledMessageAttribute.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_WasScheduledMessageAttribute.swift
diff --git a/submodules/SyncCore/Sources/wallapersState.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_wallapersState.swift
similarity index 100%
rename from submodules/SyncCore/Sources/wallapersState.swift
rename to submodules/TelegramCore/Sources/SyncCore/SyncCore_wallapersState.swift
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/ChangeAccountPhoneNumber.swift b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/ChangeAccountPhoneNumber.swift
index 8ceec98541..da7e7916af 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/ChangeAccountPhoneNumber.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/ChangeAccountPhoneNumber.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public struct ChangeAccountPhoneNumberData: Equatable {
public let type: SentAuthorizationCodeType
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/RegisterNotificationToken.swift b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/RegisterNotificationToken.swift
index 9349247abb..4eaf3a7c92 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/RegisterNotificationToken.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/RegisterNotificationToken.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
-import SyncCore
public enum NotificationTokenType {
case aps(encrypt: Bool)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TelegramEngineAccountData.swift b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TelegramEngineAccountData.swift
index 5fbab699aa..a58e04f9a9 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TelegramEngineAccountData.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TelegramEngineAccountData.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
public extension TelegramEngine {
final class AccountData {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TermsOfService.swift b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TermsOfService.swift
index b0c66a3537..a52082f7a2 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TermsOfService.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/TermsOfService.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public struct TermsOfServiceUpdate: Equatable {
public let id: String
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/UpdateAccountPeerName.swift b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/UpdateAccountPeerName.swift
index 533a240653..096a27bcae 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/AccountData/UpdateAccountPeerName.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/AccountData/UpdateAccountPeerName.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_updateAccountPeerName(account: Account, firstName: String, lastName: String) -> Signal {
return account.network.request(Api.functions.account.updateProfile(flags: (1 << 0) | (1 << 1), firstName: firstName, lastName: lastName, about: nil))
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Auth/AuthTransfer.swift b/submodules/TelegramCore/Sources/TelegramEngine/Auth/AuthTransfer.swift
index 0e5e086488..99dc5a18a4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Auth/AuthTransfer.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Auth/AuthTransfer.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramApi
-import SyncCore
import SwiftSignalKit
public struct AuthTransferExportedToken {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Auth/CancelAccountReset.swift b/submodules/TelegramCore/Sources/TelegramEngine/Auth/CancelAccountReset.swift
index 60e1b8e0ca..25a18b27dd 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Auth/CancelAccountReset.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Auth/CancelAccountReset.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public struct CancelAccountResetData: Equatable {
public let type: SentAuthorizationCodeType
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Auth/TelegramEngineAuth.swift b/submodules/TelegramCore/Sources/TelegramEngine/Auth/TelegramEngineAuth.swift
index c0f69f9d95..fe4ebd29cb 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Auth/TelegramEngineAuth.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Auth/TelegramEngineAuth.swift
@@ -2,7 +2,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
import MtProtoKit
-import SyncCore
public extension TelegramEngineUnauthorized {
final class Auth {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Auth/TwoStepVerification.swift b/submodules/TelegramCore/Sources/TelegramEngine/Auth/TwoStepVerification.swift
index 2ac72ff952..ff04a4c1c0 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Auth/TwoStepVerification.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Auth/TwoStepVerification.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum TwoStepVerificationConfiguration {
case notSet(pendingEmail: TwoStepVerificationPendingEmail?)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift b/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift
index 5bf3a438e2..696903d6bf 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift
@@ -2,7 +2,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public struct GroupCallInfo: Equatable {
public var id: Int64
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Calls/TelegramEngineCalls.swift b/submodules/TelegramCore/Sources/TelegramEngine/Calls/TelegramEngineCalls.swift
index 3e0f02a662..21be454285 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Calls/TelegramEngineCalls.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Calls/TelegramEngineCalls.swift
@@ -1,6 +1,5 @@
import SwiftSignalKit
import Postbox
-import SyncCore
public extension TelegramEngine {
final class Calls {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ContactManagement.swift b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ContactManagement.swift
index 43f9be29db..a39575d6f3 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ContactManagement.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ContactManagement.swift
@@ -3,7 +3,6 @@ import TelegramApi
import Postbox
import SwiftSignalKit
import CryptoUtils
-import SyncCore
private func md5(_ data: Data) -> Data {
return data.withUnsafeBytes { bytes -> Data in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/DeviceContact.swift b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/DeviceContact.swift
index 47ef63c7e3..ae3c28d6b4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/DeviceContact.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/DeviceContact.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
public struct DeviceContactNormalizedPhoneNumber: Hashable, RawRepresentable {
public let rawValue: String
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ImportContact.swift b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ImportContact.swift
index 5f3d5cf6bb..18a63990e4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ImportContact.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/ImportContact.swift
@@ -2,7 +2,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func _internal_importContact(account: Account, firstName: String, lastName: String, phoneNumber: String) -> Signal {
let input = Api.InputContact.inputPhoneContact(clientId: 1, phone: phoneNumber, firstName: firstName, lastName: lastName)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/TelegramDeviceContactImportInfo.swift b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/TelegramDeviceContactImportInfo.swift
index 0a82dd2dc1..fcee70fad2 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/TelegramDeviceContactImportInfo.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/TelegramDeviceContactImportInfo.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private let phoneNumberKeyPrefix: ValueBoxKey = {
let result = ValueBoxKey(length: 1)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/UpdateContactName.swift b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/UpdateContactName.swift
index dd6939d74d..471faaa5ba 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Contacts/UpdateContactName.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Contacts/UpdateContactName.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum UpdateContactNameError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Data/PeerSummary.swift b/submodules/TelegramCore/Sources/TelegramEngine/Data/PeerSummary.swift
new file mode 100644
index 0000000000..c8135eb9c5
--- /dev/null
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Data/PeerSummary.swift
@@ -0,0 +1,61 @@
+import SwiftSignalKit
+import Postbox
+
+public extension TelegramEngine.EngineData.Item {
+ enum Peer {
+ public struct Peer: TelegramEngineDataItem, PostboxViewDataItem {
+ public typealias Result = Optional
+
+ fileprivate var id: EnginePeer.Id
+
+ public init(id: EnginePeer.Id) {
+ self.id = id
+ }
+
+ var key: PostboxViewKey {
+ return .basicPeer(self.id)
+ }
+
+ func extract(view: PostboxView) -> Result {
+ guard let view = view as? BasicPeerView else {
+ preconditionFailure()
+ }
+ guard let peer = view.peer else {
+ return nil
+ }
+ return EnginePeer(peer)
+ }
+ }
+
+ public struct ParticipantCount: TelegramEngineDataItem, PostboxViewDataItem {
+ public typealias Result = Optional
+
+ fileprivate var id: EnginePeer.Id
+
+ public init(id: EnginePeer.Id) {
+ self.id = id
+ }
+
+ var key: PostboxViewKey {
+ return .cachedPeerData(peerId: self.id)
+ }
+
+ func extract(view: PostboxView) -> Result {
+ guard let view = view as? CachedPeerDataView else {
+ preconditionFailure()
+ }
+ guard let cachedPeerData = view.cachedPeerData else {
+ return nil
+ }
+ switch cachedPeerData {
+ case let channel as CachedChannelData:
+ return channel.participantsSummary.memberCount.flatMap(Int.init)
+ case let group as CachedGroupData:
+ return group.participants?.participants.count
+ default:
+ return nil
+ }
+ }
+ }
+ }
+}
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Data/TelegramEngineData.swift b/submodules/TelegramCore/Sources/TelegramEngine/Data/TelegramEngineData.swift
new file mode 100644
index 0000000000..25c8e66626
--- /dev/null
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Data/TelegramEngineData.swift
@@ -0,0 +1,97 @@
+import SwiftSignalKit
+import Postbox
+
+public protocol TelegramEngineDataItem {
+ associatedtype Result
+}
+
+protocol AnyPostboxViewDataItem {
+ var key: PostboxViewKey { get }
+
+ func _extract(view: PostboxView) -> Any
+}
+
+protocol PostboxViewDataItem: TelegramEngineDataItem, AnyPostboxViewDataItem {
+ func extract(view: PostboxView) -> Result
+}
+
+extension PostboxViewDataItem {
+ func _extract(view: PostboxView) -> Any {
+ return self.extract(view: view)
+ }
+}
+
+public extension TelegramEngine {
+ final class EngineData {
+ public struct Item {
+ }
+
+ private let account: Account
+
+ init(account: Account) {
+ self.account = account
+ }
+
+ private func _subscribe(items: [AnyPostboxViewDataItem]) -> Signal<[Any], NoError> {
+ return self.account.postbox.combinedView(keys: items.map(\.key))
+ |> map { views -> [Any] in
+ var results: [Any] = []
+
+ for item in items {
+ guard let view = views.views[item.key] else {
+ preconditionFailure()
+ }
+ results.append(item._extract(view: view))
+ }
+
+ return results
+ }
+ }
+
+ public func subscribe(_ t0: T0) -> Signal {
+ return self._subscribe(items: [t0 as! AnyPostboxViewDataItem])
+ |> map { results -> T0.Result in
+ return results[0] as! T0.Result
+ }
+ }
+ public func get(_ t0: T0) -> Signal {
+ return self.subscribe(t0)
+ |> take(1)
+ }
+
+ public func subscribe<
+ T0: TelegramEngineDataItem,
+ T1: TelegramEngineDataItem
+ >(
+ _ t0: T0,
+ _ t1: T1
+ ) -> Signal<
+ (
+ T0.Result,
+ T1.Result
+ ),
+ NoError> {
+ return self._subscribe(items: [t0 as! AnyPostboxViewDataItem])
+ |> map { results -> (T0.Result, T1.Result) in
+ return (
+ results[0] as! T0.Result,
+ results[1] as! T1.Result
+ )
+ }
+ }
+ public func get<
+ T0: TelegramEngineDataItem,
+ T1: TelegramEngineDataItem
+ >(
+ _ t0: T0,
+ _ t1: T1
+ ) -> Signal<
+ (
+ T0.Result,
+ T1.Result
+ ),
+ NoError> {
+ return self.subscribe(t0, t1) |> take(1)
+ }
+ }
+}
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/HistoryImport/TelegramEngineHistoryImport.swift b/submodules/TelegramCore/Sources/TelegramEngine/HistoryImport/TelegramEngineHistoryImport.swift
index 309c0673a0..681f0dd9f7 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/HistoryImport/TelegramEngineHistoryImport.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/HistoryImport/TelegramEngineHistoryImport.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramApi
public extension TelegramEngine {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Localization/Countries.swift b/submodules/TelegramCore/Sources/TelegramEngine/Localization/Countries.swift
index 42fd67735d..75bb8fa88b 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Localization/Countries.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Localization/Countries.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
public struct Country: PostboxCoding, Equatable {
public static func == (lhs: Country, rhs: Country) -> Bool {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationInfo.swift b/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationInfo.swift
index 893d4de9a1..cc0332797b 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationInfo.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationInfo.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension LocalizationInfo {
init(apiLanguage: Api.LangPackLanguage) {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationListState.swift b/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationListState.swift
index 090e40a0cb..56e224b0c7 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationListState.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationListState.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
public func removeSavedLocalization(transaction: Transaction, languageCode: String) {
updateLocalizationListStateInteractively(transaction: transaction, { state in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationPreview.swift b/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationPreview.swift
index b6aa82f737..dda7ad4730 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationPreview.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Localization/LocalizationPreview.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import MtProtoKit
import TelegramApi
-import SyncCore
public enum RequestLocalizationPreviewError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Localization/Localizations.swift b/submodules/TelegramCore/Sources/TelegramEngine/Localization/Localizations.swift
index fa98c35845..606a10cb3a 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Localization/Localizations.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Localization/Localizations.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func _internal_currentlySuggestedLocalization(network: Network, extractKeys: [String]) -> Signal {
return network.request(Api.functions.help.getConfig())
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Localization/SuggestedLocalizationEntry.swift b/submodules/TelegramCore/Sources/TelegramEngine/Localization/SuggestedLocalizationEntry.swift
index f5e225ab4c..df6d536cd4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Localization/SuggestedLocalizationEntry.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Localization/SuggestedLocalizationEntry.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_markSuggestedLocalizationAsSeenInteractively(postbox: Postbox, languageCode: String) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Localization/TelegramEngineLocalization.swift b/submodules/TelegramCore/Sources/TelegramEngine/Localization/TelegramEngineLocalization.swift
index 699ffb7b3f..21355fc0a5 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Localization/TelegramEngineLocalization.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Localization/TelegramEngineLocalization.swift
@@ -1,6 +1,5 @@
import SwiftSignalKit
import Postbox
-import SyncCore
public extension TelegramEngine {
final class Localization {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ApplyMaxReadIndexInteractively.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ApplyMaxReadIndexInteractively.swift
index ea804adba5..e7b41aedc2 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ApplyMaxReadIndexInteractively.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ApplyMaxReadIndexInteractively.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func _internal_applyMaxReadIndexInteractively(postbox: Postbox, stateManager: AccountStateManager, index: MessageIndex) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ClearCloudDrafts.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ClearCloudDrafts.swift
index 4f1942760b..0205e1f3cb 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ClearCloudDrafts.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ClearCloudDrafts.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
func _internal_clearCloudDraftsInteractively(postbox: Postbox, network: Network, accountPeerId: PeerId) -> Signal {
return network.request(Api.functions.messages.getAllDrafts())
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessages.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessages.swift
index fc69b68f80..b7416b81bd 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessages.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessages.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
func addMessageMediaResourceIdsToRemove(media: Media, resourceIds: inout [WrappedMediaResourceId]) {
if let image = media as? TelegramMediaImage {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessagesInteractively.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessagesInteractively.swift
index 4dd24abec2..0cf5dbbdef 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessagesInteractively.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/DeleteMessagesInteractively.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_deleteMessagesInteractively(account: Account, messageIds: [MessageId], type: InteractiveMessagesDeletionType, deleteAllInGroup: Bool = false) -> Signal {
return account.postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/EarliestUnseenPersonalMentionMessage.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/EarliestUnseenPersonalMentionMessage.swift
index d3aa62b2bf..0e18f38102 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/EarliestUnseenPersonalMentionMessage.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/EarliestUnseenPersonalMentionMessage.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public enum EarliestUnseenPersonalMentionMessageResult: Equatable {
case loading
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/InstallInteractiveReadMessagesAction.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/InstallInteractiveReadMessagesAction.swift
index 4b853a0b0f..fbbcf8d8bc 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/InstallInteractiveReadMessagesAction.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/InstallInteractiveReadMessagesAction.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func _internal_installInteractiveReadMessagesAction(postbox: Postbox, stateManager: AccountStateManager, peerId: PeerId) -> Disposable {
return postbox.installStoreMessageAction(peerId: peerId, { messages, transaction in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/LoadMessagesIfNecessary.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/LoadMessagesIfNecessary.swift
index f2e4bd052f..daff840c21 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/LoadMessagesIfNecessary.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/LoadMessagesIfNecessary.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum GetMessagesStrategy {
case local
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkAllChatsAsRead.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkAllChatsAsRead.swift
index 69dbd159a7..144eebbf6f 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkAllChatsAsRead.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkAllChatsAsRead.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
func _internal_markAllChatsAsRead(postbox: Postbox, network: Network, stateManager: AccountStateManager) -> Signal {
return network.request(Api.functions.messages.getDialogUnreadMarks())
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkMessageContentAsConsumedInteractively.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkMessageContentAsConsumedInteractively.swift
index 7a39d5bb17..ab79a3687c 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkMessageContentAsConsumedInteractively.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/MarkMessageContentAsConsumedInteractively.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func _internal_markMessageContentAsConsumedInteractively(postbox: Postbox, messageId: MessageId) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/Media.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/Media.swift
new file mode 100644
index 0000000000..9b3a40c891
--- /dev/null
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/Media.swift
@@ -0,0 +1,5 @@
+import Postbox
+
+public enum EngineMedia {
+ public typealias Id = MediaId
+}
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/Message.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/Message.swift
new file mode 100644
index 0000000000..736f36eb27
--- /dev/null
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/Message.swift
@@ -0,0 +1,83 @@
+import Postbox
+
+public final class EngineMessage {
+ public typealias Id = MessageId
+ public typealias Index = MessageIndex
+
+ private let impl: Message
+
+ public var stableId: UInt32 {
+ return self.impl.stableId
+ }
+
+ public var stableVersion: UInt32 {
+ return self.impl.stableVersion
+ }
+
+ public var id: Id {
+ return self.impl.id
+ }
+ public var globallyUniqueId: Int64? {
+ return self.impl.globallyUniqueId
+ }
+ public var groupingKey: Int64? {
+ return self.impl.groupingKey
+ }
+ public var groupInfo: MessageGroupInfo? {
+ return self.impl.groupInfo
+ }
+ public var threadId: Int64? {
+ return self.impl.threadId
+ }
+ public var timestamp: Int32 {
+ return self.impl.timestamp
+ }
+ public var flags: MessageFlags {
+ return self.impl.flags
+ }
+ public var tags: MessageTags {
+ return self.impl.tags
+ }
+ public var globalTags: GlobalMessageTags {
+ return self.impl.globalTags
+ }
+ public var localTags: LocalMessageTags {
+ return self.impl.localTags
+ }
+ public var forwardInfo: MessageForwardInfo? {
+ return self.impl.forwardInfo
+ }
+ public var author: EnginePeer? {
+ return self.impl.author.flatMap(EnginePeer.init)
+ }
+ public var text: String {
+ return self.impl.text
+ }
+ public var attributes: [MessageAttribute] {
+ return self.impl.attributes
+ }
+ public var media: [Media] {
+ return self.impl.media
+ }
+ public var peers: SimpleDictionary {
+ return self.impl.peers
+ }
+ public var associatedMessages: SimpleDictionary {
+ return self.impl.associatedMessages
+ }
+ public var associatedMessageIds: [MessageId] {
+ return self.impl.associatedMessageIds
+ }
+
+ public var index: MessageIndex {
+ return self.impl.index
+ }
+
+ public init(_ impl: Message) {
+ self.impl = impl
+ }
+
+ public func _asMessage() -> Message {
+ return self.impl
+ }
+}
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/OutgoingMessageWithChatContextResult.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/OutgoingMessageWithChatContextResult.swift
index 51b5b930f5..983c0ecc2e 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/OutgoingMessageWithChatContextResult.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/OutgoingMessageWithChatContextResult.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_enqueueOutgoingMessageWithChatContextResult(account: Account, to peerId: PeerId, results: ChatContextResultCollection, result: ChatContextResult, replyToMessageId: MessageId?, hideVia: Bool, silentPosting: Bool, scheduleTime: Int32?, correlationId: Int64?) -> Bool {
guard let message = outgoingMessageWithChatContextResult(to: peerId, results: results, result: result, replyToMessageId: replyToMessageId, hideVia: hideVia, silentPosting: silentPosting, scheduleTime: scheduleTime, correlationId: correlationId) else {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/PeerLiveLocationsContext.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/PeerLiveLocationsContext.swift
index 04be82ce54..782815e3b9 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/PeerLiveLocationsContext.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/PeerLiveLocationsContext.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
func _internal_topPeerActiveLiveLocationMessages(viewTracker: AccountViewTracker, accountPeerId: PeerId, peerId: PeerId) -> Signal<(Peer?, [Message]), NoError> {
return viewTracker.aroundMessageHistoryViewForLocation(.peer(peerId), index: .upperBound, anchorIndex: .upperBound, count: 50, fixedCombinedReadStates: nil, tagMask: .liveLocation, orderStatistics: [], additionalData: [.peer(accountPeerId)])
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/Polls.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/Polls.swift
index 6aefb2b7eb..d73686707a 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/Polls.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/Polls.swift
@@ -4,7 +4,6 @@ import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public enum RequestMessageSelectPollOptionError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RecentlyUsedHashtags.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RecentlyUsedHashtags.swift
index 9c313facbe..4588580322 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RecentlyUsedHashtags.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RecentlyUsedHashtags.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private struct RecentHashtagItemId {
public let rawValue: MemoryBuffer
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift
index 38df1cb764..3010d19a6d 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ReplyThreadHistory.swift
@@ -1,5 +1,4 @@
import Foundation
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramApi
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestChatContextResults.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestChatContextResults.swift
index 39f0488710..477ccd8f14 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestChatContextResults.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestChatContextResults.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum RequestChatContextResultsError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestMessageActionCallback.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestMessageActionCallback.swift
index 6bfa85422f..560a108e75 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestMessageActionCallback.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestMessageActionCallback.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum MessageActionCallbackResult {
case none
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestStartBot.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestStartBot.swift
index 9b46a05b71..82f3cf7ae4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestStartBot.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/RequestStartBot.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_requestStartBot(account: Account, botPeerId: PeerId, payload: String?) -> Signal {
if let payload = payload, !payload.isEmpty {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ScheduledMessages.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ScheduledMessages.swift
index 65d6906e20..a8de35803b 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/ScheduledMessages.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/ScheduledMessages.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
func _internal_sendScheduledMessageNowInteractively(postbox: Postbox, messageId: MessageId) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift
index 0d70dc6986..282b3f5686 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum SearchMessagesLocation: Equatable {
case general(tags: MessageTags?, minDate: Int32?, maxDate: Int32?)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/TelegramEngineMessages.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/TelegramEngineMessages.swift
index 6dc415b280..db4844b206 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/TelegramEngineMessages.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/TelegramEngineMessages.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
public extension TelegramEngine {
final class Messages {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/UpdatePinnedMessage.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/UpdatePinnedMessage.swift
index f7a140da28..621263a476 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/UpdatePinnedMessage.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/UpdatePinnedMessage.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum UpdatePinnedMessageError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Payments/BankCards.swift b/submodules/TelegramCore/Sources/TelegramEngine/Payments/BankCards.swift
index f756b95b71..7490c0b206 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Payments/BankCards.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Payments/BankCards.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramApi
-import SyncCore
import MtProtoKit
import SwiftSignalKit
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift b/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift
index b5a7c60e04..8b297fa09a 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift
@@ -4,7 +4,6 @@ import MtProtoKit
import SwiftSignalKit
import TelegramApi
-import SyncCore
public struct BotPaymentInvoiceFields: OptionSet {
public var rawValue: Int32
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddPeerMember.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddPeerMember.swift
index fffb6cc578..826f15047d 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddPeerMember.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddPeerMember.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum AddGroupMemberError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddressNames.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddressNames.swift
index 017cd4ba21..49bcd36685 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddressNames.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/AddressNames.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum AddressNameFormatError {
case startsWithUnderscore
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChangePeerNotificationSettings.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChangePeerNotificationSettings.swift
index 1836f8e221..ba97962fa9 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChangePeerNotificationSettings.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChangePeerNotificationSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_togglePeerMuted(account: Account, peerId: PeerId) -> Signal {
return account.postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelAdminEventLogs.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelAdminEventLogs.swift
index 180244ebb2..157cc15404 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelAdminEventLogs.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelAdminEventLogs.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public typealias AdminLogEventId = Int64
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelBlacklist.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelBlacklist.swift
index 91bd5c9ef3..53699b8859 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelBlacklist.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelBlacklist.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_updateChannelMemberBannedRights(account: Account, peerId: PeerId, memberId: PeerId, rights: TelegramChatBannedRights?) -> Signal<(ChannelParticipant?, RenderedChannelParticipant?, Bool), NoError> {
return _internal_fetchChannelParticipant(account: account, peerId: peerId, participantId: memberId)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelCreation.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelCreation.swift
index afb9dfcbe6..dc42fe8395 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelCreation.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelCreation.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
import TelegramApi
import MtProtoKit
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelHistoryAvailabilitySettings.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelHistoryAvailabilitySettings.swift
index dd66a2d550..f13af30a93 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelHistoryAvailabilitySettings.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelHistoryAvailabilitySettings.swift
@@ -2,7 +2,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public enum ChannelHistoryAvailabilityError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelMembers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelMembers.swift
index bcfee6c545..6e9b01691c 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelMembers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelMembers.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum ChannelMembersCategoryFilter {
case all
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelOwnershipTransfer.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelOwnershipTransfer.swift
index 8d57c103a8..9df47f95f4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelOwnershipTransfer.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelOwnershipTransfer.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
-import SyncCore
public enum ChannelOwnershipTransferError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelParticipants.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelParticipants.swift
index 6f975acb71..aa845ecc20 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelParticipants.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChannelParticipants.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public struct RenderedChannelParticipant: Equatable {
public let participant: ChannelParticipant
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChatListFiltering.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChatListFiltering.swift
index d94bb2b995..c8b90b2bff 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChatListFiltering.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ChatListFiltering.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
public struct ChatListFilteringConfiguration: Equatable {
public let isEnabled: Bool
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/CheckPeerChatServiceActions.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/CheckPeerChatServiceActions.swift
index 01b5acd4ce..6ff4992ef2 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/CheckPeerChatServiceActions.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/CheckPeerChatServiceActions.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_checkPeerChatServiceActions(postbox: Postbox, peerId: PeerId) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/InvitationLinks.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/InvitationLinks.swift
index 840afb6ce2..8c0b1d6403 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/InvitationLinks.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/InvitationLinks.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_revokePersistentPeerExportedInvitation(account: Account, peerId: PeerId) -> Signal {
return account.postbox.transaction { transaction -> Signal in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinChannel.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinChannel.swift
index 88d2950e9f..e4d435493b 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinChannel.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinChannel.swift
@@ -4,7 +4,6 @@ import TelegramApi
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public enum JoinChannelError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinLink.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinLink.swift
index fccad10f9c..deb87d78ed 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinLink.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/JoinLink.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum JoinLinkError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ManageChannelDiscussionGroup.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ManageChannelDiscussionGroup.swift
index db0cd8f7d0..f905aae793 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ManageChannelDiscussionGroup.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ManageChannelDiscussionGroup.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
-import SyncCore
public enum AvailableChannelDiscussionGroupError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/NotificationExceptionsList.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/NotificationExceptionsList.swift
index 1c43e7a60f..7d261fe6a6 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/NotificationExceptionsList.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/NotificationExceptionsList.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
-import SyncCore
public final class NotificationExceptionsList: Equatable {
public let peers: [PeerId: Peer]
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/Peer.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/Peer.swift
new file mode 100644
index 0000000000..359e5c1c64
--- /dev/null
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/Peer.swift
@@ -0,0 +1,83 @@
+import Postbox
+
+public enum EnginePeer: Equatable {
+ public typealias Id = PeerId
+
+ case user(TelegramUser)
+ case legacyGroup(TelegramGroup)
+ case channel(TelegramChannel)
+ case secretChat(TelegramSecretChat)
+
+ public static func ==(lhs: EnginePeer, rhs: EnginePeer) -> Bool {
+ switch lhs {
+ case let .user(user):
+ if case .user(user) = rhs {
+ return true
+ } else {
+ return false
+ }
+ case let .legacyGroup(legacyGroup):
+ if case .legacyGroup(legacyGroup) = rhs {
+ return true
+ } else {
+ return false
+ }
+ case let .channel(channel):
+ if case .channel(channel) = rhs {
+ return true
+ } else {
+ return false
+ }
+ case let .secretChat(secretChat):
+ if case .secretChat(secretChat) = rhs {
+ return true
+ } else {
+ return false
+ }
+ }
+ }
+}
+
+public extension EnginePeer {
+ var id: Id {
+ return self._asPeer().id
+ }
+
+ var addressName: String? {
+ return self._asPeer().addressName
+ }
+
+ var indexName: PeerIndexNameRepresentation {
+ return self._asPeer().indexName
+ }
+}
+
+public extension EnginePeer {
+ init(_ peer: Peer) {
+ switch peer {
+ case let user as TelegramUser:
+ self = .user(user)
+ case let group as TelegramGroup:
+ self = .legacyGroup(group)
+ case let channel as TelegramChannel:
+ self = .channel(channel)
+ case let secretChat as TelegramSecretChat:
+ self = .secretChat(secretChat)
+ default:
+ preconditionFailure("Unknown peer type")
+ }
+ }
+
+ func _asPeer() -> Peer {
+ switch self {
+ case let .user(user):
+ return user
+ case let .legacyGroup(legacyGroup):
+ return legacyGroup
+ case let .channel(channel):
+ return channel
+ case let .secretChat(secretChat):
+ return secretChat
+ }
+ }
+}
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerAdmins.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerAdmins.swift
index 9a8eea7fdf..6896019984 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerAdmins.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerAdmins.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum RemoveGroupAdminError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerCommands.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerCommands.swift
index f4be8281bd..3471b95118 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerCommands.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerCommands.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
public struct PeerCommand: Hashable {
public let peer: Peer
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerPhotoUpdater.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerPhotoUpdater.swift
index 8a2a04e011..f4abfe1612 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerPhotoUpdater.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerPhotoUpdater.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import MtProtoKit
import TelegramApi
-import SyncCore
public enum UpdatePeerPhotoStatus {
case progress(Float)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerSpecificStickerPack.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerSpecificStickerPack.swift
index c50de3ef03..3110230154 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerSpecificStickerPack.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/PeerSpecificStickerPack.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private struct WrappedStickerPackCollectionInfo: Equatable {
let info: StickerPackCollectionInfo?
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentPeers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentPeers.swift
index 11926c1364..64021a5452 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentPeers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentPeers.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public enum RecentPeers {
case peers([Peer])
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentlySearchedPeerIds.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentlySearchedPeerIds.swift
index f54fc35884..21dcd8b3f5 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentlySearchedPeerIds.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RecentlySearchedPeerIds.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_addRecentlySearchedPeer(postbox: Postbox, peerId: PeerId) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerChat.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerChat.swift
index 3858dcf79e..71e835ee0e 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerChat.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerChat.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_removePeerChat(account: Account, peerId: PeerId, reportChatSpam: Bool, deleteGloballyIfPossible: Bool = false) -> Signal {
return account.postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerMember.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerMember.swift
index c8cf17ba4b..d6aaf0c030 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerMember.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RemovePeerMember.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_removePeerMember(account: Account, peerId: PeerId, memberId: PeerId) -> Signal {
if peerId.namespace == Namespaces.Peer.CloudChannel {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ReportPeer.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ReportPeer.swift
index f37a6edf10..98ca1a7867 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ReportPeer.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ReportPeer.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_reportPeer(account: Account, peerId: PeerId) -> Signal {
return account.postbox.transaction { transaction -> Signal in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RequestUserPhotos.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RequestUserPhotos.swift
index a108b0b35c..0463c673b2 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/RequestUserPhotos.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/RequestUserPhotos.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public struct TelegramPeerPhoto {
public let image: TelegramMediaImage
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ResolvePeerByName.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ResolvePeerByName.swift
index 1b0c01f0b4..22a4261fd5 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ResolvePeerByName.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ResolvePeerByName.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
private let resolvedByNamePeersCollectionSpec = ItemCacheCollectionSpec(lowWaterItemCount: 150, highWaterItemCount: 200)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchGroupMembers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchGroupMembers.swift
index 1a2f83e841..5fbef54318 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchGroupMembers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchGroupMembers.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private struct PeerParticipants: Equatable {
let peers: [Peer]
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchPeers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchPeers.swift
index 0cd869c7d2..d01b5d46fc 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchPeers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SearchPeers.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public struct FoundPeer: Equatable {
public let peer: Peer
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SlowMode.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SlowMode.swift
index a2f3ee94f0..af0ae77d12 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SlowMode.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SlowMode.swift
@@ -2,7 +2,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public enum UpdateChannelSlowModeError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SupportPeerId.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SupportPeerId.swift
index afa575bc0e..7553f724bf 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/SupportPeerId.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/SupportPeerId.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_supportPeerId(account: Account) -> Signal {
return account.network.request(Api.functions.help.getSupport())
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/TelegramEnginePeers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/TelegramEnginePeers.swift
index 00f3ddddb6..e5f28b8c34 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/TelegramEnginePeers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/TelegramEnginePeers.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
public enum AddressNameValidationStatus: Equatable {
case checking
@@ -64,8 +63,16 @@ public extension TelegramEngine {
return _internal_inactiveChannelList(network: self.account.network)
}
- public func resolvePeerByName(name: String, ageLimit: Int32 = 2 * 60 * 60 * 24) -> Signal {
+ public func resolvePeerByName(name: String, ageLimit: Int32 = 2 * 60 * 60 * 24) -> Signal {
return _internal_resolvePeerByName(account: self.account, name: name, ageLimit: ageLimit)
+ |> mapToSignal { peerId -> Signal in
+ guard let peerId = peerId else {
+ return .single(nil)
+ }
+ return self.account.postbox.transaction { transaction -> EnginePeer? in
+ return transaction.getPeer(peerId).flatMap(EnginePeer.init)
+ }
+ }
}
public func searchPeers(query: String) -> Signal<([FoundPeer], [FoundPeer]), NoError> {
@@ -321,8 +328,13 @@ public extension TelegramEngine {
return _internal_addRecentlyUsedInlineBot(postbox: self.account.postbox, peerId: peerId)
}
- public func recentlyUsedInlineBots() -> Signal<[(Peer, Double)], NoError> {
+ public func recentlyUsedInlineBots() -> Signal<[(EnginePeer, Double)], NoError> {
return _internal_recentlyUsedInlineBots(postbox: self.account.postbox)
+ |> map { list -> [(EnginePeer, Double)] in
+ return list.map { peer, rating in
+ return (EnginePeer(peer), rating)
+ }
+ }
}
public func removeRecentlyUsedInlineBot(peerId: PeerId) -> Signal {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ToggleChannelSignatures.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ToggleChannelSignatures.swift
index 27dc326ffc..7d2d0a535b 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/ToggleChannelSignatures.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/ToggleChannelSignatures.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
func _internal_toggleShouldChannelMessagesSignatures(account:Account, peerId:PeerId, enabled: Bool) -> Signal {
return account.postbox.transaction { transaction -> Signal in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/TogglePeerChatPinned.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/TogglePeerChatPinned.swift
index a49b9b445d..b9fb6232b4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/TogglePeerChatPinned.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/TogglePeerChatPinned.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
public enum TogglePeerChatPinnedLocation {
case group(PeerGroupId)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateCachedPeerData.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateCachedPeerData.swift
index a4e378fbb8..bc33b30f13 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateCachedPeerData.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateCachedPeerData.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func fetchAndUpdateSupplementalCachedPeerData(peerId rawPeerId: PeerId, network: Network, postbox: Postbox) -> Signal {
return postbox.combinedView(keys: [.basicPeer(rawPeerId)])
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateGroupSpecificStickerset.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateGroupSpecificStickerset.swift
index 22f063f1d4..b2cb591709 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateGroupSpecificStickerset.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateGroupSpecificStickerset.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public enum UpdateGroupSpecificStickersetError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdatePeerInfo.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdatePeerInfo.swift
index 6eaba7a6ae..305660764e 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdatePeerInfo.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdatePeerInfo.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public enum UpdatePeerTitleError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/PeersNearby/PeersNearby.swift b/submodules/TelegramCore/Sources/TelegramEngine/PeersNearby/PeersNearby.swift
index e7c766a80b..66468e0e3d 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/PeersNearby/PeersNearby.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/PeersNearby/PeersNearby.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
-import SyncCore
private typealias SignalKitTimer = SwiftSignalKit.Timer
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeers.swift
index bd5794c41c..3569596ec9 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeers.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public func requestBlockedPeers(account: Account) -> Signal<[Peer], NoError> {
return account.network.request(Api.functions.contacts.getBlocked(offset: 0, limit: 100))
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeersContext.swift b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeersContext.swift
index fae1f08062..0c8254b358 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeersContext.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/BlockedPeersContext.swift
@@ -3,7 +3,6 @@ import TelegramApi
import Postbox
import SwiftSignalKit
import MtProtoKit
-import SyncCore
public struct BlockedPeersContextState: Equatable {
public var isLoadingMore: Bool
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/RecentWebSessions.swift b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/RecentWebSessions.swift
index d36c953a57..09056fb00c 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/RecentWebSessions.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/RecentWebSessions.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public struct WebAuthorization : Equatable {
public let hash: Int64
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/UpdatedAccountPrivacySettings.swift b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/UpdatedAccountPrivacySettings.swift
index b0e7daf71a..847cccced8 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Privacy/UpdatedAccountPrivacySettings.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Privacy/UpdatedAccountPrivacySettings.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
func _internal_requestAccountPrivacySettings(account: Account) -> Signal {
let lastSeenPrivacy = account.network.request(Api.functions.account.getPrivacy(key: .inputPrivacyKeyStatusTimestamp))
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Resolve/DeepLinkInfo.swift b/submodules/TelegramCore/Sources/TelegramEngine/Resolve/DeepLinkInfo.swift
index c517df7d6c..6d0f3788bc 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Resolve/DeepLinkInfo.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Resolve/DeepLinkInfo.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import TelegramApi
-import SyncCore
public struct DeepLinkInfo {
public let message: String
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Resources/CollectCacheUsageStats.swift b/submodules/TelegramCore/Sources/TelegramEngine/Resources/CollectCacheUsageStats.swift
index f668e7e65f..59affac0a4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Resources/CollectCacheUsageStats.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Resources/CollectCacheUsageStats.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
public enum PeerCacheUsageCategory: Int32 {
case image = 0
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/GrantSecureIdAccess.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/GrantSecureIdAccess.swift
index c191a5b09b..77b586b24d 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/GrantSecureIdAccess.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/GrantSecureIdAccess.swift
@@ -4,7 +4,6 @@ import MtProtoKit
import SwiftSignalKit
import TelegramApi
-import SyncCore
func apiSecureValueType(value: SecureIdValue) -> Api.SecureValueType {
let type: Api.SecureValueType
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/RequestSecureIdForm.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/RequestSecureIdForm.swift
index e7d82f7a20..03d4e2a505 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/RequestSecureIdForm.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/RequestSecureIdForm.swift
@@ -4,7 +4,6 @@ import MtProtoKit
import SwiftSignalKit
import TelegramApi
-import SyncCore
public enum RequestSecureIdFormError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SaveSecureIdValue.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SaveSecureIdValue.swift
index 1523513f4c..f581816a7f 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SaveSecureIdValue.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SaveSecureIdValue.swift
@@ -4,7 +4,6 @@ import MtProtoKit
import SwiftSignalKit
import TelegramApi
-import SyncCore
public enum SaveSecureIdValueError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureFileMediaResource.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureFileMediaResource.swift
index 1fdf6b63fa..c5640b3365 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureFileMediaResource.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureFileMediaResource.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension SecureFileMediaResource: TelegramCloudMediaResource, TelegramMultipartFetchableResource, EncryptedMediaResource {
func apiInputLocation(fileReference: Data?) -> Api.InputFileLocation? {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdBankStatementValue.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdBankStatementValue.swift
index ffde28e0b2..f0fd226a4d 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdBankStatementValue.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdBankStatementValue.swift
@@ -1,5 +1,4 @@
import Foundation
-import SyncCore
public struct SecureIdBankStatementValue: Equatable {
public var verificationDocuments: [SecureIdVerificationDocumentReference]
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdConfiguration.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdConfiguration.swift
index 2aa9cc2e98..4ddc2382d5 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdConfiguration.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdConfiguration.swift
@@ -4,7 +4,6 @@ import MtProtoKit
import SwiftSignalKit
import TelegramApi
-import SyncCore
public func secureIdConfiguration(postbox: Postbox, network: Network) -> Signal {
let cached: Signal = postbox.transaction { transaction -> CachedSecureIdConfiguration? in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdDataTypes.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdDataTypes.swift
index adfca5c8ed..9f165c723d 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdDataTypes.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdDataTypes.swift
@@ -1,7 +1,6 @@
import Foundation
import TelegramApi
-import SyncCore
public struct SecureIdPersonName: Equatable {
public let firstName: String
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdVerificationDocumentReference.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdVerificationDocumentReference.swift
index 35319bd472..0e46208fdd 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdVerificationDocumentReference.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/SecureIdVerificationDocumentReference.swift
@@ -1,5 +1,4 @@
import Foundation
-import SyncCore
public enum SecureIdVerificationDocumentReference: Equatable {
case remote(SecureIdFileReference)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/VerifySecureIdValue.swift b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/VerifySecureIdValue.swift
index 18c3305cca..4921d35659 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/SecureId/VerifySecureIdValue.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/SecureId/VerifySecureIdValue.swift
@@ -4,7 +4,6 @@ import MtProtoKit
import SwiftSignalKit
import TelegramApi
-import SyncCore
public enum SecureIdPreparePhoneVerificationError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ArchivedStickerPacks.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ArchivedStickerPacks.swift
index dac1149970..bbd76d3042 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ArchivedStickerPacks.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ArchivedStickerPacks.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public enum ArchivedStickerPacksNamespace: Int32 {
case stickers = 0
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/CachedStickerPack.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/CachedStickerPack.swift
index f9b31ebe8a..5d1d34233c 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/CachedStickerPack.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/CachedStickerPack.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import MurMurHash32
-import SyncCore
private let collectionSpec = ItemCacheCollectionSpec(lowWaterItemCount: 100, highWaterItemCount: 200)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/EmojiKeywords.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/EmojiKeywords.swift
index 7dd137a10f..a893ae59aa 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/EmojiKeywords.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/EmojiKeywords.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
private let refreshTimeout: Int32 = 60 * 60
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ImportStickers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ImportStickers.swift
index 78423d64e7..8b50cb3cd7 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ImportStickers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/ImportStickers.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
public enum UploadStickerStatus {
case progress(Float)
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/LoadedStickerPack.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/LoadedStickerPack.swift
index f3349c812e..81d1a3b615 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/LoadedStickerPack.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/LoadedStickerPack.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
extension StickerPackReference {
init(_ stickerPackInfo: StickerPackCollectionInfo) {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/SearchStickers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/SearchStickers.swift
index 0f1464fbf8..0eed25d054 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/SearchStickers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/SearchStickers.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
private struct SearchStickersConfiguration {
static var defaultValue: SearchStickersConfiguration {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPack.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPack.swift
index 61e247260f..8cb28a3141 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPack.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPack.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
import MtProtoKit
func telegramStickerPackThumbnailRepresentationFromApiSizes(datacenterId: Int32, thumbVersion: Int32?, sizes: [Api.PhotoSize]) -> (immediateThumbnail: Data?, representations: [TelegramMediaImageRepresentation]) {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPackInteractiveOperations.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPackInteractiveOperations.swift
index 6ac55d9bed..b1e1143232 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPackInteractiveOperations.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerPackInteractiveOperations.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
func _internal_addStickerPackInteractively(postbox: Postbox, info: StickerPackCollectionInfo, items: [ItemCollectionItem], positionInList: Int? = nil) -> Signal {
return postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerSetInstallation.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerSetInstallation.swift
index 18318676ee..d7c71c93d4 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerSetInstallation.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/StickerSetInstallation.swift
@@ -3,7 +3,6 @@ import Postbox
import TelegramApi
import SwiftSignalKit
-import SyncCore
public enum RequestStickerSetError {
case generic
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/TelegramEngineStickers.swift b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/TelegramEngineStickers.swift
index 56cd62570d..c123d7319b 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/Stickers/TelegramEngineStickers.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/Stickers/TelegramEngineStickers.swift
@@ -1,5 +1,4 @@
import SwiftSignalKit
-import SyncCore
import Postbox
public extension TelegramEngine {
diff --git a/submodules/TelegramCore/Sources/TelegramEngine/TelegramEngine.swift b/submodules/TelegramCore/Sources/TelegramEngine/TelegramEngine.swift
index d4902923e1..4175d9e427 100644
--- a/submodules/TelegramCore/Sources/TelegramEngine/TelegramEngine.swift
+++ b/submodules/TelegramCore/Sources/TelegramEngine/TelegramEngine.swift
@@ -67,6 +67,10 @@ public final class TelegramEngine {
public lazy var resolve: Resolve = {
return Resolve(account: self.account)
}()
+
+ public lazy var data: EngineData = {
+ return EngineData(account: self.account)
+ }()
}
public final class TelegramEngineUnauthorized {
diff --git a/submodules/TelegramCore/Sources/Themes.swift b/submodules/TelegramCore/Sources/Themes.swift
index b6af8018a9..07cceeb731 100644
--- a/submodules/TelegramCore/Sources/Themes.swift
+++ b/submodules/TelegramCore/Sources/Themes.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
#if os(macOS)
let telegramThemeFormat = "macos"
diff --git a/submodules/TelegramCore/Sources/UpdatePeerChatInterfaceState.swift b/submodules/TelegramCore/Sources/UpdatePeerChatInterfaceState.swift
index e2b7d820ac..9a1429d590 100644
--- a/submodules/TelegramCore/Sources/UpdatePeerChatInterfaceState.swift
+++ b/submodules/TelegramCore/Sources/UpdatePeerChatInterfaceState.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
public func updatePeerChatInterfaceState(account: Account, peerId: PeerId, threadId: Int64?, state: SynchronizeableChatInterfaceState) -> Signal {
return account.postbox.transaction { transaction -> Void in
diff --git a/submodules/TelegramCore/Sources/UpdatePeers.swift b/submodules/TelegramCore/Sources/UpdatePeers.swift
index 6d07288965..b221cfe80d 100644
--- a/submodules/TelegramCore/Sources/UpdatePeers.swift
+++ b/submodules/TelegramCore/Sources/UpdatePeers.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func updatePeerChatInclusionWithMinTimestamp(transaction: Transaction, id: PeerId, minTimestamp: Int32, forceRootGroupIfNotExists: Bool) {
let currentInclusion = transaction.getPeerChatListInclusion(id)
diff --git a/submodules/TelegramCore/Sources/Utils/CanSendMessagesToPeer.swift b/submodules/TelegramCore/Sources/Utils/CanSendMessagesToPeer.swift
index ed83582a3d..ce09be6037 100644
--- a/submodules/TelegramCore/Sources/Utils/CanSendMessagesToPeer.swift
+++ b/submodules/TelegramCore/Sources/Utils/CanSendMessagesToPeer.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
// Incuding at least one Objective-C class in a swift file ensures that it doesn't get stripped by the linker
private final class LinkHelperClass: NSObject {
diff --git a/submodules/TelegramCore/Sources/Utils/ImageRepresentationsUtils.swift b/submodules/TelegramCore/Sources/Utils/ImageRepresentationsUtils.swift
index 2c92d63720..da457a4f47 100644
--- a/submodules/TelegramCore/Sources/Utils/ImageRepresentationsUtils.swift
+++ b/submodules/TelegramCore/Sources/Utils/ImageRepresentationsUtils.swift
@@ -1,7 +1,6 @@
import Postbox
import TelegramApi
import MtProtoKit
-import SyncCore
public func smallestImageRepresentation(_ representations: [TelegramMediaImageRepresentation]) -> TelegramMediaImageRepresentation? {
if representations.count == 0 {
diff --git a/submodules/TelegramCore/Sources/Utils/JSON.swift b/submodules/TelegramCore/Sources/Utils/JSON.swift
index 43dd62bebd..49dbf2801d 100644
--- a/submodules/TelegramCore/Sources/Utils/JSON.swift
+++ b/submodules/TelegramCore/Sources/Utils/JSON.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
extension JSON {
private init?(_ object: Any) {
diff --git a/submodules/TelegramCore/Sources/Utils/MessageUtils.swift b/submodules/TelegramCore/Sources/Utils/MessageUtils.swift
index 4ac9fb61f0..d0ce58753c 100644
--- a/submodules/TelegramCore/Sources/Utils/MessageUtils.swift
+++ b/submodules/TelegramCore/Sources/Utils/MessageUtils.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
public extension MessageFlags {
var isSending: Bool {
diff --git a/submodules/TelegramCore/Sources/Utils/PeerUtils.swift b/submodules/TelegramCore/Sources/Utils/PeerUtils.swift
index c39e549776..99f70eea33 100644
--- a/submodules/TelegramCore/Sources/Utils/PeerUtils.swift
+++ b/submodules/TelegramCore/Sources/Utils/PeerUtils.swift
@@ -1,6 +1,5 @@
import Foundation
import Postbox
-import SyncCore
public extension Peer {
var debugDisplayTitle: String {
diff --git a/submodules/TelegramCore/Sources/Utils/StringFormat.swift b/submodules/TelegramCore/Sources/Utils/StringFormat.swift
index 9d92b02743..fecc4ab449 100644
--- a/submodules/TelegramCore/Sources/Utils/StringFormat.swift
+++ b/submodules/TelegramCore/Sources/Utils/StringFormat.swift
@@ -1,52 +1 @@
import Foundation
-
-// Incuding at least one Objective-C class in a swift file ensures that it doesn't get stripped by the linker
-private final class LinkHelperClass: NSObject {
-}
-
-public func dataSizeString(_ size: Int, forceDecimal: Bool = false, formatting: DataSizeStringFormatting) -> String {
- return dataSizeString(Int64(size), forceDecimal: forceDecimal, formatting: formatting)
-}
-
-public struct DataSizeStringFormatting {
- let decimalSeparator: String
- let byte: (String) -> (String, [(Int, NSRange)])
- let kilobyte: (String) -> (String, [(Int, NSRange)])
- let megabyte: (String) -> (String, [(Int, NSRange)])
- let gigabyte: (String) -> (String, [(Int, NSRange)])
-
- public init(decimalSeparator: String, byte: @escaping (String) -> (String, [(Int, NSRange)]), kilobyte: @escaping (String) -> (String, [(Int, NSRange)]), megabyte: @escaping (String) -> (String, [(Int, NSRange)]), gigabyte: @escaping (String) -> (String, [(Int, NSRange)])) {
- self.decimalSeparator = decimalSeparator
- self.byte = byte
- self.kilobyte = kilobyte
- self.megabyte = megabyte
- self.gigabyte = gigabyte
- }
-}
-
-public func dataSizeString(_ size: Int64, forceDecimal: Bool = false, formatting: DataSizeStringFormatting) -> String {
- if size >= 1024 * 1024 * 1024 {
- let remainder = Int64((Double(size % (1024 * 1024 * 1024)) / (1024 * 1024 * 102.4)).rounded(.down))
- if remainder != 0 || forceDecimal {
- return formatting.gigabyte("\(size / (1024 * 1024 * 1024))\(formatting.decimalSeparator)\(remainder)").0
- } else {
- return formatting.gigabyte("\(size / (1024 * 1024 * 1024))").0
- }
- } else if size >= 1024 * 1024 {
- let remainder = Int64((Double(size % (1024 * 1024)) / (1024.0 * 102.4)).rounded(.down))
- if remainder != 0 || forceDecimal {
- return formatting.megabyte( "\(size / (1024 * 1024))\(formatting.decimalSeparator)\(remainder)").0
- } else {
- return formatting.megabyte("\(size / (1024 * 1024))").0
- }
- } else if size >= 1024 {
- let remainder = (size % (1024)) / (102)
- if remainder != 0 || forceDecimal {
- return formatting.kilobyte("\(size / 1024)\(formatting.decimalSeparator)\(remainder)").0
- } else {
- return formatting.kilobyte("\(size / 1024)").0
- }
- } else {
- return formatting.byte("\(size)").0
- }
-}
diff --git a/submodules/TelegramCore/Sources/Utils/UpdateMessageMedia.swift b/submodules/TelegramCore/Sources/Utils/UpdateMessageMedia.swift
index 9b00c40d5f..a5d8c84011 100644
--- a/submodules/TelegramCore/Sources/Utils/UpdateMessageMedia.swift
+++ b/submodules/TelegramCore/Sources/Utils/UpdateMessageMedia.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
-import SyncCore
func updateMessageMedia(transaction: Transaction, id: MediaId, media: Media?) {
let updatedMessageIndices = transaction.updateMedia(id, update: media)
diff --git a/submodules/TelegramCore/Sources/Wallpapers.swift b/submodules/TelegramCore/Sources/Wallpapers.swift
index 59b32a0346..eab0ab7c11 100644
--- a/submodules/TelegramCore/Sources/Wallpapers.swift
+++ b/submodules/TelegramCore/Sources/Wallpapers.swift
@@ -3,7 +3,6 @@ import Postbox
import SwiftSignalKit
import TelegramApi
-import SyncCore
public func telegramWallpapers(postbox: Postbox, network: Network, forceUpdate: Bool = false) -> Signal<[TelegramWallpaper], NoError> {
let fetch: ([TelegramWallpaper]?, Int32?) -> Signal<[TelegramWallpaper], NoError> = { current, hash in
diff --git a/submodules/TelegramCore/Sources/WebpagePreview.swift b/submodules/TelegramCore/Sources/WebpagePreview.swift
index 5c9085b550..c7bd6363dd 100644
--- a/submodules/TelegramCore/Sources/WebpagePreview.swift
+++ b/submodules/TelegramCore/Sources/WebpagePreview.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import TelegramApi
import MtProtoKit
-import SyncCore
public func webpagePreview(account: Account, url: String, webpageId: MediaId? = nil) -> Signal {
return webpagePreviewWithProgress(account: account, url: url)
diff --git a/submodules/TelegramIntents/BUILD b/submodules/TelegramIntents/BUILD
index 66569b5f55..68285800aa 100644
--- a/submodules/TelegramIntents/BUILD
+++ b/submodules/TelegramIntents/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/TelegramIntents/Sources/TelegramIntents.swift b/submodules/TelegramIntents/Sources/TelegramIntents.swift
index 52075889b6..dcf9261f8a 100644
--- a/submodules/TelegramIntents/Sources/TelegramIntents.swift
+++ b/submodules/TelegramIntents/Sources/TelegramIntents.swift
@@ -4,7 +4,6 @@ import Intents
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramUIPreferences
import TelegramPresentationData
diff --git a/submodules/TelegramPermissions/BUILD b/submodules/TelegramPermissions/BUILD
index 6232c96dcb..8225a6d321 100644
--- a/submodules/TelegramPermissions/BUILD
+++ b/submodules/TelegramPermissions/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/AccountContext:AccountContext",
"//submodules/DeviceAccess:DeviceAccess",
diff --git a/submodules/TelegramPermissions/Sources/Permission.swift b/submodules/TelegramPermissions/Sources/Permission.swift
index 78d90058cd..dc7a30d5cc 100644
--- a/submodules/TelegramPermissions/Sources/Permission.swift
+++ b/submodules/TelegramPermissions/Sources/Permission.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import DeviceAccess
import AccountContext
diff --git a/submodules/TelegramPermissionsUI/BUILD b/submodules/TelegramPermissionsUI/BUILD
index 45eeaa6d39..acbc6e3dd5 100644
--- a/submodules/TelegramPermissionsUI/BUILD
+++ b/submodules/TelegramPermissionsUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/TextFormat:TextFormat",
diff --git a/submodules/TelegramPermissionsUI/Sources/PermissionController.swift b/submodules/TelegramPermissionsUI/Sources/PermissionController.swift
index 4bd56eb471..dc2040b2a5 100644
--- a/submodules/TelegramPermissionsUI/Sources/PermissionController.swift
+++ b/submodules/TelegramPermissionsUI/Sources/PermissionController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import DeviceAccess
import AccountContext
diff --git a/submodules/TelegramPermissionsUI/Sources/PermissionControllerNode.swift b/submodules/TelegramPermissionsUI/Sources/PermissionControllerNode.swift
index feaf44cde7..d84a4e2e60 100644
--- a/submodules/TelegramPermissionsUI/Sources/PermissionControllerNode.swift
+++ b/submodules/TelegramPermissionsUI/Sources/PermissionControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import TelegramPermissions
diff --git a/submodules/TelegramPermissionsUI/Sources/PermissionSplitTest.swift b/submodules/TelegramPermissionsUI/Sources/PermissionSplitTest.swift
index c10048d219..19cb69e699 100644
--- a/submodules/TelegramPermissionsUI/Sources/PermissionSplitTest.swift
+++ b/submodules/TelegramPermissionsUI/Sources/PermissionSplitTest.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPermissions
extension PermissionKind {
diff --git a/submodules/TelegramPresentationData/BUILD b/submodules/TelegramPresentationData/BUILD
index 424efdb88a..9a8b2f60a5 100644
--- a/submodules/TelegramPresentationData/BUILD
+++ b/submodules/TelegramPresentationData/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/Display:Display",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
@@ -18,6 +17,7 @@ swift_library(
"//submodules/StringPluralization:StringPluralization",
"//submodules/Sunrise:Sunrise",
"//submodules/TinyThumbnail:TinyThumbnail",
+ "//Telegram:PresentationStrings",
],
visibility = [
"//visibility:public",
diff --git a/submodules/TelegramPresentationData/Sources/ChatControllerBackgroundNode.swift b/submodules/TelegramPresentationData/Sources/ChatControllerBackgroundNode.swift
index 04a846ed1e..5dd0703bd0 100644
--- a/submodules/TelegramPresentationData/Sources/ChatControllerBackgroundNode.swift
+++ b/submodules/TelegramPresentationData/Sources/ChatControllerBackgroundNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Display
import SwiftSignalKit
import Postbox
diff --git a/submodules/TelegramPresentationData/Sources/ChatMessageBubbleImages.swift b/submodules/TelegramPresentationData/Sources/ChatMessageBubbleImages.swift
index 4b3ad3a60e..a59ae2b960 100644
--- a/submodules/TelegramPresentationData/Sources/ChatMessageBubbleImages.swift
+++ b/submodules/TelegramPresentationData/Sources/ChatMessageBubbleImages.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
public enum MessageBubbleImageNeighbors {
case none
diff --git a/submodules/TelegramPresentationData/Sources/ChatPresentationData.swift b/submodules/TelegramPresentationData/Sources/ChatPresentationData.swift
index 4ed273afbf..1fbb5bc4bd 100644
--- a/submodules/TelegramPresentationData/Sources/ChatPresentationData.swift
+++ b/submodules/TelegramPresentationData/Sources/ChatPresentationData.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramPresentationData/Sources/ComponentsThemes.swift b/submodules/TelegramPresentationData/Sources/ComponentsThemes.swift
index 0168febaff..96c0501443 100644
--- a/submodules/TelegramPresentationData/Sources/ComponentsThemes.swift
+++ b/submodules/TelegramPresentationData/Sources/ComponentsThemes.swift
@@ -2,6 +2,7 @@ import Foundation
import UIKit
import Display
import TelegramUIPreferences
+import PresentationStrings
public extension PresentationFontSize {
init(systemFontSize: CGFloat) {
diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift
index 7580569fdc..00da547761 100644
--- a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift
+++ b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
public let defaultDarkPresentationTheme = makeDefaultDarkPresentationTheme(preview: false)
diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift
index 1d1ebd05a6..7ded181b4b 100644
--- a/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift
+++ b/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import Postbox
diff --git a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift
index c46547f639..0a261f4621 100644
--- a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift
+++ b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import Postbox
import SwiftSignalKit
diff --git a/submodules/TelegramPresentationData/Sources/DefaultPresentationStrings.swift b/submodules/TelegramPresentationData/Sources/DefaultPresentationStrings.swift
index 2503c64bae..22191fc8e1 100644
--- a/submodules/TelegramPresentationData/Sources/DefaultPresentationStrings.swift
+++ b/submodules/TelegramPresentationData/Sources/DefaultPresentationStrings.swift
@@ -1,4 +1,97 @@
import Foundation
import AppBundle
+import PresentationStrings
-public let defaultPresentationStrings = PresentationStrings(primaryComponent: PresentationStringsComponent(languageCode: "en", localizedName: "English", pluralizationRulesCode: nil, dict: NSDictionary(contentsOf: URL(fileURLWithPath: getAppBundle().path(forResource: "Localizable", ofType: "strings", inDirectory: nil, forLocalization: "en")!)) as! [String : String]), secondaryComponent: nil, groupingSeparator: "")
+public typealias PresentationStrings = _PresentationStrings
+
+public extension PresentationStrings {
+ typealias FormattedString = _FormattedString
+ typealias Component = _PresentationStringsComponent
+}
+
+public extension _FormattedString {
+ typealias Range = _FormattedStringRange
+
+ var _tuple: (String, [(Int, NSRange)]) {
+ return (self.string, self.ranges.map { item -> (Int, NSRange) in
+ return (item.index, item.range)
+ })
+ }
+}
+
+public func formatWithArgumentRanges(_ value: String, _ ranges: [(Int, NSRange)], _ arguments: [String]) -> (String, [(Int, NSRange)]) {
+ let string = value as NSString
+
+ var resultingRanges: [(Int, NSRange)] = []
+
+ var currentLocation = 0
+
+ let result = NSMutableString()
+ for (index, range) in ranges {
+ if currentLocation < range.location {
+ result.append(string.substring(with: NSRange(location: currentLocation, length: range.location - currentLocation)))
+ }
+ resultingRanges.append((index, NSRange(location: result.length, length: (arguments[index] as NSString).length)))
+ result.append(arguments[index])
+ currentLocation = range.location + range.length
+ }
+ if currentLocation != string.length {
+ result.append(string.substring(with: NSRange(location: currentLocation, length: string.length - currentLocation)))
+ }
+ return (result as String, resultingRanges)
+}
+
+public let defaultPresentationStrings = PresentationStrings(primaryComponent: PresentationStrings.Component(languageCode: "en", localizedName: "English", pluralizationRulesCode: nil, dict: NSDictionary(contentsOf: URL(fileURLWithPath: getAppBundle().path(forResource: "Localizable", ofType: "strings", inDirectory: nil, forLocalization: "en")!)) as! [String : String]), secondaryComponent: nil, groupingSeparator: "")
+
+public func dataSizeString(_ size: Int, forceDecimal: Bool = false, formatting: DataSizeStringFormatting) -> String {
+ return dataSizeString(Int64(size), forceDecimal: forceDecimal, formatting: formatting)
+}
+
+public struct DataSizeStringFormatting {
+ let decimalSeparator: String
+ let byte: (String) -> PresentationStrings.FormattedString
+ let kilobyte: (String) -> PresentationStrings.FormattedString
+ let megabyte: (String) -> PresentationStrings.FormattedString
+ let gigabyte: (String) -> PresentationStrings.FormattedString
+
+ public init(
+ decimalSeparator: String,
+ byte: @escaping (String) -> PresentationStrings.FormattedString,
+ kilobyte: @escaping (String) -> PresentationStrings.FormattedString,
+ megabyte: @escaping (String) -> PresentationStrings.FormattedString,
+ gigabyte: @escaping (String) -> PresentationStrings.FormattedString
+ ) {
+ self.decimalSeparator = decimalSeparator
+ self.byte = byte
+ self.kilobyte = kilobyte
+ self.megabyte = megabyte
+ self.gigabyte = gigabyte
+ }
+}
+
+public func dataSizeString(_ size: Int64, forceDecimal: Bool = false, formatting: DataSizeStringFormatting) -> String {
+ if size >= 1024 * 1024 * 1024 {
+ let remainder = Int64((Double(size % (1024 * 1024 * 1024)) / (1024 * 1024 * 102.4)).rounded(.down))
+ if remainder != 0 || forceDecimal {
+ return formatting.gigabyte("\(size / (1024 * 1024 * 1024))\(formatting.decimalSeparator)\(remainder)").string
+ } else {
+ return formatting.gigabyte("\(size / (1024 * 1024 * 1024))").string
+ }
+ } else if size >= 1024 * 1024 {
+ let remainder = Int64((Double(size % (1024 * 1024)) / (1024.0 * 102.4)).rounded(.down))
+ if remainder != 0 || forceDecimal {
+ return formatting.megabyte( "\(size / (1024 * 1024))\(formatting.decimalSeparator)\(remainder)").string
+ } else {
+ return formatting.megabyte("\(size / (1024 * 1024))").string
+ }
+ } else if size >= 1024 {
+ let remainder = (size % (1024)) / (102)
+ if remainder != 0 || forceDecimal {
+ return formatting.kilobyte("\(size / 1024)\(formatting.decimalSeparator)\(remainder)").string
+ } else {
+ return formatting.kilobyte("\(size / 1024)").string
+ }
+ } else {
+ return formatting.byte("\(size)").string
+ }
+}
diff --git a/submodules/TelegramPresentationData/Sources/MakePresentationTheme.swift b/submodules/TelegramPresentationData/Sources/MakePresentationTheme.swift
index 7d505441a3..db916a3486 100644
--- a/submodules/TelegramPresentationData/Sources/MakePresentationTheme.swift
+++ b/submodules/TelegramPresentationData/Sources/MakePresentationTheme.swift
@@ -1,8 +1,8 @@
import Foundation
import UIKit
import Postbox
-import SyncCore
import TelegramUIPreferences
+import TelegramCore
public func makeDefaultPresentationTheme(reference: PresentationBuiltinThemeReference, extendingThemeReference: PresentationThemeReference? = nil, serviceBackgroundColor: UIColor?, preview: Bool = false) -> PresentationTheme {
let theme: PresentationTheme
diff --git a/submodules/TelegramPresentationData/Sources/NumericFormat.swift b/submodules/TelegramPresentationData/Sources/NumericFormat.swift
index 0b67ddc0db..fefc92766a 100644
--- a/submodules/TelegramPresentationData/Sources/NumericFormat.swift
+++ b/submodules/TelegramPresentationData/Sources/NumericFormat.swift
@@ -1,4 +1,5 @@
import Foundation
+import PresentationStrings
public func compactNumericCountString(_ count: Int, decimalSeparator: String = ".") -> String {
if count >= 1000 * 1000 {
diff --git a/submodules/TelegramPresentationData/Sources/PresentationData.swift b/submodules/TelegramPresentationData/Sources/PresentationData.swift
index 9a007fe03d..61c25cc6c9 100644
--- a/submodules/TelegramPresentationData/Sources/PresentationData.swift
+++ b/submodules/TelegramPresentationData/Sources/PresentationData.swift
@@ -3,13 +3,13 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Contacts
import AddressBook
import Display
import TelegramUIPreferences
import AppBundle
import Sunrise
+import PresentationStrings
public struct PresentationDateTimeFormat: Equatable {
public let timeFormat: PresentationTimeFormat
@@ -300,7 +300,7 @@ public func currentPresentationDataAndSettings(accountManager: AccountManager, s
let dateTimeFormat = currentDateTimeFormat()
let stringsValue: PresentationStrings
if let localizationSettings = localizationSettings {
- stringsValue = PresentationStrings(primaryComponent: PresentationStringsComponent(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStringsComponent(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }), groupingSeparator: dateTimeFormat.groupingSeparator)
+ stringsValue = PresentationStrings(primaryComponent: PresentationStrings.Component(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStrings.Component(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }), groupingSeparator: dateTimeFormat.groupingSeparator)
} else {
stringsValue = defaultPresentationStrings
}
@@ -644,7 +644,7 @@ public func updatedPresentationData(accountManager: AccountManager, applicationI
let dateTimeFormat = currentDateTimeFormat()
let stringsValue: PresentationStrings
if let localizationSettings = localizationSettings {
- stringsValue = PresentationStrings(primaryComponent: PresentationStringsComponent(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStringsComponent(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }), groupingSeparator: dateTimeFormat.groupingSeparator)
+ stringsValue = PresentationStrings(primaryComponent: PresentationStrings.Component(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStrings.Component(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }), groupingSeparator: dateTimeFormat.groupingSeparator)
} else {
stringsValue = defaultPresentationStrings
}
diff --git a/submodules/TelegramPresentationData/Sources/PresentationStrings.swift b/submodules/TelegramPresentationData/Sources/PresentationStrings.swift
deleted file mode 100644
index e136a2154f..0000000000
--- a/submodules/TelegramPresentationData/Sources/PresentationStrings.swift
+++ /dev/null
@@ -1,6610 +0,0 @@
-import Foundation
-import AppBundle
-import StringPluralization
-
-private let fallbackDict: [String: String] = {
- guard let mainPath = getAppBundle().path(forResource: "en", ofType: "lproj"), let bundle = Bundle(path: mainPath) else {
- return [:]
- }
- guard let path = bundle.path(forResource: "Localizable", ofType: "strings") else {
- return [:]
- }
- guard let dict = NSDictionary(contentsOf: URL(fileURLWithPath: path)) as? [String: String] else {
- return [:]
- }
- return dict
-}()
-
-private extension PluralizationForm {
- var canonicalSuffix: String {
- switch self {
- case .zero:
- return "_0"
- case .one:
- return "_1"
- case .two:
- return "_2"
- case .few:
- return "_3_10"
- case .many:
- return "_many"
- case .other:
- return "_any"
- }
- }
-}
-
-public final class PresentationStringsComponent {
- public let languageCode: String
- public let localizedName: String
- public let pluralizationRulesCode: String?
- public let dict: [String: String]
-
- public init(languageCode: String, localizedName: String, pluralizationRulesCode: String?, dict: [String: String]) {
- self.languageCode = languageCode
- self.localizedName = localizedName
- self.pluralizationRulesCode = pluralizationRulesCode
- self.dict = dict
- }
-}
-
-private func getValue(_ primaryComponent: PresentationStringsComponent, _ secondaryComponent: PresentationStringsComponent?, _ key: String) -> String {
- if let value = primaryComponent.dict[key] {
- return value
- } else if let secondaryComponent = secondaryComponent, let value = secondaryComponent.dict[key] {
- return value
- } else if let value = fallbackDict[key] {
- return value
- } else {
- return key
- }
-}
-
-private func getValueWithForm(_ primaryComponent: PresentationStringsComponent, _ secondaryComponent: PresentationStringsComponent?, _ key: String, _ form: PluralizationForm) -> String {
- let builtKey = key + form.canonicalSuffix
- if let value = primaryComponent.dict[builtKey] {
- return value
- } else if let secondaryComponent = secondaryComponent, let value = secondaryComponent.dict[builtKey] {
- return value
- } else if let value = fallbackDict[builtKey] {
- return value
- }
- return key
-}
-
-private let argumentRegex = try! NSRegularExpression(pattern: "%(((\\d+)\\$)?)([@df])", options: [])
-private func extractArgumentRanges(_ value: String) -> [(Int, NSRange)] {
- var result: [(Int, NSRange)] = []
- let string = value as NSString
- let matches = argumentRegex.matches(in: string as String, options: [], range: NSRange(location: 0, length: string.length))
- var index = 0
- for match in matches {
- var currentIndex = index
- if match.range(at: 3).location != NSNotFound {
- currentIndex = Int(string.substring(with: match.range(at: 3)))! - 1
- }
- result.append((currentIndex, match.range(at: 0)))
- index += 1
- }
- result.sort(by: { $0.1.location < $1.1.location })
- return result
-}
-
-public func formatWithArgumentRanges(_ value: String, _ ranges: [(Int, NSRange)], _ arguments: [String]) -> (String, [(Int, NSRange)]) {
- let string = value as NSString
-
- var resultingRanges: [(Int, NSRange)] = []
-
- var currentLocation = 0
-
- let result = NSMutableString()
- for (index, range) in ranges {
- if currentLocation < range.location {
- result.append(string.substring(with: NSRange(location: currentLocation, length: range.location - currentLocation)))
- }
- resultingRanges.append((index, NSRange(location: result.length, length: (arguments[index] as NSString).length)))
- result.append(arguments[index])
- currentLocation = range.location + range.length
- }
- if currentLocation != string.length {
- result.append(string.substring(with: NSRange(location: currentLocation, length: string.length - currentLocation)))
- }
- return (result as String, resultingRanges)
-}
-
-private final class DataReader {
- private let data: Data
- private var ptr: Int = 0
-
- init(_ data: Data) {
- self.data = data
- }
-
- func readInt32() -> Int32 {
- assert(self.ptr + 4 <= self.data.count)
- let result = self.data.withUnsafeBytes { (bytes: UnsafePointer) -> Int32 in
- var value: Int32 = 0
- memcpy(&value, bytes.advanced(by: self.ptr), 4)
- return value
- }
- self.ptr += 4
- return result
- }
-
- func readString() -> String {
- let length = Int(self.readInt32())
- assert(self.ptr + length <= self.data.count)
- let value = String(data: self.data.subdata(in: self.ptr ..< self.ptr + length), encoding: .utf8)!
- self.ptr += length
- return value
- }
-}
-
-private func loadMapping() -> ([Int], [String], [Int], [Int], [String]) {
- guard let filePath = getAppBundle().path(forResource: "PresentationStrings", ofType: "mapping") else {
- fatalError()
- }
- guard let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)) else {
- fatalError()
- }
-
- let reader = DataReader(data)
-
- let idCount = Int(reader.readInt32())
- var sIdList: [Int] = []
- var sKeyList: [String] = []
- var sArgIdList: [Int] = []
- for _ in 0 ..< idCount {
- let id = Int(reader.readInt32())
- sIdList.append(id)
- sKeyList.append(reader.readString())
- if reader.readInt32() != 0 {
- sArgIdList.append(id)
- }
- }
-
- let pCount = Int(reader.readInt32())
- var pIdList: [Int] = []
- var pKeyList: [String] = []
- for _ in 0 ..< Int(pCount) {
- pIdList.append(Int(reader.readInt32()))
- pKeyList.append(reader.readString())
- }
-
- return (sIdList, sKeyList, sArgIdList, pIdList, pKeyList)
-}
-
-private let keyMapping: ([Int], [String], [Int], [Int], [String]) = loadMapping()
-
-public final class PresentationStrings: Equatable {
- public let lc: UInt32
-
- public let primaryComponent: PresentationStringsComponent
- public let secondaryComponent: PresentationStringsComponent?
- public let baseLanguageCode: String
- public let groupingSeparator: String
-
- private let _s: [Int: String]
- private let _r: [Int: [(Int, NSRange)]]
- private let _ps: [Int: String]
- public var SocksProxySetup_Secret: String { return self._s[0]! }
- public var Channel_AdminLog_EmptyTitle: String { return self._s[2]! }
- public var Contacts_PermissionsText: String { return self._s[3]! }
- public var SettingsSearch_Synonyms_Notifications_MessageNotificationsSound: String { return self._s[4]! }
- public var Map_Work: String { return self._s[5]! }
- public var Channel_AddBotAsAdmin: String { return self._s[6]! }
- public var TwoFactorSetup_Done_Action: String { return self._s[7]! }
- public var Call_CallInProgressTitle: String { return self._s[8]! }
- public var Compose_NewChannel_Members: String { return self._s[9]! }
- public var FastTwoStepSetup_PasswordPlaceholder: String { return self._s[10]! }
- public func Channel_AdminLog_MessageInvitedName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[11]!, self._r[11]!, [_1])
- }
- public var VoiceChat_MutePeer: String { return self._s[14]! }
- public func Notification_MessageLifetimeRemoved(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[15]!, self._r[15]!, [_1])
- }
- public var Undo_DeletedGroup: String { return self._s[17]! }
- public var ChatListFolder_CategoryNonContacts: String { return self._s[18]! }
- public var Gif_NoGifsPlaceholder: String { return self._s[19]! }
- public var Conversation_ShareInlineBotLocationConfirmation: String { return self._s[20]! }
- public func VoiceChat_StatusLateBy(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[21]!, self._r[21]!, [_0])
- }
- public var AutoNightTheme_ScheduleSection: String { return self._s[22]! }
- public var Map_LiveLocationTitle: String { return self._s[23]! }
- public var Passport_PasswordCreate: String { return self._s[24]! }
- public var Settings_ProxyConnected: String { return self._s[25]! }
- public func PUSH_PINNED_TEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[26]!, self._r[26]!, [_1, _2])
- }
- public var Channel_Management_LabelOwner: String { return self._s[27]! }
- public var ApplyLanguage_ApplySuccess: String { return self._s[28]! }
- public var Group_Setup_HistoryHidden: String { return self._s[29]! }
- public var ImportStickerPack_ChooseLinkDescription: String { return self._s[30]! }
- public var Month_ShortNovember: String { return self._s[31]! }
- public var ImportStickerPack_CheckingLink: String { return self._s[32]! }
- public var Call_ReportIncludeLog: String { return self._s[33]! }
- public var ChatList_RemoveFolder: String { return self._s[34]! }
- public var PrivacyPhoneNumberSettings_CustomHelp: String { return self._s[35]! }
- public var Appearance_ThemePreview_ChatList_5_Text: String { return self._s[36]! }
- public var Checkout_Receipt_Title: String { return self._s[37]! }
- public func Conversation_ClearChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[38]!, self._r[38]!, [_0])
- }
- public var AuthSessions_LogOutApplicationsHelp: String { return self._s[39]! }
- public var SearchImages_Title: String { return self._s[40]! }
- public var Notification_PaymentSent: String { return self._s[41]! }
- public var Appearance_TintAllColors: String { return self._s[42]! }
- public var Group_Setup_TypePublicHelp: String { return self._s[43]! }
- public var ChatSettings_Cache: String { return self._s[44]! }
- public var InviteLink_RevokedLinks: String { return self._s[45]! }
- public var Login_InvalidLastNameError: String { return self._s[46]! }
- public var PeerInfo_PaneMedia: String { return self._s[47]! }
- public var InviteLink_Revoked: String { return self._s[48]! }
- public var StickerPacks_ActionShare: String { return self._s[49]! }
- public var GroupPermission_PermissionGloballyDisabled: String { return self._s[50]! }
- public var LiveLocationUpdated_JustNow: String { return self._s[51]! }
- public func Map_LiveLocationPrivateDescription(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[52]!, self._r[52]!, [_0])
- }
- public var Channel_Info_Members: String { return self._s[53]! }
- public func Channel_CommentsGroup_HeaderSet(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[54]!, self._r[54]!, [_0])
- }
- public var Common_edit: String { return self._s[55]! }
- public var ChatList_DeleteSavedMessagesConfirmationText: String { return self._s[57]! }
- public var OldChannels_GroupEmptyFormat: String { return self._s[58]! }
- public func PUSH_PINNED_AUDIO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[59]!, self._r[59]!, [_1])
- }
- public var Passport_DiscardMessageAction: String { return self._s[60]! }
- public var VoiceChat_StopRecordingTitle: String { return self._s[61]! }
- public var Passport_FieldOneOf_FinalDelimeter: String { return self._s[62]! }
- public var Stickers_SuggestNone: String { return self._s[63]! }
- public func Channel_AdminLog_JoinedViaInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[64]!, self._r[64]!, [_1, _2])
- }
- public var Channel_AdminLog_CanPinMessages: String { return self._s[65]! }
- public var Stickers_Search: String { return self._s[67]! }
- public var Passport_Identity_EditPersonalDetails: String { return self._s[68]! }
- public var NotificationSettings_ShowNotificationsAllAccounts: String { return self._s[69]! }
- public var Login_ContinueWithLocalization: String { return self._s[70]! }
- public var Privacy_ProfilePhoto_NeverShareWith_Title: String { return self._s[71]! }
- public var TextFormat_Italic: String { return self._s[73]! }
- public var ChatList_Search_NoResultsFitlerLinks: String { return self._s[75]! }
- public var Stickers_GroupChooseStickerPack: String { return self._s[76]! }
- public var Notification_MessageLifetime1w: String { return self._s[77]! }
- public var Channel_Management_AddModerator: String { return self._s[78]! }
- public var Conversation_UnsupportedMediaPlaceholder: String { return self._s[79]! }
- public var Gif_Search: String { return self._s[80]! }
- public var Checkout_ErrorGeneric: String { return self._s[81]! }
- public var Conversation_ContextMenuSendMessage: String { return self._s[82]! }
- public var Map_SetThisLocation: String { return self._s[83]! }
- public var Notifications_ExceptionsDefaultSound: String { return self._s[84]! }
- public var PrivacySettings_AutoArchiveInfo: String { return self._s[85]! }
- public var Stats_NotificationsTitle: String { return self._s[86]! }
- public var Conversation_ClearSecretHistory: String { return self._s[88]! }
- public func Conversation_DeleteAllMessagesInChat(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[89]!, self._r[89]!, [_0])
- }
- public func Notification_CallFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[90]!, self._r[90]!, [_1, _2])
- }
- public var ChatListFolder_DiscardDiscard: String { return self._s[91]! }
- public var PrivacyLastSeenSettings_AlwaysShareWith: String { return self._s[92]! }
- public var Contacts_InviteFriends: String { return self._s[93]! }
- public var Group_LinkedChannel: String { return self._s[94]! }
- public var ChatList_DeleteForAllMembers: String { return self._s[95]! }
- public var Notification_PassportValuePhone: String { return self._s[97]! }
- public func InviteText_SingleContact(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[98]!, self._r[98]!, [_0])
- }
- public var UserInfo_BotHelp: String { return self._s[100]! }
- public var Passport_Identity_MainPage: String { return self._s[102]! }
- public var LogoutOptions_ContactSupportText: String { return self._s[103]! }
- public func VoiceOver_Chat_Title(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[104]!, self._r[104]!, [_0])
- }
- public var StickerPack_ShowStickers: String { return self._s[106]! }
- public var AttachmentMenu_PhotoOrVideo: String { return self._s[107]! }
- public var Map_Satellite: String { return self._s[108]! }
- public var Passport_Identity_MainPageHelp: String { return self._s[109]! }
- public var Profile_About: String { return self._s[111]! }
- public var Group_Setup_TypePrivate: String { return self._s[112]! }
- public func ScheduleVoiceChat_ChannelText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[113]!, self._r[113]!, [_0])
- }
- public var Notifications_ChannelNotifications: String { return self._s[114]! }
- public var Call_VoiceOver_VoiceCallIncoming: String { return self._s[115]! }
- public func Login_WillCallYou(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[116]!, self._r[116]!, [_0])
- }
- public var WallpaperPreview_Motion: String { return self._s[117]! }
- public var Message_VideoMessage: String { return self._s[118]! }
- public var SharedMedia_CategoryOther: String { return self._s[120]! }
- public var Passport_FieldIdentityUploadHelp: String { return self._s[121]! }
- public var PUSH_REMINDER_TITLE: String { return self._s[122]! }
- public var Appearance_ThemePreview_Chat_3_Text: String { return self._s[124]! }
- public var Login_ResetAccountProtected_Reset: String { return self._s[126]! }
- public var Passport_Identity_TypeInternalPassportUploadScan: String { return self._s[127]! }
- public func Location_ProximityNotification_Notify(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[128]!, self._r[128]!, [_0])
- }
- public var ChatList_PeerTypeContact: String { return self._s[129]! }
- public var Stickers_SuggestAll: String { return self._s[131]! }
- public var EmptyGroupInfo_Line3: String { return self._s[132]! }
- public var Login_InvalidPhoneError: String { return self._s[133]! }
- public var MediaPicker_GroupDescription: String { return self._s[134]! }
- public func UserInfo_LinkForwardTooltip_Chat_One(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[135]!, self._r[135]!, [_0])
- }
- public var NetworkUsageSettings_MediaDocumentDataSection: String { return self._s[136]! }
- public var Conversation_PrivateChannelTimeLimitedAlertText: String { return self._s[137]! }
- public var PrivateDataSettings_Title: String { return self._s[138]! }
- public var SecretChat_Title: String { return self._s[139]! }
- public var Privacy_ChatsTitle: String { return self._s[140]! }
- public var EditProfile_NameAndPhotoHelp: String { return self._s[141]! }
- public var Watch_MessageView_Forward: String { return self._s[143]! }
- public var ChannelMembers_WhoCanAddMembers_AllMembers: String { return self._s[144]! }
- public func PUSH_PINNED_QUIZ(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[145]!, self._r[145]!, [_1, _2])
- }
- public func Channel_AdminLog_EndedVoiceChat(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[146]!, self._r[146]!, [_1])
- }
- public var InviteLink_ExpiredLink: String { return self._s[147]! }
- public var PhotoEditor_DiscardChanges: String { return self._s[148]! }
- public var SocksProxySetup_AdNoticeHelp: String { return self._s[149]! }
- public var Date_DialogDateFormat: String { return self._s[150]! }
- public var SettingsSearch_Synonyms_Proxy_Title: String { return self._s[151]! }
- public var Notifications_AlertTones: String { return self._s[152]! }
- public var Permissions_SiriAllow_v0: String { return self._s[153]! }
- public var Tour_StartButton: String { return self._s[154]! }
- public var Stats_InstantViewInteractionsTitle: String { return self._s[155]! }
- public var UserInfo_ScamUserWarning: String { return self._s[158]! }
- public var NotificationsSound_Chime: String { return self._s[159]! }
- public var Update_Skip: String { return self._s[160]! }
- public func ChannelInfo_ChannelForbidden(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[161]!, self._r[161]!, [_0])
- }
- public var SettingsSearch_Synonyms_EditProfile_PhoneNumber: String { return self._s[162]! }
- public var Notifications_PermissionsTitle: String { return self._s[163]! }
- public var Channel_AdminLog_BanSendMedia: String { return self._s[164]! }
- public var Notifications_Badge_CountUnreadMessages: String { return self._s[165]! }
- public var Appearance_AppIcon: String { return self._s[166]! }
- public var Passport_Identity_FilesUploadNew: String { return self._s[167]! }
- public func Passport_Email_UseTelegramEmail(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[168]!, self._r[168]!, [_0])
- }
- public var CreatePoll_QuizTitle: String { return self._s[169]! }
- public var DialogList_DeleteConversationConfirmation: String { return self._s[170]! }
- public var NotificationsSound_Calypso: String { return self._s[171]! }
- public var ChannelMembers_GroupAdminsTitle: String { return self._s[173]! }
- public var Checkout_NewCard_PaymentCard: String { return self._s[174]! }
- public var Wallpaper_SetCustomBackground: String { return self._s[176]! }
- public var Conversation_ContextMenuOpenProfile: String { return self._s[177]! }
- public func PUSH_MESSAGE_VIDEO_SECRET(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[179]!, self._r[179]!, [_1])
- }
- public var AuthSessions_Terminate: String { return self._s[180]! }
- public var ShareFileTip_CloseTip: String { return self._s[181]! }
- public var ChatSettings_DownloadInBackgroundInfo: String { return self._s[182]! }
- public var Channel_Moderator_AccessLevelRevoke: String { return self._s[183]! }
- public var Channel_AdminLogFilter_EventsDeletedMessages: String { return self._s[184]! }
- public var Passport_Language_fr: String { return self._s[185]! }
- public func Watch_Time_ShortTodayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[187]!, self._r[187]!, [_0])
- }
- public var Passport_Identity_TypeIdentityCard: String { return self._s[188]! }
- public var VoiceChat_MuteForMe: String { return self._s[189]! }
- public func Conversation_OpenBotLinkAllowMessages(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[190]!, self._r[190]!, [_0])
- }
- public var ReportPeer_ReasonCopyright: String { return self._s[191]! }
- public var Permissions_PeopleNearbyText_v0: String { return self._s[193]! }
- public var Channel_Stickers_NotFoundHelp: String { return self._s[194]! }
- public var Passport_Identity_AddDriversLicense: String { return self._s[195]! }
- public var AutoDownloadSettings_AutodownloadFiles: String { return self._s[196]! }
- public var Permissions_SiriAllowInSettings_v0: String { return self._s[197]! }
- public func Conversation_ForwardTooltip_ManyChats_Many(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[198]!, self._r[198]!, [_0, _1])
- }
- public var ApplyLanguage_ChangeLanguageTitle: String { return self._s[199]! }
- public var Map_LocatingError: String { return self._s[201]! }
- public var ChatSettings_AutoDownloadSettings_TypePhoto: String { return self._s[202]! }
- public func VoiceOver_Chat_MusicFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[204]!, self._r[204]!, [_0])
- }
- public func Contacts_AccessDeniedHelpLandscape(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[205]!, self._r[205]!, [_0])
- }
- public var Channel_AdminLog_EmptyFilterText: String { return self._s[206]! }
- public var Login_SmsRequestState2: String { return self._s[207]! }
- public var Conversation_Unmute: String { return self._s[209]! }
- public var TwoFactorSetup_Intro_Text: String { return self._s[210]! }
- public var Channel_AdminLog_BanSendMessages: String { return self._s[211]! }
- public func Channel_Management_RemovedBy(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[212]!, self._r[212]!, [_0])
- }
- public var AccessDenied_LocationDenied: String { return self._s[213]! }
- public var Share_AuthTitle: String { return self._s[214]! }
- public var Month_ShortAugust: String { return self._s[215]! }
- public func Notification_PinnedDeletedMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[216]!, self._r[216]!, [_0])
- }
- public var Channel_BanUser_PermissionSendMedia: String { return self._s[217]! }
- public var SettingsSearch_Synonyms_Data_DownloadInBackground: String { return self._s[218]! }
- public func PUSH_CONTACT_JOINED(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[219]!, self._r[219]!, [_1])
- }
- public var WallpaperSearch_ColorTitle: String { return self._s[221]! }
- public var Wallpaper_Search: String { return self._s[222]! }
- public var ClearCache_StorageUsage: String { return self._s[223]! }
- public var CreatePoll_TextPlaceholder: String { return self._s[224]! }
- public var Conversation_EditingMessagePanelTitle: String { return self._s[225]! }
- public var Channel_EditAdmin_PermissionBanUsers: String { return self._s[226]! }
- public var OldChannels_NoticeCreateText: String { return self._s[227]! }
- public var ProfilePhoto_MainVideo: String { return self._s[228]! }
- public var VoiceChat_StatusListening: String { return self._s[229]! }
- public var InviteLink_DeleteLinkAlert_Text: String { return self._s[230]! }
- public var UserInfo_NotificationsDisabled: String { return self._s[231]! }
- public var Map_Unknown: String { return self._s[232]! }
- public var Notifications_MessageNotificationsAlert: String { return self._s[233]! }
- public var Conversation_StopQuiz: String { return self._s[234]! }
- public var Checkout_LiabilityAlertTitle: String { return self._s[235]! }
- public func Username_UsernameIsAvailable(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[236]!, self._r[236]!, [_0])
- }
- public var CreatePoll_OptionPlaceholder: String { return self._s[237]! }
- public var Conversation_RestrictedStickers: String { return self._s[238]! }
- public var MemberSearch_BotSection: String { return self._s[240]! }
- public var Channel_Management_AddModeratorHelp: String { return self._s[242]! }
- public var Widget_ShortcutsGalleryDescription: String { return self._s[243]! }
- public var MaskStickerSettings_Title: String { return self._s[244]! }
- public var ShareMenu_Comment: String { return self._s[245]! }
- public var GroupInfo_Notifications: String { return self._s[246]! }
- public var CheckoutInfo_ReceiverInfoTitle: String { return self._s[247]! }
- public func DialogList_EncryptedChatStartedOutgoing(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[248]!, self._r[248]!, [_0])
- }
- public var Conversation_ContextMenuCopyLink: String { return self._s[249]! }
- public var VoiceChat_MutedHelp: String { return self._s[252]! }
- public var ChatListFolder_CategoryMuted: String { return self._s[253]! }
- public var TwoStepAuth_AddHintDescription: String { return self._s[254]! }
- public func VoiceOver_Chat_Duration(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[255]!, self._r[255]!, [_0])
- }
- public var Conversation_ClousStorageInfo_Description3: String { return self._s[256]! }
- public var BroadcastGroups_LimitAlert_SettingsTip: String { return self._s[257]! }
- public var Contacts_SortByPresence: String { return self._s[258]! }
- public var Watch_Location_Access: String { return self._s[259]! }
- public var WallpaperPreview_CustomColorTopText: String { return self._s[260]! }
- public var Passport_Address_TypeBankStatement: String { return self._s[261]! }
- public var Group_Username_RevokeExistingUsernamesInfo: String { return self._s[262]! }
- public var Conversation_ClearPrivateHistory: String { return self._s[263]! }
- public var ChatList_Mute: String { return self._s[266]! }
- public var Channel_AdminLog_CanDeleteMessagesOfOthers: String { return self._s[267]! }
- public var Stats_PostsTitle: String { return self._s[268]! }
- public func Conversation_AutoremoveTimerSetGroup(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[269]!, self._r[269]!, [_1])
- }
- public var Paint_Masks: String { return self._s[271]! }
- public var PasscodeSettings_TryAgainIn1Minute: String { return self._s[274]! }
- public var Chat_AttachmentLimitReached: String { return self._s[275]! }
- public var StickerPackActionInfo_ArchivedTitle: String { return self._s[276]! }
- public var Watch_Stickers_StickerPacks: String { return self._s[278]! }
- public var Channel_Setup_Title: String { return self._s[279]! }
- public var GroupInfo_Administrators: String { return self._s[280]! }
- public var InviteLink_PublicLink: String { return self._s[281]! }
- public var InviteLink_DeleteLinkAlert_Action: String { return self._s[283]! }
- public var NotificationSettings_ShowNotificationsAllAccountsInfoOff: String { return self._s[284]! }
- public var Conversation_ContextMenuDiscuss: String { return self._s[285]! }
- public var StickerPack_BuiltinPackName: String { return self._s[286]! }
- public var Conversation_GreetingText: String { return self._s[288]! }
- public var TwoStepAuth_RecoveryEmailChangeDescription: String { return self._s[290]! }
- public var Checkout_ShippingMethod: String { return self._s[292]! }
- public var ClearCache_FreeSpace: String { return self._s[293]! }
- public var EditTheme_Expand_Preview_IncomingReplyText: String { return self._s[294]! }
- public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsSound: String { return self._s[297]! }
- public func TwoStepAuth_ConfirmEmailDescription(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[298]!, self._r[298]!, [_1])
- }
- public var Conversation_typing: String { return self._s[299]! }
- public func PrivacySettings_LastSeenContactsMinus(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[301]!, self._r[301]!, [_0])
- }
- public var WebSearch_RecentSectionTitle: String { return self._s[302]! }
- public var VoiceChat_EndConfirmationTitle: String { return self._s[303]! }
- public var VoiceChat_TapToAddPhoto: String { return self._s[304]! }
- public var ChatList_UnhideAction: String { return self._s[306]! }
- public var PasscodeSettings_6DigitCode: String { return self._s[307]! }
- public var CallFeedback_AddComment: String { return self._s[308]! }
- public var LoginPassword_PasswordHelp: String { return self._s[309]! }
- public var Call_Flip: String { return self._s[310]! }
- public var Weekday_ShortWednesday: String { return self._s[312]! }
- public var VoiceOver_Chat_PollFinalResults: String { return self._s[313]! }
- public var ScheduleVoiceChat_Title: String { return self._s[314]! }
- public var PeerInfo_ButtonAddMember: String { return self._s[315]! }
- public var ImportStickerPack_ChooseNameDescription: String { return self._s[316]! }
- public var Call_Decline: String { return self._s[318]! }
- public var VoiceChat_InviteMemberToGroupFirstAdd: String { return self._s[319]! }
- public var Join_ChannelsTooMuch: String { return self._s[321]! }
- public func PUSH_CHANNEL_MESSAGE_NOTEXT(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[322]!, self._r[322]!, [_1])
- }
- public var Passport_Identity_Selfie: String { return self._s[323]! }
- public var Privacy_ContactsTitle: String { return self._s[324]! }
- public var GroupInfo_InviteLink_Title: String { return self._s[326]! }
- public var TwoFactorSetup_Password_PlaceholderPassword: String { return self._s[327]! }
- public func Channel_AdminLog_UpdatedParticipantVolume(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[328]!, self._r[328]!, [_1, _2, _3])
- }
- public var TwoFactorSetup_PasswordRecovery_SkipAlertAction: String { return self._s[330]! }
- public var Conversation_OpenFile: String { return self._s[331]! }
- public var Map_SetThisPlace: String { return self._s[332]! }
- public var Channel_Info_Management: String { return self._s[333]! }
- public var Passport_Language_hr: String { return self._s[334]! }
- public var VoiceChat_Title: String { return self._s[335]! }
- public var EditTheme_Edit_Preview_IncomingText: String { return self._s[339]! }
- public var VoiceChat_EditBioSave: String { return self._s[340]! }
- public var OpenFile_Proceed: String { return self._s[341]! }
- public var Conversation_SecretChatContextBotAlert: String { return self._s[343]! }
- public var GroupInfo_Permissions_SlowmodeValue_Off: String { return self._s[344]! }
- public var Privacy_Calls_P2PContacts: String { return self._s[345]! }
- public var Appearance_PickAccentColor: String { return self._s[346]! }
- public var TwoFactorSetup_PasswordRecovery_Title: String { return self._s[347]! }
- public var MediaPicker_TapToUngroupDescription: String { return self._s[348]! }
- public var Localization_EnglishLanguageName: String { return self._s[349]! }
- public var Stickers_SuggestStickers: String { return self._s[350]! }
- public var Passport_Language_ko: String { return self._s[351]! }
- public var Settings_ProxyDisabled: String { return self._s[352]! }
- public var PrivacySettings_PasscodeOff: String { return self._s[353]! }
- public var Undo_LeftChannel: String { return self._s[354]! }
- public var Appearance_AutoNightThemeDisabled: String { return self._s[355]! }
- public var TextFormat_Bold: String { return self._s[356]! }
- public var Login_InfoTitle: String { return self._s[357]! }
- public var Channel_BanUser_PermissionSendPolls: String { return self._s[358]! }
- public var Settings_AddAnotherAccount: String { return self._s[359]! }
- public var GroupPermission_NewTitle: String { return self._s[360]! }
- public var Login_SelectCountry_Title: String { return self._s[361]! }
- public var Cache_ServiceFiles: String { return self._s[362]! }
- public func AutoremoveSetup_TimerValueAfter(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[363]!, self._r[363]!, [_0])
- }
- public var Passport_Language_nl: String { return self._s[364]! }
- public var Contacts_TopSection: String { return self._s[365]! }
- public var Passport_Identity_DateOfBirthPlaceholder: String { return self._s[366]! }
- public var VoiceChat_StatusInvited: String { return self._s[368]! }
- public var Conversation_ContextMenuReport: String { return self._s[369]! }
- public func Login_BannedPhoneBody(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[370]!, self._r[370]!, [_0])
- }
- public var Conversation_Search: String { return self._s[371]! }
- public var Group_Setup_HistoryVisibleHelp: String { return self._s[373]! }
- public var ReportPeer_AlertSuccess: String { return self._s[375]! }
- public var AutoNightTheme_Title: String { return self._s[377]! }
- public func Notification_PinnedTextMessage(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[379]!, self._r[379]!, [_0, _1])
- }
- public func Conversation_OpenBotLinkText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[380]!, self._r[380]!, [_0])
- }
- public var Conversation_ShareBotContactConfirmation: String { return self._s[381]! }
- public var TwoStepAuth_RecoveryCode: String { return self._s[382]! }
- public var GroupInfo_Permissions_BroadcastTitle: String { return self._s[383]! }
- public var SocksProxySetup_ConnectAndSave: String { return self._s[384]! }
- public func MESSAGE_INVOICE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[385]!, self._r[385]!, [_1, _2])
- }
- public func Channel_AdminLog_MessageChangedGroupUsername(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[386]!, self._r[386]!, [_0])
- }
- public func BroadcastGroups_LimitAlert_Text(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[387]!, self._r[387]!, [_0])
- }
- public var Replies_BlockAndDeleteRepliesActionTitle: String { return self._s[389]! }
- public func Notification_GroupInviter(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[390]!, self._r[390]!, [_0])
- }
- public var VoiceChat_CopyInviteLink: String { return self._s[391]! }
- public var Conversation_InfoGroup: String { return self._s[392]! }
- public func Map_AccurateTo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[394]!, self._r[394]!, [_0])
- }
- public var Conversation_ChatBackground: String { return self._s[395]! }
- public var PhotoEditor_Set: String { return self._s[396]! }
- public func Channel_Management_PromotedBy(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[398]!, self._r[398]!, [_0])
- }
- public var TwoStepAuth_CancelResetTitle: String { return self._s[399]! }
- public var IntentsSettings_SuggestedChatsContacts: String { return self._s[400]! }
- public var Passport_Phone_Title: String { return self._s[402]! }
- public var Conversation_EditingMessageMediaChange: String { return self._s[403]! }
- public var Channel_LinkItem: String { return self._s[404]! }
- public var VoiceChat_EndConfirmationText: String { return self._s[405]! }
- public func PUSH_CHAT_DELETE_MEMBER(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[406]!, self._r[406]!, [_1, _2, _3])
- }
- public var Conversation_DeleteManyMessages: String { return self._s[408]! }
- public var Notifications_Badge_IncludeMutedChats: String { return self._s[409]! }
- public var Channel_AddUserLeftError: String { return self._s[411]! }
- public var AuthSessions_AddedDeviceTitle: String { return self._s[413]! }
- public var Privacy_Calls_NeverAllow_Placeholder: String { return self._s[414]! }
- public var Settings_ProxyConnecting: String { return self._s[415]! }
- public var Theme_Colors_Accent: String { return self._s[417]! }
- public var Theme_Colors_ColorWallpaperWarning: String { return self._s[418]! }
- public func PUSH_PHONE_CALL_MISSED(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[420]!, self._r[420]!, [_1])
- }
- public var Passport_Language_lo: String { return self._s[421]! }
- public func Watch_Time_ShortWeekdayAt(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[423]!, self._r[423]!, [_1, _2])
- }
- public var Permissions_NotificationsText_v0: String { return self._s[424]! }
- public var BroadcastGroups_LimitAlert_Title: String { return self._s[425]! }
- public var Settings_CheckPasswordText: String { return self._s[426]! }
- public var ChatList_Context_RemoveFromRecents: String { return self._s[427]! }
- public var Watch_GroupInfo_Title: String { return self._s[428]! }
- public var Settings_AddDevice: String { return self._s[430]! }
- public var WallpaperPreview_SwipeColorsTopText: String { return self._s[431]! }
- public func PUSH_CHANNEL_ALBUM(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[432]!, self._r[432]!, [_1])
- }
- public var ImportStickerPack_Create: String { return self._s[433]! }
- public var Conversation_AutoremoveActionEdit: String { return self._s[434]! }
- public var TwoStepAuth_Disable: String { return self._s[436]! }
- public func Conversation_AddNameToContacts(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[437]!, self._r[437]!, [_0])
- }
- public func Time_PreciseDate_m10(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[438]!, self._r[438]!, [_1, _2, _3])
- }
- public func Login_WillSendSms(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[439]!, self._r[439]!, [_0])
- }
- public var Channel_AdminLog_BanReadMessages: String { return self._s[440]! }
- public var Undo_ChatDeleted: String { return self._s[441]! }
- public var ContactInfo_URLLabelHomepage: String { return self._s[442]! }
- public func PUSH_CHAT_MESSAGE_STICKER(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[443]!, self._r[443]!, [_1, _2, _3])
- }
- public var FastTwoStepSetup_EmailHelp: String { return self._s[444]! }
- public var Contacts_SelectAll: String { return self._s[445]! }
- public var Privacy_ContactsReset: String { return self._s[446]! }
- public var AttachmentMenu_File: String { return self._s[448]! }
- public var PasscodeSettings_EncryptData: String { return self._s[449]! }
- public var EditTheme_ThemeTemplateAlertText: String { return self._s[450]! }
- public func Privacy_GroupsAndChannels_InviteToChannelError(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[452]!, self._r[452]!, [_0, _1])
- }
- public func Profile_CreateEncryptedChatOutdatedError(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[453]!, self._r[453]!, [_0, _1])
- }
- public var PhotoEditor_ShadowsTint: String { return self._s[455]! }
- public var GroupInfo_ChatAdmins: String { return self._s[456]! }
- public var ArchivedChats_IntroTitle2: String { return self._s[457]! }
- public var Cache_LowDiskSpaceText: String { return self._s[458]! }
- public var CreatePoll_Anonymous: String { return self._s[459]! }
- public var Report_AdditionalDetailsText: String { return self._s[460]! }
- public var Checkout_PaymentMethod_New: String { return self._s[461]! }
- public var Invitation_JoinGroup: String { return self._s[462]! }
- public func Time_MonthOfYear_m4(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[465]!, self._r[465]!, [_0])
- }
- public var CheckoutInfo_SaveInfoHelp: String { return self._s[466]! }
- public var Notification_Reply: String { return self._s[468]! }
- public func Login_PhoneBannedEmailSubject(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[469]!, self._r[469]!, [_0])
- }
- public var Login_PhoneTitle: String { return self._s[470]! }
- public var VoiceChat_UnmuteHelp: String { return self._s[471]! }
- public var VoiceOver_Media_PlaybackRateNormal: String { return self._s[472]! }
- public func PUSH_CHAT_MESSAGE_INVOICE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[473]!, self._r[473]!, [_1, _2, _3])
- }
- public var Appearance_TextSize_Title: String { return self._s[474]! }
- public var NetworkUsageSettings_MediaImageDataSection: String { return self._s[476]! }
- public var VoiceOver_Navigation_Compose: String { return self._s[477]! }
- public func Channel_AdminLog_MessageChangedAutoremoveTimeoutRemove(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[478]!, self._r[478]!, [_1])
- }
- public var Passport_InfoText: String { return self._s[479]! }
- public var ApplyLanguage_ApplyLanguageAction: String { return self._s[480]! }
- public var MessagePoll_LabelClosed: String { return self._s[482]! }
- public var AttachmentMenu_SendAsFiles: String { return self._s[483]! }
- public var KeyCommand_FocusOnInputField: String { return self._s[484]! }
- public var Conversation_ContextViewThread: String { return self._s[485]! }
- public var ChatImport_SelectionErrorGroupGeneric: String { return self._s[486]! }
- public var Privacy_SecretChatsLinkPreviews: String { return self._s[488]! }
- public var Permissions_PeopleNearbyAllow_v0: String { return self._s[489]! }
- public var Conversation_ContextMenuMention: String { return self._s[491]! }
- public var CreatePoll_QuizInfo: String { return self._s[492]! }
- public var Appearance_ThemePreview_ChatList_2_Name: String { return self._s[493]! }
- public var Username_LinkCopied: String { return self._s[494]! }
- public var IntentsSettings_SuggestedAndSpotlightChatsInfo: String { return self._s[495]! }
- public var TwoStepAuth_ChangePassword: String { return self._s[496]! }
- public var Watch_Suggestion_Thanks: String { return self._s[497]! }
- public var Channel_TitleInfo: String { return self._s[498]! }
- public var ChatList_ChatTypesSection: String { return self._s[499]! }
- public func Watch_LastSeen_AtDate(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[500]!, self._r[500]!, [_0])
- }
- public func Channel_AdminLog_PollStopped(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[501]!, self._r[501]!, [_0])
- }
- public func Channel_AdminLog_MessageRemovedAdminNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[502]!, self._r[502]!, [_1, _2])
- }
- public var AuthSessions_AddDevice_InvalidQRCode: String { return self._s[503]! }
- public func Call_MicrophoneOff(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[504]!, self._r[504]!, [_0])
- }
- public var Channel_AdminLogFilter_ChannelEventsInfo: String { return self._s[505]! }
- public var Profile_MessageLifetimeForever: String { return self._s[506]! }
- public var ArchivedChats_IntroText1: String { return self._s[507]! }
- public var Notifications_ChannelNotificationsPreview: String { return self._s[508]! }
- public var Map_PullUpForPlaces: String { return self._s[510]! }
- public var UserInfo_TelegramCall: String { return self._s[511]! }
- public var Conversation_ShareMyContactInfo: String { return self._s[512]! }
- public var ChatList_Tabs_All: String { return self._s[513]! }
- public var Notification_PassportValueEmail: String { return self._s[514]! }
- public var Notification_VideoCallIncoming: String { return self._s[515]! }
- public var SettingsSearch_Synonyms_Appearance_AutoNightTheme: String { return self._s[516]! }
- public var Channel_Username_InvalidTaken: String { return self._s[517]! }
- public var GroupPermission_EditingDisabled: String { return self._s[518]! }
- public var InviteLink_PeopleJoinedShortNone: String { return self._s[519]! }
- public var ChatContextMenu_TextSelectionTip: String { return self._s[520]! }
- public var Passport_Language_pl: String { return self._s[522]! }
- public var Call_Accept: String { return self._s[523]! }
- public var ChatListFolder_NameSectionHeader: String { return self._s[524]! }
- public var InviteLink_ExpiredLinkStatus: String { return self._s[525]! }
- public func Passport_Identity_NativeNameTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[526]!, self._r[526]!, [_0])
- }
- public var ClearCache_Forever: String { return self._s[527]! }
- public var VoiceChat_TapToEditTitle: String { return self._s[529]! }
- public func ChannelInfo_AddParticipantConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[530]!, self._r[530]!, [_0])
- }
- public var Group_EditAdmin_RankAdminPlaceholder: String { return self._s[531]! }
- public var Calls_SubmitRating: String { return self._s[532]! }
- public var Location_LiveLocationRequired_ShareLocation: String { return self._s[533]! }
- public func ChatList_AddedToFolderTooltip(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[534]!, self._r[534]!, [_1, _2])
- }
- public var IntentsSettings_MainAccountInfo: String { return self._s[535]! }
- public var Map_Hybrid: String { return self._s[537]! }
- public var ChatList_Context_Archive: String { return self._s[538]! }
- public var Message_PinnedDocumentMessage: String { return self._s[539]! }
- public var State_ConnectingToProxyInfo: String { return self._s[540]! }
- public var Passport_Identity_NativeNameGenericTitle: String { return self._s[542]! }
- public var Settings_AppLanguage: String { return self._s[543]! }
- public func Checkout_SavePasswordTimeoutAndFaceId(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[544]!, self._r[544]!, [_0])
- }
- public var Notifications_PermissionsEnable: String { return self._s[546]! }
- public var CheckoutInfo_ShippingInfoAddress1Placeholder: String { return self._s[547]! }
- public func UserInfo_BlockActionTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[548]!, self._r[548]!, [_0])
- }
- public func AuthSessions_Message(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[549]!, self._r[549]!, [_0])
- }
- public var NotificationsSound_Aurora: String { return self._s[552]! }
- public var ScheduledMessages_ClearAll: String { return self._s[555]! }
- public func CancelResetAccount_TextSMS(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[556]!, self._r[556]!, [_0])
- }
- public var Settings_BlockedUsers: String { return self._s[558]! }
- public var Checkout_TipItem: String { return self._s[559]! }
- public var VoiceOver_Keyboard: String { return self._s[561]! }
- public func UserInfo_StartSecretChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[562]!, self._r[562]!, [_0])
- }
- public var Passport_Language_hu: String { return self._s[563]! }
- public func Conversation_ScheduleMessage_SendTomorrow(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[564]!, self._r[564]!, [_0])
- }
- public var StickerPack_Share: String { return self._s[565]! }
- public var Checkout_NewCard_SaveInfoEnableHelp: String { return self._s[566]! }
- public func ForwardedAuthors2(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[567]!, self._r[567]!, [_0, _1])
- }
- public var Privacy_ContactsResetConfirmation: String { return self._s[568]! }
- public var VoiceChat_EditTitle: String { return self._s[569]! }
- public var AppleWatch_ReplyPresets: String { return self._s[570]! }
- public var Bot_GenericBotStatus: String { return self._s[571]! }
- public var Appearance_ShareThemeColor: String { return self._s[572]! }
- public var AuthSessions_AddDevice_UrlLoginHint: String { return self._s[575]! }
- public var ReportGroupLocation_Title: String { return self._s[576]! }
- public func Conversation_AutoremoveTimerSetUserYou(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[577]!, self._r[577]!, [_1])
- }
- public func Activity_RemindAboutUser(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[578]!, self._r[578]!, [_0])
- }
- public var Profile_CreateEncryptedChatError: String { return self._s[579]! }
- public var Channel_EditAdmin_TransferOwnership: String { return self._s[580]! }
- public var Wallpaper_ErrorNotFound: String { return self._s[581]! }
- public var Bot_GenericSupportStatus: String { return self._s[582]! }
- public var Activity_UploadingPhoto: String { return self._s[584]! }
- public var Intents_ErrorLockedTitle: String { return self._s[585]! }
- public var Watch_UserInfo_Title: String { return self._s[587]! }
- public var SocksProxySetup_ProxyTelegram: String { return self._s[588]! }
- public var Appearance_ThemeDay: String { return self._s[589]! }
- public func ApplyLanguage_ChangeLanguageOfficialText(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[590]!, self._r[590]!, [_1])
- }
- public func FileSize_B(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[591]!, self._r[591]!, [_0])
- }
- public var InviteLink_AdditionalLinks: String { return self._s[592]! }
- public var Passport_Title: String { return self._s[596]! }
- public func Time_PreciseDate_m3(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[598]!, self._r[598]!, [_1, _2, _3])
- }
- public var CheckoutInfo_ShippingInfoCountryPlaceholder: String { return self._s[599]! }
- public var VoiceChat_OpenGroup: String { return self._s[601]! }
- public var SocksProxySetup_ShareLink: String { return self._s[603]! }
- public var AuthSessions_OtherDevices: String { return self._s[604]! }
- public var IntentsSettings_SuggestedChatsGroups: String { return self._s[605]! }
- public var Watch_MessageView_Reply: String { return self._s[606]! }
- public var Camera_FlashOn: String { return self._s[608]! }
- public func PUSH_MESSAGE_STICKER(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[609]!, self._r[609]!, [_1, _2])
- }
- public var Conversation_ContextMenuBlock: String { return self._s[610]! }
- public var Channel_EditAdmin_PermissionEditMessages: String { return self._s[612]! }
- public var Privacy_Calls_NeverAllow: String { return self._s[613]! }
- public var BroadcastGroups_Cancel: String { return self._s[614]! }
- public var SharedMedia_CategoryLinks: String { return self._s[615]! }
- public var Conversation_PinMessageAlertGroup: String { return self._s[618]! }
- public var Passport_Identity_ScansHelp: String { return self._s[620]! }
- public var ShareMenu_CopyShareLink: String { return self._s[621]! }
- public var StickerSettings_MaskContextInfo: String { return self._s[622]! }
- public var InviteLink_Create_EditTitle: String { return self._s[623]! }
- public var SocksProxySetup_ProxyStatusChecking: String { return self._s[624]! }
- public var TwoStepAuth_RecoveryEmailResetNoAccess: String { return self._s[625]! }
- public var AutoDownloadSettings_AutodownloadPhotos: String { return self._s[628]! }
- public var ChatImportActivity_Success: String { return self._s[630]! }
- public var Checkout_ErrorPrecheckoutFailed: String { return self._s[631]! }
- public var NotificationsSound_Popcorn: String { return self._s[632]! }
- public var FeatureDisabled_Oops: String { return self._s[633]! }
- public func Channel_AdminLog_MessageChangedChannelAbout(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[634]!, self._r[634]!, [_0])
- }
- public var Notification_PinnedMessage: String { return self._s[635]! }
- public var Tour_Title4: String { return self._s[636]! }
- public func Notification_VoiceChatInvitationForYou(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[637]!, self._r[637]!, [_1])
- }
- public var Watch_Suggestion_OK: String { return self._s[638]! }
- public var Compose_TokenListPlaceholder: String { return self._s[639]! }
- public var InviteLink_PermanentLink: String { return self._s[640]! }
- public var EditTheme_Edit_TopInfo: String { return self._s[641]! }
- public var Gif_NoGifsFound: String { return self._s[642]! }
- public var Login_InvalidCountryCode: String { return self._s[643]! }
- public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsExceptions: String { return self._s[644]! }
- public var Call_VoiceOver_VideoCallMissed: String { return self._s[645]! }
- public var VoiceChat_ChangeNameTitle: String { return self._s[647]! }
- public func PUSH_LOCKED_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[648]!, self._r[648]!, [_1])
- }
- public var Profile_CreateNewContact: String { return self._s[649]! }
- public var AutoDownloadSettings_DataUsageLow: String { return self._s[650]! }
- public var SettingsSearch_Synonyms_Notifications_InAppNotificationsPreview: String { return self._s[651]! }
- public var Group_Setup_TypePublic: String { return self._s[652]! }
- public var Weekday_ShortSaturday: String { return self._s[653]! }
- public func Time_MonthOfYear_m12(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[654]!, self._r[654]!, [_0])
- }
- public var LiveLocation_MenuStopAll: String { return self._s[655]! }
- public func DialogList_EncryptedChatStartedIncoming(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[656]!, self._r[656]!, [_0])
- }
- public var ChatListFolder_NamePlaceholder: String { return self._s[657]! }
- public var Channel_OwnershipTransfer_ErrorPublicChannelsTooMuch: String { return self._s[658]! }
- public func PUSH_CHAT_MESSAGE_GAME(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[659]!, self._r[659]!, [_1, _2, _3])
- }
- public var VoiceChat_ChatFullAlertText: String { return self._s[660]! }
- public var Chat_GenericPsaTooltip: String { return self._s[662]! }
- public var ChannelInfo_CreateVoiceChat: String { return self._s[663]! }
- public func Message_ForwardedMessageShort(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[664]!, self._r[664]!, [_0])
- }
- public var PrivacyLastSeenSettings_AlwaysShareWith_Placeholder: String { return self._s[665]! }
- public var Login_PhoneAndCountryHelp: String { return self._s[666]! }
- public var SaveIncomingPhotosSettings_From: String { return self._s[668]! }
- public var Conversation_JumpToDate: String { return self._s[669]! }
- public var AuthSessions_AddDevice: String { return self._s[670]! }
- public var Settings_FAQ: String { return self._s[672]! }
- public func ChatImport_CreateGroupAlertText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[673]!, self._r[673]!, [_0])
- }
- public var Username_Title: String { return self._s[674]! }
- public var DialogList_Read: String { return self._s[675]! }
- public var Conversation_InstantPagePreview: String { return self._s[676]! }
- public var Report_Succeed: String { return self._s[678]! }
- public var Login_ResetAccountProtected_Title: String { return self._s[679]! }
- public var CallFeedback_ReasonDistortedSpeech: String { return self._s[680]! }
- public var Channel_EditAdmin_PermissionChangeInfo: String { return self._s[681]! }
- public func Channel_AdminLog_MessageRankUsername(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[682]!, self._r[682]!, [_1, _2, _3])
- }
- public var WallpaperPreview_PreviewBottomText: String { return self._s[684]! }
- public var Privacy_SecretChatsTitle: String { return self._s[687]! }
- public func Notification_PassportValuesSentMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[688]!, self._r[688]!, [_1, _2])
- }
- public var Checkout_NewCard_SaveInfoHelp: String { return self._s[689]! }
- public var Conversation_ClousStorageInfo_Description4: String { return self._s[690]! }
- public var PasscodeSettings_TurnPasscodeOn: String { return self._s[691]! }
- public var Message_ReplyActionButtonShowReceipt: String { return self._s[692]! }
- public func PrivacyPolicy_AgeVerificationMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[693]!, self._r[693]!, [_0])
- }
- public var GroupInfo_DeleteAndExitConfirmation: String { return self._s[695]! }
- public var TwoStepAuth_ConfirmationAbort: String { return self._s[696]! }
- public var PrivacySettings_LastSeenEverybody: String { return self._s[697]! }
- public var CallFeedback_ReasonDropped: String { return self._s[698]! }
- public func ScheduledMessages_ScheduledDate(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[699]!, self._r[699]!, [_0])
- }
- public var WebSearch_Images: String { return self._s[700]! }
- public var Passport_Identity_Surname: String { return self._s[701]! }
- public var Channel_Stickers_CreateYourOwn: String { return self._s[702]! }
- public var TwoFactorSetup_Email_Title: String { return self._s[703]! }
- public var Cache_ClearEmpty: String { return self._s[704]! }
- public var AuthSessions_AddDeviceIntro_Action: String { return self._s[705]! }
- public var Theme_Context_Apply: String { return self._s[706]! }
- public var GroupInfo_Permissions_SearchPlaceholder: String { return self._s[707]! }
- public var CallList_DeleteAllForEveryone: String { return self._s[708]! }
- public func BroadcastGroups_Success(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[709]!, self._r[709]!, [_0])
- }
- public var AutoDownloadSettings_DocumentsTitle: String { return self._s[710]! }
- public func NetworkUsageSettings_CellularUsageSince(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[711]!, self._r[711]!, [_0])
- }
- public var Call_StatusRinging: String { return self._s[712]! }
- public func Map_DistanceAway(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[713]!, self._r[713]!, [_0])
- }
- public func DialogList_SingleTypingSuffix(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[714]!, self._r[714]!, [_0])
- }
- public var Cache_ClearNone: String { return self._s[715]! }
- public var PrivacyPolicy_Accept: String { return self._s[716]! }
- public var Contacts_PhoneNumber: String { return self._s[717]! }
- public var Passport_Identity_OneOfTypePassport: String { return self._s[718]! }
- public var PhotoEditor_HighlightsTint: String { return self._s[720]! }
- public var AutoDownloadSettings_AutodownloadVideos: String { return self._s[721]! }
- public var Checkout_PaymentMethod_Title: String { return self._s[724]! }
- public var Month_GenAugust: String { return self._s[726]! }
- public var DialogList_Draft: String { return self._s[727]! }
- public var ChatList_EmptyChatListFilterText: String { return self._s[728]! }
- public var PeopleNearby_Description: String { return self._s[729]! }
- public var WallpaperPreview_SwipeColorsBottomText: String { return self._s[730]! }
- public var VoiceChat_InviteLink_CopyListenerLink: String { return self._s[731]! }
- public var VoiceChat_EditTitleRemoveSuccess: String { return self._s[732]! }
- public var SettingsSearch_Synonyms_Privacy_Data_TopPeers: String { return self._s[734]! }
- public var Watch_Message_ForwardedFrom: String { return self._s[735]! }
- public var Notification_Mute1h: String { return self._s[736]! }
- public var Appearance_ThemePreview_Chat_3_TextWithLink: String { return self._s[737]! }
- public var SettingsSearch_Synonyms_Privacy_AuthSessions: String { return self._s[739]! }
- public var Channel_Edit_LinkItem: String { return self._s[740]! }
- public var Presence_online: String { return self._s[741]! }
- public var AutoDownloadSettings_Title: String { return self._s[742]! }
- public var Conversation_MessageDialogRetry: String { return self._s[743]! }
- public var SettingsSearch_Synonyms_ChatSettings_OpenLinksIn: String { return self._s[745]! }
- public var Channel_About_Placeholder: String { return self._s[747]! }
- public var Passport_Language_sl: String { return self._s[748]! }
- public var AppleWatch_Title: String { return self._s[750]! }
- public var RepliesChat_DescriptionText: String { return self._s[752]! }
- public var Stats_Message_PrivateShares: String { return self._s[753]! }
- public var Settings_ViewPhoto: String { return self._s[754]! }
- public var Conversation_ForwardTooltip_SavedMessages_One: String { return self._s[755]! }
- public var ChatList_DeleteSavedMessagesConfirmation: String { return self._s[756]! }
- public var Cache_ClearProgress: String { return self._s[757]! }
- public var Cache_Music: String { return self._s[758]! }
- public var Conversation_ContextMenuShare: String { return self._s[760]! }
- public var AutoDownloadSettings_Unlimited: String { return self._s[761]! }
- public var Channel_OwnershipTransfer_ErrorPrivacyRestricted: String { return self._s[762]! }
- public var Contacts_PermissionsAllow: String { return self._s[763]! }
- public var Passport_Language_vi: String { return self._s[765]! }
- public var TwoFactorSetup_PasswordRecovery_PlaceholderPassword: String { return self._s[766]! }
- public func PUSH_MESSAGE_TEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[769]!, self._r[769]!, [_1, _2])
- }
- public var Passport_Language_de: String { return self._s[770]! }
- public var Notifications_PermissionsText: String { return self._s[772]! }
- public var GroupRemoved_AddToGroup: String { return self._s[773]! }
- public var Appearance_ThemePreview_ChatList_4_Text: String { return self._s[774]! }
- public var ChangePhoneNumberCode_RequestingACall: String { return self._s[775]! }
- public var Login_TermsOfServiceAgree: String { return self._s[776]! }
- public var VoiceOver_Navigation_ProxySettings: String { return self._s[777]! }
- public func PUSH_CHAT_JOINED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[778]!, self._r[778]!, [_1, _2])
- }
- public var SettingsSearch_Synonyms_Data_CallsUseLessData: String { return self._s[780]! }
- public var VoiceChat_VideoPreviewStopScreenSharing: String { return self._s[781]! }
- public func PUSH_CHAT_VOICECHAT_START(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[782]!, self._r[782]!, [_1, _2])
- }
- public var VoiceChat_VideoPreviewContinue: String { return self._s[783]! }
- public var ChatListFolder_NameGroups: String { return self._s[784]! }
- public var SocksProxySetup_ProxyDetailsTitle: String { return self._s[785]! }
- public var VoiceChat_EditDescriptionSave: String { return self._s[786]! }
- public func Channel_AdminLog_MessageChangedLinkedGroup(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[787]!, self._r[787]!, [_1, _2])
- }
- public var Watch_Suggestion_TalkLater: String { return self._s[788]! }
- public var Checkout_ShippingOption_Title: String { return self._s[789]! }
- public var Conversation_TitleRepliesEmpty: String { return self._s[790]! }
- public var CreatePoll_TextHeader: String { return self._s[791]! }
- public var VoiceOver_Chat_Message: String { return self._s[793]! }
- public var InfoPlist_NSLocationWhenInUseUsageDescription: String { return self._s[794]! }
- public var ContactInfo_Note: String { return self._s[796]! }
- public var Channel_AdminLog_InfoPanelAlertText: String { return self._s[797]! }
- public var Checkout_NewCard_CardholderNameTitle: String { return self._s[798]! }
- public var AutoDownloadSettings_Photos: String { return self._s[799]! }
- public var UserInfo_NotificationsDefaultDisabled: String { return self._s[800]! }
- public func Conversation_ForwardTooltip_Chat_One(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[801]!, self._r[801]!, [_0])
- }
- public var Channel_Info_Subscribers: String { return self._s[802]! }
- public var ChatList_DeleteForCurrentUser: String { return self._s[803]! }
- public var ChatListFolderSettings_FoldersSection: String { return self._s[804]! }
- public var ChannelInfo_ScheduleVoiceChat: String { return self._s[805]! }
- public var VoiceOver_ChatList_OutgoingMessage: String { return self._s[806]! }
- public func Time_PreciseDate_m9(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[810]!, self._r[810]!, [_1, _2, _3])
- }
- public var AutoNightTheme_System: String { return self._s[811]! }
- public var Call_StatusWaiting: String { return self._s[812]! }
- public var GroupInfo_GroupHistoryHidden: String { return self._s[813]! }
- public func CHAT_MESSAGE_INVOICE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[814]!, self._r[814]!, [_1, _2, _3])
- }
- public var Conversation_ContextMenuCopy: String { return self._s[816]! }
- public var Notifications_MessageNotificationsPreview: String { return self._s[817]! }
- public var Notifications_InAppNotificationsVibrate: String { return self._s[818]! }
- public func Conversation_RestrictedTextTimed(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[819]!, self._r[819]!, [_0])
- }
- public var Group_Status: String { return self._s[821]! }
- public var Group_Setup_HistoryVisible: String { return self._s[822]! }
- public var Conversation_UploadFileTooLarge: String { return self._s[823]! }
- public var Conversation_DiscardVoiceMessageAction: String { return self._s[824]! }
- public var Paint_Edit: String { return self._s[825]! }
- public var PeerInfo_AutoremoveMessages: String { return self._s[826]! }
- public func ChatImport_SelectionConfirmationGroupWithoutTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[828]!, self._r[828]!, [_0])
- }
- public var Channel_EditAdmin_CannotEdit: String { return self._s[829]! }
- public var Username_InvalidTooShort: String { return self._s[830]! }
- public var ClearCache_StorageOtherApps: String { return self._s[832]! }
- public var Conversation_ViewMessage: String { return self._s[833]! }
- public var GroupInfo_PublicLinkAdd: String { return self._s[835]! }
- public func Notification_RemovedGroupPhoto(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[836]!, self._r[836]!, [_0])
- }
- public var CallSettings_Title: String { return self._s[837]! }
- public func Conversation_BotInteractiveUrlAlert(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[838]!, self._r[838]!, [_0])
- }
- public func VoiceOver_Chat_ContactFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[841]!, self._r[841]!, [_0])
- }
- public var PUSH_SENDER_YOU: String { return self._s[844]! }
- public func Conversation_DeletedFromContacts(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[845]!, self._r[845]!, [_0])
- }
- public var Profile_ShareContactButton: String { return self._s[846]! }
- public var GroupInfo_Permissions_SectionTitle: String { return self._s[847]! }
- public func VoiceOver_Chat_StickerFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[848]!, self._r[848]!, [_0])
- }
- public var Map_ShareLiveLocation: String { return self._s[849]! }
- public var ChatListFolder_TitleEdit: String { return self._s[850]! }
- public func VoiceOver_Chat_AnimatedStickerFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[851]!, self._r[851]!, [_0])
- }
- public var Passport_Address_Address: String { return self._s[853]! }
- public var LastSeen_JustNow: String { return self._s[855]! }
- public func SecretImage_NotViewedYet(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[856]!, self._r[856]!, [_0])
- }
- public var ContactInfo_PhoneLabelOther: String { return self._s[857]! }
- public var PasscodeSettings_DoNotMatch: String { return self._s[858]! }
- public var Weekday_Today: String { return self._s[861]! }
- public var DialogList_Title: String { return self._s[862]! }
- public var SettingsSearch_Synonyms_Notifications_MessageNotificationsPreview: String { return self._s[863]! }
- public var Cache_ClearCache: String { return self._s[864]! }
- public var CreatePoll_ExplanationInfo: String { return self._s[865]! }
- public var Notifications_ResetAllNotificationsHelp: String { return self._s[867]! }
- public var Stats_MessageTitle: String { return self._s[868]! }
- public var Passport_Address_Street: String { return self._s[870]! }
- public func Channel_AdminLog_MessageRemovedGroupUsername(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[871]!, self._r[871]!, [_0])
- }
- public var Channel_AdminLog_ChannelEmptyText: String { return self._s[872]! }
- public func Login_PhoneGenericEmailSubject(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[873]!, self._r[873]!, [_0])
- }
- public var TwoStepAuth_Email: String { return self._s[875]! }
- public var Conversation_SecretLinkPreviewAlert: String { return self._s[876]! }
- public var PrivacySettings_PasscodeOn: String { return self._s[877]! }
- public var Camera_SquareMode: String { return self._s[879]! }
- public var SocksProxySetup_Port: String { return self._s[880]! }
- public var Watch_LastSeen_JustNow: String { return self._s[882]! }
- public func Location_ProximityAlertSetText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[883]!, self._r[883]!, [_1, _2])
- }
- public func PUSH_MESSAGE_GAME(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[884]!, self._r[884]!, [_1, _2])
- }
- public func Watch_LastSeen_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[885]!, self._r[885]!, [_0])
- }
- public var VoiceChat_CancelVoiceChat: String { return self._s[886]! }
- public var EditTheme_Expand_Preview_OutgoingText: String { return self._s[887]! }
- public var Channel_AdminLogFilter_EventsTitle: String { return self._s[888]! }
- public var Watch_Suggestion_HoldOn: String { return self._s[891]! }
- public func PUSH_CHANNEL_MESSAGE_GEOLIVE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[892]!, self._r[892]!, [_1])
- }
- public var CallSettings_TabIcon: String { return self._s[893]! }
- public var ScheduledMessages_SendNow: String { return self._s[894]! }
- public var Stats_GroupTopWeekdaysTitle: String { return self._s[895]! }
- public var ImportStickerPack_NamePlaceholder: String { return self._s[896]! }
- public var UserInfo_PhoneCall: String { return self._s[897]! }
- public var Month_GenMarch: String { return self._s[898]! }
- public var Camera_Discard: String { return self._s[899]! }
- public var InfoPlist_NSFaceIDUsageDescription: String { return self._s[900]! }
- public var Passport_RequestedInformation: String { return self._s[901]! }
- public var VoiceChat_RecordingTitlePlaceholder: String { return self._s[903]! }
- public func Notification_ProximityYouReached(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[904]!, self._r[904]!, [_1, _2])
- }
- public var Passport_Language_ro: String { return self._s[905]! }
- public func PUSH_CHAT_MESSAGE_DOC(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[906]!, self._r[906]!, [_1, _2])
- }
- public var AutoDownloadSettings_ResetHelp: String { return self._s[907]! }
- public var Passport_Identity_DocumentDetails: String { return self._s[909]! }
- public var Passport_Address_ScansHelp: String { return self._s[910]! }
- public var Location_LiveLocationRequired_Title: String { return self._s[911]! }
- public var WallpaperPreview_PreviewBottomTextAnimatable: String { return self._s[912]! }
- public var ClearCache_StorageCache: String { return self._s[913]! }
- public var Theme_Colors_ColorWallpaperWarningProceed: String { return self._s[914]! }
- public var Conversation_RestrictedText: String { return self._s[915]! }
- public var Notifications_MessageNotifications: String { return self._s[917]! }
- public var Passport_Scans: String { return self._s[918]! }
- public func VoiceChat_StatusStartsIn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[920]!, self._r[920]!, [_0])
- }
- public var TwoStepAuth_SetupHintTitle: String { return self._s[921]! }
- public var LogoutOptions_ContactSupportTitle: String { return self._s[922]! }
- public var Passport_Identity_SelfieHelp: String { return self._s[923]! }
- public var Permissions_NotificationsUnreachableText_v0: String { return self._s[924]! }
- public var Privacy_PaymentsClear_PaymentInfo: String { return self._s[925]! }
- public var ShareMenu_CopyShareLinkGame: String { return self._s[926]! }
- public var PeerInfo_ButtonSearch: String { return self._s[927]! }
- public func Notification_ProximityReachedYou(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[930]!, self._r[930]!, [_1, _2])
- }
- public var SettingsSearch_Synonyms_Privacy_Data_ClearPaymentsInfo: String { return self._s[931]! }
- public var Passport_FieldIdentityTranslationHelp: String { return self._s[933]! }
- public var Conversation_InputTextSilentBroadcastPlaceholder: String { return self._s[934]! }
- public var Month_GenSeptember: String { return self._s[935]! }
- public func Call_GroupFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[937]!, self._r[937]!, [_1, _2])
- }
- public var StickerPacksSettings_ArchivedPacks: String { return self._s[938]! }
- public func Notification_VoiceChatInvitation(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[940]!, self._r[940]!, [_1, _2])
- }
- public func Channel_Username_LinkHint(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[941]!, self._r[941]!, [_0])
- }
- public func PUSH_PINNED_CONTACT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[943]!, self._r[943]!, [_1, _2])
- }
- public func PUSH_MESSAGE_VIDEOS(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[944]!, self._r[944]!, [_1, _2])
- }
- public var Calls_NotNow: String { return self._s[946]! }
- public var Settings_ChatFolders: String { return self._s[951]! }
- public var Login_PadPhoneHelpTitle: String { return self._s[952]! }
- public var TwoStepAuth_EnterPasswordInvalid: String { return self._s[953]! }
- public var Widget_MessageAutoremoveTimerRemoved: String { return self._s[954]! }
- public var VoiceChat_RecordingSaved: String { return self._s[955]! }
- public var Settings_ChatBackground: String { return self._s[956]! }
- public func PUSH_CHAT_MESSAGE_CONTACT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[958]!, self._r[958]!, [_1, _2])
- }
- public var ProxyServer_VoiceOver_Active: String { return self._s[959]! }
- public var Call_StatusBusy: String { return self._s[960]! }
- public var Conversation_MessageDeliveryFailed: String { return self._s[961]! }
- public var Login_NetworkError: String { return self._s[963]! }
- public var TwoStepAuth_SetupPasswordDescription: String { return self._s[964]! }
- public var Privacy_Calls_Integration: String { return self._s[965]! }
- public var DialogList_SearchSectionMessages: String { return self._s[966]! }
- public var AutoDownloadSettings_VideosTitle: String { return self._s[967]! }
- public var Preview_DeletePhoto: String { return self._s[968]! }
- public var VoiceChat_Video: String { return self._s[969]! }
- public var PrivacySettings_PhoneNumber: String { return self._s[971]! }
- public var Forward_ErrorDisabledForChat: String { return self._s[972]! }
- public var Watch_Compose_CurrentLocation: String { return self._s[973]! }
- public var Settings_CallSettings: String { return self._s[974]! }
- public var TwoFactorRemember_Done_Action: String { return self._s[975]! }
- public var AutoDownloadSettings_TypePrivateChats: String { return self._s[976]! }
- public var Conversation_StickerRemovedFromFavorites: String { return self._s[977]! }
- public var ChatList_Context_MarkAllAsRead: String { return self._s[978]! }
- public var ChatSettings_AutoPlayAnimations: String { return self._s[979]! }
- public var SaveIncomingPhotosSettings_Title: String { return self._s[980]! }
- public var OwnershipTransfer_SecurityRequirements: String { return self._s[981]! }
- public var Map_LiveLocationFor1Hour: String { return self._s[982]! }
- public func Privacy_GroupsAndChannels_InviteToGroupError(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[983]!, self._r[983]!, [_0, _1])
- }
- public var VoiceChat_MutedByAdmin: String { return self._s[984]! }
- public func Notification_PinnedLiveLocationMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[985]!, self._r[985]!, [_0])
- }
- public var Conversation_UnvotePoll: String { return self._s[986]! }
- public var TwoStepAuth_EnterEmailCode: String { return self._s[987]! }
- public func LOCAL_MESSAGE_FWDS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[988]!, self._r[988]!, [_1, "\(_2)"])
- }
- public var Passport_InfoTitle: String { return self._s[989]! }
- public func Conversation_Bytes(_ _0: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[990]!, self._r[990]!, ["\(_0)"])
- }
- public var AccentColor_Title: String { return self._s[991]! }
- public func PUSH_MESSAGE_INVOICE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[992]!, self._r[992]!, [_1, _2])
- }
- public func Notification_JoinedChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[995]!, self._r[995]!, [_0])
- }
- public var AutoDownloadSettings_DataUsageCustom: String { return self._s[996]! }
- public var Conversation_ShareBotLocationConfirmation: String { return self._s[997]! }
- public var PrivacyPhoneNumberSettings_WhoCanSeeMyPhoneNumber: String { return self._s[998]! }
- public var VoiceOver_Editing_ClearText: String { return self._s[999]! }
- public var Conversation_Unarchive: String { return self._s[1000]! }
- public var Notification_CallOutgoing: String { return self._s[1001]! }
- public var Channel_Setup_PublicNoLink: String { return self._s[1002]! }
- public var Passport_Identity_GenderPlaceholder: String { return self._s[1003]! }
- public var Message_Animation: String { return self._s[1004]! }
- public var SettingsSearch_Synonyms_Appearance_Animations: String { return self._s[1005]! }
- public var ChatSettings_ConnectionType_Title: String { return self._s[1006]! }
- public func Watch_Time_ShortFullAt(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1007]!, self._r[1007]!, [_1, _2])
- }
- public func VoiceChat_StatusSpeakingVolume(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1008]!, self._r[1008]!, [_0])
- }
- public var Notification_CallBack: String { return self._s[1009]! }
- public var Appearance_Title: String { return self._s[1012]! }
- public var NotificationsSound_Glass: String { return self._s[1014]! }
- public var AutoDownloadSettings_CellularTitle: String { return self._s[1016]! }
- public var Notifications_PermissionsSuppressWarningTitle: String { return self._s[1018]! }
- public var ChatSearch_SearchPlaceholder: String { return self._s[1019]! }
- public var Passport_Identity_AddPassport: String { return self._s[1020]! }
- public var GroupPermission_NoAddMembers: String { return self._s[1022]! }
- public var ContactList_Context_SendMessage: String { return self._s[1023]! }
- public var PhotoEditor_GrainTool: String { return self._s[1024]! }
- public var Settings_CopyPhoneNumber: String { return self._s[1025]! }
- public var Passport_Address_City: String { return self._s[1026]! }
- public var VoiceChat_LeaveAndCancelVoiceChat: String { return self._s[1027]! }
- public var ChannelRemoved_RemoveInfo: String { return self._s[1028]! }
- public var SocksProxySetup_Password: String { return self._s[1030]! }
- public var Settings_Passport: String { return self._s[1031]! }
- public var Channel_MessagePhotoUpdated: String { return self._s[1033]! }
- public var Stats_LanguagesTitle: String { return self._s[1034]! }
- public var ChatList_PeerTypeGroup: String { return self._s[1035]! }
- public var Privacy_Calls_P2PHelp: String { return self._s[1036]! }
- public var VoiceOver_Chat_PollNoVotes: String { return self._s[1037]! }
- public var Embed_PlayingInPIP: String { return self._s[1038]! }
- public var ImportStickerPack_GeneratingLink: String { return self._s[1040]! }
- public var BlockedUsers_BlockUser: String { return self._s[1042]! }
- public var Login_CancelPhoneVerificationContinue: String { return self._s[1043]! }
- public func PUSH_CHANNEL_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1044]!, self._r[1044]!, [_1])
- }
- public var AuthSessions_LoggedIn: String { return self._s[1045]! }
- public var Channel_AdminLog_MessagePreviousCaption: String { return self._s[1046]! }
- public var Activity_UploadingDocument: String { return self._s[1047]! }
- public var PeopleNearby_NoMembers: String { return self._s[1048]! }
- public var TwoFactorRemember_Text: String { return self._s[1050]! }
- public var SettingsSearch_Synonyms_Stickers_Masks: String { return self._s[1052]! }
- public var ChatSettings_AutoPlayVideos: String { return self._s[1053]! }
- public var VoiceOver_Chat_OpenLinkHint: String { return self._s[1054]! }
- public var InstantPage_VoiceOver_IncreaseFontSize: String { return self._s[1055]! }
- public var Settings_ViewVideo: String { return self._s[1056]! }
- public var Map_ShowPlaces: String { return self._s[1058]! }
- public var Passport_Phone_UseTelegramNumberHelp: String { return self._s[1059]! }
- public var InviteLink_Create_Title: String { return self._s[1060]! }
- public var Notification_CreatedGroup: String { return self._s[1061]! }
- public var SettingsSearch_Synonyms_Appearance_ChatBackground_Custom: String { return self._s[1062]! }
- public func PrivacySettings_LastSeenContactsPlus(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1063]!, self._r[1063]!, [_0])
- }
- public var Conversation_StatusLeftGroup: String { return self._s[1064]! }
- public var Theme_Colors_Messages: String { return self._s[1065]! }
- public var AuthSessions_EmptyText: String { return self._s[1066]! }
- public func PUSH_MESSAGE_CONTACT(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1067]!, self._r[1067]!, [_1])
- }
- public var UserInfo_StartSecretChat: String { return self._s[1068]! }
- public var ChatListFolderSettings_EditFoldersInfo: String { return self._s[1069]! }
- public var Channel_Edit_PrivatePublicLinkAlert: String { return self._s[1070]! }
- public var TwoFactorSetup_ResetDone_Title: String { return self._s[1071]! }
- public var Conversation_ReportSpamGroupConfirmation: String { return self._s[1072]! }
- public var Conversation_PrivateMessageLinkCopied: String { return self._s[1074]! }
- public var PeerInfo_PaneFiles: String { return self._s[1075]! }
- public var VoiceChat_DisplayAs: String { return self._s[1076]! }
- public var PrivacySettings_AutoArchive: String { return self._s[1077]! }
- public var Camera_VideoMode: String { return self._s[1078]! }
- public var NotificationsSound_Alert: String { return self._s[1079]! }
- public var Privacy_Forwards_NeverAllow_Title: String { return self._s[1080]! }
- public var Appearance_AutoNightTheme: String { return self._s[1081]! }
- public var Passport_Language_he: String { return self._s[1082]! }
- public var Passport_InvalidPasswordError: String { return self._s[1083]! }
- public var Conversation_PinMessageAlert_OnlyPin: String { return self._s[1084]! }
- public var UserInfo_InviteBotToGroup: String { return self._s[1085]! }
- public var Conversation_SilentBroadcastTooltipOff: String { return self._s[1086]! }
- public var Common_TakePhoto: String { return self._s[1087]! }
- public func Channel_AdminLog_RevokedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1088]!, self._r[1088]!, [_1, _2])
- }
- public var Passport_Email_UseTelegramEmailHelp: String { return self._s[1089]! }
- public var ChatList_Context_JoinChannel: String { return self._s[1090]! }
- public var MediaPlayer_UnknownArtist: String { return self._s[1091]! }
- public var VoiceChat_EditDescriptionText: String { return self._s[1092]! }
- public var KeyCommand_JumpToPreviousUnreadChat: String { return self._s[1095]! }
- public var Channel_OwnershipTransfer_Title: String { return self._s[1096]! }
- public var EditTheme_UploadEditedTheme: String { return self._s[1097]! }
- public var Settings_SetProfilePhotoOrVideo: String { return self._s[1099]! }
- public var Passport_FieldOneOf_Delimeter: String { return self._s[1100]! }
- public var MessagePoll_ViewResults: String { return self._s[1101]! }
- public var Group_Setup_TypePrivateHelp: String { return self._s[1102]! }
- public func UserInfo_ContactForwardTooltip_Chat_One(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1103]!, self._r[1103]!, [_0])
- }
- public var Passport_Address_OneOfTypeUtilityBill: String { return self._s[1104]! }
- public var Privacy_PaymentsClear_ShippingInfoCleared: String { return self._s[1105]! }
- public var ChatList_Search_ShowLess: String { return self._s[1106]! }
- public var InviteLink_Create_UsersLimitNoLimit: String { return self._s[1107]! }
- public var UserInfo_ShareBot: String { return self._s[1108]! }
- public var Privacy_Calls_P2P: String { return self._s[1110]! }
- public var WebBrowser_InAppSafari: String { return self._s[1111]! }
- public var SharedMedia_EmptyFilesText: String { return self._s[1114]! }
- public var Channel_AdminLog_MessagePreviousMessage: String { return self._s[1115]! }
- public var GroupInfo_SetSound: String { return self._s[1116]! }
- public var Permissions_PeopleNearbyAllowInSettings_v0: String { return self._s[1117]! }
- public func Conversation_AutoremoveRemainingTime(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1118]!, self._r[1118]!, [_0])
- }
- public var Channel_AdminLog_MessagePreviousDescription: String { return self._s[1119]! }
- public var Channel_AdminLogFilter_EventsAll: String { return self._s[1120]! }
- public var CallSettings_UseLessData: String { return self._s[1121]! }
- public var InfoPlist_NSCameraUsageDescription: String { return self._s[1122]! }
- public var NotificationsSound_Chord: String { return self._s[1123]! }
- public var PhotoEditor_CurvesTool: String { return self._s[1124]! }
- public var Appearance_ThemePreview_Chat_2_Text: String { return self._s[1125]! }
- public var Resolve_ErrorNotFound: String { return self._s[1126]! }
- public var Activity_PlayingGame: String { return self._s[1127]! }
- public func VoiceChat_InvitedPeerText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1131]!, self._r[1131]!, [_0])
- }
- public var StickerPacksSettings_AnimatedStickersInfo: String { return self._s[1132]! }
- public func PUSH_CHANNEL_MESSAGE_GEO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1133]!, self._r[1133]!, [_1])
- }
- public var Conversation_ShareBotContactConfirmationTitle: String { return self._s[1134]! }
- public var Notification_CallIncoming: String { return self._s[1135]! }
- public var Stats_EnabledNotifications: String { return self._s[1136]! }
- public var Notification_VoiceChatStartedChannel: String { return self._s[1137]! }
- public var Notifications_PermissionsOpenSettings: String { return self._s[1138]! }
- public var Checkout_ErrorProviderAccountTimeout: String { return self._s[1139]! }
- public func Activity_RemindAboutChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1140]!, self._r[1140]!, [_0])
- }
- public var VoiceChat_StatusMutedYou: String { return self._s[1141]! }
- public var VoiceOver_Chat_ReplyToYourMessage: String { return self._s[1142]! }
- public var Channel_DiscussionGroup_MakeHistoryPublic: String { return self._s[1143]! }
- public var StickerPacksSettings_Title: String { return self._s[1144]! }
- public func Channel_AdminLog_MessageGroupPreHistoryVisible(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1145]!, self._r[1145]!, [_0])
- }
- public var Watch_NoConnection: String { return self._s[1146]! }
- public var EncryptionKey_Title: String { return self._s[1147]! }
- public var Widget_AuthRequired: String { return self._s[1148]! }
- public func PUSH_MESSAGE_ROUND(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1149]!, self._r[1149]!, [_1])
- }
- public var Notifications_ExceptionsTitle: String { return self._s[1150]! }
- public var EditTheme_Expand_TopInfo: String { return self._s[1151]! }
- public func Contacts_AddPhoneNumber(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1152]!, self._r[1152]!, [_0])
- }
- public var Channel_AdminLogFilter_EventsRestrictions: String { return self._s[1154]! }
- public var Notifications_GroupNotificationsSound: String { return self._s[1155]! }
- public var VoiceChat_SpeakPermissionAdmin: String { return self._s[1156]! }
- public var Passport_Email_EnterOtherEmail: String { return self._s[1157]! }
- public func VoiceChat_RemovePeerConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1160]!, self._r[1160]!, [_0])
- }
- public var Conversation_AddToContacts: String { return self._s[1161]! }
- public var AutoDownloadSettings_DataUsageMedium: String { return self._s[1162]! }
- public var AuthSessions_LogOutApplications: String { return self._s[1164]! }
- public var VoiceChat_LeaveVoiceChat: String { return self._s[1165]! }
- public var ChatList_Context_Unpin: String { return self._s[1166]! }
- public var PeopleNearby_DiscoverDescription: String { return self._s[1167]! }
- public var UserInfo_FakeBotWarning: String { return self._s[1168]! }
- public var Notification_MessageLifetime1d: String { return self._s[1169]! }
- public var PrivacyLastSeenSettings_NeverShareWith_Title: String { return self._s[1170]! }
- public var ChatListFolder_CategoryChannels: String { return self._s[1171]! }
- public var VoiceOver_Chat_SeenByRecipient: String { return self._s[1172]! }
- public var Notifications_PermissionsAllow: String { return self._s[1173]! }
- public var Undo_ScheduledMessagesCleared: String { return self._s[1174]! }
- public var AutoDownloadSettings_PrivateChats: String { return self._s[1176]! }
- public var VoiceChat_ImproveYourProfileText: String { return self._s[1177]! }
- public var ApplyLanguage_ChangeLanguageAction: String { return self._s[1178]! }
- public var ChatImportActivity_ErrorInvalidChatType: String { return self._s[1179]! }
- public func Conversation_ScheduledVoiceChatStartsToday(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1180]!, self._r[1180]!, [_0])
- }
- public func PrivacySettings_LastSeenNobodyPlus(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1181]!, self._r[1181]!, [_0])
- }
- public var Conversation_AutoremoveTimerRemovedChannel: String { return self._s[1183]! }
- public var Notifications_MessageNotificationsHelp: String { return self._s[1185]! }
- public var WallpaperSearch_ColorPink: String { return self._s[1186]! }
- public var ContactInfo_PhoneNumberHidden: String { return self._s[1187]! }
- public var Passport_Identity_IssueDate: String { return self._s[1189]! }
- public func PUSH_CHAT_MESSAGE_GIF(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1190]!, self._r[1190]!, [_1, _2])
- }
- public var ChatList_DeleteForAllSubscribersConfirmationText: String { return self._s[1191]! }
- public var Channel_Info_Description: String { return self._s[1192]! }
- public var PrivacySettings_DeleteAccountIfAwayFor: String { return self._s[1193]! }
- public var Weekday_ShortTuesday: String { return self._s[1194]! }
- public var Common_Back: String { return self._s[1195]! }
- public var Chat_PinnedMessagesHiddenTitle: String { return self._s[1197]! }
- public var ChatListFolder_AddChats: String { return self._s[1198]! }
- public var Common_Close: String { return self._s[1200]! }
- public var Map_OpenIn: String { return self._s[1201]! }
- public var Group_Setup_HistoryTitle: String { return self._s[1202]! }
- public var SettingsSearch_Synonyms_Data_AutoDownloadUsingWifi: String { return self._s[1203]! }
- public var Notification_MessageLifetime1h: String { return self._s[1204]! }
- public func CancelResetAccount_Success(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1205]!, self._r[1205]!, [_0])
- }
- public var Watch_Contacts_NoResults: String { return self._s[1207]! }
- public var TwoStepAuth_SetupResendEmailCode: String { return self._s[1208]! }
- public var Checkout_Phone: String { return self._s[1209]! }
- public var OwnershipTransfer_ComeBackLater: String { return self._s[1210]! }
- public func Channel_CommentsGroup_HeaderGroupSet(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1211]!, self._r[1211]!, [_0])
- }
- public func DialogList_MultipleTypingSuffix(_ _0: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1212]!, self._r[1212]!, ["\(_0)"])
- }
- public var Conversation_AudioRateTooltipSpeedUp: String { return self._s[1213]! }
- public var ChatAdmins_Title: String { return self._s[1214]! }
- public var Appearance_ThemePreview_Chat_7_Text: String { return self._s[1215]! }
- public func PUSH_CHANNEL_MESSAGE_POLL(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1216]!, self._r[1216]!, [_1])
- }
- public var Common_Done: String { return self._s[1217]! }
- public var ChatList_HeaderImportIntoAnExistingGroup: String { return self._s[1218]! }
- public var Appearance_AppIconNew2: String { return self._s[1219]! }
- public func PUSH_PINNED_VIDEO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1223]!, self._r[1223]!, [_1])
- }
- public var Appearance_ThemeCarouselNight: String { return self._s[1224]! }
- public var InviteLink_Expired: String { return self._s[1226]! }
- public var Preview_OpenInInstagram: String { return self._s[1227]! }
- public var Wallpaper_SetColor: String { return self._s[1232]! }
- public var VoiceOver_Media_PlaybackRate: String { return self._s[1233]! }
- public var ChatSettings_Groups: String { return self._s[1234]! }
- public func VoiceOver_Chat_VoiceMessageFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1235]!, self._r[1235]!, [_0])
- }
- public var Contacts_SortedByName: String { return self._s[1236]! }
- public var SettingsSearch_Synonyms_Notifications_ContactJoined: String { return self._s[1237]! }
- public var Channel_Management_LabelCreator: String { return self._s[1238]! }
- public var Contacts_PermissionsSuppressWarningTitle: String { return self._s[1239]! }
- public func PrivacySettings_LastSeenContactsMinusPlus(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1240]!, self._r[1240]!, [_0, _1])
- }
- public var Group_GroupMembersHeader: String { return self._s[1241]! }
- public var Group_PublicLink_Title: String { return self._s[1242]! }
- public var Channel_OwnershipTransfer_ErrorAdminsTooMuch: String { return self._s[1243]! }
- public var VoiceOver_Chat_Photo: String { return self._s[1244]! }
- public var TwoFactorSetup_EmailVerification_Placeholder: String { return self._s[1245]! }
- public var IntentsSettings_SuggestBy: String { return self._s[1246]! }
- public var Privacy_Calls_AlwaysAllow_Placeholder: String { return self._s[1247]! }
- public var Appearance_ThemePreview_ChatList_1_Name: String { return self._s[1248]! }
- public var PhoneNumberHelp_ChangeNumber: String { return self._s[1249]! }
- public var LogoutOptions_SetPasscodeText: String { return self._s[1250]! }
- public var Map_OpenInMaps: String { return self._s[1251]! }
- public var ContactInfo_PhoneLabelWorkFax: String { return self._s[1252]! }
- public var BlockedUsers_Unblock: String { return self._s[1253]! }
- public func Settings_ApplyProxyAlert(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1254]!, self._r[1254]!, [_1, _2])
- }
- public func Channel_AdminLog_MessageRestrictedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1255]!, self._r[1255]!, [_1, _2])
- }
- public var ChatImport_CreateGroupAlertTitle: String { return self._s[1257]! }
- public var Conversation_Block: String { return self._s[1258]! }
- public var VoiceChat_PersonalAccount: String { return self._s[1259]! }
- public var Passport_Scans_UploadNew: String { return self._s[1260]! }
- public var Share_Title: String { return self._s[1261]! }
- public var Conversation_ApplyLocalization: String { return self._s[1262]! }
- public var SharedMedia_EmptyLinksText: String { return self._s[1263]! }
- public var Settings_NotificationsAndSounds: String { return self._s[1264]! }
- public var Stats_ViewsByHoursTitle: String { return self._s[1265]! }
- public var PhotoEditor_QualityMedium: String { return self._s[1266]! }
- public var Conversation_ContextMenuCancelSending: String { return self._s[1267]! }
- public func PUSH_CHANNEL_MESSAGE_GAME(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1268]!, self._r[1268]!, [_1, _2])
- }
- public var Conversation_RestrictedInline: String { return self._s[1269]! }
- public var Passport_Language_tr: String { return self._s[1270]! }
- public var Call_Mute: String { return self._s[1271]! }
- public func Conversation_NoticeInvitedByInGroup(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1272]!, self._r[1272]!, [_0])
- }
- public var Passport_Language_bn: String { return self._s[1273]! }
- public var Common_Save: String { return self._s[1275]! }
- public var AccessDenied_LocationTracking: String { return self._s[1277]! }
- public var Month_ShortOctober: String { return self._s[1278]! }
- public var AutoDownloadSettings_WiFi: String { return self._s[1279]! }
- public var ProfilePhoto_SetMainPhoto: String { return self._s[1281]! }
- public var ChangePhoneNumberNumber_NewNumber: String { return self._s[1282]! }
- public func Time_MonthOfYear_m3(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1283]!, self._r[1283]!, [_0])
- }
- public var Watch_ChannelInfo_Title: String { return self._s[1284]! }
- public var State_Updating: String { return self._s[1285]! }
- public var Conversation_UnblockUser: String { return self._s[1286]! }
- public var Notifications_ChannelNotificationsSound: String { return self._s[1287]! }
- public var Map_GetDirections: String { return self._s[1288]! }
- public var Watch_Compose_AddContact: String { return self._s[1290]! }
- public var Conversation_Dice_u26BD: String { return self._s[1291]! }
- public var AccessDenied_PhotosRestricted: String { return self._s[1292]! }
- public func Channel_AdminLog_MessageRank(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1293]!, self._r[1293]!, [_1])
- }
- public var Map_LoadError: String { return self._s[1295]! }
- public var SettingsSearch_Synonyms_Privacy_Calls: String { return self._s[1296]! }
- public var PhotoEditor_CropAuto: String { return self._s[1297]! }
- public func Target_ShareGameConfirmationPrivate(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1300]!, self._r[1300]!, [_0])
- }
- public var Username_TooManyPublicUsernamesError: String { return self._s[1302]! }
- public func PUSH_PINNED_GAME(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1303]!, self._r[1303]!, [_1])
- }
- public var Settings_PhoneNumber: String { return self._s[1304]! }
- public func Channel_AdminLog_MessageTransferedName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1305]!, self._r[1305]!, [_1])
- }
- public var Month_GenJune: String { return self._s[1307]! }
- public var Notifications_ExceptionsGroupPlaceholder: String { return self._s[1308]! }
- public var ChatListFolder_CategoryRead: String { return self._s[1309]! }
- public var LoginPassword_ResetAccount: String { return self._s[1310]! }
- public func DialogList_SingleUploadingFileSuffix(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1311]!, self._r[1311]!, [_0])
- }
- public var Call_CameraConfirmationConfirm: String { return self._s[1312]! }
- public var Notification_RenamedChannel: String { return self._s[1313]! }
- public func Channel_AdminLog_MessageUnpinned(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1314]!, self._r[1314]!, [_0])
- }
- public var Channel_AdminLogFilter_EventsAdmins: String { return self._s[1315]! }
- public var IntentsSettings_Title: String { return self._s[1317]! }
- public var CallList_DeleteAllForMe: String { return self._s[1318]! }
- public var Settings_AppleWatch: String { return self._s[1319]! }
- public var Conversation_LinkCopied: String { return self._s[1320]! }
- public var DialogList_NoMessagesText: String { return self._s[1321]! }
- public func VoiceChat_SendPublicLinkText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1322]!, self._r[1322]!, [_1, _2])
- }
- public var GroupPermission_NoChangeInfo: String { return self._s[1323]! }
- public var Channel_ErrorAccessDenied: String { return self._s[1325]! }
- public var ScheduledMessages_EmptyPlaceholder: String { return self._s[1326]! }
- public func Message_StickerText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1327]!, self._r[1327]!, [_0])
- }
- public var AuthSessions_TerminateOtherSessionsHelp: String { return self._s[1328]! }
- public var StickerPacksSettings_AnimatedStickers: String { return self._s[1329]! }
- public var Month_ShortJanuary: String { return self._s[1330]! }
- public var Conversation_UnreadMessages: String { return self._s[1331]! }
- public var Conversation_PrivateChannelTooltip: String { return self._s[1333]! }
- public var Call_VoiceOver_VideoCallCanceled: String { return self._s[1334]! }
- public var PrivacySettings_DeleteAccountTitle: String { return self._s[1336]! }
- public var Channel_Members_AddBannedErrorAdmin: String { return self._s[1337]! }
- public func Conversation_ShareMyPhoneNumberConfirmation(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1341]!, self._r[1341]!, [_1, _2])
- }
- public var Widget_ApplicationLocked: String { return self._s[1342]! }
- public func TextFormat_AddLinkText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1343]!, self._r[1343]!, [_0])
- }
- public var Common_TakePhotoOrVideo: String { return self._s[1344]! }
- public var Passport_Language_ru: String { return self._s[1346]! }
- public var MediaPicker_VideoMuteDescription: String { return self._s[1347]! }
- public var EditTheme_ErrorLinkTaken: String { return self._s[1348]! }
- public func Group_EditAdmin_RankInfo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1350]!, self._r[1350]!, [_0])
- }
- public var VoiceChat_ShareShort: String { return self._s[1351]! }
- public var Channel_Members_AddAdminErrorBlacklisted: String { return self._s[1352]! }
- public var Conversation_Owner: String { return self._s[1354]! }
- public var Settings_FAQ_Intro: String { return self._s[1355]! }
- public var PhotoEditor_QualityLow: String { return self._s[1357]! }
- public var Widget_GalleryTitle: String { return self._s[1358]! }
- public var Call_End: String { return self._s[1359]! }
- public var StickerPacksSettings_FeaturedPacks: String { return self._s[1361]! }
- public var Privacy_ContactsSyncHelp: String { return self._s[1362]! }
- public var OldChannels_NoticeUpgradeText: String { return self._s[1366]! }
- public var Conversation_Call: String { return self._s[1368]! }
- public var Watch_MessageView_Title: String { return self._s[1369]! }
- public func Notification_RenamedChat(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1370]!, self._r[1370]!, [_0])
- }
- public var Passport_PasswordCompleteSetup: String { return self._s[1371]! }
- public func Notification_ChangedGroupVideo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1372]!, self._r[1372]!, [_0])
- }
- public func TwoFactorSetup_EmailVerification_Text(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1374]!, self._r[1374]!, [_0])
- }
- public var Map_Location: String { return self._s[1375]! }
- public var Watch_MessageView_ViewOnPhone: String { return self._s[1376]! }
- public var Login_CountryCode: String { return self._s[1377]! }
- public var Channel_DiscussionGroup_PrivateGroup: String { return self._s[1379]! }
- public var ChatState_ConnectingToProxy: String { return self._s[1380]! }
- public var Login_CallRequestState3: String { return self._s[1381]! }
- public var NetworkUsageSettings_MediaAudioDataSection: String { return self._s[1384]! }
- public var SocksProxySetup_ProxyStatusConnecting: String { return self._s[1385]! }
- public var Widget_ChatsGalleryDescription: String { return self._s[1387]! }
- public var PrivacyLastSeenSettings_NeverShareWith_Placeholder: String { return self._s[1389]! }
- public var InstantPage_FontSanFrancisco: String { return self._s[1390]! }
- public var Call_StatusEnded: String { return self._s[1391]! }
- public func Checkout_SuccessfulTooltip(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1394]!, self._r[1394]!, [_1, _2])
- }
- public var MusicPlayer_VoiceNote: String { return self._s[1395]! }
- public var ChatImportActivity_ErrorUserBlocked: String { return self._s[1396]! }
- public func PUSH_CHANNEL_MESSAGE_TEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1397]!, self._r[1397]!, [_1, _2])
- }
- public var VoiceOver_MessageContextShare: String { return self._s[1398]! }
- public var ProfilePhoto_SearchWeb: String { return self._s[1399]! }
- public var EditProfile_Title: String { return self._s[1400]! }
- public func Notification_PinnedQuizMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1401]!, self._r[1401]!, [_0])
- }
- public var VoiceChat_Unmute: String { return self._s[1402]! }
- public var ChangePhoneNumberCode_CodePlaceholder: String { return self._s[1403]! }
- public var NetworkUsageSettings_ResetStats: String { return self._s[1405]! }
- public var NetworkUsageSettings_GeneralDataSection: String { return self._s[1406]! }
- public var StickerPackActionInfo_AddedTitle: String { return self._s[1407]! }
- public var Channel_BanUser_PermissionSendStickersAndGifs: String { return self._s[1408]! }
- public func Call_ParticipantVideoVersionOutdatedError(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1409]!, self._r[1409]!, [_0])
- }
- public var Location_ProximityNotification_Title: String { return self._s[1410]! }
- public var AuthSessions_AddDeviceIntro_Text1: String { return self._s[1411]! }
- public var Passport_Identity_LatinNameHelp: String { return self._s[1414]! }
- public var AuthSessions_AddDeviceIntro_Text2: String { return self._s[1415]! }
- public var Stats_GroupMembersTitle: String { return self._s[1416]! }
- public var AuthSessions_AddDeviceIntro_Text3: String { return self._s[1417]! }
- public var InviteLink_InviteLinkRevoked: String { return self._s[1418]! }
- public var Contacts_PermissionsSuppressWarningText: String { return self._s[1419]! }
- public var OpenFile_PotentiallyDangerousContentAlert: String { return self._s[1420]! }
- public var Settings_SetUsername: String { return self._s[1421]! }
- public var GroupInfo_ActionRestrict: String { return self._s[1422]! }
- public var SettingsSearch_Synonyms_SavedMessages: String { return self._s[1423]! }
- public func Time_PreciseDate_m2(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1424]!, self._r[1424]!, [_1, _2, _3])
- }
- public var Notifications_DisplayNamesOnLockScreenInfoWithLink: String { return self._s[1426]! }
- public var Notification_Exceptions_AlwaysOff: String { return self._s[1427]! }
- public var Conversation_ContextMenuDelete: String { return self._s[1428]! }
- public var Privacy_Calls_WhoCanCallMe: String { return self._s[1429]! }
- public var ChatList_PsaAlert_covid: String { return self._s[1432]! }
- public var VoiceOver_SilentPostOn: String { return self._s[1433]! }
- public var DialogList_Pin: String { return self._s[1434]! }
- public var Channel_AdminLog_CanInviteUsersViaLink: String { return self._s[1435]! }
- public var PrivacySettings_SecurityTitle: String { return self._s[1436]! }
- public var GroupPermission_NotAvailableInPublicGroups: String { return self._s[1437]! }
- public var PeopleNearby_Groups: String { return self._s[1438]! }
- public var Message_File: String { return self._s[1439]! }
- public var Calls_NoCallsPlaceholder: String { return self._s[1440]! }
- public var ChatList_GenericPsaLabel: String { return self._s[1443]! }
- public var UserInfo_LastNamePlaceholder: String { return self._s[1444]! }
- public var IntentsSettings_Reset: String { return self._s[1446]! }
- public var Call_ConnectionErrorTitle: String { return self._s[1447]! }
- public var PhotoEditor_SaturationTool: String { return self._s[1448]! }
- public var ChatSettings_AutomaticVideoMessageDownload: String { return self._s[1449]! }
- public var SettingsSearch_Synonyms_Stickers_ArchivedPacks: String { return self._s[1450]! }
- public var Conversation_SearchNoResults: String { return self._s[1451]! }
- public var Channel_DiscussionGroup_PrivateChannel: String { return self._s[1452]! }
- public var Map_OpenInWaze: String { return self._s[1453]! }
- public var InviteLink_PeopleJoinedNone: String { return self._s[1454]! }
- public var WallpaperPreview_Title: String { return self._s[1455]! }
- public func Passport_AcceptHelp(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1457]!, self._r[1457]!, [_1, _2])
- }
- public var AuthSessions_AddDeviceIntro_Title: String { return self._s[1458]! }
- public var VoiceOver_Chat_RecordModeVideoMessageInfo: String { return self._s[1459]! }
- public var TwoFactorSetup_ResetDone_TextNoPassword: String { return self._s[1460]! }
- public var VoiceOver_Chat_ChannelInfo: String { return self._s[1461]! }
- public var Conversation_ImageCopied: String { return self._s[1462]! }
- public var Passport_Identity_OneOfTypeInternalPassport: String { return self._s[1463]! }
- public var Notifications_PermissionsUnreachableTitle: String { return self._s[1465]! }
- public var Stats_Total: String { return self._s[1468]! }
- public var Stats_GroupMessages: String { return self._s[1469]! }
- public var TwoFactorSetup_Email_SkipAction: String { return self._s[1470]! }
- public var CheckoutInfo_ErrorPhoneInvalid: String { return self._s[1471]! }
- public var VoiceChat_You: String { return self._s[1472]! }
- public var VoiceChat_DisplayAsInfoGroup: String { return self._s[1473]! }
- public var Passport_Identity_Translation: String { return self._s[1474]! }
- public var Notifications_TextTone: String { return self._s[1477]! }
- public var Settings_RemoveConfirmation: String { return self._s[1479]! }
- public var ScheduledMessages_Delete: String { return self._s[1480]! }
- public var Channel_AdminLog_BanEmbedLinks: String { return self._s[1481]! }
- public var Passport_PasswordNext: String { return self._s[1482]! }
- public func PUSH_ENCRYPTED_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1483]!, self._r[1483]!, [_1])
- }
- public var Passport_Address_EditBankStatement: String { return self._s[1484]! }
- public var PhotoEditor_ShadowsTool: String { return self._s[1485]! }
- public var Notification_VideoCallMissed: String { return self._s[1486]! }
- public var AccessDenied_CameraDisabled: String { return self._s[1488]! }
- public var AuthSessions_AddDevice_ScanInfo: String { return self._s[1489]! }
- public var Notifications_ExceptionsMuted: String { return self._s[1490]! }
- public var VoiceChat_TapToViewScreenVideo: String { return self._s[1491]! }
- public var Conversation_ScheduleMessage_SendWhenOnline: String { return self._s[1492]! }
- public var Channel_BlackList_Title: String { return self._s[1493]! }
- public var PasscodeSettings_4DigitCode: String { return self._s[1494]! }
- public var NotificationsSound_Bamboo: String { return self._s[1495]! }
- public var Conversation_InputMenu: String { return self._s[1496]! }
- public var PrivacySettings_LastSeenContacts: String { return self._s[1497]! }
- public var Passport_Address_TypeUtilityBill: String { return self._s[1498]! }
- public var Passport_Address_CountryPlaceholder: String { return self._s[1499]! }
- public var GroupPermission_SectionTitle: String { return self._s[1500]! }
- public var InviteLink_ContextRevoke: String { return self._s[1501]! }
- public func Notification_InvitedMultiple(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1502]!, self._r[1502]!, [_0, _1])
- }
- public var CheckoutInfo_ShippingInfoStatePlaceholder: String { return self._s[1503]! }
- public var Channel_LeaveChannel: String { return self._s[1504]! }
- public var Watch_Notification_Joined: String { return self._s[1505]! }
- public var PeerInfo_ButtonMore: String { return self._s[1506]! }
- public var Passport_FieldEmailHelp: String { return self._s[1507]! }
- public var ChatList_Context_Pin: String { return self._s[1508]! }
- public func Time_MonthOfYear_m9(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1509]!, self._r[1509]!, [_0])
- }
- public var Group_Location_CreateInThisPlace: String { return self._s[1510]! }
- public var PhotoEditor_QualityVeryHigh: String { return self._s[1511]! }
- public var Tour_Title5: String { return self._s[1512]! }
- public func PUSH_CHAT_MESSAGE_FWD(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1513]!, self._r[1513]!, [_1, _2])
- }
- public var Passport_Language_en: String { return self._s[1514]! }
- public var Checkout_Name: String { return self._s[1515]! }
- public var ChatImport_Title: String { return self._s[1516]! }
- public func NetworkUsageSettings_WifiUsageSince(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1517]!, self._r[1517]!, [_0])
- }
- public var PhotoEditor_EnhanceTool: String { return self._s[1518]! }
- public func PUSH_CHAT_DELETE_YOU(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1519]!, self._r[1519]!, [_1, _2])
- }
- public func VoiceChat_UserCanNowSpeak(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1520]!, self._r[1520]!, [_0])
- }
- public var PeerInfo_CustomizeNotifications: String { return self._s[1521]! }
- public func Login_TermsOfService_ProceedBot(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1522]!, self._r[1522]!, [_0])
- }
- public var Group_ErrorSendRestrictedMedia: String { return self._s[1523]! }
- public func UserInfo_NotificationsDefaultSound(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1524]!, self._r[1524]!, [_0])
- }
- public var Login_UnknownError: String { return self._s[1525]! }
- public var Conversation_ImportedMessageHint: String { return self._s[1527]! }
- public func VoiceChat_ForwardTooltip_Chat(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1528]!, self._r[1528]!, [_0])
- }
- public var Passport_Identity_TypeDriversLicense: String { return self._s[1530]! }
- public var ChatList_AutoarchiveSuggestion_Title: String { return self._s[1531]! }
- public var Watch_PhotoView_Title: String { return self._s[1532]! }
- public var Appearance_ThemePreview_ChatList_3_Text: String { return self._s[1533]! }
- public var Checkout_TotalAmount: String { return self._s[1534]! }
- public var ChatList_RemoveFolderAction: String { return self._s[1535]! }
- public func GroupInfo_Permissions_BroadcastConvertInfo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1536]!, self._r[1536]!, [_0])
- }
- public var GroupInfo_SetGroupPhoto: String { return self._s[1537]! }
- public var Watch_AppName: String { return self._s[1538]! }
- public func PUSH_PINNED_GAME_SCORE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1539]!, self._r[1539]!, [_1])
- }
- public var Channel_Username_CheckingUsername: String { return self._s[1540]! }
- public var ContactList_Context_Call: String { return self._s[1541]! }
- public var ChatList_ReorderTabs: String { return self._s[1542]! }
- public var Watch_ChatList_Compose: String { return self._s[1543]! }
- public func Conversation_LiveLocationYouAnd(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1544]!, self._r[1544]!, [_0])
- }
- public var Channel_AdminLog_EmptyFilterTitle: String { return self._s[1545]! }
- public var ArchivedChats_IntroTitle1: String { return self._s[1546]! }
- public func PUSH_ENCRYPTION_ACCEPT(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1547]!, self._r[1547]!, [_1])
- }
- public var Call_StatusRequesting: String { return self._s[1549]! }
- public var Checkout_TotalPaidAmount: String { return self._s[1550]! }
- public var Weekday_Friday: String { return self._s[1552]! }
- public var CreateGroup_ChannelsTooMuch: String { return self._s[1553]! }
- public func ChatImport_SelectionConfirmationUserWithoutTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1554]!, self._r[1554]!, [_0])
- }
- public var Watch_ChatList_NoConversationsText: String { return self._s[1555]! }
- public var Group_Members_AddMembersHelp: String { return self._s[1556]! }
- public func Channel_AdminLog_MessageChangedGroupStickerPack(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1557]!, self._r[1557]!, [_0])
- }
- public var SecretVideo_Title: String { return self._s[1558]! }
- public func Notification_PinnedStickerMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1561]!, self._r[1561]!, [_0])
- }
- public var Undo_Undo: String { return self._s[1562]! }
- public var Watch_Microphone_Access: String { return self._s[1563]! }
- public func ChatImport_SelectionConfirmationGroupWithTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1564]!, self._r[1564]!, [_1, _2])
- }
- public func PUSH_CHAT_MESSAGE_PHOTO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1565]!, self._r[1565]!, [_1, _2])
- }
- public func ChatList_Search_NoResultsQueryDescription(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1566]!, self._r[1566]!, [_0])
- }
- public var Checkout_NewCard_PostcodeTitle: String { return self._s[1568]! }
- public var TwoFactorSetup_Intro_Action: String { return self._s[1569]! }
- public var Passport_Language_ne: String { return self._s[1570]! }
- public var TwoStepAuth_EmailHelp: String { return self._s[1572]! }
- public var Profile_MessageLifetime2s: String { return self._s[1573]! }
- public func Conversation_MessageDialogRetryAll(_ _1: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1575]!, self._r[1575]!, ["\(_1)"])
- }
- public func Items_NOfM(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1576]!, self._r[1576]!, [_1, _2])
- }
- public var VoiceChat_SendPublicLinkSend: String { return self._s[1577]! }
- public var Media_LimitedAccessText: String { return self._s[1578]! }
- public func PUSH_CHAT_TITLE_EDITED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1579]!, self._r[1579]!, [_1, _2])
- }
- public var GroupPermission_NoPinMessages: String { return self._s[1580]! }
- public func Notification_VoiceChatStarted(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1581]!, self._r[1581]!, [_1])
- }
- public func Notification_CreatedChat(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1582]!, self._r[1582]!, [_0])
- }
- public var FastTwoStepSetup_HintHelp: String { return self._s[1583]! }
- public var VoiceOver_SilentPostOff: String { return self._s[1584]! }
- public var WallpaperSearch_ColorRed: String { return self._s[1585]! }
- public var Watch_ConnectionDescription: String { return self._s[1586]! }
- public var Notification_Exceptions_AddException: String { return self._s[1587]! }
- public var LocalGroup_IrrelevantWarning: String { return self._s[1588]! }
- public var VoiceOver_MessageContextDelete: String { return self._s[1589]! }
- public var LogoutOptions_AlternativeOptionsSection: String { return self._s[1590]! }
- public var Passport_PasswordPlaceholder: String { return self._s[1591]! }
- public var TwoStepAuth_RecoveryEmailAddDescription: String { return self._s[1592]! }
- public var Stats_MessageInteractionsTitle: String { return self._s[1593]! }
- public var Appearance_ThemeCarouselClassic: String { return self._s[1594]! }
- public var TwoFactorSetup_Email_SkipConfirmationText: String { return self._s[1596]! }
- public var Channel_AdminLog_PinMessages: String { return self._s[1597]! }
- public var Passport_Address_AddRentalAgreement: String { return self._s[1599]! }
- public var Watch_Message_Game: String { return self._s[1600]! }
- public var PrivacyLastSeenSettings_NeverShareWith: String { return self._s[1601]! }
- public var PrivacyPolicy_DeclineLastWarning: String { return self._s[1602]! }
- public var EditTheme_FileReadError: String { return self._s[1603]! }
- public var Group_ErrorAddBlocked: String { return self._s[1604]! }
- public var CallSettings_UseLessDataLongDescription: String { return self._s[1605]! }
- public func PUSH_MESSAGE_PHOTO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1607]!, self._r[1607]!, [_1])
- }
- public var GroupRemoved_ViewChannelInfo: String { return self._s[1608]! }
- public func UserInfo_BlockConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1609]!, self._r[1609]!, [_0])
- }
- public var CheckoutInfo_ShippingInfoAddress2Placeholder: String { return self._s[1610]! }
- public var TwoFactorSetup_EmailVerification_Action: String { return self._s[1611]! }
- public func Username_LinkHint(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1612]!, self._r[1612]!, [_0])
- }
- public var ConversationProfile_ErrorCreatingConversation: String { return self._s[1613]! }
- public var Bot_GroupStatusReadsHistory: String { return self._s[1614]! }
- public var PhotoEditor_CurvesRed: String { return self._s[1615]! }
- public var InstantPage_TapToOpenLink: String { return self._s[1616]! }
- public var InviteLink_PeopleJoinedShortNoneExpired: String { return self._s[1617]! }
- public var FastTwoStepSetup_PasswordHelp: String { return self._s[1618]! }
- public var Conversation_DiscussionNotStarted: String { return self._s[1619]! }
- public var Notification_CallMissedShort: String { return self._s[1620]! }
- public func Notification_JoinedGroupByLink(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1621]!, self._r[1621]!, [_0])
- }
- public var Conversation_DeleteMessagesForEveryone: String { return self._s[1622]! }
- public var VoiceChat_UnpinVideo: String { return self._s[1623]! }
- public var Permissions_SiriTitle_v0: String { return self._s[1624]! }
- public var GroupInfo_AddUserLeftError: String { return self._s[1625]! }
- public var Conversation_SendMessage_SendSilently: String { return self._s[1626]! }
- public var Paint_Duplicate: String { return self._s[1627]! }
- public var AttachmentMenu_WebSearch: String { return self._s[1628]! }
- public var Bot_Stop: String { return self._s[1630]! }
- public var Conversation_PrivateChannelTimeLimitedAlertTitle: String { return self._s[1631]! }
- public var ReportGroupLocation_Report: String { return self._s[1632]! }
- public var Compose_Create: String { return self._s[1633]! }
- public var Stats_GroupViewers: String { return self._s[1634]! }
- public var AutoDownloadSettings_Channels: String { return self._s[1635]! }
- public var PhotoEditor_QualityHigh: String { return self._s[1636]! }
- public var VoiceChat_Leave: String { return self._s[1637]! }
- public var Call_Speaker: String { return self._s[1638]! }
- public func ChatList_LeaveGroupConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1639]!, self._r[1639]!, [_0])
- }
- public var Conversation_CloudStorage_ChatStatus: String { return self._s[1640]! }
- public var Chat_AttachmentMultipleFilesDisabled: String { return self._s[1641]! }
- public var ChatList_Context_AddToFolder: String { return self._s[1642]! }
- public var InviteLink_QRCode_Info: String { return self._s[1643]! }
- public var AutoremoveSetup_Title: String { return self._s[1644]! }
- public var ChatList_DeleteForAllMembersConfirmationText: String { return self._s[1645]! }
- public var Conversation_Unblock: String { return self._s[1646]! }
- public var SettingsSearch_Synonyms_Proxy_UseForCalls: String { return self._s[1647]! }
- public func Time_PreciseDate_m8(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1648]!, self._r[1648]!, [_1, _2, _3])
- }
- public var Conversation_ContextMenuReply: String { return self._s[1649]! }
- public var Contacts_SearchLabel: String { return self._s[1650]! }
- public var Forward_ErrorPublicQuizDisabledInChannels: String { return self._s[1651]! }
- public var Stats_GroupMessagesTitle: String { return self._s[1653]! }
- public var VoiceChat_NoiseSuppression: String { return self._s[1654]! }
- public var Notification_CallCanceled: String { return self._s[1655]! }
- public var VoiceOver_Chat_Selected: String { return self._s[1656]! }
- public var NotificationsSound_Tremolo: String { return self._s[1658]! }
- public var VoiceOver_AuthSessions_CurrentSession: String { return self._s[1659]! }
- public var ChatList_Search_NoResultsDescription: String { return self._s[1660]! }
- public var AccessDenied_PhotosAndVideos: String { return self._s[1661]! }
- public var LogoutOptions_ClearCacheText: String { return self._s[1662]! }
- public func VoiceChat_DisplayAsSuccess(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1664]!, self._r[1664]!, [_0])
- }
- public var VoiceOver_Chat_Sticker: String { return self._s[1665]! }
- public var ChatListFolder_NameUnread: String { return self._s[1666]! }
- public var PeerInfo_ButtonMessage: String { return self._s[1668]! }
- public var InfoPlist_NSPhotoLibraryAddUsageDescription: String { return self._s[1669]! }
- public var Settings_KeepPassword: String { return self._s[1670]! }
- public var BlockedUsers_SelectUserTitle: String { return self._s[1671]! }
- public var ChatSettings_Other: String { return self._s[1672]! }
- public var UserInfo_NotificationsEnabled: String { return self._s[1673]! }
- public var CreatePoll_OptionsHeader: String { return self._s[1674]! }
- public var Appearance_RemoveThemeColorConfirmation: String { return self._s[1677]! }
- public var Channel_Moderator_Title: String { return self._s[1678]! }
- public func Conversation_ForwardTooltip_Chat_Many(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1679]!, self._r[1679]!, [_0])
- }
- public func UserInfo_ContactForwardTooltip_ManyChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1680]!, self._r[1680]!, [_0, _1])
- }
- public var Channel_AdminLog_MessageRestrictedForever: String { return self._s[1681]! }
- public var WallpaperColors_Title: String { return self._s[1682]! }
- public var InviteLink_InviteLink: String { return self._s[1684]! }
- public var PrivacyPolicy_DeclineMessage: String { return self._s[1685]! }
- public var AutoDownloadSettings_VoiceMessagesTitle: String { return self._s[1686]! }
- public var Your_card_was_declined: String { return self._s[1687]! }
- public var SettingsSearch_FAQ: String { return self._s[1689]! }
- public var EditTheme_Expand_Preview_IncomingReplyName: String { return self._s[1690]! }
- public var Conversation_ReportSpamConfirmation: String { return self._s[1691]! }
- public var OwnershipTransfer_SecurityCheck: String { return self._s[1693]! }
- public var PrivacySettings_DataSettingsHelp: String { return self._s[1694]! }
- public var Settings_About_Help: String { return self._s[1695]! }
- public func Channel_DiscussionGroup_HeaderGroupSet(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1696]!, self._r[1696]!, [_0])
- }
- public var Settings_Proxy: String { return self._s[1697]! }
- public var TwoStepAuth_ResetAccountConfirmation: String { return self._s[1698]! }
- public var Passport_Identity_TypePassportUploadScan: String { return self._s[1700]! }
- public var NotificationsSound_Bell: String { return self._s[1701]! }
- public var PrivacySettings_Title: String { return self._s[1703]! }
- public var PrivacySettings_DataSettings: String { return self._s[1704]! }
- public var ConversationMedia_Title: String { return self._s[1705]! }
- public func Channel_AdminLog_MessageAddedAdminName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1706]!, self._r[1706]!, [_1])
- }
- public func Conversation_EncryptedPlaceholderTitleIncoming(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1707]!, self._r[1707]!, [_0])
- }
- public var PrivacySettings_BlockedPeersEmpty: String { return self._s[1708]! }
- public var ReportPeer_ReasonPornography: String { return self._s[1710]! }
- public var Privacy_Calls: String { return self._s[1712]! }
- public var TwoFactorSetup_Email_Text: String { return self._s[1713]! }
- public var Conversation_EncryptedDescriptionTitle: String { return self._s[1714]! }
- public func VoiceOver_Chat_MusicTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1715]!, self._r[1715]!, [_1, _2])
- }
- public var Passport_Identity_FrontSideHelp: String { return self._s[1716]! }
- public var InstantPage_VoiceOver_DecreaseFontSize: String { return self._s[1717]! }
- public var GroupInfo_Permissions_SlowmodeHeader: String { return self._s[1719]! }
- public var ContactList_Context_VideoCall: String { return self._s[1720]! }
- public var Settings_SaveIncomingPhotos: String { return self._s[1721]! }
- public var Passport_Identity_MiddleName: String { return self._s[1722]! }
- public var MessagePoll_QuizNoUsers: String { return self._s[1723]! }
- public func Channel_AdminLog_MutedParticipant(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1724]!, self._r[1724]!, [_1, _2])
- }
- public var OldChannels_ChannelFormat: String { return self._s[1725]! }
- public var Watch_Message_Call: String { return self._s[1726]! }
- public var VoiceChat_OpenChannel: String { return self._s[1727]! }
- public var Wallpaper_Title: String { return self._s[1728]! }
- public var PasscodeSettings_TurnPasscodeOff: String { return self._s[1729]! }
- public var IntentsSettings_SuggestedChatsSavedMessages: String { return self._s[1730]! }
- public var ReportGroupLocation_Text: String { return self._s[1731]! }
- public var InviteText_URL: String { return self._s[1732]! }
- public var ClearCache_StorageServiceFiles: String { return self._s[1733]! }
- public var MessageTimer_Custom: String { return self._s[1734]! }
- public var Message_PinnedLocationMessage: String { return self._s[1735]! }
- public func VoiceOver_Chat_ContactOrganization(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1736]!, self._r[1736]!, [_0])
- }
- public var EditTheme_UploadNewTheme: String { return self._s[1737]! }
- public var TwoFactorRemember_CheckPassword: String { return self._s[1740]! }
- public var ChatImportActivity_ErrorLimitExceeded: String { return self._s[1741]! }
- public func AutoDownloadSettings_UpToForAll(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1742]!, self._r[1742]!, [_0])
- }
- public var Login_CodeSentCall: String { return self._s[1744]! }
- public func Conversation_AutoremoveTimerSetUser(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1745]!, self._r[1745]!, [_1, _2])
- }
- public var Conversation_Report: String { return self._s[1746]! }
- public var NotificationSettings_ContactJoined: String { return self._s[1747]! }
- public func PUSH_MESSAGE_SCREENSHOT(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1748]!, self._r[1748]!, [_1])
- }
- public var StickerPacksSettings_ShowStickersButtonHelp: String { return self._s[1749]! }
- public var BroadcastGroups_IntroText: String { return self._s[1750]! }
- public var IntentsSettings_SuggestByAll: String { return self._s[1752]! }
- public var StickerPacksSettings_ShowStickersButton: String { return self._s[1753]! }
- public var AuthSessions_Title: String { return self._s[1754]! }
- public func Notification_VoiceChatEnded(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1755]!, self._r[1755]!, [_0])
- }
- public var Settings_Tips: String { return self._s[1756]! }
- public var Channel_AdminLog_TitleAllEvents: String { return self._s[1757]! }
- public var WallpaperPreview_WallpaperColors: String { return self._s[1758]! }
- public var KeyCommand_JumpToNextUnreadChat: String { return self._s[1759]! }
- public var VoiceChat_YouCanNowSpeak: String { return self._s[1762]! }
- public var Passport_Address_AddPassportRegistration: String { return self._s[1764]! }
- public func UserInfo_LinkForwardTooltip_ManyChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1765]!, self._r[1765]!, [_0, _1])
- }
- public var AutoDownloadSettings_MaxVideoSize: String { return self._s[1766]! }
- public var ExplicitContent_AlertTitle: String { return self._s[1767]! }
- public var Channel_UpdatePhotoItem: String { return self._s[1769]! }
- public var ChatList_AutoarchiveSuggestion_Text: String { return self._s[1771]! }
- public var Channel_DiscussionGroup_LinkGroup: String { return self._s[1772]! }
- public func Call_BatteryLow(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1773]!, self._r[1773]!, [_0])
- }
- public var Login_HaveNotReceivedCodeInternal: String { return self._s[1774]! }
- public var WallpaperPreview_PatternPaternApply: String { return self._s[1775]! }
- public var Notifications_MessageNotificationsSound: String { return self._s[1776]! }
- public var CommentsGroup_ErrorAccessDenied: String { return self._s[1777]! }
- public var Appearance_AccentColor: String { return self._s[1779]! }
- public var GroupInfo_SharedMedia: String { return self._s[1780]! }
- public var Login_PhonePlaceholder: String { return self._s[1781]! }
- public var Appearance_TextSize_Automatic: String { return self._s[1782]! }
- public var EmptyGroupInfo_Line2: String { return self._s[1783]! }
- public func PUSH_CHAT_CREATED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1784]!, self._r[1784]!, [_1, _2])
- }
- public var VoiceChat_TapToAddPhotoOrBio: String { return self._s[1785]! }
- public var Conversation_ClearChannel: String { return self._s[1786]! }
- public var Conversation_MessageDoesntExist: String { return self._s[1787]! }
- public var Appearance_AppIconDefaultX: String { return self._s[1789]! }
- public var EditProfile_NameAndPhotoOrVideoHelp: String { return self._s[1790]! }
- public var CheckoutInfo_ShippingInfoPostcodePlaceholder: String { return self._s[1791]! }
- public var Notifications_GroupNotificationsHelp: String { return self._s[1792]! }
- public func PUSH_CHAT_MESSAGE_NOTEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1793]!, self._r[1793]!, [_1, _2])
- }
- public var ChatList_EmptyChatListEditFilter: String { return self._s[1794]! }
- public var ChatSettings_ConnectionType_UseProxy: String { return self._s[1797]! }
- public var Chat_PinnedMessagesHiddenText: String { return self._s[1798]! }
- public func Message_PinnedGenericMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1799]!, self._r[1799]!, [_0])
- }
- public func Location_ProximityTip(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1800]!, self._r[1800]!, [_0])
- }
- public var UserInfo_NotificationsEnable: String { return self._s[1801]! }
- public var Checkout_PayWithTouchId: String { return self._s[1802]! }
- public var SharedMedia_ViewInChat: String { return self._s[1803]! }
- public func Notification_CreatedChatWithTitle(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1804]!, self._r[1804]!, [_0, _1])
- }
- public var ChatSettings_AutoDownloadSettings_OffForAll: String { return self._s[1805]! }
- public func Channel_DiscussionGroup_PublicChannelLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1806]!, self._r[1806]!, [_1, _2])
- }
- public func Cache_Clear(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1808]!, self._r[1808]!, [_0])
- }
- public var Conversation_PeerNearbyText: String { return self._s[1810]! }
- public var Conversation_StopPollConfirmationTitle: String { return self._s[1811]! }
- public var PhotoEditor_Skip: String { return self._s[1812]! }
- public var SettingsSearch_Synonyms_Appearance_ChatBackground_SetColor: String { return self._s[1813]! }
- public var ChatList_EmptyChatList: String { return self._s[1814]! }
- public var Channel_BanUser_Unban: String { return self._s[1815]! }
- public func Message_GenericForwardedPsa(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1816]!, self._r[1816]!, [_0])
- }
- public var Appearance_TextSize_Apply: String { return self._s[1817]! }
- public func Conversation_MessageViewCommentsFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1818]!, self._r[1818]!, [_1, _2])
- }
- public var Login_InfoFirstNamePlaceholder: String { return self._s[1819]! }
- public var VoiceOver_Chat_YourSticker: String { return self._s[1820]! }
- public var TwoStepAuth_HintPlaceholder: String { return self._s[1821]! }
- public var TwoStepAuth_EmailSkip: String { return self._s[1823]! }
- public var ChatList_UndoArchiveMultipleTitle: String { return self._s[1824]! }
- public var TwoFactorSetup_Email_SkipConfirmationTitle: String { return self._s[1825]! }
- public func PUSH_MESSAGE_QUIZ(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1826]!, self._r[1826]!, [_1])
- }
- public var VoiceOver_Chat_GoToOriginalMessage: String { return self._s[1828]! }
- public var State_WaitingForNetwork: String { return self._s[1829]! }
- public var AccessDenied_CameraRestricted: String { return self._s[1830]! }
- public var ChatSettings_Appearance: String { return self._s[1831]! }
- public var ScheduledMessages_BotActionUnavailable: String { return self._s[1832]! }
- public var GroupInfo_InviteLink_CopyAlert_Success: String { return self._s[1833]! }
- public var Channel_DiscussionGroupAdd: String { return self._s[1834]! }
- public var Conversation_SelectMessages: String { return self._s[1836]! }
- public var Map_NoPlacesNearby: String { return self._s[1837]! }
- public var AuthSessions_IncompleteAttemptsInfo: String { return self._s[1838]! }
- public var GroupRemoved_Title: String { return self._s[1839]! }
- public var ImportStickerPack_RemoveFromImport: String { return self._s[1840]! }
- public var TwoStepAuth_EnterPasswordHelp: String { return self._s[1842]! }
- public var VoiceChat_Mute: String { return self._s[1843]! }
- public var Paint_Marker: String { return self._s[1844]! }
- public var Widget_ChatsGalleryTitle: String { return self._s[1845]! }
- public func AddContact_ContactWillBeSharedAfterMutual(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1846]!, self._r[1846]!, [_1])
- }
- public var SocksProxySetup_ShareProxyList: String { return self._s[1847]! }
- public var GroupInfo_InvitationLinkDoesNotExist: String { return self._s[1848]! }
- public func VoiceOver_Chat_Size(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1849]!, self._r[1849]!, [_0])
- }
- public var EditTheme_ErrorInvalidCharacters: String { return self._s[1850]! }
- public var Appearance_ThemePreview_ChatList_7_Name: String { return self._s[1851]! }
- public var Settings_CheckPasswordTitle: String { return self._s[1852]! }
- public var Notifications_GroupNotificationsAlert: String { return self._s[1853]! }
- public var SocksProxySetup_ShareQRCode: String { return self._s[1854]! }
- public var Compose_NewGroup: String { return self._s[1856]! }
- public func Passport_Address_UploadOneOfScan(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1857]!, self._r[1857]!, [_0])
- }
- public var Location_LiveLocationRequired_Description: String { return self._s[1859]! }
- public var Conversation_ClearGroupHistory: String { return self._s[1860]! }
- public var GroupInfo_InviteLink_Help: String { return self._s[1863]! }
- public var VoiceOver_BotKeyboard: String { return self._s[1864]! }
- public var Channel_BanUser_BlockFor: String { return self._s[1865]! }
- public var Bot_Start: String { return self._s[1866]! }
- public var Your_card_has_expired: String { return self._s[1867]! }
- public var Channel_About_Title: String { return self._s[1868]! }
- public var VoiceChat_EditTitleTitle: String { return self._s[1869]! }
- public var Passport_Identity_ExpiryDatePlaceholder: String { return self._s[1870]! }
- public var SettingsSearch_Synonyms_Notifications_MessageNotificationsExceptions: String { return self._s[1872]! }
- public var Conversation_FileDropbox: String { return self._s[1873]! }
- public var ChatList_Search_NoResultsFitlerMusic: String { return self._s[1874]! }
- public var Month_GenNovember: String { return self._s[1875]! }
- public var IntentsSettings_SuggestByShare: String { return self._s[1876]! }
- public func Call_PrivacyErrorMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1877]!, self._r[1877]!, [_0])
- }
- public var StickerPack_Add: String { return self._s[1878]! }
- public var Theme_ErrorNotFound: String { return self._s[1879]! }
- public var Wallpaper_SearchShort: String { return self._s[1881]! }
- public var Channel_BanUser_PermissionsHeader: String { return self._s[1882]! }
- public var ConversationProfile_UsersTooMuchError: String { return self._s[1883]! }
- public var ChatList_FolderAllChats: String { return self._s[1884]! }
- public var VoiceChat_EndConfirmationEnd: String { return self._s[1885]! }
- public var Passport_Authorize: String { return self._s[1886]! }
- public func Channel_AdminLog_MessageChangedLinkedChannel(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1887]!, self._r[1887]!, [_1, _2])
- }
- public var GroupInfo_GroupHistoryVisible: String { return self._s[1888]! }
- public func PUSH_MESSAGE_VIDEO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1889]!, self._r[1889]!, [_1])
- }
- public var LocalGroup_ButtonTitle: String { return self._s[1890]! }
- public var VoiceOver_Stickers: String { return self._s[1892]! }
- public var UserInfo_GroupsInCommon: String { return self._s[1893]! }
- public var LoginPassword_Title: String { return self._s[1895]! }
- public var Wallpaper_Set: String { return self._s[1896]! }
- public var Stats_InteractionsTitle: String { return self._s[1897]! }
- public func SecretGIF_NotViewedYet(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1899]!, self._r[1899]!, [_0])
- }
- public var Conversation_MessageDialogEdit: String { return self._s[1900]! }
- public var Paint_Outlined: String { return self._s[1901]! }
- public func Login_ResetAccountProtected_Text(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1902]!, self._r[1902]!, [_0])
- }
- public func Conversation_SetReminder_RemindTomorrow(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1903]!, self._r[1903]!, [_0])
- }
- public var Invite_LargeRecipientsCountWarning: String { return self._s[1904]! }
- public var Passport_Address_Street1Placeholder: String { return self._s[1905]! }
- public var Appearance_ColorThemeNight: String { return self._s[1906]! }
- public var ChannelInfo_Stats: String { return self._s[1907]! }
- public var Widget_ShortcutsGalleryTitle: String { return self._s[1908]! }
- public var TwoStepAuth_RecoveryTitle: String { return self._s[1909]! }
- public var MediaPicker_TimerTooltip: String { return self._s[1910]! }
- public var ChatImportActivity_ErrorNotAdmin: String { return self._s[1911]! }
- public var TwoFactorRemember_Title: String { return self._s[1912]! }
- public var Common_ChoosePhoto: String { return self._s[1913]! }
- public var Media_LimitedAccessTitle: String { return self._s[1914]! }
- public var ChatSettings_AutoDownloadVideos: String { return self._s[1915]! }
- public var PeerInfo_PaneGroups: String { return self._s[1916]! }
- public var SocksProxySetup_UsernamePlaceholder: String { return self._s[1918]! }
- public var ChangePhoneNumberNumber_Title: String { return self._s[1919]! }
- public var ContactInfo_PhoneLabelMobile: String { return self._s[1920]! }
- public var OldChannels_ChannelsHeader: String { return self._s[1921]! }
- public var MuteFor_Forever: String { return self._s[1922]! }
- public var Passport_Address_PostcodePlaceholder: String { return self._s[1923]! }
- public var SettingsSearch_Synonyms_Appearance_ChatBackground: String { return self._s[1925]! }
- public var MessagePoll_LabelAnonymous: String { return self._s[1926]! }
- public var ContactInfo_Job: String { return self._s[1927]! }
- public var Passport_Language_mk: String { return self._s[1928]! }
- public var EditTheme_ShortLink: String { return self._s[1929]! }
- public var AutoDownloadSettings_PhotosTitle: String { return self._s[1932]! }
- public var Month_GenApril: String { return self._s[1934]! }
- public var Channel_DiscussionGroup_HeaderLabel: String { return self._s[1936]! }
- public var NetworkUsageSettings_TotalSection: String { return self._s[1937]! }
- public var EditTheme_Create_Preview_OutgoingText: String { return self._s[1938]! }
- public var EditTheme_Title: String { return self._s[1939]! }
- public var Conversation_LinkDialogCopy: String { return self._s[1940]! }
- public func Channel_AdminLog_MessageInvitedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1941]!, self._r[1941]!, [_1, _2])
- }
- public var Passport_ForgottenPassword: String { return self._s[1942]! }
- public var WallpaperSearch_Recent: String { return self._s[1943]! }
- public var ChatSettings_Title: String { return self._s[1948]! }
- public var Appearance_ReduceMotionInfo: String { return self._s[1949]! }
- public func StickerPackActionInfo_AddedText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1950]!, self._r[1950]!, [_0])
- }
- public var SocksProxySetup_UseForCallsHelp: String { return self._s[1951]! }
- public var LastSeen_WithinAMonth: String { return self._s[1952]! }
- public var VoiceChat_Live: String { return self._s[1953]! }
- public var PeerInfo_ButtonCall: String { return self._s[1954]! }
- public var SettingsSearch_Synonyms_Appearance_Title: String { return self._s[1955]! }
- public var Group_Username_InvalidStartsWithNumber: String { return self._s[1956]! }
- public var Call_AudioRouteHide: String { return self._s[1957]! }
- public var DialogList_SavedMessages: String { return self._s[1958]! }
- public var ChatList_Context_Mute: String { return self._s[1959]! }
- public var Conversation_StatusKickedFromChannel: String { return self._s[1960]! }
- public func Notification_Exceptions_MutedUntil(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1961]!, self._r[1961]!, [_0])
- }
- public var VoiceChat_StatusMutedForYou: String { return self._s[1962]! }
- public var Passport_Language_et: String { return self._s[1963]! }
- public var Conversation_MessageLeaveCommentShort: String { return self._s[1964]! }
- public var PhotoEditor_CropReset: String { return self._s[1965]! }
- public var Privacy_GroupsAndChannels_AlwaysAllow: String { return self._s[1966]! }
- public var SocksProxySetup_HostnamePlaceholder: String { return self._s[1967]! }
- public var CreateGroup_ErrorLocatedGroupsTooMuch: String { return self._s[1968]! }
- public var WallpaperSearch_ColorWhite: String { return self._s[1971]! }
- public var Channel_AdminLog_CanEditMessages: String { return self._s[1973]! }
- public var Privacy_PaymentsClearInfoDoneHelp: String { return self._s[1974]! }
- public var Channel_Username_InvalidStartsWithNumber: String { return self._s[1976]! }
- public var CheckoutInfo_ReceiverInfoName: String { return self._s[1978]! }
- public var Map_YouAreHere: String { return self._s[1980]! }
- public var Core_ServiceUserStatus: String { return self._s[1981]! }
- public var Channel_Setup_TypePrivateHelp: String { return self._s[1984]! }
- public var VoiceChat_StartRecording: String { return self._s[1985]! }
- public var SettingsSearch_Synonyms_Notifications_BadgeCountUnreadMessages: String { return self._s[1986]! }
- public var MediaPicker_Videos: String { return self._s[1988]! }
- public var Map_LiveLocationFor15Minutes: String { return self._s[1990]! }
- public var Passport_Identity_TranslationsHelp: String { return self._s[1991]! }
- public var SharedMedia_CategoryMedia: String { return self._s[1992]! }
- public func MediaPicker_Nof(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1993]!, self._r[1993]!, [_0])
- }
- public var ChatSettings_AutoPlayGifs: String { return self._s[1994]! }
- public var Passport_Identity_CountryPlaceholder: String { return self._s[1995]! }
- public var Bot_GroupStatusDoesNotReadHistory: String { return self._s[1996]! }
- public var Conversation_JoinVoiceChatAsListener: String { return self._s[1997]! }
- public var Notification_Exceptions_RemoveFromExceptions: String { return self._s[1998]! }
- public func Chat_SlowmodeTooltip(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[1999]!, self._r[1999]!, [_0])
- }
- public var Web_Error: String { return self._s[2000]! }
- public var PhotoEditor_SkinTool: String { return self._s[2001]! }
- public var ApplyLanguage_UnsufficientDataTitle: String { return self._s[2002]! }
- public var AutoremoveSetup_TimerInfoChat: String { return self._s[2003]! }
- public var ChatSettings_ConnectionType_UseSocks5: String { return self._s[2005]! }
- public var PasscodeSettings_Help: String { return self._s[2006]! }
- public var Appearance_ColorTheme: String { return self._s[2007]! }
- public func Channel_AdminLog_MessageRestrictedNewSetting(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2008]!, self._r[2008]!, [_0])
- }
- public var InviteLink_DeleteAllRevokedLinks: String { return self._s[2009]! }
- public func PUSH_PINNED_GEO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2010]!, self._r[2010]!, [_1])
- }
- public var InviteLink_QRCode_Title: String { return self._s[2011]! }
- public var GroupInfo_LeftStatus: String { return self._s[2012]! }
- public var EditTheme_Preview: String { return self._s[2013]! }
- public var Watch_Suggestion_WhatsUp: String { return self._s[2014]! }
- public func AutoDownloadSettings_PreloadVideoInfo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2015]!, self._r[2015]!, [_0])
- }
- public var NotificationsSound_Keys: String { return self._s[2016]! }
- public var VoiceChat_StatusWantsToSpeak: String { return self._s[2017]! }
- public var PasscodeSettings_UnlockWithTouchId: String { return self._s[2018]! }
- public var ChatList_Context_MarkAsUnread: String { return self._s[2019]! }
- public var DialogList_AdNoticeAlert: String { return self._s[2020]! }
- public var UserInfo_Invite: String { return self._s[2021]! }
- public var Checkout_Email: String { return self._s[2022]! }
- public var Stats_GroupActionsTitle: String { return self._s[2023]! }
- public var Coub_TapForSound: String { return self._s[2024]! }
- public var Conversation_AutoremoveTimerRemovedUserYou: String { return self._s[2025]! }
- public var Theme_ThemeChangedText: String { return self._s[2026]! }
- public var Call_ExternalCallInProgressMessage: String { return self._s[2027]! }
- public var AutoremoveSetup_TimerInfoChannel: String { return self._s[2028]! }
- public var Settings_ApplyProxyAlertEnable: String { return self._s[2029]! }
- public var ScheduledMessages_ScheduledToday: String { return self._s[2030]! }
- public var Channel_AdminLog_DefaultRestrictionsUpdated: String { return self._s[2031]! }
- public func VoiceChat_InviteMemberToChannelFirstText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2032]!, self._r[2032]!, [_1, _2])
- }
- public var Call_ReportIncludeLogDescription: String { return self._s[2033]! }
- public var Settings_FrequentlyAskedQuestions: String { return self._s[2035]! }
- public var Call_VoiceOver_VoiceCallMissed: String { return self._s[2036]! }
- public var Channel_MessagePhotoRemoved: String { return self._s[2037]! }
- public var Passport_Email_Delete: String { return self._s[2038]! }
- public func PUSH_PINNED_PHOTO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2039]!, self._r[2039]!, [_1])
- }
- public var NotificationSettings_ShowNotificationsAllAccountsInfoOn: String { return self._s[2040]! }
- public func Conversation_AutoremoveTimerRemovedUser(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2041]!, self._r[2041]!, [_1])
- }
- public var Channel_AdminLog_CanAddAdmins: String { return self._s[2042]! }
- public var SocksProxySetup_FailedToConnect: String { return self._s[2044]! }
- public var SettingsSearch_Synonyms_Data_NetworkUsage: String { return self._s[2045]! }
- public var Common_of: String { return self._s[2046]! }
- public var VoiceChat_CreateNewVoiceChatText: String { return self._s[2047]! }
- public var VoiceChat_StartRecordingStart: String { return self._s[2048]! }
- public var PeerInfo_ButtonUnmute: String { return self._s[2051]! }
- public func ChatSettings_AutoDownloadSettings_TypeFile(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2052]!, self._r[2052]!, [_0])
- }
- public var Privacy_ContactsReset_ContactsDeleted: String { return self._s[2053]! }
- public var ChatList_AddChatsToFolder: String { return self._s[2054]! }
- public var Login_ResetAccountProtected_LimitExceeded: String { return self._s[2055]! }
- public var Settings_Title: String { return self._s[2057]! }
- public var AutoDownloadSettings_Contacts: String { return self._s[2059]! }
- public var Appearance_BubbleCornersSetting: String { return self._s[2060]! }
- public var InviteLink_OtherAdminsLinks: String { return self._s[2061]! }
- public var Privacy_Calls_AlwaysAllow: String { return self._s[2062]! }
- public var Privacy_Forwards_AlwaysAllow_Title: String { return self._s[2064]! }
- public var WallpaperPreview_CropBottomText: String { return self._s[2065]! }
- public var SecretTimer_VideoDescription: String { return self._s[2066]! }
- public var VoiceOver_Chat_AnimatedSticker: String { return self._s[2067]! }
- public var WallpaperPreview_Blurred: String { return self._s[2068]! }
- public var SettingsSearch_Synonyms_Notifications_GroupNotificationsExceptions: String { return self._s[2069]! }
- public var ChatListFolder_ExcludedSectionHeader: String { return self._s[2071]! }
- public var Conversation_CancelForwardSelectChat: String { return self._s[2072]! }
- public var DialogList_PasscodeLockHelp: String { return self._s[2073]! }
- public var SocksProxySetup_SecretPlaceholder: String { return self._s[2074]! }
- public var NetworkUsageSettings_CallDataSection: String { return self._s[2075]! }
- public var TwoStepAuth_PasswordRemovePassportConfirmation: String { return self._s[2076]! }
- public var Passport_FieldAddressTranslationHelp: String { return self._s[2077]! }
- public var SocksProxySetup_Connection: String { return self._s[2078]! }
- public var Passport_Address_TypePassportRegistration: String { return self._s[2079]! }
- public var Contacts_PermissionsAllowInSettings: String { return self._s[2080]! }
- public var Conversation_Unpin: String { return self._s[2081]! }
- public var Notifications_MessageNotificationsExceptionsHelp: String { return self._s[2082]! }
- public var TwoFactorSetup_Hint_Placeholder: String { return self._s[2083]! }
- public var Call_ReportSkip: String { return self._s[2084]! }
- public func VoiceOver_Chat_PhotoFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2085]!, self._r[2085]!, [_0])
- }
- public func VoiceOver_Chat_Caption(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2087]!, self._r[2087]!, [_0])
- }
- public var AutoNightTheme_Automatic: String { return self._s[2088]! }
- public var Passport_Language_az: String { return self._s[2090]! }
- public func Conversation_AutoremoveChanged(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2091]!, self._r[2091]!, [_0])
- }
- public var SettingsSearch_Synonyms_Data_Storage_ClearCache: String { return self._s[2092]! }
- public var Watch_UserInfo_Unmute: String { return self._s[2093]! }
- public var Channel_Stickers_YourStickers: String { return self._s[2094]! }
- public var Channel_DiscussionGroup_UnlinkChannel: String { return self._s[2095]! }
- public var PeerInfo_AutoremoveMessagesDisabled: String { return self._s[2096]! }
- public var Tour_Text1: String { return self._s[2097]! }
- public var Common_Delete: String { return self._s[2098]! }
- public var Settings_EditPhoto: String { return self._s[2099]! }
- public var Common_Edit: String { return self._s[2100]! }
- public var ShareMenu_ShareTo: String { return self._s[2102]! }
- public var Passport_Identity_ExpiryDate: String { return self._s[2103]! }
- public func Channel_AdminLog_MutedNewMembers(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2104]!, self._r[2104]!, [_1])
- }
- public var Preview_DeleteGif: String { return self._s[2105]! }
- public var WallpaperPreview_PatternPaternDiscard: String { return self._s[2106]! }
- public var ChatSettings_AutoDownloadUsingCellular: String { return self._s[2107]! }
- public var Conversation_ViewReply: String { return self._s[2108]! }
- public var Stats_LoadingText: String { return self._s[2109]! }
- public var Channel_EditAdmin_PermissinAddAdminOn: String { return self._s[2110]! }
- public var CheckoutInfo_ReceiverInfoEmailPlaceholder: String { return self._s[2111]! }
- public var Channel_AdminLog_CanChangeInfo: String { return self._s[2112]! }
- public func Passport_Phone_UseTelegramNumber(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2113]!, self._r[2113]!, [_0])
- }
- public func Time_MonthOfYear_m2(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2114]!, self._r[2114]!, [_0])
- }
- public func VoiceOver_Chat_VideoMessageFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2116]!, self._r[2116]!, [_0])
- }
- public var Passport_Address_OneOfTypeRentalAgreement: String { return self._s[2117]! }
- public var InviteLink_Share: String { return self._s[2119]! }
- public func Conversation_ImportProgress(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2121]!, self._r[2121]!, [_0])
- }
- public var IntentsSettings_MainAccount: String { return self._s[2122]! }
- public var Group_MessagePhotoRemoved: String { return self._s[2125]! }
- public var Conversation_ContextMenuSelect: String { return self._s[2126]! }
- public var GroupInfo_Permissions_Exceptions: String { return self._s[2128]! }
- public var GroupRemoved_UsersSectionTitle: String { return self._s[2129]! }
- public var Contacts_PermissionsEnable: String { return self._s[2130]! }
- public var Channel_EditAdmin_PermissionDeleteMessagesOfOthers: String { return self._s[2131]! }
- public var Common_NotNow: String { return self._s[2132]! }
- public var Notification_CreatedChannel: String { return self._s[2133]! }
- public var Stats_ViewsBySourceTitle: String { return self._s[2135]! }
- public var InviteLink_ContextShare: String { return self._s[2136]! }
- public var Appearance_AppIconClassic: String { return self._s[2137]! }
- public var PhotoEditor_QualityTool: String { return self._s[2138]! }
- public var ClearCache_ClearCache: String { return self._s[2139]! }
- public var TwoFactorSetup_Password_PlaceholderConfirmPassword: String { return self._s[2140]! }
- public var AutoDownloadSettings_Videos: String { return self._s[2141]! }
- public var GroupPermission_Duration: String { return self._s[2142]! }
- public var ChatList_Read: String { return self._s[2143]! }
- public func Group_OwnershipTransfer_DescriptionInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2144]!, self._r[2144]!, [_1, _2])
- }
- public func ScheduleVoiceChat_ScheduleTomorrow(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2145]!, self._r[2145]!, [_0])
- }
- public var CallFeedback_Send: String { return self._s[2146]! }
- public var Channel_Stickers_Searching: String { return self._s[2147]! }
- public var ScheduledMessages_ReminderNotification: String { return self._s[2148]! }
- public var FastTwoStepSetup_HintSection: String { return self._s[2149]! }
- public var ChatSettings_AutoDownloadVideoMessages: String { return self._s[2150]! }
- public var EditTheme_CreateTitle: String { return self._s[2152]! }
- public var Application_Name: String { return self._s[2153]! }
- public var Paint_Stickers: String { return self._s[2154]! }
- public var Appearance_ThemePreview_Chat_1_Text: String { return self._s[2155]! }
- public var Call_StatusFailed: String { return self._s[2156]! }
- public var Stickers_FavoriteStickers: String { return self._s[2157]! }
- public var ClearCache_Clear: String { return self._s[2158]! }
- public var Passport_Language_mn: String { return self._s[2159]! }
- public var WallpaperPreview_PreviewTopText: String { return self._s[2160]! }
- public var LogoutOptions_ClearCacheTitle: String { return self._s[2161]! }
- public var Call_VoiceOver_VideoCallOutgoing: String { return self._s[2163]! }
- public var TwoFactorSetup_Hint_Text: String { return self._s[2165]! }
- public var WallpaperPreview_PatternIntensity: String { return self._s[2166]! }
- public var CheckoutInfo_ErrorShippingNotAvailable: String { return self._s[2167]! }
- public var Passport_Address_AddBankStatement: String { return self._s[2168]! }
- public func Conversation_TitleRepliesFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2171]!, self._r[2171]!, [_1, _2])
- }
- public var ChatListFolderSettings_RecommendedNewFolder: String { return self._s[2172]! }
- public var UserInfo_ShareContact: String { return self._s[2173]! }
- public var Passport_Identity_NamePlaceholder: String { return self._s[2174]! }
- public var Channel_ErrorAdminsTooMuch: String { return self._s[2176]! }
- public var Call_RateCall: String { return self._s[2177]! }
- public var Contacts_AccessDeniedError: String { return self._s[2178]! }
- public var Invite_ChannelsTooMuch: String { return self._s[2179]! }
- public var CheckoutInfo_ShippingInfoPostcode: String { return self._s[2180]! }
- public var Channel_BanUser_PermissionReadMessages: String { return self._s[2181]! }
- public var InviteLink_Create_TimeLimitInfo: String { return self._s[2182]! }
- public var Cache_NoLimit: String { return self._s[2185]! }
- public var Conversation_EmptyPlaceholder: String { return self._s[2186]! }
- public var Privacy_GroupsAndChannels_AlwaysAllow_Placeholder: String { return self._s[2190]! }
- public var Notification_Exceptions_MessagePreviewAlwaysOff: String { return self._s[2191]! }
- public var GroupRemoved_RemoveInfo: String { return self._s[2192]! }
- public var Privacy_PaymentsClear_AllInfoCleared: String { return self._s[2193]! }
- public var Privacy_Calls_IntegrationHelp: String { return self._s[2194]! }
- public func PUSH_VIDEO_CALL_MISSED(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2195]!, self._r[2195]!, [_1])
- }
- public var VoiceOver_Media_PlaybackRateFast: String { return self._s[2196]! }
- public var Theme_ThemeChanged: String { return self._s[2197]! }
- public var Privacy_GroupsAndChannels_NeverAllow: String { return self._s[2199]! }
- public var AutoDownloadSettings_MediaTypes: String { return self._s[2200]! }
- public func Notification_PinnedDocumentMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2201]!, self._r[2201]!, [_0])
- }
- public var Channel_AdminLog_InfoPanelTitle: String { return self._s[2202]! }
- public var Passport_Language_da: String { return self._s[2204]! }
- public var Chat_SlowmodeSendError: String { return self._s[2205]! }
- public var Application_Update: String { return self._s[2207]! }
- public var SocksProxySetup_SaveProxy: String { return self._s[2208]! }
- public func PUSH_AUTH_REGION(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2209]!, self._r[2209]!, [_1, _2])
- }
- public var Privacy_AddNewPeer: String { return self._s[2211]! }
- public var Channel_DiscussionGroup_MakeHistoryPublicProceed: String { return self._s[2213]! }
- public var Channel_Members_Title: String { return self._s[2214]! }
- public var StickerPacks_ActionDelete: String { return self._s[2215]! }
- public var Conversation_ScheduledVoiceChat: String { return self._s[2216]! }
- public var Settings_LogoutConfirmationText: String { return self._s[2218]! }
- public var Chat_UnsendMyMessages: String { return self._s[2219]! }
- public var PeerInfo_ReportProfilePhoto: String { return self._s[2220]! }
- public var Conversation_EditingMessageMediaEditCurrentVideo: String { return self._s[2222]! }
- public var ChatListFilter_AddChatsTitle: String { return self._s[2223]! }
- public var Passport_FloodError: String { return self._s[2224]! }
- public var NotificationSettings_ContactJoinedInfo: String { return self._s[2225]! }
- public var SettingsSearch_Synonyms_Privacy_Data_SecretChatLinkPreview: String { return self._s[2226]! }
- public var CallSettings_TabIconDescription: String { return self._s[2227]! }
- public var Group_Setup_HistoryHeader: String { return self._s[2229]! }
- public func Channel_AdminLog_AllowedNewMembersToSpeak(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2230]!, self._r[2230]!, [_1])
- }
- public var TwoStepAuth_EmailTitle: String { return self._s[2231]! }
- public var GroupInfo_Permissions_Removed: String { return self._s[2232]! }
- public var DialogList_ClearHistoryConfirmation: String { return self._s[2233]! }
- public var Contacts_Title: String { return self._s[2235]! }
- public func Notification_Invited(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2236]!, self._r[2236]!, [_0, _1])
- }
- public var ChatList_PeerTypeBot: String { return self._s[2239]! }
- public func Channel_AdminLog_SetSlowmode(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2240]!, self._r[2240]!, [_1, _2])
- }
- public var Appearance_ThemePreview_Chat_6_Text: String { return self._s[2241]! }
- public func Time_PreciseDate_m1(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2242]!, self._r[2242]!, [_1, _2, _3])
- }
- public var Camera_PhotoMode: String { return self._s[2244]! }
- public func PUSH_MESSAGE_GAME_SCORE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2245]!, self._r[2245]!, [_1, _2, _3])
- }
- public var ContactInfo_PhoneLabelPager: String { return self._s[2246]! }
- public var SettingsSearch_Synonyms_FAQ: String { return self._s[2247]! }
- public var Call_CallAgain: String { return self._s[2248]! }
- public var TwoStepAuth_PasswordSet: String { return self._s[2249]! }
- public var VoiceChat_EditDescriptionPlaceholder: String { return self._s[2250]! }
- public func Channel_Management_RestrictedBy(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2251]!, self._r[2251]!, [_0])
- }
- public var GroupInfo_InviteLink_RevokeAlert_Success: String { return self._s[2252]! }
- public var ClearCache_FreeSpaceDescription: String { return self._s[2253]! }
- public var Permissions_ContactsAllowInSettings_v0: String { return self._s[2254]! }
- public var Group_LeaveGroup: String { return self._s[2255]! }
- public var Channel_Setup_LinkTypePrivate: String { return self._s[2257]! }
- public var GroupInfo_LabelAdmin: String { return self._s[2259]! }
- public var CheckoutInfo_ErrorStateInvalid: String { return self._s[2261]! }
- public var Notification_PassportValuePersonalDetails: String { return self._s[2262]! }
- public func WebSearch_SearchNoResultsDescription(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2263]!, self._r[2263]!, [_0])
- }
- public var Stats_GroupNewMembersBySourceTitle: String { return self._s[2264]! }
- public var Appearance_Preview: String { return self._s[2265]! }
- public var VoiceOver_Chat_Contact: String { return self._s[2266]! }
- public var Passport_Language_th: String { return self._s[2267]! }
- public var PhotoEditor_CropAspectRatioOriginal: String { return self._s[2269]! }
- public var LastSeen_Offline: String { return self._s[2272]! }
- public var Map_OpenInHereMaps: String { return self._s[2273]! }
- public var SettingsSearch_Synonyms_Data_AutoplayVideos: String { return self._s[2274]! }
- public var InviteLink_ContextEdit: String { return self._s[2276]! }
- public var AutoDownloadSettings_Reset: String { return self._s[2277]! }
- public var Conversation_SendMessage_SetReminder: String { return self._s[2278]! }
- public var Channel_AdminLog_EmptyMessageText: String { return self._s[2279]! }
- public func AddContact_StatusSuccess(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2280]!, self._r[2280]!, [_0])
- }
- public func AuthCode_Alert(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2281]!, self._r[2281]!, [_0])
- }
- public var Passport_Identity_EditDriversLicense: String { return self._s[2282]! }
- public var ChatListFolder_NameNonMuted: String { return self._s[2283]! }
- public var Username_Placeholder: String { return self._s[2284]! }
- public func PUSH_ALBUM(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2285]!, self._r[2285]!, [_1])
- }
- public var Passport_Language_it: String { return self._s[2286]! }
- public var Checkout_NewCard_SaveInfo: String { return self._s[2287]! }
- public func Channel_OwnershipTransfer_DescriptionInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2288]!, self._r[2288]!, [_1, _2])
- }
- public var NotificationsSound_Pulse: String { return self._s[2289]! }
- public var VoiceOver_DismissContextMenu: String { return self._s[2291]! }
- public var MessagePoll_NoVotes: String { return self._s[2294]! }
- public var Message_Wallpaper: String { return self._s[2295]! }
- public var Conversation_JoinVoiceChat: String { return self._s[2296]! }
- public var Appearance_Other: String { return self._s[2297]! }
- public var Passport_Identity_NativeNameHelp: String { return self._s[2299]! }
- public var Group_PublicLink_Placeholder: String { return self._s[2303]! }
- public var Appearance_ThemePreview_ChatList_2_Text: String { return self._s[2304]! }
- public var VoiceOver_Recording_StopAndPreview: String { return self._s[2305]! }
- public var ChatListFolder_NameBots: String { return self._s[2306]! }
- public var Conversation_StopPollConfirmation: String { return self._s[2307]! }
- public var UserInfo_DeleteContact: String { return self._s[2308]! }
- public func Time_MonthOfYear_m11(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2309]!, self._r[2309]!, [_0])
- }
- public var Wallpaper_Wallpaper: String { return self._s[2311]! }
- public func PUSH_MESSAGE_NOTEXT(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2312]!, self._r[2312]!, [_1])
- }
- public var LoginPassword_ForgotPassword: String { return self._s[2313]! }
- public var FeaturedStickerPacks_Title: String { return self._s[2314]! }
- public var Paint_Pen: String { return self._s[2315]! }
- public var Channel_AdminLogFilter_EventsInfo: String { return self._s[2316]! }
- public var ChatListFolderSettings_Info: String { return self._s[2317]! }
- public var FastTwoStepSetup_HintPlaceholder: String { return self._s[2318]! }
- public var PhotoEditor_CurvesAll: String { return self._s[2320]! }
- public func Time_PreciseDate_m12(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2322]!, self._r[2322]!, [_1, _2, _3])
- }
- public var Passport_Address_TypeRentalAgreement: String { return self._s[2324]! }
- public var Message_ImageExpired: String { return self._s[2325]! }
- public var Call_ConnectionErrorMessage: String { return self._s[2326]! }
- public var SearchImages_NoImagesFound: String { return self._s[2328]! }
- public var PeerInfo_PaneGifs: String { return self._s[2329]! }
- public var Passport_DeletePersonalDetailsConfirmation: String { return self._s[2330]! }
- public var EnterPasscode_RepeatNewPasscode: String { return self._s[2331]! }
- public var PhotoEditor_VignetteTool: String { return self._s[2332]! }
- public var Passport_Language_dz: String { return self._s[2333]! }
- public var Notifications_ChannelNotificationsHelp: String { return self._s[2334]! }
- public var Conversation_BlockUser: String { return self._s[2335]! }
- public var GroupPermission_PermissionDisabledByDefault: String { return self._s[2338]! }
- public var TwoStepAuth_CancelResetText: String { return self._s[2340]! }
- public var Group_OwnershipTransfer_ErrorAdminsTooMuch: String { return self._s[2341]! }
- public func Time_MonthOfYear_m8(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2342]!, self._r[2342]!, [_0])
- }
- public var KeyCommand_NewMessage: String { return self._s[2343]! }
- public var EditTheme_Edit_Preview_IncomingReplyText: String { return self._s[2346]! }
- public func PUSH_CHAT_MESSAGE_GEO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2348]!, self._r[2348]!, [_1, _2])
- }
- public var ContactList_Context_StartSecretChat: String { return self._s[2349]! }
- public var VoiceOver_Chat_File: String { return self._s[2350]! }
- public var ChatList_EditFolder: String { return self._s[2352]! }
- public var Appearance_BubbleCorners_Title: String { return self._s[2353]! }
- public var PeerInfo_PaneAudio: String { return self._s[2354]! }
- public var ChatListFolder_CategoryContacts: String { return self._s[2356]! }
- public var VoiceOver_ScheduledMessages: String { return self._s[2357]! }
- public func Login_InvalidPhoneEmailBody(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2358]!, self._r[2358]!, [_1, _2, _3, _4, _5])
- }
- public var ChatList_PeerTypeChannel: String { return self._s[2359]! }
- public var VoiceOver_Navigation_Search: String { return self._s[2360]! }
- public var Settings_Search: String { return self._s[2361]! }
- public var WallpaperSearch_ColorYellow: String { return self._s[2362]! }
- public var Login_PhoneBannedError: String { return self._s[2363]! }
- public var KeyCommand_JumpToNextChat: String { return self._s[2364]! }
- public var Passport_Language_fa: String { return self._s[2365]! }
- public var Settings_About: String { return self._s[2366]! }
- public var AutoDownloadSettings_MaxFileSize: String { return self._s[2367]! }
- public var Channel_AdminLog_InfoPanelChannelAlertText: String { return self._s[2368]! }
- public var AutoDownloadSettings_DataUsageHigh: String { return self._s[2369]! }
- public func PUSH_CHAT_MESSAGE_TEXT(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2370]!, self._r[2370]!, [_1, _2, _3])
- }
- public var Common_OK: String { return self._s[2371]! }
- public var Contacts_SortBy: String { return self._s[2372]! }
- public var ImportStickerPack_LinkTaken: String { return self._s[2373]! }
- public var AutoNightTheme_PreferredTheme: String { return self._s[2374]! }
- public func AutoDownloadSettings_OnFor(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2376]!, self._r[2376]!, [_0])
- }
- public var CallFeedback_IncludeLogs: String { return self._s[2379]! }
- public func External_OpenIn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2380]!, self._r[2380]!, [_0])
- }
- public var ImportStickerPack_ChooseLink: String { return self._s[2382]! }
- public var Passcode_AppLockedAlert: String { return self._s[2383]! }
- public var TwoStepAuth_SetupPasswordTitle: String { return self._s[2384]! }
- public var Channel_NotificationLoading: String { return self._s[2386]! }
- public var Passport_Identity_DocumentNumber: String { return self._s[2387]! }
- public var VoiceOver_Chat_PagePreview: String { return self._s[2388]! }
- public var VoiceOver_Chat_OpenHint: String { return self._s[2389]! }
- public var Weekday_ShortFriday: String { return self._s[2390]! }
- public var Conversation_TitleMute: String { return self._s[2391]! }
- public var SettingsSearch_Synonyms_Notifications_GroupNotificationsSound: String { return self._s[2392]! }
- public var ScheduledMessages_PollUnavailable: String { return self._s[2393]! }
- public var DialogList_LanguageTooltip: String { return self._s[2395]! }
- public var BroadcastGroups_IntroTitle: String { return self._s[2396]! }
- public var Channel_AdminLogFilter_EventsPinned: String { return self._s[2397]! }
- public func DialogList_SingleUploadingVideoSuffix(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2398]!, self._r[2398]!, [_0])
- }
- public var TwoStepAuth_SetupResendEmailCodeAlert: String { return self._s[2400]! }
- public var Privacy_Calls_AlwaysAllow_Title: String { return self._s[2401]! }
- public var Settings_EditVideo: String { return self._s[2402]! }
- public var VoiceOver_Common_Off: String { return self._s[2403]! }
- public var Stickers_FrequentlyUsed: String { return self._s[2404]! }
- public var GroupPermission_Title: String { return self._s[2405]! }
- public var AccessDenied_VideoMessageCamera: String { return self._s[2406]! }
- public var Appearance_ThemeCarouselDay: String { return self._s[2407]! }
- public func PUSH_CHAT_MESSAGE_AUDIO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2408]!, self._r[2408]!, [_1, _2])
- }
- public var Passport_Identity_DocumentNumberPlaceholder: String { return self._s[2409]! }
- public var Tour_Title6: String { return self._s[2410]! }
- public var EmptyGroupInfo_Title: String { return self._s[2411]! }
- public func Channel_AdminLog_MessageToggleSignaturesOn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2412]!, self._r[2412]!, [_0])
- }
- public var Passport_Language_sk: String { return self._s[2413]! }
- public var VoiceOver_Chat_YourAnonymousPoll: String { return self._s[2414]! }
- public var TwoFactorRemember_WrongPassword: String { return self._s[2415]! }
- public var Preview_SaveToCameraRoll: String { return self._s[2416]! }
- public func VoiceChat_YouCanNowSpeakIn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2417]!, self._r[2417]!, [_0])
- }
- public var LogoutOptions_SetPasscodeTitle: String { return self._s[2418]! }
- public var Passport_Address_TypeUtilityBillUploadScan: String { return self._s[2419]! }
- public var Conversation_ContextMenuMore: String { return self._s[2420]! }
- public var Conversation_ForwardAuthorHiddenTooltip: String { return self._s[2421]! }
- public var Channel_AdminLog_CanBeAnonymous: String { return self._s[2422]! }
- public var CallFeedback_ReasonSilentLocal: String { return self._s[2424]! }
- public func Channel_AdminLog_UnmutedMutedParticipant(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2425]!, self._r[2425]!, [_1, _2])
- }
- public var UserInfo_NotificationsDisable: String { return self._s[2426]! }
- public func Channel_AdminLog_EmptyFilterQueryText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2428]!, self._r[2428]!, [_0])
- }
- public var SettingsSearch_Synonyms_EditProfile_Bio: String { return self._s[2429]! }
- public func Date_ChatDateHeader(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2431]!, self._r[2431]!, [_1, _2])
- }
- public var WallpaperSearch_ColorPrefix: String { return self._s[2432]! }
- public func Message_ForwardedPsa_covid(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2433]!, self._r[2433]!, [_0])
- }
- public var VoiceChat_NoiseSuppressionDisabled: String { return self._s[2435]! }
- public var Conversation_RestrictedMedia: String { return self._s[2436]! }
- public var Group_MessageVideoUpdated: String { return self._s[2437]! }
- public var NetworkUsageSettings_ResetStatsConfirmation: String { return self._s[2438]! }
- public var GroupInfo_DeleteAndExit: String { return self._s[2439]! }
- public var TwoFactorSetup_Email_Action: String { return self._s[2440]! }
- public var TwoFactorSetup_ResetDone_TitleNoPassword: String { return self._s[2441]! }
- public var Media_ShareThisVideo: String { return self._s[2443]! }
- public var DialogList_Replies: String { return self._s[2445]! }
- public func Conversation_Moderate_DeleteAllMessages(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2446]!, self._r[2446]!, [_0])
- }
- public var CheckoutInfo_ShippingInfoAddress1: String { return self._s[2447]! }
- public var Watch_Suggestion_OnMyWay: String { return self._s[2448]! }
- public var ImportStickerPack_ImportingStickers: String { return self._s[2449]! }
- public var CheckoutInfo_ShippingInfoAddress2: String { return self._s[2450]! }
- public func PUSH_PINNED_POLL(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2451]!, self._r[2451]!, [_1, _2])
- }
- public func GroupInfo_InvitationLinkAcceptChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2452]!, self._r[2452]!, [_0])
- }
- public var Channel_EditAdmin_PermissinAddAdminOff: String { return self._s[2453]! }
- public var ChatAdmins_AllMembersAreAdminsOnHelp: String { return self._s[2454]! }
- public var ChatList_Search_NoResultsFitlerMedia: String { return self._s[2455]! }
- public var Channel_Members_InviteLink: String { return self._s[2456]! }
- public var Conversation_TapAndHoldToRecord: String { return self._s[2457]! }
- public var WatchRemote_AlertText: String { return self._s[2458]! }
- public func Channel_DiscussionGroup_PrivateChannelLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2459]!, self._r[2459]!, [_1, _2])
- }
- public var Conversation_Pin: String { return self._s[2460]! }
- public var InfoPlist_NSMicrophoneUsageDescription: String { return self._s[2461]! }
- public var Stickers_RemoveFromFavorites: String { return self._s[2462]! }
- public var Conversation_CancelForwardTitle: String { return self._s[2463]! }
- public func Notification_PinnedPollMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2464]!, self._r[2464]!, [_0])
- }
- public var Appearance_AppIconFilled: String { return self._s[2465]! }
- public var StickerPack_ErrorNotFound: String { return self._s[2466]! }
- public func Channel_AdminLog_MessageRestrictedName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2467]!, self._r[2467]!, [_1])
- }
- public var Passport_Identity_AddIdentityCard: String { return self._s[2468]! }
- public func PUSH_CHANNEL_MESSAGE_DOC(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2470]!, self._r[2470]!, [_1])
- }
- public var Call_Camera: String { return self._s[2471]! }
- public var GroupInfo_InviteLink_RevokeAlert_Text: String { return self._s[2472]! }
- public var Group_Location_Info: String { return self._s[2473]! }
- public var Watch_LastSeen_WithinAMonth: String { return self._s[2474]! }
- public var UserInfo_NotificationsDefaultEnabled: String { return self._s[2475]! }
- public func DialogList_PinLimitError(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2476]!, self._r[2476]!, [_0])
- }
- public var Weekday_Yesterday: String { return self._s[2477]! }
- public var TwoStepAuth_SetupPasswordEnterPasswordNew: String { return self._s[2478]! }
- public var InviteLink_Create_UsersLimit: String { return self._s[2479]! }
- public func Notification_VoiceChatScheduledTodayChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2480]!, self._r[2480]!, [_0])
- }
- public var ArchivedPacksAlert_Title: String { return self._s[2481]! }
- public var PeerInfo_PaneMembers: String { return self._s[2482]! }
- public var PhotoEditor_SelectCoverFrame: String { return self._s[2483]! }
- public func Location_ProximityAlertSetTextGroup(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2484]!, self._r[2484]!, [_0])
- }
- public var ContactInfo_PhoneLabelMain: String { return self._s[2485]! }
- public func Time_PreciseDate_m7(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2486]!, self._r[2486]!, [_1, _2, _3])
- }
- public var TwoFactorSetup_EmailVerification_ChangeAction: String { return self._s[2487]! }
- public var Channel_DiscussionGroup: String { return self._s[2488]! }
- public var EditTheme_Edit_Preview_IncomingReplyName: String { return self._s[2489]! }
- public var InviteLink_Create_TimeLimit: String { return self._s[2491]! }
- public var Channel_EditAdmin_PermissionsHeader: String { return self._s[2492]! }
- public var VoiceOver_MessageContextForward: String { return self._s[2493]! }
- public var SocksProxySetup_TypeNone: String { return self._s[2494]! }
- public var CreatePoll_MultipleChoiceQuizAlert: String { return self._s[2496]! }
- public var ProfilePhoto_OpenInEditor: String { return self._s[2498]! }
- public var WallpaperSearch_ColorPurple: String { return self._s[2499]! }
- public var ChatListFolder_IncludeChatsTitle: String { return self._s[2500]! }
- public var Group_Username_InvalidTooShort: String { return self._s[2501]! }
- public var Location_ProximityNotification_DistanceM: String { return self._s[2502]! }
- public var VoiceChat_EditTitleText: String { return self._s[2503]! }
- public func Login_EmailPhoneBody(_ _0: String, _ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2504]!, self._r[2504]!, [_0, _1, _2])
- }
- public var Passport_Language_tk: String { return self._s[2505]! }
- public var ConvertToSupergroup_Title: String { return self._s[2506]! }
- public var Channel_BanUser_PermissionEmbedLinks: String { return self._s[2507]! }
- public var Cache_KeepMediaHelp: String { return self._s[2508]! }
- public var Channel_Management_Title: String { return self._s[2509]! }
- public func PUSH_MESSAGE_PHOTO_SECRET(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2510]!, self._r[2510]!, [_1])
- }
- public var Conversation_ForwardChats: String { return self._s[2511]! }
- public var Passport_Language_bg: String { return self._s[2512]! }
- public var SocksProxySetup_TypeSocks: String { return self._s[2513]! }
- public var Permissions_PrivacyPolicy: String { return self._s[2514]! }
- public var VoiceOver_Chat_YourMusic: String { return self._s[2515]! }
- public var SettingsSearch_Synonyms_Notifications_ResetAllNotifications: String { return self._s[2516]! }
- public var Conversation_EmptyGifPanelPlaceholder: String { return self._s[2517]! }
- public var Conversation_ContextMenuOpenChannel: String { return self._s[2518]! }
- public var Report_AdditionalDetailsPlaceholder: String { return self._s[2519]! }
- public var Activity_UploadingVideo: String { return self._s[2520]! }
- public var PrivacyPolicy_AgeVerificationAgree: String { return self._s[2522]! }
- public var Widget_LongTapToEdit: String { return self._s[2523]! }
- public var VoiceChat_InviteLink_Listener: String { return self._s[2525]! }
- public var SocksProxySetup_Credentials: String { return self._s[2526]! }
- public var Preview_SaveGif: String { return self._s[2527]! }
- public var Cache_Photos: String { return self._s[2528]! }
- public var Channel_AdminLogFilter_EventsCalls: String { return self._s[2529]! }
- public var Conversation_ContextMenuCancelEditing: String { return self._s[2530]! }
- public var Contacts_FailedToSendInvitesMessage: String { return self._s[2531]! }
- public func VoiceChat_RemoveAndBanPeerConfirmation(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2532]!, self._r[2532]!, [_1, _2])
- }
- public var Passport_Language_lt: String { return self._s[2533]! }
- public var Passport_DeleteDocument: String { return self._s[2535]! }
- public var GroupInfo_SetGroupPhotoStop: String { return self._s[2536]! }
- public func Location_ProximityNotification_NotifyLong(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2537]!, self._r[2537]!, [_1, _2])
- }
- public var AccessDenied_VideoMessageMicrophone: String { return self._s[2538]! }
- public func PeopleNearby_VisibleUntil(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2539]!, self._r[2539]!, [_0])
- }
- public var AccessDenied_VideoCallCamera: String { return self._s[2540]! }
- public func Channel_AdminLog_MessageDeleted(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2541]!, self._r[2541]!, [_0])
- }
- public var PhotoEditor_SharpenTool: String { return self._s[2542]! }
- public func PUSH_CHANNEL_MESSAGE_AUDIO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2543]!, self._r[2543]!, [_1])
- }
- public var DialogList_Unpin: String { return self._s[2544]! }
- public var Stickers_NoStickersFound: String { return self._s[2545]! }
- public var UserInfo_AddContact: String { return self._s[2547]! }
- public func AddContact_SharedContactExceptionInfo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2549]!, self._r[2549]!, [_0])
- }
- public func Notification_PinnedLocationMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2550]!, self._r[2550]!, [_0])
- }
- public var CallFeedback_VideoReasonDistorted: String { return self._s[2551]! }
- public var Tour_Text2: String { return self._s[2552]! }
- public func Conversation_TitleCommentsFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2554]!, self._r[2554]!, [_1, _2])
- }
- public var InviteLink_DeleteAllRevokedLinksAlert_Text: String { return self._s[2556]! }
- public var Paint_Delete: String { return self._s[2557]! }
- public func Call_VoiceChatInProgressMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2558]!, self._r[2558]!, [_1, _2])
- }
- public var SettingsSearch_Synonyms_Notifications_InAppNotificationsVibrate: String { return self._s[2559]! }
- public func PrivacySettings_LastSeenEverybodyMinus(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2561]!, self._r[2561]!, [_0])
- }
- public var Privacy_Calls_NeverAllow_Title: String { return self._s[2562]! }
- public var Notification_CallOutgoingShort: String { return self._s[2563]! }
- public var Checkout_PasswordEntry_Title: String { return self._s[2564]! }
- public var Channel_AdminLogFilter_AdminsAll: String { return self._s[2565]! }
- public var Notification_MessageLifetime1m: String { return self._s[2566]! }
- public var BlockedUsers_AddNew: String { return self._s[2568]! }
- public var FastTwoStepSetup_EmailSection: String { return self._s[2569]! }
- public var Settings_SaveEditedPhotos: String { return self._s[2570]! }
- public var GroupInfo_GroupNamePlaceholder: String { return self._s[2571]! }
- public func ImportStickerPack_Of(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2572]!, self._r[2572]!, [_1, _2])
- }
- public var Channel_AboutItem: String { return self._s[2573]! }
- public var GroupInfo_InviteLink_RevokeLink: String { return self._s[2574]! }
- public var Privacy_Calls_P2PNever: String { return self._s[2576]! }
- public var Passport_Language_uk: String { return self._s[2577]! }
- public var NetworkUsageSettings_Wifi: String { return self._s[2578]! }
- public var Conversation_Moderate_Report: String { return self._s[2579]! }
- public var Wallpaper_ResetWallpapersConfirmation: String { return self._s[2580]! }
- public var VoiceOver_Chat_SeenByRecipients: String { return self._s[2581]! }
- public var Permissions_SiriText_v0: String { return self._s[2582]! }
- public var Theme_Colors_Background: String { return self._s[2583]! }
- public var Notification_CallMissed: String { return self._s[2584]! }
- public var Stats_ZoomOut: String { return self._s[2585]! }
- public var Profile_AddToExisting: String { return self._s[2586]! }
- public var Passport_FieldAddressUploadHelp: String { return self._s[2589]! }
- public var VoiceChat_RemovePeerRemove: String { return self._s[2590]! }
- public var Undo_DeletedChannel: String { return self._s[2591]! }
- public func Channel_AdminLog_MessagePinned(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2592]!, self._r[2592]!, [_0])
- }
- public var Login_ResetAccountProtected_TimerTitle: String { return self._s[2593]! }
- public var Map_LiveLocationGroupDescription: String { return self._s[2594]! }
- public var Passport_InfoFAQ_URL: String { return self._s[2595]! }
- public var IntentsSettings_SuggestedChats: String { return self._s[2598]! }
- public func PUSH_MESSAGE_DOC(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2599]!, self._r[2599]!, [_1])
- }
- public var State_connecting: String { return self._s[2600]! }
- public var Passport_Identity_Country: String { return self._s[2601]! }
- public var Passport_PasswordDescription: String { return self._s[2602]! }
- public var ChatList_PsaLabel_covid: String { return self._s[2603]! }
- public func PUSH_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2604]!, self._r[2604]!, [_1])
- }
- public var Contacts_AddPeopleNearby: String { return self._s[2605]! }
- public var OwnershipTransfer_SetupTwoStepAuth: String { return self._s[2606]! }
- public var ClearCache_Description: String { return self._s[2607]! }
- public var Localization_LanguageName: String { return self._s[2608]! }
- public func UserInfo_UnblockConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2609]!, self._r[2609]!, [_0])
- }
- public var Conversation_AddMembers: String { return self._s[2610]! }
- public var ChatList_TabIconFoldersTooltipEmptyFolders: String { return self._s[2611]! }
- public var UserInfo_CreateNewContact: String { return self._s[2612]! }
- public var Channel_Stickers_NotFound: String { return self._s[2614]! }
- public var Message_FakeAccount: String { return self._s[2615]! }
- public var Watch_Message_Poll: String { return self._s[2616]! }
- public var Group_Members_Title: String { return self._s[2617]! }
- public var Privacy_Forwards_WhoCanForward: String { return self._s[2618]! }
- public func Notification_Kicked(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2619]!, self._r[2619]!, [_0, _1])
- }
- public var VoiceChat_CancelConfirmationText: String { return self._s[2620]! }
- public var BroadcastGroups_Convert: String { return self._s[2621]! }
- public var Login_InfoDeletePhoto: String { return self._s[2622]! }
- public var Appearance_ThemePreview_ChatList_6_Name: String { return self._s[2623]! }
- public var InstantPage_FeedbackButton: String { return self._s[2624]! }
- public var Appearance_PreviewReplyText: String { return self._s[2625]! }
- public var Passport_FieldPhoneHelp: String { return self._s[2626]! }
- public var Group_ErrorAddTooMuchBots: String { return self._s[2627]! }
- public var Media_SendingOptionsTooltip: String { return self._s[2628]! }
- public var ScheduledMessages_ScheduledOnline: String { return self._s[2629]! }
- public var Notifications_Badge: String { return self._s[2630]! }
- public var VoiceOver_Chat_VideoMessage: String { return self._s[2631]! }
- public var TwoStepAuth_RecoveryCodeExpired: String { return self._s[2632]! }
- public func Notification_PinnedPhotoMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2634]!, self._r[2634]!, [_0])
- }
- public var Passport_InfoLearnMore: String { return self._s[2635]! }
- public var EnterPasscode_EnterTitle: String { return self._s[2636]! }
- public var Appearance_EditTheme: String { return self._s[2637]! }
- public var EditTheme_Expand_BottomInfo: String { return self._s[2638]! }
- public var Stats_FollowersTitle: String { return self._s[2639]! }
- public var Passport_Identity_SurnamePlaceholder: String { return self._s[2640]! }
- public var Channel_Subscribers_Title: String { return self._s[2641]! }
- public var Group_ErrorSupergroupConversionNotPossible: String { return self._s[2642]! }
- public var ChatImportActivity_ErrorGeneric: String { return self._s[2643]! }
- public var EditTheme_ThemeTemplateAlertTitle: String { return self._s[2644]! }
- public var EditTheme_Create_Preview_IncomingText: String { return self._s[2645]! }
- public var Conversation_AddToReadingList: String { return self._s[2646]! }
- public var VoiceChat_EditBioPlaceholder: String { return self._s[2647]! }
- public func Notifications_ExceptionsChangeSound(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2648]!, self._r[2648]!, [_0])
- }
- public var Group_AdminLog_EmptyText: String { return self._s[2649]! }
- public var Passport_Identity_EditInternalPassport: String { return self._s[2650]! }
- public var Watch_Location_Current: String { return self._s[2651]! }
- public var Appearance_AppIconNew1: String { return self._s[2652]! }
- public var PrivacyPolicy_Title: String { return self._s[2653]! }
- public var Privacy_GroupsAndChannels_CustomHelp: String { return self._s[2660]! }
- public var Channel_TypeSetup_Title: String { return self._s[2664]! }
- public var Appearance_PreviewReplyAuthor: String { return self._s[2665]! }
- public var Passport_Language_ja: String { return self._s[2666]! }
- public var ReportPeer_ReasonSpam: String { return self._s[2667]! }
- public var Widget_GalleryDescription: String { return self._s[2668]! }
- public var Privacy_PaymentsClearInfoHelp: String { return self._s[2669]! }
- public var VoiceChat_ChangePhoto: String { return self._s[2671]! }
- public var Conversation_EditingMessageMediaEditCurrentPhoto: String { return self._s[2672]! }
- public var Channel_AdminLog_ChangeInfo: String { return self._s[2673]! }
- public var ChatListFolder_NameNonContacts: String { return self._s[2674]! }
- public func InviteLink_ExpiresIn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2675]!, self._r[2675]!, [_0])
- }
- public var Call_Audio: String { return self._s[2676]! }
- public var PhotoEditor_CurvesGreen: String { return self._s[2677]! }
- public var ChatList_Search_NoResultsFitlerFiles: String { return self._s[2678]! }
- public var Settings_PrivacySettings: String { return self._s[2679]! }
- public var InviteLink_UsageLimitReached: String { return self._s[2680]! }
- public var Stats_Followers: String { return self._s[2681]! }
- public var Notifications_AddExceptionTitle: String { return self._s[2682]! }
- public var TwoFactorSetup_Password_Title: String { return self._s[2683]! }
- public var ChannelMembers_WhoCanAddMembersAllHelp: String { return self._s[2684]! }
- public var OldChannels_NoticeText: String { return self._s[2685]! }
- public var Conversation_SavedMessages: String { return self._s[2686]! }
- public var Intents_ErrorLockedText: String { return self._s[2687]! }
- public func Conversation_PeerNearbyTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2689]!, self._r[2689]!, [_1, _2])
- }
- public var Passport_Address_TypeResidentialAddress: String { return self._s[2690]! }
- public var Appearance_ThemeNightBlue: String { return self._s[2691]! }
- public var Notification_ChannelInviterSelf: String { return self._s[2692]! }
- public var Conversation_ForwardTooltip_SavedMessages_Many: String { return self._s[2693]! }
- public var InviteLink_Create_TimeLimitExpiryDateNever: String { return self._s[2695]! }
- public var Watch_UserInfo_Service: String { return self._s[2696]! }
- public var ChatList_Context_Back: String { return self._s[2697]! }
- public var Passport_Email_Title: String { return self._s[2698]! }
- public var ImportStickerPack_AddToExistingStickerSet: String { return self._s[2699]! }
- public var Stats_GroupTopAdmin_Promote: String { return self._s[2700]! }
- public func PUSH_PINNED_INVOICE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2701]!, self._r[2701]!, [_1])
- }
- public var Conversation_UnsupportedMedia: String { return self._s[2702]! }
- public var Passport_Address_OneOfTypePassportRegistration: String { return self._s[2703]! }
- public var Privacy_TopPeersHelp: String { return self._s[2705]! }
- public var Privacy_Forwards_AlwaysLink: String { return self._s[2706]! }
- public var Notifications_Badge_CountUnreadMessages_InfoOn: String { return self._s[2707]! }
- public var Permissions_NotificationsTitle_v0: String { return self._s[2708]! }
- public func Location_ProximityNotification_AlreadyClose(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2709]!, self._r[2709]!, [_0])
- }
- public var Notification_PassportValueProofOfAddress: String { return self._s[2710]! }
- public var Map_Map: String { return self._s[2711]! }
- public var WallpaperSearch_ColorBlue: String { return self._s[2712]! }
- public var Privacy_Calls_CustomShareHelp: String { return self._s[2713]! }
- public var PhotoEditor_BlurToolRadial: String { return self._s[2714]! }
- public var ChatList_Search_FilterMusic: String { return self._s[2715]! }
- public var SettingsSearch_Synonyms_Data_AutoplayGifs: String { return self._s[2716]! }
- public var Privacy_PaymentsClear_ShippingInfo: String { return self._s[2717]! }
- public var Settings_LogoutConfirmationTitle: String { return self._s[2719]! }
- public func PUSH_CHANNEL_MESSAGE_VIDEOS(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2720]!, self._r[2720]!, [_1, _2])
- }
- public func Notification_ChangedGroupPhoto(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2721]!, self._r[2721]!, [_0])
- }
- public var Channel_Username_RevokeExistingUsernamesInfo: String { return self._s[2722]! }
- public var Group_Username_CreatePublicLinkHelp: String { return self._s[2723]! }
- public var VoiceOver_ChatList_MessageEmpty: String { return self._s[2725]! }
- public var GroupInfo_Location: String { return self._s[2726]! }
- public var Passport_Language_ka: String { return self._s[2727]! }
- public func TwoStepAuth_SetupPendingEmail(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2728]!, self._r[2728]!, [_0])
- }
- public var Conversation_ContextMenuOpenChannelProfile: String { return self._s[2729]! }
- public var ChatImport_SelectionConfirmationAlertTitle: String { return self._s[2731]! }
- public var ScheduledMessages_ClearAllConfirmation: String { return self._s[2733]! }
- public var DialogList_SearchSectionRecent: String { return self._s[2734]! }
- public var Passport_Address_OneOfTypeTemporaryRegistration: String { return self._s[2735]! }
- public var Conversation_Timer_Send: String { return self._s[2736]! }
- public func VoiceOver_ScrollStatus(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2738]!, self._r[2738]!, [_1, _2])
- }
- public var ChatState_Updating: String { return self._s[2739]! }
- public var ChannelMembers_WhoCanAddMembers: String { return self._s[2740]! }
- public var ChannelInfo_DeleteGroup: String { return self._s[2741]! }
- public var TwoStepAuth_RecoveryFailed: String { return self._s[2742]! }
- public var Channel_OwnershipTransfer_EnterPassword: String { return self._s[2743]! }
- public var InviteLink_Create_TimeLimitExpiryTime: String { return self._s[2744]! }
- public var ChannelInfo_InviteLink_RevokeAlert_Text: String { return self._s[2745]! }
- public var ChatList_Search_NoResults: String { return self._s[2746]! }
- public var ChatListFolderSettings_AddRecommended: String { return self._s[2748]! }
- public var ChangePhoneNumberCode_Called: String { return self._s[2749]! }
- public var PeerInfo_GroupAboutItem: String { return self._s[2750]! }
- public var VoiceOver_SelfDestructTimerOff: String { return self._s[2752]! }
- public func Channel_AdminLog_DeletedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2753]!, self._r[2753]!, [_1, _2])
- }
- public func LiveLocationUpdated_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2754]!, self._r[2754]!, [_0])
- }
- public var PrivacySettings_AuthSessions: String { return self._s[2755]! }
- public var Passport_Address_Postcode: String { return self._s[2756]! }
- public var VoiceOver_Chat_YourVideoMessage: String { return self._s[2757]! }
- public func VoiceChat_ForwardTooltip_ManyChats(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2758]!, self._r[2758]!, [_0, _1])
- }
- public var Passport_Address_Street2Placeholder: String { return self._s[2759]! }
- public var Group_Location_Title: String { return self._s[2760]! }
- public var SettingsSearch_Synonyms_Data_AutoDownloadReset: String { return self._s[2761]! }
- public var PeopleNearby_UsersEmpty: String { return self._s[2762]! }
- public var Conversation_ContextMenuSpeak: String { return self._s[2764]! }
- public var SettingsSearch_Synonyms_Data_Title: String { return self._s[2765]! }
- public func Checkout_PasswordEntry_Text(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2767]!, self._r[2767]!, [_0])
- }
- public var Proxy_TooltipUnavailable: String { return self._s[2768]! }
- public var Map_Search: String { return self._s[2769]! }
- public var VoiceChat_CancelConfirmationTitle: String { return self._s[2770]! }
- public var AutoDownloadSettings_TypeContacts: String { return self._s[2771]! }
- public var Conversation_SearchByName_Prefix: String { return self._s[2772]! }
- public func Channel_AdminLog_MessageToggleSignaturesOff(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2773]!, self._r[2773]!, [_0])
- }
- public var TwoStepAuth_EmailAddSuccess: String { return self._s[2774]! }
- public var ProfilePhoto_MainPhoto: String { return self._s[2775]! }
- public var SettingsSearch_Synonyms_Notifications_InAppNotificationsSound: String { return self._s[2776]! }
- public var SharedMedia_EmptyMusicText: String { return self._s[2777]! }
- public var ChatSettings_AutoDownloadPhotos: String { return self._s[2778]! }
- public var NetworkUsageSettings_BytesReceived: String { return self._s[2779]! }
- public var Channel_AdminLog_EmptyText: String { return self._s[2780]! }
- public var ImportStickerPack_InProgress: String { return self._s[2781]! }
- public var Channel_BanUser_PermissionSendMessages: String { return self._s[2782]! }
- public var Undo_ChatDeletedForBothSides: String { return self._s[2783]! }
- public var Notifications_GroupNotifications: String { return self._s[2784]! }
- public var AccessDenied_SaveMedia: String { return self._s[2785]! }
- public var InviteLink_Create_Revoke: String { return self._s[2786]! }
- public var GroupInfo_LabelOwner: String { return self._s[2787]! }
- public var TwoFactorSetup_PasswordRecovery_Action: String { return self._s[2788]! }
- public var Passport_Language_id: String { return self._s[2790]! }
- public var ChatSettings_AutoDownloadTitle: String { return self._s[2791]! }
- public var Conversation_UnpinMessageAlert: String { return self._s[2792]! }
- public func LiveLocationUpdated_TodayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2793]!, self._r[2793]!, [_0])
- }
- public func Call_RemoteVideoPaused(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2794]!, self._r[2794]!, [_0])
- }
- public var TwoFactorSetup_Done_Text: String { return self._s[2795]! }
- public func LastSeen_AtDate(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2796]!, self._r[2796]!, [_0])
- }
- public var NetworkUsageSettings_BytesSent: String { return self._s[2797]! }
- public var Conversation_AudioRateTooltipNormal: String { return self._s[2798]! }
- public var VoiceChat_EditDescriptionSuccess: String { return self._s[2799]! }
- public var OwnershipTransfer_Transfer: String { return self._s[2800]! }
- public func Notification_Exceptions_Sound(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2801]!, self._r[2801]!, [_0])
- }
- public var Passport_Language_pt: String { return self._s[2802]! }
- public var PrivacySettings_WebSessions: String { return self._s[2803]! }
- public var PrivacyPolicy_DeclineDeleteNow: String { return self._s[2805]! }
- public var TwoFactorSetup_Hint_Title: String { return self._s[2806]! }
- public func Notification_Joined(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2807]!, self._r[2807]!, [_0])
- }
- public var Group_Username_RemoveExistingUsernamesInfo: String { return self._s[2808]! }
- public var PrivacyLastSeenSettings_CustomShareSettings_Delete: String { return self._s[2809]! }
- public var AutoNightTheme_Scheduled: String { return self._s[2810]! }
- public var CreatePoll_ExplanationHeader: String { return self._s[2811]! }
- public var Calls_TabTitle: String { return self._s[2812]! }
- public var VoiceChat_RecordingInProgress: String { return self._s[2813]! }
- public var ChatList_UndoArchiveHiddenText: String { return self._s[2814]! }
- public var Notification_VideoCallCanceled: String { return self._s[2815]! }
- public var Login_CodeSentInternal: String { return self._s[2816]! }
- public var SettingsSearch_Synonyms_Proxy_AddProxy: String { return self._s[2817]! }
- public var Call_RecordingDisabledMessage: String { return self._s[2819]! }
- public func VoiceChat_RemovedPeerText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2820]!, self._r[2820]!, [_0])
- }
- public var Conversation_UsersTooMuchError: String { return self._s[2822]! }
- public var AutoDownloadSettings_TypeChannels: String { return self._s[2823]! }
- public var VoiceChat_StopScreenSharingShort: String { return self._s[2824]! }
- public var Channel_Info_Stickers: String { return self._s[2825]! }
- public var Passport_DeleteAddressConfirmation: String { return self._s[2826]! }
- public func Conversation_PeerNearbyDistance(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2827]!, self._r[2827]!, [_1, _2])
- }
- public var ChannelMembers_WhoCanAddMembers_Admins: String { return self._s[2828]! }
- public func Call_StatusOngoing(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2829]!, self._r[2829]!, [_0])
- }
- public var Passport_DiscardMessageTitle: String { return self._s[2830]! }
- public var Call_VoiceOver_VideoCallIncoming: String { return self._s[2831]! }
- public var Localization_LanguageOther: String { return self._s[2832]! }
- public var Conversation_EncryptionCanceled: String { return self._s[2833]! }
- public var ChatSettings_AutomaticPhotoDownload: String { return self._s[2834]! }
- public var ReportPeer_ReasonFake: String { return self._s[2836]! }
- public func Notification_SecretChatMessageScreenshot(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2837]!, self._r[2837]!, [_0])
- }
- public var Target_InviteToGroupErrorAlreadyInvited: String { return self._s[2839]! }
- public var SocksProxySetup_SavedProxies: String { return self._s[2840]! }
- public var InviteLink_Create_UsersLimitNumberOfUsers: String { return self._s[2841]! }
- public func ApplyLanguage_ChangeLanguageAlreadyActive(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2842]!, self._r[2842]!, [_1])
- }
- public var Conversation_ScamWarning: String { return self._s[2844]! }
- public var Channel_AdminLog_InfoPanelAlertTitle: String { return self._s[2845]! }
- public var LocalGroup_Title: String { return self._s[2846]! }
- public var SettingsSearch_Synonyms_Notifications_MessageNotificationsAlert: String { return self._s[2848]! }
- public var SettingsSearch_Synonyms_Privacy_PasscodeAndFaceId: String { return self._s[2849]! }
- public var VoiceChat_SelectAccount: String { return self._s[2850]! }
- public var Login_PhoneFloodError: String { return self._s[2851]! }
- public var Conversation_PinMessageAlert_PinAndNotifyMembers: String { return self._s[2852]! }
- public var Username_InvalidTaken: String { return self._s[2854]! }
- public var SocksProxySetup_AddProxy: String { return self._s[2856]! }
- public var PrivacyLastSeenSettings_WhoCanSeeMyTimestamp: String { return self._s[2857]! }
- public var MediaPicker_UngroupDescription: String { return self._s[2858]! }
- public var Login_CodeExpired: String { return self._s[2859]! }
- public var Localization_ChooseLanguage: String { return self._s[2860]! }
- public var Checkout_NewCard_PostcodePlaceholder: String { return self._s[2861]! }
- public func ChangePhone_ErrorOccupied(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2862]!, self._r[2862]!, [_0])
- }
- public func Channel_DiscussionGroup_HeaderSet(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2863]!, self._r[2863]!, [_0])
- }
- public var ReportPeer_ReasonOther_Title: String { return self._s[2865]! }
- public var Conversation_ScheduleMessage_Title: String { return self._s[2866]! }
- public func VoiceChat_UserInvited(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2867]!, self._r[2867]!, [_0])
- }
- public var PeerInfo_ButtonDiscuss: String { return self._s[2868]! }
- public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedPublicGroups: String { return self._s[2869]! }
- public var Call_StatusNoAnswer: String { return self._s[2870]! }
- public var ScheduledMessages_DeleteMany: String { return self._s[2872]! }
- public var Channel_DiscussionGroupInfo: String { return self._s[2873]! }
- public var Conversation_UnarchiveDone: String { return self._s[2874]! }
- public var LogoutOptions_AddAccountText: String { return self._s[2875]! }
- public var Message_PinnedContactMessage: String { return self._s[2876]! }
- public func ChatList_DeleteAndLeaveGroupConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2877]!, self._r[2877]!, [_0])
- }
- public var VoiceChat_EditBioTitle: String { return self._s[2879]! }
- public func FileSize_GB(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2880]!, self._r[2880]!, [_0])
- }
- public var Stats_GroupLanguagesTitle: String { return self._s[2881]! }
- public var Passport_FieldAddressHelp: String { return self._s[2882]! }
- public func Passport_FieldOneOf_Or(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2883]!, self._r[2883]!, [_1, _2])
- }
- public var ChatSettings_OpenLinksIn: String { return self._s[2885]! }
- public var TwoFactorSetup_Hint_SkipAction: String { return self._s[2886]! }
- public var Message_Photo: String { return self._s[2887]! }
- public var Media_LimitedAccessManage: String { return self._s[2889]! }
- public var MediaPicker_AddCaption: String { return self._s[2890]! }
- public var LogoutOptions_Title: String { return self._s[2891]! }
- public func PUSH_PINNED_GIF(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2892]!, self._r[2892]!, [_1])
- }
- public var Conversation_StatusKickedFromGroup: String { return self._s[2893]! }
- public var Channel_AdminLogFilter_AdminsTitle: String { return self._s[2894]! }
- public var ChatList_DeleteSavedMessagesConfirmationTitle: String { return self._s[2895]! }
- public var Channel_AdminLogFilter_Title: String { return self._s[2896]! }
- public var Passport_Address_TypeRentalAgreementUploadScan: String { return self._s[2897]! }
- public var Compose_GroupTokenListPlaceholder: String { return self._s[2898]! }
- public var Notifications_MessageNotificationsExceptions: String { return self._s[2899]! }
- public var ChannelIntro_Title: String { return self._s[2900]! }
- public var Stats_Message_Views: String { return self._s[2901]! }
- public var Stickers_Install: String { return self._s[2902]! }
- public func VoiceOver_Chat_FileFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2903]!, self._r[2903]!, [_0])
- }
- public var EditTheme_Create_Preview_IncomingReplyText: String { return self._s[2904]! }
- public var Conversation_SwipeToReplyHintTitle: String { return self._s[2906]! }
- public var Settings_Username: String { return self._s[2909]! }
- public var FastTwoStepSetup_Title: String { return self._s[2910]! }
- public var Notifications_Badge_CountUnreadMessages_InfoOff: String { return self._s[2911]! }
- public var SettingsSearch_Synonyms_Privacy_Title: String { return self._s[2912]! }
- public var Passport_Identity_IssueDatePlaceholder: String { return self._s[2914]! }
- public var CallFeedback_ReasonEcho: String { return self._s[2915]! }
- public func Time_MonthOfYear_m1(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2916]!, self._r[2916]!, [_0])
- }
- public var Conversation_OpenBotLinkTitle: String { return self._s[2917]! }
- public var SocksProxySetup_Title: String { return self._s[2918]! }
- public var CallFeedback_Success: String { return self._s[2919]! }
- public var WallpaperPreview_SwipeTopText: String { return self._s[2921]! }
- public var InstantPage_AutoNightTheme: String { return self._s[2923]! }
- public var Watch_Conversation_Reply: String { return self._s[2924]! }
- public var VoiceChat_Share: String { return self._s[2926]! }
- public var VoiceChat_AddPhoto: String { return self._s[2927]! }
- public var Chat_PanelUnpinAllMessages: String { return self._s[2928]! }
- public var WallpaperPreview_Pattern: String { return self._s[2929]! }
- public var CheckoutInfo_ReceiverInfoEmail: String { return self._s[2930]! }
- public func Conversation_DeleteMessagesFor(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2931]!, self._r[2931]!, [_0])
- }
- public var AutoDownloadSettings_TypeGroupChats: String { return self._s[2932]! }
- public var VoiceOver_Chat_GroupInfo: String { return self._s[2933]! }
- public var DialogList_SavedMessagesTooltip: String { return self._s[2935]! }
- public var Update_Title: String { return self._s[2936]! }
- public var Conversation_ShareMyPhoneNumber: String { return self._s[2937]! }
- public var WallpaperPreview_CropTopText: String { return self._s[2940]! }
- public var Channel_EditMessageErrorGeneric: String { return self._s[2941]! }
- public var AccessDenied_LocationAlwaysDenied: String { return self._s[2942]! }
- public var ChatListFolder_DiscardCancel: String { return self._s[2943]! }
- public var Message_PinnedPhotoMessage: String { return self._s[2944]! }
- public var Appearance_ThemeDayClassic: String { return self._s[2945]! }
- public var VoiceChat_ChangeName: String { return self._s[2946]! }
- public var SocksProxySetup_ProxySocks5: String { return self._s[2948]! }
- public var VoiceChat_DisplayAsInfo: String { return self._s[2950]! }
- public var AccessDenied_Wallpapers: String { return self._s[2955]! }
- public func Channel_AdminLog_MessageChangedGroupAbout(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2956]!, self._r[2956]!, [_0])
- }
- public var Weekday_Sunday: String { return self._s[2957]! }
- public var SettingsSearch_Synonyms_Privacy_GroupsAndChannels: String { return self._s[2959]! }
- public var PeopleNearby_MakeVisibleDescription: String { return self._s[2960]! }
- public var AccessDenied_LocationDisabled: String { return self._s[2961]! }
- public var Tour_Text3: String { return self._s[2962]! }
- public var AuthSessions_AddDevice_ScanTitle: String { return self._s[2963]! }
- public func Time_TodayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2964]!, self._r[2964]!, [_0])
- }
- public var Privacy_SecretChatsLinkPreviewsHelp: String { return self._s[2965]! }
- public var Conversation_ClearCache: String { return self._s[2966]! }
- public var StickerPacksSettings_ArchivedMasks_Info: String { return self._s[2967]! }
- public var ChatList_Tabs_AllChats: String { return self._s[2968]! }
- public var DialogList_RecentTitlePeople: String { return self._s[2969]! }
- public var Stickers_AddToFavorites: String { return self._s[2970]! }
- public var ChatList_Context_RemoveFromFolder: String { return self._s[2971]! }
- public var VoiceChat_CancelSpeakRequest: String { return self._s[2972]! }
- public var Settings_RemoveVideo: String { return self._s[2973]! }
- public var PhotoEditor_CropAspectRatioSquare: String { return self._s[2974]! }
- public var ConversationProfile_LeaveDeleteAndExit: String { return self._s[2975]! }
- public var VoiceOver_Chat_YourFile: String { return self._s[2976]! }
- public var SettingsSearch_Synonyms_Privacy_Forwards: String { return self._s[2978]! }
- public var Group_OwnershipTransfer_ErrorPrivacyRestricted: String { return self._s[2979]! }
- public var VoiceChat_TapToAddBio: String { return self._s[2980]! }
- public var Channel_AdminLog_AddMembers: String { return self._s[2981]! }
- public var Map_SendThisLocation: String { return self._s[2983]! }
- public var TwoStepAuth_EmailSkipAlert: String { return self._s[2985]! }
- public var IntentsSettings_SuggestedChatsPrivateChats: String { return self._s[2986]! }
- public var CloudStorage_Title: String { return self._s[2987]! }
- public var TwoFactorSetup_Password_Action: String { return self._s[2988]! }
- public var TwoStepAuth_ConfirmationText: String { return self._s[2989]! }
- public var Passport_Address_EditTemporaryRegistration: String { return self._s[2991]! }
- public var Undo_LeftGroup: String { return self._s[2992]! }
- public var Conversation_StopLiveLocation: String { return self._s[2993]! }
- public var NotificationSettings_ShowNotificationsFromAccountsSection: String { return self._s[2994]! }
- public var Message_PinnedInvoice: String { return self._s[2995]! }
- public var ApplyLanguage_LanguageNotSupportedError: String { return self._s[2996]! }
- public func PUSH_CHAT_MESSAGE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2998]!, self._r[2998]!, [_1, _2])
- }
- public func Notification_PinnedAudioMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[2999]!, self._r[2999]!, [_0])
- }
- public var TwoStepAuth_RecoveryUnavailableResetTitle: String { return self._s[3000]! }
- public var Weekday_Tuesday: String { return self._s[3001]! }
- public var ChangePhoneNumberCode_Code: String { return self._s[3002]! }
- public var VoiceOver_Chat_YourMessage: String { return self._s[3003]! }
- public var Calls_CallTabDescription: String { return self._s[3004]! }
- public var ChatImport_SelectionErrorNotAdmin: String { return self._s[3005]! }
- public var SocksProxySetup_UseProxy: String { return self._s[3007]! }
- public var SettingsSearch_Synonyms_Stickers_Title: String { return self._s[3008]! }
- public var PasscodeSettings_AlphanumericCode: String { return self._s[3009]! }
- public var VoiceOver_Chat_YourVideo: String { return self._s[3010]! }
- public var ChannelMembers_WhoCanAddMembersAdminsHelp: String { return self._s[3012]! }
- public var SettingsSearch_Synonyms_Privacy_DeleteAccountIfAwayFor: String { return self._s[3013]! }
- public var Exceptions_AddToExceptions: String { return self._s[3014]! }
- public var UserInfo_Title: String { return self._s[3015]! }
- public var Passport_DeleteDocumentConfirmation: String { return self._s[3017]! }
- public var VoiceChat_EditDescription: String { return self._s[3019]! }
- public var ChatList_Unmute: String { return self._s[3020]! }
- public var SettingsSearch_Synonyms_Privacy_Data_ContactsSync: String { return self._s[3021]! }
- public func Channel_AdminLog_MessageChangedAutoremoveTimeoutSet(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3022]!, self._r[3022]!, [_1, _2])
- }
- public var Stats_GroupTopPostersTitle: String { return self._s[3023]! }
- public var Username_CheckingUsername: String { return self._s[3025]! }
- public var WallpaperColors_SetCustomColor: String { return self._s[3026]! }
- public var PeerSelection_ImportIntoNewGroup: String { return self._s[3030]! }
- public var Location_ProximityAlertSetTitle: String { return self._s[3031]! }
- public var AuthSessions_AddedDeviceTerminate: String { return self._s[3032]! }
- public var Conversation_JoinVoiceChatAsSpeaker: String { return self._s[3033]! }
- public var Privacy_ProfilePhoto_CustomHelp: String { return self._s[3034]! }
- public var Settings_ChangePhoneNumber: String { return self._s[3035]! }
- public var PeerInfo_PaneLinks: String { return self._s[3036]! }
- public var Appearance_ThemePreview_ChatList_1_Text: String { return self._s[3039]! }
- public var Channel_EditAdmin_PermissionInviteSubscribers: String { return self._s[3041]! }
- public func PUSH_CHAT_VOICECHAT_INVITE_YOU(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3042]!, self._r[3042]!, [_1, _2])
- }
- public var LogoutOptions_ChangePhoneNumberText: String { return self._s[3043]! }
- public var VoiceOver_Media_PlaybackPause: String { return self._s[3044]! }
- public var VoiceChat_CancelConfirmationEnd: String { return self._s[3045]! }
- public var BroadcastGroups_ConfirmationAlert_Title: String { return self._s[3046]! }
- public var Stats_FollowersBySourceTitle: String { return self._s[3048]! }
- public func Conversation_ScheduleMessage_SendOn(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3049]!, self._r[3049]!, [_0, _1])
- }
- public var Compose_NewEncryptedChatTitle: String { return self._s[3050]! }
- public var Channel_CommentsGroup_Header: String { return self._s[3052]! }
- public func ShareFileTip_Text(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3056]!, self._r[3056]!, [_0])
- }
- public func PUSH_MESSAGE_AUDIO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3057]!, self._r[3057]!, [_1])
- }
- public var Group_Setup_BasicHistoryHiddenHelp: String { return self._s[3059]! }
- public func TwoStepAuth_RecoveryEmailUnavailable(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3060]!, self._r[3060]!, [_0])
- }
- public var Conversation_ReportMessages: String { return self._s[3061]! }
- public var Conversation_OpenBotLinkOpen: String { return self._s[3062]! }
- public var VoiceOver_Chat_RecordModeVoiceMessage: String { return self._s[3063]! }
- public var PrivacySettings_LastSeen: String { return self._s[3065]! }
- public var SettingsSearch_Synonyms_Privacy_Passcode: String { return self._s[3066]! }
- public var Theme_Colors_Proceed: String { return self._s[3067]! }
- public var UserInfo_ScamBotWarning: String { return self._s[3068]! }
- public var LogoutOptions_LogOut: String { return self._s[3070]! }
- public var Conversation_SendMessage: String { return self._s[3071]! }
- public var Conversation_CancelForwardCancelForward: String { return self._s[3072]! }
- public var VoiceChat_Scheduled: String { return self._s[3074]! }
- public var Passport_Address_Region: String { return self._s[3075]! }
- public var MediaPicker_CameraRoll: String { return self._s[3077]! }
- public func VoiceOver_Chat_ForwardedFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3079]!, self._r[3079]!, [_0])
- }
- public var Call_ReportSend: String { return self._s[3081]! }
- public var VoiceOver_ChatList_Message: String { return self._s[3082]! }
- public var Month_ShortJune: String { return self._s[3083]! }
- public var AutoDownloadSettings_GroupChats: String { return self._s[3084]! }
- public func Channel_AdminLog_CaptionEdited(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3087]!, self._r[3087]!, [_0])
- }
- public var TwoStepAuth_DisableSuccess: String { return self._s[3088]! }
- public var Cache_KeepMedia: String { return self._s[3089]! }
- public func Date_ChatDateHeaderYear(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3090]!, self._r[3090]!, [_1, _2, _3])
- }
- public var Appearance_LargeEmoji: String { return self._s[3091]! }
- public func Notification_NewAuthDetected(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String, _ _6: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3092]!, self._r[3092]!, [_1, _2, _3, _4, _5, _6])
- }
- public var Chat_AttachmentMultipleForwardDisabled: String { return self._s[3093]! }
- public var Privacy_PaymentsClear_PaymentInfoCleared: String { return self._s[3094]! }
- public var Call_CameraConfirmationText: String { return self._s[3095]! }
- public func AuthSessions_AppUnofficial(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3097]!, self._r[3097]!, [_0])
- }
- public var DialogList_SearchSectionChats: String { return self._s[3098]! }
- public var VoiceOver_MessageContextReport: String { return self._s[3100]! }
- public var VoiceChat_RemovePeer: String { return self._s[3101]! }
- public var ChatListFolder_ExcludeChatsTitle: String { return self._s[3102]! }
- public var InviteLink_ContextCopy: String { return self._s[3103]! }
- public var NotificationsSound_Tritone: String { return self._s[3105]! }
- public var VoiceChat_YouAreSharingScreen: String { return self._s[3107]! }
- public var Notifications_InAppNotificationsPreview: String { return self._s[3109]! }
- public var Stats_GroupTopAdmin_Actions: String { return self._s[3110]! }
- public var TwoFactorSetup_PasswordRecovery_SkipAlertText: String { return self._s[3111]! }
- public var TwoStepAuth_ResetAction: String { return self._s[3112]! }
- public var PeerInfo_AddToContacts: String { return self._s[3113]! }
- public var VoiceChat_OpenChat: String { return self._s[3114]! }
- public var AccessDenied_Title: String { return self._s[3115]! }
- public var InviteLink_QRCode_InfoChannel: String { return self._s[3116]! }
- public var Tour_Title1: String { return self._s[3117]! }
- public var VoiceOver_AttachMedia: String { return self._s[3118]! }
- public func SharedMedia_SearchNoResultsDescription(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3120]!, self._r[3120]!, [_0])
- }
- public var Chat_Gifs_SavedSectionHeader: String { return self._s[3121]! }
- public var Privacy_DeleteDrafts_DraftsDeleted: String { return self._s[3122]! }
- public var LogoutOptions_ChangePhoneNumberTitle: String { return self._s[3123]! }
- public func Passport_Scans_ScanIndex(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3124]!, self._r[3124]!, [_0])
- }
- public var Channel_AdminLog_MessagePreviousLink: String { return self._s[3125]! }
- public var OldChannels_Title: String { return self._s[3126]! }
- public var LoginPassword_FloodError: String { return self._s[3127]! }
- public var ChatImportActivity_InProgress: String { return self._s[3129]! }
- public var Checkout_ErrorPaymentFailed: String { return self._s[3130]! }
- public func Time_MonthOfYear_m7(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3131]!, self._r[3131]!, [_0])
- }
- public var VoiceOver_Media_PlaybackPlay: String { return self._s[3134]! }
- public var Passport_CorrectErrors: String { return self._s[3136]! }
- public func PUSH_CHAT_PHOTO_EDITED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3137]!, self._r[3137]!, [_1, _2])
- }
- public var ChatListFolderSettings_Title: String { return self._s[3138]! }
- public func AutoDownloadSettings_UpToFor(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3139]!, self._r[3139]!, [_1, _2])
- }
- public var PhotoEditor_HighlightsTool: String { return self._s[3140]! }
- public var Contacts_NotRegisteredSection: String { return self._s[3143]! }
- public func Call_VoiceChatInProgressCallMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3144]!, self._r[3144]!, [_1, _2])
- }
- public func PUSH_PINNED_DOC(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3145]!, self._r[3145]!, [_1])
- }
- public var InviteLink_Create_UsersLimitInfo: String { return self._s[3146]! }
- public var User_DeletedAccount: String { return self._s[3147]! }
- public var Conversation_ViewContactDetails: String { return self._s[3148]! }
- public var Conversation_Dice_u1F3B3: String { return self._s[3149]! }
- public var WebSearch_GIFs: String { return self._s[3150]! }
- public var ChatList_DeleteSavedMessagesConfirmationAction: String { return self._s[3151]! }
- public var Appearance_PreviewOutgoingText: String { return self._s[3152]! }
- public var Calls_CallTabTitle: String { return self._s[3153]! }
- public var Call_VoiceChatInProgressTitle: String { return self._s[3154]! }
- public var Checkout_OptionalTipItem: String { return self._s[3155]! }
- public func LastSeen_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3156]!, self._r[3156]!, [_0])
- }
- public var Channel_Status: String { return self._s[3157]! }
- public var Conversation_SendMessageErrorGroupRestricted: String { return self._s[3159]! }
- public var VoiceOver_Chat_OptionSelected: String { return self._s[3160]! }
- public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsAlert: String { return self._s[3161]! }
- public func ClearCache_Success(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3162]!, self._r[3162]!, [_0, _1])
- }
- public var Passport_Identity_ExpiryDateNone: String { return self._s[3164]! }
- public var Your_cards_expiration_month_is_invalid: String { return self._s[3166]! }
- public var Month_ShortDecember: String { return self._s[3167]! }
- public var Username_Help: String { return self._s[3168]! }
- public var Login_InfoAvatarAdd: String { return self._s[3169]! }
- public var Month_ShortMay: String { return self._s[3170]! }
- public var DialogList_UnknownPinLimitError: String { return self._s[3171]! }
- public var PasscodeSettings_AutoLock_IfAwayFor_5hours: String { return self._s[3172]! }
- public var TwoStepAuth_EnabledSuccess: String { return self._s[3173]! }
- public var VoiceChat_StopScreenSharing: String { return self._s[3174]! }
- public var VoiceChat_AskedToSpeak: String { return self._s[3175]! }
- public var Weekday_ShortSunday: String { return self._s[3176]! }
- public var Channel_Username_InvalidTooShort: String { return self._s[3177]! }
- public var AuthSessions_TerminateSession: String { return self._s[3178]! }
- public var Passport_Identity_FilesTitle: String { return self._s[3179]! }
- public func Notification_PinnedRoundMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3180]!, self._r[3180]!, [_0])
- }
- public var PeopleNearby_MakeVisible: String { return self._s[3182]! }
- public func Conversation_RestrictedMediaTimed(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3183]!, self._r[3183]!, [_0])
- }
- public var Widget_UpdatedAt: String { return self._s[3184]! }
- public func Notification_MessageLifetimeChanged(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3185]!, self._r[3185]!, [_1, _2])
- }
- public func GroupInfo_AddParticipantConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3186]!, self._r[3186]!, [_0])
- }
- public var PrivacyPolicy_DeclineDeclineAndDelete: String { return self._s[3187]! }
- public var VoiceChat_VideoPreviewShareScreen: String { return self._s[3188]! }
- public var ImportStickerPack_ChooseStickerSet: String { return self._s[3190]! }
- public var Conversation_ContextMenuForward: String { return self._s[3191]! }
- public var Channel_AdminLog_CanManageCalls: String { return self._s[3192]! }
- public func PUSH_CHAT_MESSAGE_QUIZ(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3194]!, self._r[3194]!, [_1, _2, _3])
- }
- public var Notification_GroupInviterSelf: String { return self._s[3196]! }
- public var Privacy_Forwards_NeverLink: String { return self._s[3197]! }
- public var AuthSessions_CurrentSession: String { return self._s[3198]! }
- public var Passport_Address_EditPassportRegistration: String { return self._s[3199]! }
- public var ChannelInfo_DeleteChannelConfirmation: String { return self._s[3200]! }
- public var ChatSearch_ResultsTooltip: String { return self._s[3202]! }
- public var CheckoutInfo_Pay: String { return self._s[3203]! }
- public func Conversation_PinMessagesFor(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3205]!, self._r[3205]!, [_0])
- }
- public var GroupInfo_AddParticipant: String { return self._s[3206]! }
- public var GroupPermission_ApplyAlertAction: String { return self._s[3207]! }
- public func Channel_AdminLog_MessageChangedChannelUsername(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3208]!, self._r[3208]!, [_0])
- }
- public var Localization_LanguageCustom: String { return self._s[3209]! }
- public var SettingsSearch_Synonyms_Passport: String { return self._s[3210]! }
- public var Settings_UsernameEmpty: String { return self._s[3211]! }
- public var Settings_FAQ_URL: String { return self._s[3212]! }
- public var ChatList_UndoArchiveText1: String { return self._s[3213]! }
- public var Common_Select: String { return self._s[3215]! }
- public var Notification_MessageLifetimeRemovedOutgoing: String { return self._s[3216]! }
- public var Notification_PassportValueAddress: String { return self._s[3217]! }
- public var Conversation_MessageDialogDelete: String { return self._s[3218]! }
- public var Map_OpenInYandexNavigator: String { return self._s[3220]! }
- public var DialogList_SearchSectionDialogs: String { return self._s[3221]! }
- public var AccessDenied_Contacts: String { return self._s[3222]! }
- public var SettingsSearch_Synonyms_Privacy_Data_DeleteDrafts: String { return self._s[3224]! }
- public var Passport_ScanPassportHelp: String { return self._s[3225]! }
- public var Chat_PinnedListPreview_HidePinnedMessages: String { return self._s[3226]! }
- public var ChatListFolder_NameChannels: String { return self._s[3227]! }
- public var Appearance_ThemePreview_Chat_5_Text: String { return self._s[3228]! }
- public func Channel_OwnershipTransfer_TransferCompleted(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3229]!, self._r[3229]!, [_1, _2])
- }
- public var Checkout_ErrorInvoiceAlreadyPaid: String { return self._s[3230]! }
- public func VoiceChat_InviteMemberToGroupFirstText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3231]!, self._r[3231]!, [_1, _2])
- }
- public var Conversation_GifTooltip: String { return self._s[3232]! }
- public var Widget_MessageAutoremoveTimerUpdated: String { return self._s[3233]! }
- public var Passport_Identity_TypeDriversLicenseUploadScan: String { return self._s[3235]! }
- public var VoiceChat_Connecting: String { return self._s[3236]! }
- public var AutoDownloadSettings_OffForAll: String { return self._s[3237]! }
- public func Channel_AdminLog_CreatedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3238]!, self._r[3238]!, [_1, _2])
- }
- public var Privacy_GroupsAndChannels_InviteToChannelMultipleError: String { return self._s[3239]! }
- public var AutoDownloadSettings_PreloadVideo: String { return self._s[3240]! }
- public var CreatePoll_Quiz: String { return self._s[3241]! }
- public var TwoFactorSetup_Email_Placeholder: String { return self._s[3243]! }
- public var Watch_Message_Invoice: String { return self._s[3244]! }
- public var Settings_AddAnotherAccount_Help: String { return self._s[3245]! }
- public var Watch_Message_Unsupported: String { return self._s[3246]! }
- public func Call_CameraOff(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3248]!, self._r[3248]!, [_0])
- }
- public var AuthSessions_TerminateOtherSessions: String { return self._s[3249]! }
- public var CreatePoll_AllOptionsAdded: String { return self._s[3251]! }
- public var TwoStepAuth_RecoveryEmailTitle: String { return self._s[3252]! }
- public var Call_IncomingVoiceCall: String { return self._s[3253]! }
- public func Channel_AdminLog_MessageTransferedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3254]!, self._r[3254]!, [_1, _2])
- }
- public var PrivacySettings_DeleteAccountHelp: String { return self._s[3255]! }
- public var Passport_Address_TypePassportRegistrationUploadScan: String { return self._s[3256]! }
- public var Group_EditAdmin_RankOwnerPlaceholder: String { return self._s[3257]! }
- public var Group_ErrorAccessDenied: String { return self._s[3258]! }
- public var PasscodeSettings_HelpTop: String { return self._s[3259]! }
- public var Watch_ChatList_NoConversationsTitle: String { return self._s[3260]! }
- public var AddContact_SharedContactException: String { return self._s[3261]! }
- public var AccessDenied_MicrophoneRestricted: String { return self._s[3262]! }
- public var Privacy_TopPeers: String { return self._s[3263]! }
- public var Web_OpenExternal: String { return self._s[3264]! }
- public var Group_ErrorSendRestrictedStickers: String { return self._s[3265]! }
- public var Channel_Management_LabelAdministrator: String { return self._s[3266]! }
- public func ChangePhoneNumberCode_CallTimer(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3267]!, self._r[3267]!, [_0])
- }
- public var Conversation_PhoneCopied: String { return self._s[3268]! }
- public var Permissions_Skip: String { return self._s[3269]! }
- public var Notifications_GroupNotificationsExceptions: String { return self._s[3270]! }
- public func VoiceChat_ForwardTooltip_TwoChats(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3271]!, self._r[3271]!, [_0, _1])
- }
- public var PeopleNearby_Title: String { return self._s[3272]! }
- public var GroupInfo_SharedMediaNone: String { return self._s[3273]! }
- public func PUSH_MESSAGE_GEOLIVE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3275]!, self._r[3275]!, [_1])
- }
- public var Profile_MessageLifetime1w: String { return self._s[3276]! }
- public func Time_PreciseDate_m6(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3277]!, self._r[3277]!, [_1, _2, _3])
- }
- public var WebBrowser_DefaultBrowser: String { return self._s[3278]! }
- public var Conversation_PinOlderMessageAlertTitle: String { return self._s[3280]! }
- public var EditTheme_Edit_BottomInfo: String { return self._s[3281]! }
- public var Privacy_Forwards_Preview: String { return self._s[3282]! }
- public var Settings_EditAccount: String { return self._s[3283]! }
- public func Conversation_RestrictedInlineTimed(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3284]!, self._r[3284]!, [_0])
- }
- public var TwoFactorSetup_Intro_Title: String { return self._s[3285]! }
- public func Channel_AdminLog_MessagePromotedName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3287]!, self._r[3287]!, [_1])
- }
- public var PeerInfo_ButtonVideoCall: String { return self._s[3288]! }
- public func DialogList_SingleUploadingPhotoSuffix(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3289]!, self._r[3289]!, [_0])
- }
- public var Login_InfoHelp: String { return self._s[3290]! }
- public var Notification_SecretChatMessageScreenshotSelf: String { return self._s[3291]! }
- public var VoiceChat_SpeakPermissionEveryone: String { return self._s[3292]! }
- public var Profile_MessageLifetime1d: String { return self._s[3293]! }
- public var Group_UpgradeConfirmation: String { return self._s[3294]! }
- public func PUSH_PINNED_STICKER(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3295]!, self._r[3295]!, [_1, _2])
- }
- public var Appearance_RemoveThemeColor: String { return self._s[3296]! }
- public var VoiceChat_VideoPreviewFrontCamera: String { return self._s[3297]! }
- public var Channel_AdminLog_TitleSelectedEvents: String { return self._s[3298]! }
- public func Call_AnsweringWithAccount(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3299]!, self._r[3299]!, [_0])
- }
- public var UserInfo_BotSettings: String { return self._s[3300]! }
- public func Notification_ChannelInviter(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3302]!, self._r[3302]!, [_0])
- }
- public var Permissions_ContactsText_v0: String { return self._s[3303]! }
- public var Conversation_PinMessagesForMe: String { return self._s[3304]! }
- public var VoiceChat_PanelJoin: String { return self._s[3305]! }
- public var Conversation_DiscussionStarted: String { return self._s[3307]! }
- public var SettingsSearch_Synonyms_Privacy_TwoStepAuth: String { return self._s[3308]! }
- public var SharedMedia_SearchNoResults: String { return self._s[3310]! }
- public func Login_EmailPhoneSubject(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3312]!, self._r[3312]!, [_0])
- }
- public func Conversation_ShareMyPhoneNumber_StatusSuccess(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3314]!, self._r[3314]!, [_0])
- }
- public var ReportPeer_ReasonOther_Placeholder: String { return self._s[3315]! }
- public func TwoStepAuth_ResetPendingText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3316]!, self._r[3316]!, [_0])
- }
- public var ContactInfo_PhoneLabelHomeFax: String { return self._s[3317]! }
- public var Call_AudioRouteHeadphones: String { return self._s[3318]! }
- public func Notification_VoiceChatScheduledTomorrowChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3320]!, self._r[3320]!, [_0])
- }
- public func PUSH_AUTH_UNKNOWN(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3321]!, self._r[3321]!, [_1])
- }
- public var Passport_Identity_FilesView: String { return self._s[3322]! }
- public var TwoStepAuth_SetupEmail: String { return self._s[3323]! }
- public var Widget_ApplicationStartRequired: String { return self._s[3324]! }
- public var PhotoEditor_Original: String { return self._s[3325]! }
- public var Call_YourMicrophoneOff: String { return self._s[3326]! }
- public var Permissions_ContactsAllow_v0: String { return self._s[3327]! }
- public var Conversation_CardNumberCopied: String { return self._s[3328]! }
- public var Notification_Exceptions_PreviewAlwaysOn: String { return self._s[3329]! }
- public var PrivacyPolicy_Decline: String { return self._s[3330]! }
- public var SettingsSearch_Synonyms_ChatFolders: String { return self._s[3331]! }
- public var TwoStepAuth_PasswordRemoveConfirmation: String { return self._s[3332]! }
- public var ChatListFolder_IncludeSectionInfo: String { return self._s[3333]! }
- public func Map_DirectionsDriveEta(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3334]!, self._r[3334]!, [_0])
- }
- public var Passport_Identity_Name: String { return self._s[3335]! }
- public var WallpaperPreview_PatternTitle: String { return self._s[3337]! }
- public var VoiceOver_Chat_RecordModeVideoMessage: String { return self._s[3338]! }
- public var WallpaperSearch_ColorOrange: String { return self._s[3340]! }
- public var Appearance_ThemePreview_ChatList_5_Name: String { return self._s[3341]! }
- public var GroupInfo_Permissions_SlowmodeInfo: String { return self._s[3342]! }
- public var Your_cards_security_code_is_invalid: String { return self._s[3343]! }
- public var IntentsSettings_ResetAll: String { return self._s[3344]! }
- public var SettingsSearch_Synonyms_Calls_CallTab: String { return self._s[3346]! }
- public var Group_EditAdmin_TransferOwnership: String { return self._s[3347]! }
- public var ChatList_DeleteForAllSubscribers: String { return self._s[3348]! }
- public var Notification_Exceptions_Add: String { return self._s[3349]! }
- public var Group_DeleteGroup: String { return self._s[3350]! }
- public var Cache_Help: String { return self._s[3351]! }
- public var Call_AudioRouteMute: String { return self._s[3352]! }
- public var VoiceOver_Chat_YourVoiceMessage: String { return self._s[3353]! }
- public var SocksProxySetup_ProxyEnabled: String { return self._s[3354]! }
- public func VoiceChat_Status_MembersFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3355]!, self._r[3355]!, [_1, _2])
- }
- public func ApplyLanguage_UnsufficientDataText(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3356]!, self._r[3356]!, [_1])
- }
- public func Call_CallInProgressMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3357]!, self._r[3357]!, [_1, _2])
- }
- public var AutoDownloadSettings_VideoMessagesTitle: String { return self._s[3358]! }
- public var Channel_BanUser_PermissionAddMembers: String { return self._s[3359]! }
- public func PUSH_CHAT_VOICECHAT_INVITE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3360]!, self._r[3360]!, [_1, _2, _3])
- }
- public var Contacts_MemberSearchSectionTitleGroup: String { return self._s[3361]! }
- public var TwoStepAuth_RecoveryCodeHelp: String { return self._s[3362]! }
- public var ClearCache_StorageFree: String { return self._s[3363]! }
- public func DialogList_SingleRecordingVideoMessageSuffix(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3364]!, self._r[3364]!, [_0])
- }
- public var Privacy_Forwards_CustomHelp: String { return self._s[3365]! }
- public func Channel_AdminLog_EditedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3367]!, self._r[3367]!, [_1, _2])
- }
- public var Group_ErrorAddTooMuchAdmins: String { return self._s[3368]! }
- public var DialogList_Typing: String { return self._s[3369]! }
- public func Login_EmailCodeSubject(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3370]!, self._r[3370]!, [_0])
- }
- public var Target_SelectGroup: String { return self._s[3371]! }
- public var AuthSessions_IncompleteAttempts: String { return self._s[3372]! }
- public var TwoStepAuth_RecoveryEmailResetText: String { return self._s[3373]! }
- public var TwoFactorRemember_Done_Text: String { return self._s[3374]! }
- public func Notification_ProximityReached(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3375]!, self._r[3375]!, [_1, _2, _3])
- }
- public var Chat_PinnedListPreview_ShowAllMessages: String { return self._s[3376]! }
- public var TwoStepAuth_EmailChangeSuccess: String { return self._s[3377]! }
- public func Settings_CheckPhoneNumberTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3378]!, self._r[3378]!, [_0])
- }
- public var Channel_AdminLog_CanSendMessages: String { return self._s[3379]! }
- public var TwoFactorSetup_EmailVerification_Title: String { return self._s[3380]! }
- public var ChatSettings_TextSize: String { return self._s[3381]! }
- public var Channel_AdminLogFilter_EventsEditedMessages: String { return self._s[3383]! }
- public var Map_SendThisPlace: String { return self._s[3384]! }
- public var Conversation_TextCopied: String { return self._s[3385]! }
- public var Login_PhoneNumberAlreadyAuthorized: String { return self._s[3386]! }
- public var ContactInfo_BirthdayLabel: String { return self._s[3387]! }
- public var Call_ShareStats: String { return self._s[3388]! }
- public func PUSH_CHAT_VOICECHAT_END(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3390]!, self._r[3390]!, [_1, _2])
- }
- public var ChatList_UndoArchiveRevealedText: String { return self._s[3391]! }
- public var Notifications_GroupNotificationsPreview: String { return self._s[3392]! }
- public var Settings_Support: String { return self._s[3393]! }
- public var GroupInfo_ChannelListNamePlaceholder: String { return self._s[3394]! }
- public func EmptyGroupInfo_Line1(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3396]!, self._r[3396]!, [_0])
- }
- public var Watch_Conversation_GroupInfo: String { return self._s[3397]! }
- public var Tour_Text4: String { return self._s[3398]! }
- public var VoiceChat_CancelReminder: String { return self._s[3399]! }
- public var Calls_StartNewCall: String { return self._s[3400]! }
- public var UserInfo_FakeUserWarning: String { return self._s[3402]! }
- public var PasscodeSettings_AutoLock: String { return self._s[3403]! }
- public var Channel_BanList_BlockedTitle: String { return self._s[3404]! }
- public var Bot_DescriptionTitle: String { return self._s[3406]! }
- public var Map_LocationTitle: String { return self._s[3407]! }
- public var ChatListFolder_ExcludeSectionInfo: String { return self._s[3408]! }
- public var Conversation_HashtagCopied: String { return self._s[3409]! }
- public func Notification_MessageLifetimeChangedOutgoing(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3410]!, self._r[3410]!, [_1])
- }
- public var VoiceChat_ReminderNotify: String { return self._s[3411]! }
- public var Login_EmailNotConfiguredError: String { return self._s[3412]! }
- public var AutoDownloadSettings_LimitBySize: String { return self._s[3413]! }
- public var PrivacySettings_LastSeenNobody: String { return self._s[3414]! }
- public var Permissions_CellularDataText_v0: String { return self._s[3415]! }
- public var Conversation_EncryptionProcessing: String { return self._s[3416]! }
- public var GroupPermission_Delete: String { return self._s[3418]! }
- public var Contacts_SortByName: String { return self._s[3419]! }
- public var TwoStepAuth_RecoveryUnavailable: String { return self._s[3420]! }
- public var Compose_ChannelTokenListPlaceholder: String { return self._s[3421]! }
- public var Group_Management_AddModeratorHelp: String { return self._s[3423]! }
- public var SettingsSearch_Synonyms_EditProfile_Logout: String { return self._s[3424]! }
- public var Forward_ErrorPublicPollDisabledInChannels: String { return self._s[3425]! }
- public var CallFeedback_IncludeLogsInfo: String { return self._s[3427]! }
- public func PUSH_CHANNEL_MESSAGE_QUIZ(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3428]!, self._r[3428]!, [_1])
- }
- public func SecretVideo_NotViewedYet(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3429]!, self._r[3429]!, [_0])
- }
- public var ChatList_Context_Delete: String { return self._s[3430]! }
- public var VoiceChat_InviteMember: String { return self._s[3431]! }
- public var PrivacyPhoneNumberSettings_CustomDisabledHelp: String { return self._s[3432]! }
- public var Conversation_Processing: String { return self._s[3433]! }
- public var TwoStepAuth_EmailCodeExpired: String { return self._s[3434]! }
- public var ChatSettings_Stickers: String { return self._s[3435]! }
- public var AppleWatch_ReplyPresetsHelp: String { return self._s[3436]! }
- public var Passport_Language_cs: String { return self._s[3437]! }
- public var GroupInfo_InvitationLinkGroupFull: String { return self._s[3439]! }
- public var Conversation_Contact: String { return self._s[3440]! }
- public var Passport_Identity_ReverseSideHelp: String { return self._s[3441]! }
- public var SocksProxySetup_PasteFromClipboard: String { return self._s[3443]! }
- public var Theme_Unsupported: String { return self._s[3444]! }
- public var Privacy_TopPeersWarning: String { return self._s[3445]! }
- public func Conversation_ScheduledVoiceChatStartsTodayShort(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3446]!, self._r[3446]!, [_0])
- }
- public var InviteLink_Title: String { return self._s[3448]! }
- public func UserInfo_BlockConfirmationTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3449]!, self._r[3449]!, [_0])
- }
- public var Conversation_SilentBroadcastTooltipOn: String { return self._s[3450]! }
- public var TwoStepAuth_RemovePassword: String { return self._s[3451]! }
- public var Settings_CheckPhoneNumberText: String { return self._s[3452]! }
- public var PeopleNearby_Users: String { return self._s[3453]! }
- public var Appearance_TextSize_UseSystem: String { return self._s[3454]! }
- public var Settings_SetProfilePhoto: String { return self._s[3455]! }
- public var Conversation_ContextMenuBan: String { return self._s[3456]! }
- public var KeyCommand_ScrollUp: String { return self._s[3457]! }
- public var Settings_ChatSettings: String { return self._s[3459]! }
- public var CallList_RecentCallsHeader: String { return self._s[3460]! }
- public func PUSH_CHAT_MESSAGE_VIDEO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3461]!, self._r[3461]!, [_1, _2])
- }
- public var Stats_GroupTopInvitersTitle: String { return self._s[3462]! }
- public var Passport_Phone_EnterOtherNumber: String { return self._s[3463]! }
- public var VoiceChat_StartRecordingTitle: String { return self._s[3464]! }
- public func Notification_VoiceChatScheduledToday(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3465]!, self._r[3465]!, [_1, _2])
- }
- public var Passport_Identity_MiddleNamePlaceholder: String { return self._s[3467]! }
- public var Passport_Address_OneOfTypeBankStatement: String { return self._s[3468]! }
- public var VoiceOver_ChatList_MessageRead: String { return self._s[3470]! }
- public var Stats_GroupTopPoster_Promote: String { return self._s[3473]! }
- public var Cache_Title: String { return self._s[3474]! }
- public func Conversation_AutoremoveTimerSetToastText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3475]!, self._r[3475]!, [_0])
- }
- public var Clipboard_SendPhoto: String { return self._s[3476]! }
- public var Notifications_ExceptionsMessagePlaceholder: String { return self._s[3478]! }
- public var TwoStepAuth_EnterPasswordForgot: String { return self._s[3479]! }
- public var WatchRemote_AlertTitle: String { return self._s[3482]! }
- public var Appearance_ReduceMotion: String { return self._s[3483]! }
- public func PUSH_CHAT_MESSAGE_ROUND(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3486]!, self._r[3486]!, [_1, _2])
- }
- public var Notifications_PermissionsSuppressWarningText: String { return self._s[3487]! }
- public var ChatList_UndoArchiveHiddenTitle: String { return self._s[3488]! }
- public var Passport_Identity_TypePersonalDetails: String { return self._s[3489]! }
- public func Call_CallInProgressVoiceChatMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3490]!, self._r[3490]!, [_1, _2])
- }
- public func Passport_Identity_UploadOneOfScan(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3492]!, self._r[3492]!, [_0])
- }
- public var ChatListFolder_DiscardConfirmation: String { return self._s[3493]! }
- public func Conversation_RestrictedStickersTimed(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3495]!, self._r[3495]!, [_0])
- }
- public var InstantPage_Search: String { return self._s[3496]! }
- public var ChatState_WaitingForNetwork: String { return self._s[3497]! }
- public var GroupInfo_Sound: String { return self._s[3498]! }
- public var NotificationsSound_Telegraph: String { return self._s[3499]! }
- public func VoiceChat_ParticipantIsSpeaking(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3500]!, self._r[3500]!, [_1])
- }
- public var NotificationsSound_Hello: String { return self._s[3501]! }
- public var VoiceChat_LeaveConfirmation: String { return self._s[3502]! }
- public var UserInfo_LinkForwardTooltip_SavedMessages_One: String { return self._s[3503]! }
- public var Passport_FieldIdentityDetailsHelp: String { return self._s[3504]! }
- public var Group_Members_AddMemberBotErrorNotAllowed: String { return self._s[3505]! }
- public var Conversation_HoldForVideo: String { return self._s[3506]! }
- public var Conversation_PinOlderMessageAlertText: String { return self._s[3507]! }
- public var Appearance_ShareTheme: String { return self._s[3508]! }
- public var TwoStepAuth_SetupHint: String { return self._s[3509]! }
- public var Stats_GrowthTitle: String { return self._s[3512]! }
- public var GroupInfo_InviteLink_ShareLink: String { return self._s[3513]! }
- public var Conversation_DefaultRestrictedMedia: String { return self._s[3514]! }
- public var Channel_EditAdmin_PermissionPostMessages: String { return self._s[3515]! }
- public var GroupPermission_NoSendMessages: String { return self._s[3518]! }
- public var Conversation_SetReminder_Title: String { return self._s[3519]! }
- public var Privacy_Calls_CustomHelp: String { return self._s[3520]! }
- public var CheckoutInfo_ErrorPostcodeInvalid: String { return self._s[3521]! }
- public func ClearCache_StorageTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3522]!, self._r[3522]!, [_0])
- }
- public var InviteLinks_InviteLinkExpired: String { return self._s[3524]! }
- public var Undo_SecretChatDeleted: String { return self._s[3525]! }
- public var PhotoEditor_ContrastTool: String { return self._s[3526]! }
- public var Privacy_Forwards: String { return self._s[3527]! }
- public var AuthSessions_LoggedInWithTelegram: String { return self._s[3528]! }
- public var KeyCommand_SendMessage: String { return self._s[3530]! }
- public var Conversation_PrivateMessageLinkCopiedLong: String { return self._s[3531]! }
- public func InstantPage_RelatedArticleAuthorAndDateTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3532]!, self._r[3532]!, [_1, _2])
- }
- public var VoiceChat_VideoPaused: String { return self._s[3533]! }
- public var GroupPermission_NoSendGifs: String { return self._s[3534]! }
- public func Notification_VoiceChatEndedGroup(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3535]!, self._r[3535]!, [_1, _2])
- }
- public var Notification_MessageLifetime2s: String { return self._s[3536]! }
- public var Message_Theme: String { return self._s[3537]! }
- public var Conversation_Dice_u1F3AF: String { return self._s[3540]! }
- public func DialogList_SinglePlayingGameSuffix(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3541]!, self._r[3541]!, [_0])
- }
- public var Group_UpgradeNoticeHeader: String { return self._s[3543]! }
- public var PeerInfo_BioExpand: String { return self._s[3544]! }
- public var Passport_DeletePersonalDetails: String { return self._s[3545]! }
- public var Widget_NoUsers: String { return self._s[3546]! }
- public var TwoStepAuth_AddHintTitle: String { return self._s[3547]! }
- public var VoiceChat_VideoPreviewDescription: String { return self._s[3548]! }
- public var Login_TermsOfServiceDecline: String { return self._s[3549]! }
- public var VoiceChat_UnmuteSuggestion: String { return self._s[3550]! }
- public var CreatePoll_QuizTip: String { return self._s[3552]! }
- public var VoiceChat_VideoPreviewBackCamera: String { return self._s[3553]! }
- public var Watch_LastSeen_WithinAWeek: String { return self._s[3554]! }
- public var MessagePoll_SubmitVote: String { return self._s[3556]! }
- public var ChatSettings_AutoDownloadEnabled: String { return self._s[3557]! }
- public var Passport_Address_EditRentalAgreement: String { return self._s[3558]! }
- public var Conversation_SearchByName_Placeholder: String { return self._s[3559]! }
- public var Conversation_UpdateTelegram: String { return self._s[3560]! }
- public func FileSize_KB(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3561]!, self._r[3561]!, [_0])
- }
- public var UserInfo_About_Placeholder: String { return self._s[3562]! }
- public var CallSettings_Always: String { return self._s[3563]! }
- public var ChannelInfo_ScamChannelWarning: String { return self._s[3564]! }
- public var VoiceChat_MutedByAdminHelp: String { return self._s[3565]! }
- public var Login_TermsOfServiceHeader: String { return self._s[3566]! }
- public var KeyCommand_ChatInfo: String { return self._s[3567]! }
- public var MessagePoll_LabelPoll: String { return self._s[3568]! }
- public var Paint_Clear: String { return self._s[3569]! }
- public var PeerInfo_ButtonMute: String { return self._s[3570]! }
- public var LastSeen_WithinAWeek: String { return self._s[3571]! }
- public var Invitation_JoinVoiceChatAsSpeaker: String { return self._s[3572]! }
- public var Passport_Identity_FrontSide: String { return self._s[3573]! }
- public var Stickers_GroupStickers: String { return self._s[3574]! }
- public var ChangePhoneNumberNumber_NumberPlaceholder: String { return self._s[3575]! }
- public func Map_SearchNoResultsDescription(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3576]!, self._r[3576]!, [_0])
- }
- public var VoiceOver_BotCommands: String { return self._s[3577]! }
- public func PUSH_MESSAGE_GEO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3580]!, self._r[3580]!, [_1])
- }
- public var SocksProxySetup_ProxyStatusConnected: String { return self._s[3581]! }
- public var Chat_MultipleTextMessagesDisabled: String { return self._s[3582]! }
- public var InviteLink_ContextDelete: String { return self._s[3583]! }
- public func Notification_LeftChat(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3584]!, self._r[3584]!, [_0])
- }
- public var WebSearch_SearchNoResults: String { return self._s[3586]! }
- public var Channel_DiscussionGroup_Create: String { return self._s[3587]! }
- public var Passport_Language_es: String { return self._s[3588]! }
- public var EnterPasscode_EnterCurrentPasscode: String { return self._s[3589]! }
- public var Map_LiveLocationShowAll: String { return self._s[3590]! }
- public var Cache_MaximumCacheSizeHelp: String { return self._s[3592]! }
- public var Map_OpenInGoogleMaps: String { return self._s[3593]! }
- public var CheckoutInfo_ErrorNameInvalid: String { return self._s[3595]! }
- public var EditTheme_Create_BottomInfo: String { return self._s[3596]! }
- public var PhotoEditor_BlurToolLinear: String { return self._s[3597]! }
- public func Channel_AdminLog_MessageEdited(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3598]!, self._r[3598]!, [_0])
- }
- public var Passport_Phone_Delete: String { return self._s[3599]! }
- public var Channel_Username_CreatePrivateLinkHelp: String { return self._s[3600]! }
- public var PrivacySettings_PrivacyTitle: String { return self._s[3601]! }
- public var CheckoutInfo_ReceiverInfoNamePlaceholder: String { return self._s[3602]! }
- public func EncryptionKey_Description(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3603]!, self._r[3603]!, [_1, _2])
- }
- public var LogoutOptions_LogOutInfo: String { return self._s[3604]! }
- public var Cache_ByPeerHeader: String { return self._s[3606]! }
- public var Username_InvalidCharacters: String { return self._s[3607]! }
- public var Checkout_ShippingAddress: String { return self._s[3609]! }
- public func PUSH_CHAT_MESSAGE_GAME_SCORE(_ _1: String, _ _2: String, _ _3: String, _ _4: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3610]!, self._r[3610]!, [_1, _2, _3, _4])
- }
- public var VoiceChat_LeaveAndEndVoiceChat: String { return self._s[3612]! }
- public var Conversation_AddContact: String { return self._s[3613]! }
- public var Passport_Address_EditUtilityBill: String { return self._s[3614]! }
- public var InviteLink_ContextGetQRCode: String { return self._s[3615]! }
- public var Conversation_ChecksTooltip_Delivered: String { return self._s[3617]! }
- public func Channel_AdminLog_MessageAddedAdminNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3618]!, self._r[3618]!, [_1, _2])
- }
- public var Message_Video: String { return self._s[3619]! }
- public func Watch_Time_ShortYesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3620]!, self._r[3620]!, [_0])
- }
- public func Conversation_Megabytes(_ _0: Float) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3621]!, self._r[3621]!, ["\(_0)"])
- }
- public var InviteLink_ReactivateLink: String { return self._s[3622]! }
- public var Passport_Language_km: String { return self._s[3624]! }
- public func PUSH_MESSAGE_CHANNEL_MESSAGE_GAME_SCORE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3625]!, self._r[3625]!, [_1, _2, _3])
- }
- public var EmptyGroupInfo_Line4: String { return self._s[3626]! }
- public var Conversation_SendMessageErrorTooMuchScheduled: String { return self._s[3628]! }
- public var Notification_CallCanceledShort: String { return self._s[3629]! }
- public var PhotoEditor_FadeTool: String { return self._s[3630]! }
- public var Group_PublicLink_Info: String { return self._s[3631]! }
- public var Contacts_DeselectAll: String { return self._s[3632]! }
- public var Conversation_Moderate_Delete: String { return self._s[3634]! }
- public var TwoStepAuth_RecoveryCodeInvalid: String { return self._s[3635]! }
- public var NotificationsSound_Note: String { return self._s[3638]! }
- public func Message_PaymentSent(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3639]!, self._r[3639]!, [_0])
- }
- public var Appearance_ThemePreview_ChatList_7_Text: String { return self._s[3640]! }
- public var Channel_EditAdmin_PermissionInviteViaLink: String { return self._s[3642]! }
- public var DialogList_SearchSectionGlobal: String { return self._s[3643]! }
- public var AccessDenied_Settings: String { return self._s[3644]! }
- public var Passport_Identity_TypeIdentityCardUploadScan: String { return self._s[3645]! }
- public var AuthSessions_EmptyTitle: String { return self._s[3646]! }
- public var TwoStepAuth_PasswordChangeSuccess: String { return self._s[3647]! }
- public var GroupInfo_GroupType: String { return self._s[3648]! }
- public var Calls_Missed: String { return self._s[3649]! }
- public var Contacts_VoiceOver_AddContact: String { return self._s[3650]! }
- public var UserInfo_GenericPhoneLabel: String { return self._s[3652]! }
- public var Passport_Language_uz: String { return self._s[3653]! }
- public var Conversation_StopQuizConfirmationTitle: String { return self._s[3654]! }
- public var PhotoEditor_BlurToolPortrait: String { return self._s[3655]! }
- public var VoiceChat_CreateNewVoiceChatStartNow: String { return self._s[3656]! }
- public var Map_ChooseLocationTitle: String { return self._s[3657]! }
- public var Checkout_EnterPassword: String { return self._s[3658]! }
- public var GroupInfo_ConvertToSupergroup: String { return self._s[3659]! }
- public var AutoNightTheme_UpdateLocation: String { return self._s[3660]! }
- public var NetworkUsageSettings_Title: String { return self._s[3661]! }
- public var Location_ProximityAlertCancelled: String { return self._s[3662]! }
- public var SettingsSearch_Synonyms_ChatSettings_IntentsSettings: String { return self._s[3663]! }
- public var Message_PinnedLiveLocationMessage: String { return self._s[3664]! }
- public var Compose_NewChannel: String { return self._s[3665]! }
- public var Privacy_PaymentsClearInfo: String { return self._s[3667]! }
- public func PUSH_MESSAGE_POLL(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3668]!, self._r[3668]!, [_1])
- }
- public var Notification_Exceptions_AlwaysOn: String { return self._s[3669]! }
- public var Privacy_GroupsAndChannels_WhoCanAddMe: String { return self._s[3670]! }
- public var AutoNightTheme_AutomaticSection: String { return self._s[3673]! }
- public var WallpaperSearch_ColorBrown: String { return self._s[3674]! }
- public var Appearance_AppIconDefault: String { return self._s[3675]! }
- public var StickerSettings_ContextInfo: String { return self._s[3678]! }
- public var Channel_AddBotErrorNoRights: String { return self._s[3679]! }
- public var Passport_FieldPhone: String { return self._s[3681]! }
- public var Contacts_PermissionsTitle: String { return self._s[3682]! }
- public var TwoFactorSetup_Email_SkipConfirmationSkip: String { return self._s[3683]! }
- public func Notification_JoinedChat(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3684]!, self._r[3684]!, [_0])
- }
- public var Bot_Unblock: String { return self._s[3685]! }
- public var PasscodeSettings_SimplePasscode: String { return self._s[3686]! }
- public var InviteLink_InviteLinkCopiedText: String { return self._s[3687]! }
- public var Passport_PasswordHelp: String { return self._s[3688]! }
- public var TwoFactorSetup_PasswordRecovery_PlaceholderConfirmPassword: String { return self._s[3689]! }
- public var Watch_Conversation_UserInfo: String { return self._s[3690]! }
- public func Channel_AdminLog_MessageChangedGroupGeoLocation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3694]!, self._r[3694]!, [_0])
- }
- public var State_Connecting: String { return self._s[3696]! }
- public var Passport_Address_TypeTemporaryRegistration: String { return self._s[3697]! }
- public var TextFormat_AddLinkPlaceholder: String { return self._s[3698]! }
- public var Conversation_Dice_u1F3B2: String { return self._s[3699]! }
- public func Call_StatusBar(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3700]!, self._r[3700]!, [_0])
- }
- public var Conversation_SendingOptionsTooltip: String { return self._s[3701]! }
- public var ChatList_UndoArchiveTitle: String { return self._s[3702]! }
- public var ChatList_EmptyChatListNewMessage: String { return self._s[3703]! }
- public var WallpaperSearch_ColorGreen: String { return self._s[3705]! }
- public var PhotoEditor_BlurToolOff: String { return self._s[3706]! }
- public var Conversation_AutoremoveOff: String { return self._s[3707]! }
- public var SocksProxySetup_PortPlaceholder: String { return self._s[3708]! }
- public var Weekday_Saturday: String { return self._s[3709]! }
- public var DialogList_Unread: String { return self._s[3710]! }
- public var Watch_LastSeen_ALongTimeAgo: String { return self._s[3711]! }
- public var Stats_GroupPosters: String { return self._s[3712]! }
- public func PUSH_ENCRYPTION_REQUEST(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3713]!, self._r[3713]!, [_1])
- }
- public var Conversation_AlsoClearCacheTitle: String { return self._s[3714]! }
- public func Conversation_ForwardTooltip_TwoChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3715]!, self._r[3715]!, [_0, _1])
- }
- public func Target_ShareGameConfirmationGroup(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3718]!, self._r[3718]!, [_0])
- }
- public var ReportPeer_ReasonChildAbuse: String { return self._s[3719]! }
- public func Channel_AdminLog_MessageUnkickedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3720]!, self._r[3720]!, [_1, _2])
- }
- public var InfoPlist_NSContactsUsageDescription: String { return self._s[3721]! }
- public var Conversation_EmailCopied: String { return self._s[3723]! }
- public var AutoNightTheme_UseSunsetSunrise: String { return self._s[3724]! }
- public var Channel_OwnershipTransfer_ChangeOwner: String { return self._s[3725]! }
- public var Call_VoiceOver_VoiceCallCanceled: String { return self._s[3726]! }
- public var VoiceChat_LateBy: String { return self._s[3727]! }
- public var Passport_Language_dv: String { return self._s[3728]! }
- public var TwoFactorSetup_PasswordRecovery_Text: String { return self._s[3729]! }
- public var GroupPermission_AddSuccess: String { return self._s[3731]! }
- public var Passport_Email_Help: String { return self._s[3732]! }
- public var Call_ReportPlaceholder: String { return self._s[3733]! }
- public var CreatePoll_AddOption: String { return self._s[3734]! }
- public var MessagePoll_LabelAnonymousQuiz: String { return self._s[3736]! }
- public var PeerInfo_ButtonLeave: String { return self._s[3737]! }
- public var PhotoEditor_TiltShift: String { return self._s[3740]! }
- public var SecretGif_Title: String { return self._s[3742]! }
- public var GroupInfo_InviteLinks: String { return self._s[3743]! }
- public var PhotoEditor_QualityVeryLow: String { return self._s[3744]! }
- public var SocksProxySetup_Connecting: String { return self._s[3746]! }
- public var PrivacySettings_PasscodeAndFaceId: String { return self._s[3747]! }
- public var ContactInfo_PhoneLabelWork: String { return self._s[3748]! }
- public var Stats_GroupTopHoursTitle: String { return self._s[3749]! }
- public var Compose_NewMessage: String { return self._s[3750]! }
- public var VoiceOver_Common_SwitchHint: String { return self._s[3751]! }
- public var NotificationsSound_Synth: String { return self._s[3752]! }
- public var ChatImport_UserErrorNotMutual: String { return self._s[3753]! }
- public var Conversation_FileOpenIn: String { return self._s[3754]! }
- public var AutoDownloadSettings_WifiTitle: String { return self._s[3755]! }
- public var UserInfo_SendMessage: String { return self._s[3756]! }
- public var Checkout_PayWithFaceId: String { return self._s[3757]! }
- public func Map_LiveLocationShortHour(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3758]!, self._r[3758]!, [_0])
- }
- public var TextFormat_Strikethrough: String { return self._s[3759]! }
- public var SettingsSearch_Synonyms_Notifications_DisplayNamesOnLockScreen: String { return self._s[3760]! }
- public var Conversation_ViewChannel: String { return self._s[3761]! }
- public func Message_ForwardedMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3762]!, self._r[3762]!, [_0])
- }
- public var Channel_Stickers_Placeholder: String { return self._s[3763]! }
- public var Channel_OwnershipTransfer_PasswordPlaceholder: String { return self._s[3764]! }
- public var Message_ScamAccount: String { return self._s[3765]! }
- public var Camera_FlashAuto: String { return self._s[3766]! }
- public var Conversation_EncryptedDescription1: String { return self._s[3767]! }
- public var LocalGroup_Text: String { return self._s[3768]! }
- public var SettingsSearch_Synonyms_Data_Storage_KeepMedia: String { return self._s[3769]! }
- public var UserInfo_FirstNamePlaceholder: String { return self._s[3770]! }
- public var Conversation_SendMessageErrorFlood: String { return self._s[3771]! }
- public var Conversation_EncryptedDescription2: String { return self._s[3772]! }
- public var Conversation_CancelForwardText: String { return self._s[3773]! }
- public var Notification_GroupActivated: String { return self._s[3774]! }
- public var LastSeen_Lately: String { return self._s[3775]! }
- public var Conversation_EncryptedDescription3: String { return self._s[3776]! }
- public var SettingsSearch_Synonyms_Privacy_ProfilePhoto: String { return self._s[3777]! }
- public var TwoStepAuth_RecoveryUnavailableResetText: String { return self._s[3778]! }
- public var Conversation_SwipeToReplyHintText: String { return self._s[3779]! }
- public var Conversation_EncryptedDescription4: String { return self._s[3780]! }
- public var SharedMedia_EmptyTitle: String { return self._s[3781]! }
- public var Appearance_CreateTheme: String { return self._s[3783]! }
- public var Stats_SharesPerPost: String { return self._s[3784]! }
- public var Contacts_TabTitle: String { return self._s[3785]! }
- public var Weekday_ShortThursday: String { return self._s[3786]! }
- public var MessageTimer_Forever: String { return self._s[3787]! }
- public var ChatListFolder_CategoryArchived: String { return self._s[3788]! }
- public var Channel_EditAdmin_PermissionDeleteMessages: String { return self._s[3789]! }
- public var EditTheme_Create_TopInfo: String { return self._s[3791]! }
- public var TwoFactorRemember_Forgot: String { return self._s[3792]! }
- public func VoiceOver_ChatList_MessageFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3793]!, self._r[3793]!, [_0])
- }
- public var Month_GenDecember: String { return self._s[3794]! }
- public var EnterPasscode_EnterPasscode: String { return self._s[3795]! }
- public var SettingsSearch_Synonyms_Appearance_LargeEmoji: String { return self._s[3796]! }
- public var PeopleNearby_CreateGroup: String { return self._s[3798]! }
- public var Group_EditAdmin_PermissionChangeInfo: String { return self._s[3799]! }
- public var Paint_ClearConfirm: String { return self._s[3800]! }
- public var ChatList_ReadAll: String { return self._s[3801]! }
- public var ChatSettings_IntentsSettings: String { return self._s[3802]! }
- public var Passport_PassportInformation: String { return self._s[3804]! }
- public var Login_CheckOtherSessionMessages: String { return self._s[3806]! }
- public var Location_ProximityNotification_DistanceMI: String { return self._s[3809]! }
- public var PhotoEditor_ExposureTool: String { return self._s[3810]! }
- public var Group_Username_CreatePrivateLinkHelp: String { return self._s[3811]! }
- public var SettingsSearch_Synonyms_Watch: String { return self._s[3812]! }
- public var Stats_GroupTopPoster_History: String { return self._s[3813]! }
- public var UserInfo_AddPhone: String { return self._s[3814]! }
- public var Media_SendWithTimer: String { return self._s[3816]! }
- public var SettingsSearch_Synonyms_Notifications_Title: String { return self._s[3817]! }
- public var Channel_EditAdmin_PermissionEnabledByDefault: String { return self._s[3818]! }
- public var GroupInfo_GroupHistoryShort: String { return self._s[3819]! }
- public var PasscodeSettings_AutoLock_Disabled: String { return self._s[3820]! }
- public var ChatList_Context_Unarchive: String { return self._s[3822]! }
- public func DialogList_LiveLocationSharingTo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3823]!, self._r[3823]!, [_0])
- }
- public var BlockedUsers_Title: String { return self._s[3825]! }
- public var TwoStepAuth_EmailPlaceholder: String { return self._s[3826]! }
- public var Media_ShareThisPhoto: String { return self._s[3827]! }
- public var Notifications_DisplayNamesOnLockScreen: String { return self._s[3828]! }
- public var Conversation_FilePhotoOrVideo: String { return self._s[3829]! }
- public var Appearance_ThemePreview_Chat_2_ReplyName: String { return self._s[3833]! }
- public var CallFeedback_ReasonNoise: String { return self._s[3835]! }
- public var WebBrowser_Title: String { return self._s[3836]! }
- public func Checkout_SavePasswordTimeoutAndTouchId(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3837]!, self._r[3837]!, [_0])
- }
- public var Notification_MessageLifetime5s: String { return self._s[3839]! }
- public var Passport_Address_AddResidentialAddress: String { return self._s[3840]! }
- public var Profile_MessageLifetime1m: String { return self._s[3842]! }
- public var Passport_ScanPassport: String { return self._s[3843]! }
- public var Stats_LoadingTitle: String { return self._s[3844]! }
- public var Passport_Address_AddTemporaryRegistration: String { return self._s[3846]! }
- public var Permissions_NotificationsAllow_v0: String { return self._s[3847]! }
- public var Login_InvalidFirstNameError: String { return self._s[3848]! }
- public var Undo_ChatCleared: String { return self._s[3850]! }
- public func ApplyLanguage_ChangeLanguageUnofficialText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3852]!, self._r[3852]!, [_1, _2])
- }
- public var Conversation_PinMessageAlertPin: String { return self._s[3853]! }
- public func Login_PhoneBannedEmailBody(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3854]!, self._r[3854]!, [_1, _2, _3, _4, _5])
- }
- public func PUSH_MESSAGE_FWD(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3855]!, self._r[3855]!, [_1])
- }
- public var Share_MultipleMessagesDisabled: String { return self._s[3856]! }
- public var TwoStepAuth_EmailInvalid: String { return self._s[3857]! }
- public var EnterPasscode_ChangeTitle: String { return self._s[3859]! }
- public var VoiceChat_InviteLink_Speaker: String { return self._s[3860]! }
- public var CallSettings_RecentCalls: String { return self._s[3861]! }
- public var GroupInfo_DeactivatedStatus: String { return self._s[3862]! }
- public var AuthSessions_OtherSessions: String { return self._s[3863]! }
- public var PrivacyLastSeenSettings_CustomHelp: String { return self._s[3864]! }
- public var Tour_Text5: String { return self._s[3865]! }
- public var Login_PadPhoneHelp: String { return self._s[3866]! }
- public var Wallpaper_PhotoLibrary: String { return self._s[3869]! }
- public var Conversation_ViewGroup: String { return self._s[3870]! }
- public var PeopleNearby_MakeVisibleTitle: String { return self._s[3872]! }
- public var VoiceOver_Chat_YourContact: String { return self._s[3873]! }
- public var Watch_AuthRequired: String { return self._s[3874]! }
- public var VoiceOver_Chat_ForwardedFromYou: String { return self._s[3876]! }
- public var Conversation_ForwardContacts: String { return self._s[3877]! }
- public var Conversation_InputTextPlaceholder: String { return self._s[3878]! }
- public func PUSH_CHANNEL_MESSAGE_PHOTO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3879]!, self._r[3879]!, [_1])
- }
- public func Conversation_MessageViaUser(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3880]!, self._r[3880]!, [_0])
- }
- public var Channel_Setup_TypePrivate: String { return self._s[3881]! }
- public func Conversation_NoticeInvitedByInChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3882]!, self._r[3882]!, [_0])
- }
- public var Checkout_OptionalTipItemPlaceholder: String { return self._s[3883]! }
- public var InviteLink_Create_TimeLimitExpiryDate: String { return self._s[3884]! }
- public var InfoPlist_NSSiriUsageDescription: String { return self._s[3885]! }
- public var AutoDownloadSettings_Delimeter: String { return self._s[3886]! }
- public var EmptyGroupInfo_Subtitle: String { return self._s[3887]! }
- public var UserInfo_StartSecretChatStart: String { return self._s[3888]! }
- public func GroupPermission_AddedInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3889]!, self._r[3889]!, [_1, _2])
- }
- public func Channel_AdminLog_MessageRestricted(_ _0: String, _ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3890]!, self._r[3890]!, [_0, _1, _2])
- }
- public func Conversation_ForwardTooltip_TwoChats_Many(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3891]!, self._r[3891]!, [_0, _1])
- }
- public var PrivacySettings_AutoArchiveTitle: String { return self._s[3892]! }
- public var GroupInfo_InviteLink_LinkSection: String { return self._s[3893]! }
- public var FastTwoStepSetup_EmailPlaceholder: String { return self._s[3894]! }
- public var StickerPacksSettings_ArchivedMasks: String { return self._s[3896]! }
- public var NewContact_Title: String { return self._s[3899]! }
- public var Appearance_ThemeCarouselTintedNight: String { return self._s[3900]! }
- public var VoiceChat_StatusSpeaking: String { return self._s[3901]! }
- public var Notifications_PermissionsKeepDisabled: String { return self._s[3902]! }
- public func Time_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3903]!, self._r[3903]!, [_0])
- }
- public func AutoNightTheme_LocationHelp(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3904]!, self._r[3904]!, [_0, _1])
- }
- public var Chat_SlowmodeTooltipPending: String { return self._s[3905]! }
- public func Time_MediumDate(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3907]!, self._r[3907]!, [_1, _2])
- }
- public var ContactInfo_PhoneLabelHome: String { return self._s[3908]! }
- public var CallFeedback_ReasonInterruption: String { return self._s[3909]! }
- public var Passport_Identity_OneOfTypeDriversLicense: String { return self._s[3910]! }
- public var Conversation_MessageEditedLabel: String { return self._s[3913]! }
- public var CallList_ActiveVoiceChatsHeader: String { return self._s[3914]! }
- public var SocksProxySetup_PasswordPlaceholder: String { return self._s[3915]! }
- public var ChatList_Context_AddToContacts: String { return self._s[3916]! }
- public var Passport_Language_is: String { return self._s[3917]! }
- public var Notification_PassportValueProofOfIdentity: String { return self._s[3918]! }
- public var PhotoEditor_CurvesBlue: String { return self._s[3919]! }
- public func FileSize_MB(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3920]!, self._r[3920]!, [_0])
- }
- public var SocksProxySetup_Username: String { return self._s[3921]! }
- public var Login_SmsRequestState3: String { return self._s[3922]! }
- public var Message_PinnedVideoMessage: String { return self._s[3923]! }
- public var SharedMedia_TitleLink: String { return self._s[3924]! }
- public var Passport_FieldIdentity: String { return self._s[3925]! }
- public var GroupInfo_Permissions_BroadcastConvert: String { return self._s[3927]! }
- public func Conversation_EncryptedPlaceholderTitleOutgoing(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3930]!, self._r[3930]!, [_0])
- }
- public var DialogList_ProxyConnectionIssuesTooltip: String { return self._s[3933]! }
- public var ReportSpam_DeleteThisChat: String { return self._s[3934]! }
- public var Checkout_NewCard_CardholderNamePlaceholder: String { return self._s[3935]! }
- public var Passport_Identity_DateOfBirth: String { return self._s[3936]! }
- public var Call_StatusIncoming: String { return self._s[3937]! }
- public var ChatAdmins_AdminLabel: String { return self._s[3938]! }
- public func InstantPage_OpenInBrowser(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3939]!, self._r[3939]!, [_0])
- }
- public func Time_MonthOfYear_m10(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3941]!, self._r[3941]!, [_0])
- }
- public var Message_PinnedAnimationMessage: String { return self._s[3942]! }
- public var VoiceChat_TapToViewCameraVideo: String { return self._s[3943]! }
- public var Conversation_ReportSpamAndLeave: String { return self._s[3944]! }
- public var Preview_CopyAddress: String { return self._s[3945]! }
- public var MediaPlayer_UnknownTrack: String { return self._s[3947]! }
- public var Login_CancelSignUpConfirmation: String { return self._s[3948]! }
- public var Map_OpenInYandexMaps: String { return self._s[3950]! }
- public func Time_PreciseDate_m11(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3953]!, self._r[3953]!, [_1, _2, _3])
- }
- public var GroupRemoved_Remove: String { return self._s[3954]! }
- public var ChatListFolder_TitleCreate: String { return self._s[3955]! }
- public func InstantPage_AuthorAndDateTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3957]!, self._r[3957]!, [_1, _2])
- }
- public var Watch_UserInfo_MuteTitle: String { return self._s[3958]! }
- public func UserInfo_LinkForwardTooltip_TwoChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3960]!, self._r[3960]!, [_0, _1])
- }
- public var Group_UpgradeNoticeText2: String { return self._s[3961]! }
- public var Stats_GroupGrowthTitle: String { return self._s[3962]! }
- public var CreatePoll_CancelConfirmation: String { return self._s[3965]! }
- public var Month_GenOctober: String { return self._s[3966]! }
- public var Conversation_TitleCommentsEmpty: String { return self._s[3967]! }
- public var Settings_Appearance: String { return self._s[3968]! }
- public func Time_MonthOfYear_m6(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3969]!, self._r[3969]!, [_0])
- }
- public var UserInfo_AddToExisting: String { return self._s[3970]! }
- public var Call_PhoneCallInProgressMessage: String { return self._s[3972]! }
- public var Map_HomeAndWorkInfo: String { return self._s[3973]! }
- public var VoiceChat_ContextAudio: String { return self._s[3974]! }
- public var InstantPage_VoiceOver_ResetFontSize: String { return self._s[3975]! }
- public var Paint_Arrow: String { return self._s[3976]! }
- public var InviteLink_CreatePrivateLinkHelp: String { return self._s[3977]! }
- public func DialogList_MultipleTypingPair(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3978]!, self._r[3978]!, [_0, _1])
- }
- public var CancelResetAccount_Title: String { return self._s[3979]! }
- public var NotificationsSound_Circles: String { return self._s[3980]! }
- public var Notifications_GroupNotificationsExceptionsHelp: String { return self._s[3981]! }
- public var ChatState_Connecting: String { return self._s[3983]! }
- public var Profile_MessageLifetime5s: String { return self._s[3984]! }
- public func DialogList_AwaitingEncryption(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3985]!, self._r[3985]!, [_0])
- }
- public var PrivacyPolicy_AgeVerificationTitle: String { return self._s[3986]! }
- public var Channel_Username_CreatePublicLinkHelp: String { return self._s[3987]! }
- public var AutoNightTheme_ScheduledTo: String { return self._s[3988]! }
- public var Conversation_DefaultRestrictedStickers: String { return self._s[3990]! }
- public var TwoStepAuth_ConfirmationTitle: String { return self._s[3991]! }
- public func Chat_UnsendMyMessagesAlertTitle(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[3992]!, self._r[3992]!, [_0])
- }
- public var Passport_Phone_Help: String { return self._s[3993]! }
- public var Privacy_ContactsSync: String { return self._s[3994]! }
- public var CheckoutInfo_ReceiverInfoPhone: String { return self._s[3995]! }
- public var Channel_AdminLogFilter_EventsLeavingSubscribers: String { return self._s[3997]! }
- public var Map_SendMyCurrentLocation: String { return self._s[3998]! }
- public var Map_AddressOnMap: String { return self._s[3999]! }
- public var BroadcastGroups_ConfirmationAlert_Convert: String { return self._s[4001]! }
- public var DialogList_SearchLabel: String { return self._s[4002]! }
- public var Notification_Exceptions_NewException_NotificationHeader: String { return self._s[4003]! }
- public var GroupInfo_FakeGroupWarning: String { return self._s[4004]! }
- public var Conversation_ChecksTooltip_Read: String { return self._s[4006]! }
- public var TwoFactorRemember_Placeholder: String { return self._s[4008]! }
- public var ConversationProfile_UnknownAddMemberError: String { return self._s[4009]! }
- public var ChatList_Search_ShowMore: String { return self._s[4010]! }
- public var DialogList_EncryptionRejected: String { return self._s[4011]! }
- public var VoiceChat_InviteLinkCopiedText: String { return self._s[4012]! }
- public var DialogList_DeleteBotConfirmation: String { return self._s[4013]! }
- public var VoiceChat_StartRecordingText: String { return self._s[4014]! }
- public var Privacy_TopPeersDelete: String { return self._s[4015]! }
- public var AttachmentMenu_SendAsFile: String { return self._s[4017]! }
- public var ChatList_GenericPsaAlert: String { return self._s[4019]! }
- public var SecretTimer_ImageDescription: String { return self._s[4021]! }
- public func Conversation_SetReminder_RemindOn(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4022]!, self._r[4022]!, [_0, _1])
- }
- public var VoiceChat_EditNameSuccess: String { return self._s[4023]! }
- public var ChatSettings_TextSizeUnits: String { return self._s[4024]! }
- public var Notification_RenamedGroup: String { return self._s[4026]! }
- public var Tour_Title2: String { return self._s[4027]! }
- public var Settings_CopyUsername: String { return self._s[4028]! }
- public var Compose_NewEncryptedChat: String { return self._s[4029]! }
- public var Conversation_CloudStorageInfo_Title: String { return self._s[4030]! }
- public var VoiceChat_SetReminder: String { return self._s[4031]! }
- public var Month_ShortSeptember: String { return self._s[4032]! }
- public var AutoDownloadSettings_OnForAll: String { return self._s[4033]! }
- public var ChatList_DeleteForEveryoneConfirmationText: String { return self._s[4034]! }
- public var VoiceChat_StartNow: String { return self._s[4035]! }
- public var Call_StatusConnecting: String { return self._s[4037]! }
- public var Privacy_GroupsAndChannels_NeverAllow_Placeholder: String { return self._s[4038]! }
- public var Map_ShareLiveLocationHelp: String { return self._s[4039]! }
- public var Cache_Files: String { return self._s[4040]! }
- public var Notifications_Reset: String { return self._s[4041]! }
- public func Settings_KeepPhoneNumber(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4042]!, self._r[4042]!, [_0])
- }
- public var Privacy_GroupsAndChannels_AlwaysAllow_Title: String { return self._s[4043]! }
- public func Conversation_OpenBotLinkLogin(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4044]!, self._r[4044]!, [_1, _2])
- }
- public var Notification_CallIncomingShort: String { return self._s[4045]! }
- public var UserInfo_BotPrivacy: String { return self._s[4048]! }
- public var Appearance_BubbleCorners_Apply: String { return self._s[4049]! }
- public var WebSearch_RecentClearConfirmation: String { return self._s[4050]! }
- public var Conversation_ContextMenuLookUp: String { return self._s[4052]! }
- public var Calls_RatingTitle: String { return self._s[4053]! }
- public var SecretImage_Title: String { return self._s[4054]! }
- public var Weekday_Monday: String { return self._s[4055]! }
- public func Passport_PrivacyPolicy(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4056]!, self._r[4056]!, [_1, _2])
- }
- public var KeyCommand_JumpToPreviousChat: String { return self._s[4057]! }
- public var VoiceChat_InviteLink_CopySpeakerLink: String { return self._s[4058]! }
- public var Invitation_JoinVoiceChatAsListener: String { return self._s[4059]! }
- public func DialogList_SearchSubtitleFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4060]!, self._r[4060]!, [_1, _2])
- }
- public var Stats_GroupMembers: String { return self._s[4061]! }
- public var Camera_Retake: String { return self._s[4062]! }
- public var Conversation_SearchPlaceholder: String { return self._s[4064]! }
- public func Passport_Identity_NativeNameGenericHelp(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4065]!, self._r[4065]!, [_0])
- }
- public var Channel_DiscussionGroup_Info: String { return self._s[4066]! }
- public var SocksProxySetup_Hostname: String { return self._s[4067]! }
- public var PrivacyLastSeenSettings_EmpryUsersPlaceholder: String { return self._s[4068]! }
- public var Privacy_DeleteDrafts: String { return self._s[4070]! }
- public var Login_CancelPhoneVerification: String { return self._s[4072]! }
- public var TwoStepAuth_ResetAccountHelp: String { return self._s[4073]! }
- public var VoiceOver_Chat_Profile: String { return self._s[4074]! }
- public func SocksProxySetup_ProxyStatusPing(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4075]!, self._r[4075]!, [_0])
- }
- public var TwoStepAuth_EmailSent: String { return self._s[4076]! }
- public var Cache_Indexing: String { return self._s[4077]! }
- public var Notifications_ExceptionsNone: String { return self._s[4078]! }
- public var MessagePoll_LabelQuiz: String { return self._s[4079]! }
- public var Call_EncryptionKey_Title: String { return self._s[4080]! }
- public var Common_Yes: String { return self._s[4081]! }
- public var Channel_ErrorAddBlocked: String { return self._s[4082]! }
- public var Month_GenJanuary: String { return self._s[4083]! }
- public var Checkout_NewCard_Title: String { return self._s[4084]! }
- public func TwoStepAuth_EnterPasswordHint(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4085]!, self._r[4085]!, [_0])
- }
- public var Conversation_InputTextPlaceholderReply: String { return self._s[4087]! }
- public var PasscodeSettings_AutoLock_IfAwayFor_1hour: String { return self._s[4088]! }
- public var Conversation_SendDice: String { return self._s[4089]! }
- public func ChatSettings_AutoDownloadSettings_TypeVideo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4090]!, self._r[4090]!, [_0])
- }
- public func VoiceOver_Chat_VideoFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4091]!, self._r[4091]!, [_0])
- }
- public var Weekday_Wednesday: String { return self._s[4092]! }
- public var ReportPeer_ReasonOther_Send: String { return self._s[4093]! }
- public var PasscodeSettings_EncryptDataHelp: String { return self._s[4094]! }
- public var PrivacyLastSeenSettings_CustomShareSettingsHelp: String { return self._s[4095]! }
- public var OldChannels_NoticeTitle: String { return self._s[4096]! }
- public var TwoStepAuth_ChangeEmail: String { return self._s[4097]! }
- public var PasscodeSettings_PasscodeOptions: String { return self._s[4098]! }
- public var InfoPlist_NSPhotoLibraryUsageDescription: String { return self._s[4099]! }
- public var Passport_Address_AddUtilityBill: String { return self._s[4100]! }
- public func Time_PreciseDate_m5(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4102]!, self._r[4102]!, [_1, _2, _3])
- }
- public var TwoFactorSetup_EmailVerification_ResendAction: String { return self._s[4104]! }
- public var Stats_GroupTopAdminsTitle: String { return self._s[4105]! }
- public var Paint_Regular: String { return self._s[4107]! }
- public var Message_Contact: String { return self._s[4108]! }
- public var NetworkUsageSettings_MediaVideoDataSection: String { return self._s[4109]! }
- public var VoiceOver_Chat_YourPhoto: String { return self._s[4110]! }
- public var Notification_Mute1hMin: String { return self._s[4111]! }
- public func Login_BannedPhoneSubject(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4112]!, self._r[4112]!, [_0])
- }
- public var Profile_MessageLifetime1h: String { return self._s[4113]! }
- public var TwoStepAuth_GenericHelp: String { return self._s[4114]! }
- public var TwoFactorSetup_PasswordRecovery_Skip: String { return self._s[4115]! }
- public var TextFormat_Monospace: String { return self._s[4116]! }
- public var VoiceOver_Media_PlaybackRateChange: String { return self._s[4118]! }
- public var Conversation_DeleteMessagesForMe: String { return self._s[4119]! }
- public var ChatList_DeleteChat: String { return self._s[4120]! }
- public var Channel_OwnershipTransfer_EnterPasswordText: String { return self._s[4123]! }
- public func Settings_ApplyProxyAlertCredentials(_ _1: String, _ _2: String, _ _3: String, _ _4: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4124]!, self._r[4124]!, [_1, _2, _3, _4])
- }
- public var Login_CancelPhoneVerificationStop: String { return self._s[4125]! }
- public var Appearance_ThemePreview_ChatList_4_Name: String { return self._s[4126]! }
- public var MediaPicker_MomentsDateRangeSameMonthYearFormat: String { return self._s[4127]! }
- public func Channel_AdminLog_MessageToggleInvitesOn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4128]!, self._r[4128]!, [_0])
- }
- public var Notifications_Badge_IncludeChannels: String { return self._s[4129]! }
- public var InviteLink_CreatePrivateLinkHelpChannel: String { return self._s[4130]! }
- public var StickerPack_ViewPack: String { return self._s[4133]! }
- public var FastTwoStepSetup_PasswordConfirmationPlaceholder: String { return self._s[4135]! }
- public var EditTheme_Expand_Preview_IncomingText: String { return self._s[4136]! }
- public var Notifications_Title: String { return self._s[4137]! }
- public var Conversation_InputTextPlaceholderComment: String { return self._s[4138]! }
- public var GroupInfo_PublicLink: String { return self._s[4139]! }
- public func ScheduleVoiceChat_GroupText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4140]!, self._r[4140]!, [_0])
- }
- public var VoiceOver_DiscardPreparedContent: String { return self._s[4141]! }
- public var Conversation_Moderate_Ban: String { return self._s[4145]! }
- public var InviteLink_Manage: String { return self._s[4146]! }
- public var InstantPage_FontNewYork: String { return self._s[4147]! }
- public func Activity_RemindAboutGroup(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4148]!, self._r[4148]!, [_0])
- }
- public var TextFormat_Underline: String { return self._s[4149]! }
- public func DownloadingStatus(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4150]!, self._r[4150]!, [_0, _1])
- }
- public func PUSH_PINNED_ROUND(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4151]!, self._r[4151]!, [_1])
- }
- public var PollResults_Collapse: String { return self._s[4153]! }
- public var Contacts_GlobalSearch: String { return self._s[4154]! }
- public func Conversation_EncryptionWaiting(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4156]!, self._r[4156]!, [_0])
- }
- public var Channel_Management_LabelEditor: String { return self._s[4157]! }
- public var SettingsSearch_Synonyms_Stickers_FeaturedPacks: String { return self._s[4159]! }
- public var Conversation_Theme: String { return self._s[4160]! }
- public func PUSH_CHANNEL_MESSAGE_DOCS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4161]!, self._r[4161]!, [_1, "\(_2)"])
- }
- public var Conversation_LinkDialogSave: String { return self._s[4162]! }
- public var EnterPasscode_TouchId: String { return self._s[4163]! }
- public var Conversation_VoiceChatMediaRecordingRestricted: String { return self._s[4164]! }
- public var Group_ErrorAdminsTooMuch: String { return self._s[4165]! }
- public var Stats_MessageOverview: String { return self._s[4166]! }
- public var Privacy_Calls_P2PAlways: String { return self._s[4168]! }
- public var Message_Sticker: String { return self._s[4169]! }
- public var TwoFactorSetup_PasswordRecovery_SkipAlertTitle: String { return self._s[4170]! }
- public var Conversation_Mute: String { return self._s[4173]! }
- public var VoiceChat_AnonymousDisabledAlertText: String { return self._s[4174]! }
- public var ContactInfo_Title: String { return self._s[4175]! }
- public func PUSH_CHANNEL_MESSAGE_CONTACT(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4176]!, self._r[4176]!, [_1])
- }
- public var Channel_Setup_TypeHeader: String { return self._s[4177]! }
- public var AuthSessions_LogOut: String { return self._s[4178]! }
- public var ChatSettings_AutoDownloadReset: String { return self._s[4179]! }
- public var VoiceChat_PinVideo: String { return self._s[4180]! }
- public var Group_Info_Members: String { return self._s[4182]! }
- public var ChatListFolderSettings_NewFolder: String { return self._s[4183]! }
- public var Appearance_ThemePreview_ChatList_3_AuthorName: String { return self._s[4184]! }
- public var CreatePoll_Title: String { return self._s[4185]! }
- public var EditTheme_EditTitle: String { return self._s[4186]! }
- public var ChatListFolderSettings_RecommendedFoldersSection: String { return self._s[4187]! }
- public var TwoStepAuth_SetPassword: String { return self._s[4188]! }
- public func Login_InvalidPhoneEmailSubject(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4189]!, self._r[4189]!, [_0])
- }
- public var BlockedUsers_Info: String { return self._s[4190]! }
- public var AuthSessions_Sessions: String { return self._s[4191]! }
- public var Group_EditAdmin_RankTitle: String { return self._s[4192]! }
- public var Common_ActionNotAllowedError: String { return self._s[4193]! }
- public var WebPreview_GettingLinkInfo: String { return self._s[4194]! }
- public var Appearance_AppIconFilledX: String { return self._s[4195]! }
- public var Passport_Email_EmailPlaceholder: String { return self._s[4196]! }
- public var FeaturedStickers_OtherSection: String { return self._s[4197]! }
- public var VoiceChat_RecordingStarted: String { return self._s[4198]! }
- public var EditTheme_Edit_Preview_OutgoingText: String { return self._s[4199]! }
- public var Profile_Username: String { return self._s[4200]! }
- public var TwoFactorRemember_Done_Title: String { return self._s[4201]! }
- public var Settings_TipsUsername: String { return self._s[4202]! }
- public var Appearance_RemoveTheme: String { return self._s[4203]! }
- public var TwoStepAuth_SetupPasswordConfirmPassword: String { return self._s[4204]! }
- public var Message_PinnedStickerMessage: String { return self._s[4205]! }
- public var AccessDenied_VideoMicrophone: String { return self._s[4206]! }
- public var WallpaperPreview_CustomColorBottomText: String { return self._s[4207]! }
- public var Passport_Address_RegionPlaceholder: String { return self._s[4208]! }
- public var Conversation_VoiceChat: String { return self._s[4209]! }
- public var VoiceChat_EditBioSuccess: String { return self._s[4210]! }
- public var ImportStickerPack_LinkAvailable: String { return self._s[4211]! }
- public var SettingsSearch_Synonyms_Data_Storage_Title: String { return self._s[4212]! }
- public var TwoStepAuth_Title: String { return self._s[4213]! }
- public var VoiceOver_Chat_YourAnimatedSticker: String { return self._s[4214]! }
- public var Checkout_WebConfirmation_Title: String { return self._s[4215]! }
- public var AutoDownloadSettings_VoiceMessagesInfo: String { return self._s[4216]! }
- public var ChatListFolder_CategoryGroups: String { return self._s[4218]! }
- public var Stats_GroupTopInviter_Promote: String { return self._s[4219]! }
- public var Conversation_EditingPhotoPanelTitle: String { return self._s[4220]! }
- public var Month_GenJuly: String { return self._s[4221]! }
- public var Passport_Identity_Gender: String { return self._s[4222]! }
- public var Channel_DiscussionGroup_UnlinkGroup: String { return self._s[4223]! }
- public var Notification_Exceptions_DeleteAll: String { return self._s[4224]! }
- public var VoiceChat_StopRecording: String { return self._s[4225]! }
- public func Conversation_FileHowToText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4226]!, self._r[4226]!, [_0])
- }
- public func Channel_AdminLog_MessageAdmin(_ _0: String, _ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4227]!, self._r[4227]!, [_0, _1, _2])
- }
- public var Login_CodeSentSms: String { return self._s[4228]! }
- public func VoiceOver_Chat_ReplyFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4229]!, self._r[4229]!, [_0])
- }
- public var Login_CallRequestState2: String { return self._s[4230]! }
- public var Channel_DiscussionGroup_Header: String { return self._s[4231]! }
- public func Channel_AdminLog_MessageToggleInvitesOff(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4232]!, self._r[4232]!, [_0])
- }
- public var Passport_Language_ms: String { return self._s[4233]! }
- public var PeopleNearby_MakeInvisible: String { return self._s[4235]! }
- public var ImportStickerPack_CreateStickerSet: String { return self._s[4237]! }
- public var ChatList_Search_FilterVoice: String { return self._s[4238]! }
- public var Camera_TapAndHoldForVideo: String { return self._s[4240]! }
- public var Permissions_NotificationsAllowInSettings_v0: String { return self._s[4241]! }
- public func Notification_LeftChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4242]!, self._r[4242]!, [_0])
- }
- public func Call_VoiceChatInProgressMessageCall(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4243]!, self._r[4243]!, [_1, _2])
- }
- public var Map_Locating: String { return self._s[4244]! }
- public func Checkout_SavePasswordTimeout(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4246]!, self._r[4246]!, [_0])
- }
- public var Passport_Identity_TypeInternalPassport: String { return self._s[4248]! }
- public var Appearance_ThemePreview_Chat_4_Text: String { return self._s[4249]! }
- public var SettingsSearch_Synonyms_EditProfile_Username: String { return self._s[4250]! }
- public var Stickers_Installed: String { return self._s[4251]! }
- public var Notifications_PermissionsAllowInSettings: String { return self._s[4252]! }
- public var StickerPackActionInfo_RemovedTitle: String { return self._s[4253]! }
- public var CallSettings_Never: String { return self._s[4255]! }
- public var Channel_Setup_TypePublicHelp: String { return self._s[4256]! }
- public func ChatList_DeleteForEveryone(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4258]!, self._r[4258]!, [_0])
- }
- public var Message_Game: String { return self._s[4259]! }
- public var Call_Message: String { return self._s[4260]! }
- public func PUSH_CHANNEL_MESSAGE_VIDEO(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4261]!, self._r[4261]!, [_1])
- }
- public var ChannelIntro_Text: String { return self._s[4262]! }
- public var VoiceChat_NoiseSuppressionEnabled: String { return self._s[4263]! }
- public var StickerPack_Send: String { return self._s[4264]! }
- public var Share_AuthDescription: String { return self._s[4265]! }
- public var PasscodeSettings_AutoLock_IfAwayFor_5minutes: String { return self._s[4266]! }
- public var CallFeedback_WhatWentWrong: String { return self._s[4267]! }
- public var Common_Create: String { return self._s[4270]! }
- public var Passport_Language_hy: String { return self._s[4271]! }
- public var CreatePoll_Explanation: String { return self._s[4272]! }
- public var GroupPermission_AddMembersNotAvailable: String { return self._s[4273]! }
- public var ChatImport_CreateGroupAlertImportAction: String { return self._s[4274]! }
- public var PeerInfo_ButtonVoiceChat: String { return self._s[4275]! }
- public var Undo_ChatClearedForBothSides: String { return self._s[4276]! }
- public var DialogList_NoMessagesTitle: String { return self._s[4277]! }
- public var GroupInfo_Title: String { return self._s[4279]! }
- public func ScheduleVoiceChat_ScheduleToday(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4280]!, self._r[4280]!, [_0])
- }
- public var UserInfo_ContactForwardTooltip_SavedMessages_One: String { return self._s[4281]! }
- public var Channel_AdminLog_CanBanUsers: String { return self._s[4282]! }
- public var PhoneNumberHelp_Help: String { return self._s[4283]! }
- public var TwoStepAuth_AdditionalPassword: String { return self._s[4284]! }
- public var Settings_Logout: String { return self._s[4285]! }
- public var Privacy_PaymentsTitle: String { return self._s[4286]! }
- public var StickerPacksSettings_StickerPacksSection: String { return self._s[4287]! }
- public var Tour_Text6: String { return self._s[4288]! }
- public var ChatImportActivity_Title: String { return self._s[4290]! }
- public var Channel_Username_Help: String { return self._s[4291]! }
- public var VoiceOver_Chat_RecordModeVoiceMessageInfo: String { return self._s[4292]! }
- public var AttachmentMenu_Poll: String { return self._s[4293]! }
- public var EditTheme_Create_Preview_IncomingReplyName: String { return self._s[4294]! }
- public var Conversation_ReportSpamChannelConfirmation: String { return self._s[4295]! }
- public var Passport_DeletePassport: String { return self._s[4296]! }
- public var Login_Code: String { return self._s[4297]! }
- public var Notification_SecretChatScreenshot: String { return self._s[4298]! }
- public var VoiceChat_AddBio: String { return self._s[4299]! }
- public var Login_CodeFloodError: String { return self._s[4300]! }
- public func Notification_PinnedAnimationMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4301]!, self._r[4301]!, [_0])
- }
- public func Channel_Username_UsernameIsAvailable(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4302]!, self._r[4302]!, [_0])
- }
- public var Watch_Stickers_Recents: String { return self._s[4303]! }
- public var Generic_ErrorMoreInfo: String { return self._s[4304]! }
- public func Call_AccountIsLoggedOnCurrentDevice(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4305]!, self._r[4305]!, [_0])
- }
- public var AutoDownloadSettings_DataUsage: String { return self._s[4306]! }
- public var Conversation_ViewTheme: String { return self._s[4307]! }
- public var Contacts_InviteSearchLabel: String { return self._s[4308]! }
- public var Settings_CancelUpload: String { return self._s[4310]! }
- public var Settings_AppLanguage_Unofficial: String { return self._s[4311]! }
- public func ChatList_ClearChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4312]!, self._r[4312]!, [_0])
- }
- public var ChatList_AddFolder: String { return self._s[4313]! }
- public var Conversation_Location: String { return self._s[4315]! }
- public var Appearance_BubbleCorners_AdjustAdjacent: String { return self._s[4316]! }
- public var DialogList_AdLabel: String { return self._s[4317]! }
- public func Time_TomorrowAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4319]!, self._r[4319]!, [_0])
- }
- public var Message_InvoiceLabel: String { return self._s[4320]! }
- public var Channel_TooMuchBots: String { return self._s[4321]! }
- public func Channel_AdminLog_MessageRemovedChannelUsername(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4323]!, self._r[4323]!, [_0])
- }
- public var Call_IncomingVideoCall: String { return self._s[4324]! }
- public var Conversation_LiveLocation: String { return self._s[4325]! }
- public var VoiceChat_AskedToSpeakHelp: String { return self._s[4326]! }
- public var TwoStepAuth_SetupPasswordEnterPasswordChange: String { return self._s[4327]! }
- public var Passport_Identity_EditPassport: String { return self._s[4328]! }
- public var Permissions_CellularDataTitle_v0: String { return self._s[4330]! }
- public var ChatList_Search_NoResultsFitlerVoice: String { return self._s[4331]! }
- public var GroupInfo_Permissions_AddException: String { return self._s[4332]! }
- public func VoiceChat_RemovePeerConfirmationChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4334]!, self._r[4334]!, [_0])
- }
- public var Channel_AdminLog_CanInviteUsers: String { return self._s[4335]! }
- public var Channel_MessageVideoUpdated: String { return self._s[4336]! }
- public var GroupInfo_Permissions_EditingDisabled: String { return self._s[4337]! }
- public var AutoremoveSetup_TimeSectionHeader: String { return self._s[4340]! }
- public var AccessDenied_Camera: String { return self._s[4341]! }
- public func Target_InviteToGroupConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4342]!, self._r[4342]!, [_0])
- }
- public var Theme_Context_ChangeColors: String { return self._s[4343]! }
- public var PrivacySettings_TwoStepAuth: String { return self._s[4344]! }
- public var Privacy_Forwards_PreviewMessageText: String { return self._s[4345]! }
- public var Login_CodeExpiredError: String { return self._s[4346]! }
- public var State_ConnectingToProxy: String { return self._s[4347]! }
- public var TextFormat_Link: String { return self._s[4348]! }
- public var Passport_Language_lv: String { return self._s[4350]! }
- public var Conversation_AutoremoveTimerRemovedGroup: String { return self._s[4351]! }
- public var AccessDenied_VoiceMicrophone: String { return self._s[4352]! }
- public var WallpaperPreview_SwipeBottomText: String { return self._s[4353]! }
- public var ProfilePhoto_SetMainVideo: String { return self._s[4354]! }
- public var AutoDownloadSettings_Cellular: String { return self._s[4356]! }
- public var ChatSettings_AutoDownloadVoiceMessages: String { return self._s[4357]! }
- public var Calls_NoVoiceAndVideoCallsPlaceholder: String { return self._s[4358]! }
- public func Channel_AdminLog_MessageKickedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4359]!, self._r[4359]!, [_1, _2])
- }
- public var ChatList_EmptyChatListFilterTitle: String { return self._s[4360]! }
- public var Checkout_PayNone: String { return self._s[4361]! }
- public var NotificationsSound_Complete: String { return self._s[4363]! }
- public var TwoStepAuth_ConfirmEmailCodePlaceholder: String { return self._s[4364]! }
- public var InviteLink_CreateInfo: String { return self._s[4365]! }
- public var AuthSessions_DevicesTitle: String { return self._s[4366]! }
- public func DialogList_MultipleTyping(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4367]!, self._r[4367]!, [_0, _1])
- }
- public var Message_LiveLocation: String { return self._s[4368]! }
- public var Watch_Suggestion_BRB: String { return self._s[4369]! }
- public var Channel_BanUser_Title: String { return self._s[4370]! }
- public var SettingsSearch_Synonyms_Privacy_Data_Title: String { return self._s[4371]! }
- public var Conversation_Dice_u1F3C0: String { return self._s[4372]! }
- public var Conversation_ClearSelfHistory: String { return self._s[4373]! }
- public var ProfilePhoto_OpenGallery: String { return self._s[4374]! }
- public var PrivacySettings_LastSeenTitle: String { return self._s[4375]! }
- public var Weekday_Thursday: String { return self._s[4376]! }
- public var BroadcastListInfo_AddRecipient: String { return self._s[4377]! }
- public var Privacy_ProfilePhoto: String { return self._s[4379]! }
- public var StickerPacksSettings_ArchivedPacks_Info: String { return self._s[4380]! }
- public func Channel_AdminLog_MessageChangedUnlinkedGroup(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4381]!, self._r[4381]!, [_1, _2])
- }
- public var Message_Audio: String { return self._s[4382]! }
- public var Conversation_Info: String { return self._s[4383]! }
- public var Cache_Videos: String { return self._s[4384]! }
- public var Appearance_ThemePreview_ChatList_6_Text: String { return self._s[4385]! }
- public var Channel_ErrorAddTooMuch: String { return self._s[4386]! }
- public var TwoFactorSetup_ResetDone_Text: String { return self._s[4387]! }
- public func ChatList_DeleteSecretChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4388]!, self._r[4388]!, [_0])
- }
- public var VoiceChat_EditBio: String { return self._s[4389]! }
- public var ChannelMembers_ChannelAdminsTitle: String { return self._s[4391]! }
- public var VoiceChat_ShareScreen: String { return self._s[4394]! }
- public var ScheduledMessages_Title: String { return self._s[4395]! }
- public var ShareFileTip_Title: String { return self._s[4398]! }
- public var Chat_Gifs_TrendingSectionHeader: String { return self._s[4399]! }
- public var ChatList_RemoveFolderConfirmation: String { return self._s[4400]! }
- public func PUSH_CHAT_MESSAGE_GEOLIVE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4401]!, self._r[4401]!, [_1, _2])
- }
- public var Conversation_ContextViewStats: String { return self._s[4403]! }
- public var Channel_DiscussionGroup_SearchPlaceholder: String { return self._s[4404]! }
- public var PasscodeSettings_Title: String { return self._s[4405]! }
- public var Channel_AdminLog_SendPolls: String { return self._s[4406]! }
- public var LastSeen_ALongTimeAgo: String { return self._s[4407]! }
- public func PUSH_CHANNEL_MESSAGE_GIF(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4408]!, self._r[4408]!, [_1])
- }
- public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChannels: String { return self._s[4409]! }
- public var ChannelInfo_FakeChannelWarning: String { return self._s[4410]! }
- public var CallFeedback_VideoReasonLowQuality: String { return self._s[4411]! }
- public var VoiceChat_VideoPreviewShareScreenInfo: String { return self._s[4412]! }
- public var Conversation_PinnedPreviousMessage: String { return self._s[4413]! }
- public var SocksProxySetup_AddProxyTitle: String { return self._s[4414]! }
- public var Passport_Identity_AddInternalPassport: String { return self._s[4415]! }
- public func ChatList_RemovedFromFolderTooltip(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4416]!, self._r[4416]!, [_1, _2])
- }
- public func Conversation_SetReminder_RemindToday(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4417]!, self._r[4417]!, [_0])
- }
- public var Passport_Identity_GenderFemale: String { return self._s[4418]! }
- public var Location_ProximityNotification_DistanceKM: String { return self._s[4421]! }
- public var ConvertToSupergroup_HelpTitle: String { return self._s[4422]! }
- public func Message_ImportedDateFormat(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4423]!, self._r[4423]!, [_1, _2, _3])
- }
- public var VoiceChat_Audio: String { return self._s[4424]! }
- public var SharedMedia_TitleAll: String { return self._s[4425]! }
- public var Settings_Context_Logout: String { return self._s[4426]! }
- public var GroupInfo_SetGroupPhotoDelete: String { return self._s[4429]! }
- public var Settings_About_Title: String { return self._s[4430]! }
- public var StickerSettings_ContextHide: String { return self._s[4431]! }
- public func AutoDownloadSettings_UpTo(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4432]!, self._r[4432]!, [_0])
- }
- public func Conversation_LiveLocationYouAndOther(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4433]!, self._r[4433]!, [_0])
- }
- public var ChatImport_SelectionConfirmationAlertImportAction: String { return self._s[4435]! }
- public var Common_Cancel: String { return self._s[4436]! }
- public var CallFeedback_Title: String { return self._s[4438]! }
- public func Notification_PinnedContactMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4439]!, self._r[4439]!, [_0])
- }
- public var Conversation_StickerAddedToFavorites: String { return self._s[4440]! }
- public var Activity_UploadingVideoMessage: String { return self._s[4442]! }
- public var MediaPicker_Send: String { return self._s[4443]! }
- public var PasscodeSettings_AutoLock_IfAwayFor_1minute: String { return self._s[4444]! }
- public var Conversation_LiveLocationYou: String { return self._s[4445]! }
- public var Notifications_ExceptionsUnmuted: String { return self._s[4446]! }
- public func Channel_AdminLog_MessageGroupPreHistoryHidden(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4448]!, self._r[4448]!, [_0])
- }
- public func PUSH_CHAT_ADD_YOU(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4449]!, self._r[4449]!, [_1, _2])
- }
- public var Checkout_PaymentLiabilityAlert: String { return self._s[4450]! }
- public var Conversation_ViewBackground: String { return self._s[4451]! }
- public var ChatSettings_PrivateChats: String { return self._s[4454]! }
- public var Conversation_ErrorInaccessibleMessage: String { return self._s[4455]! }
- public var BroadcastGroups_LimitAlert_LearnMore: String { return self._s[4456]! }
- public var Appearance_ThemeNight: String { return self._s[4457]! }
- public var Common_Search: String { return self._s[4458]! }
- public var TwoStepAuth_ReEnterPasswordTitle: String { return self._s[4459]! }
- public var ChangePhoneNumberNumber_Help: String { return self._s[4461]! }
- public var InviteLink_QRCode_Share: String { return self._s[4462]! }
- public var Stickers_SuggestAdded: String { return self._s[4464]! }
- public func VoiceChat_VideoParticipantsLimitExceeded(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4466]!, self._r[4466]!, [_0])
- }
- public var Conversation_DiscardVoiceMessageDescription: String { return self._s[4468]! }
- public var Widget_UpdatedTodayAt: String { return self._s[4469]! }
- public var NetworkUsageSettings_Cellular: String { return self._s[4470]! }
- public var CheckoutInfo_Title: String { return self._s[4471]! }
- public var Conversation_ShareBotLocationConfirmationTitle: String { return self._s[4472]! }
- public var Channel_BotDoesntSupportGroups: String { return self._s[4473]! }
- public func DialogList_SingleRecordingAudioSuffix(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4474]!, self._r[4474]!, [_0])
- }
- public var MaskStickerSettings_Info: String { return self._s[4476]! }
- public var GroupRemoved_DeleteUser: String { return self._s[4478]! }
- public var Contacts_ShareTelegram: String { return self._s[4479]! }
- public var Group_UpgradeNoticeText1: String { return self._s[4480]! }
- public func PUSH_PHONE_CALL_REQUEST(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4481]!, self._r[4481]!, [_1])
- }
- public var PrivacyLastSeenSettings_Title: String { return self._s[4482]! }
- public var SettingsSearch_Synonyms_Support: String { return self._s[4486]! }
- public var PhotoEditor_TintTool: String { return self._s[4487]! }
- public var ChatImportActivity_OpenApp: String { return self._s[4489]! }
- public var GroupPermission_NoSendPolls: String { return self._s[4490]! }
- public var NotificationsSound_None: String { return self._s[4491]! }
- public func LOCAL_CHANNEL_MESSAGE_FWDS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4492]!, self._r[4492]!, [_1, "\(_2)"])
- }
- public var CheckoutInfo_ShippingInfoCityPlaceholder: String { return self._s[4495]! }
- public func Conversation_AutoremoveTimerSetChannel(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4497]!, self._r[4497]!, [_1])
- }
- public var ExplicitContent_AlertChannel: String { return self._s[4498]! }
- public var Conversation_ClousStorageInfo_Description1: String { return self._s[4499]! }
- public var Contacts_SortedByPresence: String { return self._s[4500]! }
- public var WallpaperSearch_ColorGray: String { return self._s[4501]! }
- public var Channel_AdminLogFilter_EventsNewSubscribers: String { return self._s[4502]! }
- public var Conversation_ReportSpam: String { return self._s[4503]! }
- public var ChatList_Search_NoResultsFilter: String { return self._s[4506]! }
- public var WallpaperSearch_ColorBlack: String { return self._s[4507]! }
- public var ArchivedChats_IntroTitle3: String { return self._s[4508]! }
- public var InviteLink_DeleteAllRevokedLinksAlert_Action: String { return self._s[4509]! }
- public func VoiceChat_PeerJoinedText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4510]!, self._r[4510]!, [_0])
- }
- public var Conversation_DefaultRestrictedText: String { return self._s[4511]! }
- public var Settings_Devices: String { return self._s[4512]! }
- public var Call_AudioRouteSpeaker: String { return self._s[4513]! }
- public var GroupInfo_InviteLink_CopyLink: String { return self._s[4514]! }
- public var VoiceChat_StartsIn: String { return self._s[4515]! }
- public var VoiceChat_CreateNewVoiceChatSchedule: String { return self._s[4516]! }
- public var VoiceChat_EditDescriptionTitle: String { return self._s[4518]! }
- public var Passport_Address_Country: String { return self._s[4519]! }
- public var Cache_MaximumCacheSize: String { return self._s[4520]! }
- public var Chat_PanelHidePinnedMessages: String { return self._s[4521]! }
- public var Notifications_Badge_IncludePublicGroups: String { return self._s[4522]! }
- public var ChatSettings_AutoDownloadUsingWiFi: String { return self._s[4524]! }
- public var Login_TermsOfServiceLabel: String { return self._s[4525]! }
- public var Calls_NoMissedCallsPlacehoder: String { return self._s[4526]! }
- public var SocksProxySetup_RequiredCredentials: String { return self._s[4527]! }
- public var VoiceOver_MessageContextOpenMessageMenu: String { return self._s[4528]! }
- public var AutoNightTheme_ScheduledFrom: String { return self._s[4529]! }
- public var ChatSettings_AutoDownloadDocuments: String { return self._s[4530]! }
- public var ConvertToSupergroup_Note: String { return self._s[4532]! }
- public var Settings_SetNewProfilePhotoOrVideo: String { return self._s[4533]! }
- public var PrivacySettings_PasscodeAndTouchId: String { return self._s[4534]! }
- public var Common_More: String { return self._s[4535]! }
- public var ShareMenu_SelectChats: String { return self._s[4537]! }
- public func Conversation_ScheduleMessage_SendToday(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4538]!, self._r[4538]!, [_0])
- }
- public func Channel_AdminLog_MessageRemovedGroupStickerPack(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4539]!, self._r[4539]!, [_0])
- }
- public var Contacts_PermissionsKeepDisabled: String { return self._s[4541]! }
- public var VoiceChat_EditBioText: String { return self._s[4542]! }
- public func Call_ParticipantVersionOutdatedError(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4543]!, self._r[4543]!, [_0])
- }
- public var WatchRemote_AlertOpen: String { return self._s[4544]! }
- public func PUSH_CHAT_ADD_MEMBER(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4545]!, self._r[4545]!, [_1, _2, _3])
- }
- public var Channel_Members_AddMembersHelp: String { return self._s[4546]! }
- public var Shortcut_SwitchAccount: String { return self._s[4547]! }
- public var Map_LiveLocationFor8Hours: String { return self._s[4548]! }
- public func AutoNightTheme_AutomaticHelp(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4549]!, self._r[4549]!, [_0])
- }
- public var Compose_NewGroupTitle: String { return self._s[4550]! }
- public var DialogList_You: String { return self._s[4551]! }
- public var Call_VoiceOver_VoiceCallOutgoing: String { return self._s[4552]! }
- public var ReportPeer_ReasonViolence: String { return self._s[4553]! }
- public func PUSH_CHANNEL_MESSAGE_STICKER(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4554]!, self._r[4554]!, [_1, _2])
- }
- public var VoiceChat_Reconnecting: String { return self._s[4556]! }
- public var KeyCommand_ScrollDown: String { return self._s[4559]! }
- public var ChatSettings_DownloadInBackground: String { return self._s[4560]! }
- public var Wallpaper_ResetWallpapers: String { return self._s[4561]! }
- public var Channel_BanList_RestrictedTitle: String { return self._s[4562]! }
- public var ArchivedChats_IntroText3: String { return self._s[4563]! }
- public var HashtagSearch_AllChats: String { return self._s[4565]! }
- public var VoiceChat_EndVoiceChat: String { return self._s[4566]! }
- public var Conversation_MessageCopied: String { return self._s[4568]! }
- public var Channel_Info_BlackList: String { return self._s[4569]! }
- public var Contacts_SearchUsersAndGroupsLabel: String { return self._s[4570]! }
- public var PrivacyPhoneNumberSettings_DiscoveryHeader: String { return self._s[4571]! }
- public var Paint_Neon: String { return self._s[4573]! }
- public var SettingsSearch_Synonyms_AppLanguage: String { return self._s[4574]! }
- public var AutoDownloadSettings_AutoDownload: String { return self._s[4575]! }
- public var ImportStickerPack_CreateNewStickerSet: String { return self._s[4576]! }
- public func Notification_PinnedVideoMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4578]!, self._r[4578]!, [_0])
- }
- public var Map_StopLiveLocation: String { return self._s[4579]! }
- public var SettingsSearch_Synonyms_Data_SaveEditedPhotos: String { return self._s[4580]! }
- public var Channel_Username_InvalidCharacters: String { return self._s[4581]! }
- public var InstantPage_Reference: String { return self._s[4583]! }
- public var Group_Members_AddMembers: String { return self._s[4585]! }
- public func Conversation_ScheduledVoiceChatStartsOn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4586]!, self._r[4586]!, [_0])
- }
- public var ChatList_HideAction: String { return self._s[4587]! }
- public var Conversation_FileICloudDrive: String { return self._s[4589]! }
- public func PUSH_PINNED_GEOLIVE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4590]!, self._r[4590]!, [_1])
- }
- public var Passport_PasswordReset: String { return self._s[4592]! }
- public var ChatList_Context_UnhideArchive: String { return self._s[4594]! }
- public var ConvertToSupergroup_HelpText: String { return self._s[4595]! }
- public var Calls_AddTab: String { return self._s[4596]! }
- public var TwoStepAuth_ConfirmEmailResendCode: String { return self._s[4598]! }
- public var SettingsSearch_Synonyms_Stickers_SuggestStickers: String { return self._s[4599]! }
- public var Privacy_GroupsAndChannels: String { return self._s[4602]! }
- public var Conversation_UsernameCopied: String { return self._s[4603]! }
- public var AutoNightTheme_Disabled: String { return self._s[4604]! }
- public var CreatePoll_MultipleChoice: String { return self._s[4605]! }
- public func PINNED_INVOICE(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4606]!, self._r[4606]!, [_1])
- }
- public var Watch_Bot_Restart: String { return self._s[4608]! }
- public func Conversation_Kilobytes(_ _0: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4609]!, self._r[4609]!, ["\(_0)"])
- }
- public var GroupInfo_ScamGroupWarning: String { return self._s[4611]! }
- public var Conversation_EditingMessagePanelMedia: String { return self._s[4612]! }
- public var Appearance_PreviewIncomingText: String { return self._s[4613]! }
- public var ChatSettings_WidgetSettings: String { return self._s[4614]! }
- public var Notifications_ChannelNotificationsExceptionsHelp: String { return self._s[4615]! }
- public var ChatList_UndoArchiveRevealedTitle: String { return self._s[4617]! }
- public var Stats_GroupOverview: String { return self._s[4619]! }
- public var ScheduledMessages_EditTime: String { return self._s[4622]! }
- public var Month_GenFebruary: String { return self._s[4623]! }
- public var ChatList_AutoarchiveSuggestion_OpenSettings: String { return self._s[4624]! }
- public var Stickers_ClearRecent: String { return self._s[4625]! }
- public var InviteLink_Create_UsersLimitNumberOfUsersUnlimited: String { return self._s[4626]! }
- public var TwoStepAuth_EnterPasswordPassword: String { return self._s[4627]! }
- public var Stats_Message_PublicShares: String { return self._s[4628]! }
- public func Checkout_PayPrice(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4629]!, self._r[4629]!, [_0])
- }
- public var Login_TermsOfServiceSignupDecline: String { return self._s[4630]! }
- public var CheckoutInfo_ErrorCityInvalid: String { return self._s[4631]! }
- public var VoiceOver_Chat_PlayHint: String { return self._s[4632]! }
- public var ChatAdmins_AllMembersAreAdminsOffHelp: String { return self._s[4633]! }
- public var CheckoutInfo_ShippingInfoTitle: String { return self._s[4635]! }
- public var CreatePoll_Create: String { return self._s[4636]! }
- public var ChatList_Search_FilterLinks: String { return self._s[4637]! }
- public var Your_cards_number_is_invalid: String { return self._s[4638]! }
- public var Month_ShortApril: String { return self._s[4639]! }
- public var SocksProxySetup_UseForCalls: String { return self._s[4640]! }
- public var Conversation_EditingCaptionPanelTitle: String { return self._s[4641]! }
- public var SocksProxySetup_Status: String { return self._s[4642]! }
- public var VoiceChat_UnmuteForMe: String { return self._s[4643]! }
- public var ChannelInfo_DeleteGroupConfirmation: String { return self._s[4644]! }
- public var ChatListFolder_CategoryBots: String { return self._s[4645]! }
- public var Passport_FieldIdentitySelfieHelp: String { return self._s[4647]! }
- public var GroupInfo_BroadcastListNamePlaceholder: String { return self._s[4648]! }
- public var Chat_PinnedListPreview_UnpinAllMessages: String { return self._s[4649]! }
- public var Wallpaper_ResetWallpapersInfo: String { return self._s[4650]! }
- public var Conversation_TitleUnmute: String { return self._s[4651]! }
- public var Group_Setup_TypeHeader: String { return self._s[4652]! }
- public func Conversation_ForwardTooltip_ManyChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4653]!, self._r[4653]!, [_0, _1])
- }
- public var Stats_ViewsPerPost: String { return self._s[4654]! }
- public var CheckoutInfo_ShippingInfoCountry: String { return self._s[4655]! }
- public var Passport_Identity_TranslationHelp: String { return self._s[4656]! }
- public func PUSH_CHANNEL_MESSAGE_FWD(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4657]!, self._r[4657]!, [_1])
- }
- public var GroupInfo_Administrators_Title: String { return self._s[4658]! }
- public func Channel_AdminLog_MessageRankName(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4659]!, self._r[4659]!, [_1, _2])
- }
- public func PUSH_CHAT_MESSAGE_POLL(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4660]!, self._r[4660]!, [_1, _2, _3])
- }
- public var CheckoutInfo_ShippingInfoState: String { return self._s[4661]! }
- public var Passport_Language_my: String { return self._s[4663]! }
- public var PrivacyLastSeenSettings_AlwaysShareWith_Title: String { return self._s[4664]! }
- public var VoiceChat_Unpin: String { return self._s[4665]! }
- public var Map_PlacesNearby: String { return self._s[4666]! }
- public var Channel_About_Help: String { return self._s[4667]! }
- public var LogoutOptions_AddAccountTitle: String { return self._s[4668]! }
- public var ChatSettings_AutomaticAudioDownload: String { return self._s[4669]! }
- public var Channel_Username_Title: String { return self._s[4670]! }
- public var Activity_RecordingVideoMessage: String { return self._s[4671]! }
- public func StickerPackActionInfo_RemovedText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4672]!, self._r[4672]!, [_0])
- }
- public var CheckoutInfo_ShippingInfoCity: String { return self._s[4673]! }
- public var Passport_DiscardMessageDescription: String { return self._s[4674]! }
- public var Conversation_LinkDialogOpen: String { return self._s[4675]! }
- public var ChatList_Context_HideArchive: String { return self._s[4676]! }
- public func Message_AuthorPinnedGame(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4677]!, self._r[4677]!, [_0])
- }
- public var Privacy_GroupsAndChannels_CustomShareHelp: String { return self._s[4678]! }
- public var Conversation_Admin: String { return self._s[4679]! }
- public var DialogList_TabTitle: String { return self._s[4680]! }
- public func PUSH_CHAT_ALBUM(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4681]!, self._r[4681]!, [_1, _2])
- }
- public var Notifications_PermissionsUnreachableText: String { return self._s[4682]! }
- public var Passport_Identity_GenderMale: String { return self._s[4684]! }
- public func VoiceChat_EditTitleSuccess(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4686]!, self._r[4686]!, [_0])
- }
- public var SettingsSearch_Synonyms_Privacy_BlockedUsers: String { return self._s[4687]! }
- public var PhoneNumberHelp_Alert: String { return self._s[4688]! }
- public var EnterPasscode_EnterNewPasscodeChange: String { return self._s[4689]! }
- public var Notifications_InAppNotifications: String { return self._s[4690]! }
- public func Update_AppVersion(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4691]!, self._r[4691]!, [_0])
- }
- public var Notification_VideoCallOutgoing: String { return self._s[4692]! }
- public var Login_InvalidCodeError: String { return self._s[4693]! }
- public var Conversation_PrivateChannelTimeLimitedAlertJoin: String { return self._s[4694]! }
- public func LastSeen_TodayAt(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4696]!, self._r[4696]!, [_0])
- }
- public var Conversation_InputTextCaptionPlaceholder: String { return self._s[4697]! }
- public var ReportPeer_Report: String { return self._s[4698]! }
- public var Camera_FlashOff: String { return self._s[4701]! }
- public var Conversation_InputTextBroadcastPlaceholder: String { return self._s[4704]! }
- public func Notification_VoiceChatScheduledTomorrow(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4705]!, self._r[4705]!, [_1, _2])
- }
- public var PrivacyPolicy_DeclineTitle: String { return self._s[4708]! }
- public var SettingsSearch_Synonyms_Privacy_PasscodeAndTouchId: String { return self._s[4709]! }
- public var Passport_FieldEmail: String { return self._s[4710]! }
- public func Channel_AdminLog_MessageKickedName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4711]!, self._r[4711]!, [_1])
- }
- public var Notifications_ExceptionsResetToDefaults: String { return self._s[4712]! }
- public var PeerInfo_PaneVoiceAndVideo: String { return self._s[4713]! }
- public var Group_OwnershipTransfer_Title: String { return self._s[4714]! }
- public var Conversation_DefaultRestrictedInline: String { return self._s[4715]! }
- public var Login_PhoneNumberHelp: String { return self._s[4717]! }
- public var Channel_AdminLogFilter_EventsNewMembers: String { return self._s[4718]! }
- public var Conversation_PinnedQuiz: String { return self._s[4719]! }
- public var CreateGroup_SoftUserLimitAlert: String { return self._s[4720]! }
- public var Login_PhoneNumberAlreadyAuthorizedSwitch: String { return self._s[4721]! }
- public var Group_MessagePhotoUpdated: String { return self._s[4722]! }
- public var LoginPassword_PasswordPlaceholder: String { return self._s[4723]! }
- public var BroadcastGroups_ConfirmationAlert_Text: String { return self._s[4724]! }
- public var Passport_Identity_Translations: String { return self._s[4726]! }
- public var ChatAdmins_AllMembersAreAdmins: String { return self._s[4727]! }
- public var ChannelInfo_DeleteChannel: String { return self._s[4729]! }
- public var PasscodeSettings_HelpBottom: String { return self._s[4730]! }
- public var Channel_Members_AddMembers: String { return self._s[4731]! }
- public var AutoDownloadSettings_LastDelimeter: String { return self._s[4732]! }
- public var Notification_Exceptions_DeleteAllConfirmation: String { return self._s[4734]! }
- public var Conversation_HoldForAudio: String { return self._s[4735]! }
- public var Media_LimitedAccessChangeSettings: String { return self._s[4737]! }
- public var Watch_LastSeen_Lately: String { return self._s[4738]! }
- public var ChatList_Context_MarkAsRead: String { return self._s[4739]! }
- public var Conversation_PinnedMessage: String { return self._s[4740]! }
- public var SettingsSearch_Synonyms_Appearance_ColorTheme: String { return self._s[4741]! }
- public var VoiceChat_StopRecordingStop: String { return self._s[4743]! }
- public var Passport_UpdateRequiredError: String { return self._s[4744]! }
- public var PrivacySettings_Passcode: String { return self._s[4745]! }
- public func Call_EmojiDescription(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4746]!, self._r[4746]!, [_0])
- }
- public var AutoNightTheme_NotAvailable: String { return self._s[4747]! }
- public var Conversation_PressVolumeButtonForSound: String { return self._s[4748]! }
- public var VoiceOver_Common_On: String { return self._s[4749]! }
- public var LoginPassword_InvalidPasswordError: String { return self._s[4750]! }
- public var ChatListFolder_IncludedSectionHeader: String { return self._s[4751]! }
- public var Channel_SignMessages_Help: String { return self._s[4752]! }
- public var ChatList_DeleteForEveryoneConfirmationTitle: String { return self._s[4753]! }
- public var Conversation_TitleNoComments: String { return self._s[4754]! }
- public var MediaPicker_LivePhotoDescription: String { return self._s[4755]! }
- public var GroupInfo_Permissions: String { return self._s[4756]! }
- public var GroupPermission_NoSendLinks: String { return self._s[4759]! }
- public func Conversation_ScheduledVoiceChatStartsTomorrow(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4760]!, self._r[4760]!, [_0])
- }
- public var Passport_Identity_ResidenceCountry: String { return self._s[4761]! }
- public var Appearance_ThemeCarouselNightBlue: String { return self._s[4763]! }
- public var ChatList_ArchiveAction: String { return self._s[4764]! }
- public func Channel_AdminLog_DisabledSlowmode(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4765]!, self._r[4765]!, [_0])
- }
- public var GroupInfo_GroupHistory: String { return self._s[4766]! }
- public func Channel_Management_ErrorNotMember(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4768]!, self._r[4768]!, [_0])
- }
- public var Privacy_Forwards_LinkIfAllowed: String { return self._s[4770]! }
- public var Channel_Info_Banned: String { return self._s[4771]! }
- public var Paint_RecentStickers: String { return self._s[4772]! }
- public var VoiceOver_MessageContextSend: String { return self._s[4773]! }
- public var Group_ErrorNotMutualContact: String { return self._s[4774]! }
- public var ReportPeer_ReasonOther: String { return self._s[4776]! }
- public var Channel_BanUser_PermissionChangeGroupInfo: String { return self._s[4777]! }
- public var SocksProxySetup_ShareQRCodeInfo: String { return self._s[4779]! }
- public var KeyCommand_Find: String { return self._s[4780]! }
- public func Channel_MessageTitleUpdated(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4781]!, self._r[4781]!, [_0])
- }
- public var ChatList_Context_Unmute: String { return self._s[4782]! }
- public var Chat_SlowmodeAttachmentLimitReached: String { return self._s[4783]! }
- public var TwoFactorSetup_ResetDone_Action: String { return self._s[4784]! }
- public var Stickers_GroupStickersHelp: String { return self._s[4785]! }
- public var Checkout_Title: String { return self._s[4786]! }
- public var Activity_RecordingAudio: String { return self._s[4787]! }
- public var SettingsSearch_Synonyms_Notifications_GroupNotificationsPreview: String { return self._s[4788]! }
- public var BlockedUsers_BlockTitle: String { return self._s[4789]! }
- public var DialogList_SavedMessagesHelp: String { return self._s[4791]! }
- public var Calls_All: String { return self._s[4792]! }
- public var Settings_FAQ_Button: String { return self._s[4794]! }
- public var Conversation_Dice_u1F3B0: String { return self._s[4796]! }
- public func Time_MonthOfYear_m5(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4797]!, self._r[4797]!, [_0])
- }
- public var Conversation_ReportGroupLocation: String { return self._s[4798]! }
- public var Passport_Scans_Upload: String { return self._s[4799]! }
- public var Channel_EditAdmin_PermissionPinMessages: String { return self._s[4801]! }
- public var ChatList_UnarchiveAction: String { return self._s[4802]! }
- public var Stats_GroupTopInviter_History: String { return self._s[4803]! }
- public var GroupInfo_Permissions_Title: String { return self._s[4804]! }
- public var VoiceChat_CreateNewVoiceChatStart: String { return self._s[4805]! }
- public var Passport_Language_el: String { return self._s[4806]! }
- public var Channel_DiscussionMessageUnavailable: String { return self._s[4807]! }
- public func UserInfo_ContactForwardTooltip_TwoChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4808]!, self._r[4808]!, [_0, _1])
- }
- public var GroupInfo_ActionPromote: String { return self._s[4809]! }
- public var Group_OwnershipTransfer_ErrorLocatedGroupsTooMuch: String { return self._s[4810]! }
- public var Media_LimitedAccessSelectMore: String { return self._s[4811]! }
- public func TwoStepAuth_PendingEmailHelp(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4812]!, self._r[4812]!, [_0])
- }
- public var VoiceOver_Chat_Reply: String { return self._s[4813]! }
- public var Month_GenMay: String { return self._s[4814]! }
- public var DialogList_DeleteBotConversationConfirmation: String { return self._s[4815]! }
- public var Chat_PsaTooltip_covid: String { return self._s[4816]! }
- public var Watch_Suggestion_CantTalk: String { return self._s[4817]! }
- public var Privacy_GroupsAndChannels_NeverAllow_Title: String { return self._s[4818]! }
- public var AppUpgrade_Running: String { return self._s[4819]! }
- public var PasscodeSettings_UnlockWithFaceId: String { return self._s[4822]! }
- public var Notification_Exceptions_PreviewAlwaysOff: String { return self._s[4823]! }
- public var SharedMedia_EmptyText: String { return self._s[4824]! }
- public var Passport_Address_EditResidentialAddress: String { return self._s[4825]! }
- public var SettingsSearch_Synonyms_Notifications_GroupNotificationsAlert: String { return self._s[4826]! }
- public var Message_PinnedGame: String { return self._s[4827]! }
- public var KeyCommand_SearchInChat: String { return self._s[4828]! }
- public var Appearance_ThemeCarouselNewNight: String { return self._s[4829]! }
- public var ChatList_Search_FilterMedia: String { return self._s[4830]! }
- public var Message_PinnedAudioMessage: String { return self._s[4831]! }
- public var ChannelInfo_ConfirmLeave: String { return self._s[4833]! }
- public func Channel_AdminLog_MessagePromotedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4834]!, self._r[4834]!, [_1, _2])
- }
- public var SocksProxySetup_ProxyStatusUnavailable: String { return self._s[4835]! }
- public var InviteLink_Create: String { return self._s[4836]! }
- public func Passport_Email_CodeHelp(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4837]!, self._r[4837]!, [_0])
- }
- public func Message_PinnedTextMessage(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4838]!, self._r[4838]!, [_0])
- }
- public var Settings_AddAccount: String { return self._s[4839]! }
- public var Channel_AdminLog_CanDeleteMessages: String { return self._s[4840]! }
- public var Conversation_DiscardVoiceMessageTitle: String { return self._s[4841]! }
- public var Channel_JoinChannel: String { return self._s[4842]! }
- public var Watch_UserInfo_Unblock: String { return self._s[4843]! }
- public var PhoneLabel_Title: String { return self._s[4844]! }
- public var VoiceChat_EditPermissions: String { return self._s[4846]! }
- public var Group_Setup_HistoryHiddenHelp: String { return self._s[4847]! }
- public var Privacy_ProfilePhoto_AlwaysShareWith_Title: String { return self._s[4848]! }
- public func Login_PhoneGenericEmailBody(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String, _ _6: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4849]!, self._r[4849]!, [_1, _2, _3, _4, _5, _6])
- }
- public var Channel_AddBotErrorHaveRights: String { return self._s[4850]! }
- public var ChatList_TabIconFoldersTooltipNonEmptyFolders: String { return self._s[4851]! }
- public var DialogList_EncryptionProcessing: String { return self._s[4852]! }
- public var ChatList_Search_FilterChats: String { return self._s[4853]! }
- public var WatchRemote_NotificationText: String { return self._s[4854]! }
- public var EditTheme_ChangeColors: String { return self._s[4856]! }
- public var GroupRemoved_ViewUserInfo: String { return self._s[4857]! }
- public var CallSettings_OnMobile: String { return self._s[4859]! }
- public var Month_ShortFebruary: String { return self._s[4861]! }
- public var VoiceOver_MessageContextReply: String { return self._s[4862]! }
- public var AutoremoveSetup_TimerValueNever: String { return self._s[4863]! }
- public var Group_Location_ChangeLocation: String { return self._s[4865]! }
- public func PUSH_VIDEO_CALL_REQUEST(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4866]!, self._r[4866]!, [_1])
- }
- public var Passport_Address_TypeBankStatementUploadScan: String { return self._s[4867]! }
- public var VoiceOver_Media_PlaybackStop: String { return self._s[4868]! }
- public var SettingsSearch_Synonyms_Data_SaveIncomingPhotos: String { return self._s[4869]! }
- public func Channel_AdminLog_MessageRestrictedUntil(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4871]!, self._r[4871]!, [_0])
- }
- public var PhotoEditor_WarmthTool: String { return self._s[4872]! }
- public var Login_InfoAvatarPhoto: String { return self._s[4873]! }
- public var Notification_Exceptions_NewException_MessagePreviewHeader: String { return self._s[4874]! }
- public var Permissions_CellularDataAllowInSettings_v0: String { return self._s[4875]! }
- public var Map_PlacesInThisArea: String { return self._s[4876]! }
- public var VoiceOver_Chat_ContactEmail: String { return self._s[4877]! }
- public var Notifications_InAppNotificationsSounds: String { return self._s[4878]! }
- public func PUSH_PINNED_NOTEXT(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4879]!, self._r[4879]!, [_1])
- }
- public var PeerInfo_ReportProfileVideo: String { return self._s[4880]! }
- public var ShareMenu_Send: String { return self._s[4881]! }
- public var Username_InvalidStartsWithNumber: String { return self._s[4882]! }
- public func Channel_AdminLog_StartedVoiceChat(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4883]!, self._r[4883]!, [_1])
- }
- public var Appearance_AppIconClassicX: String { return self._s[4884]! }
- public var Report_Report: String { return self._s[4885]! }
- public func PUSH_CHANNEL_MESSAGE_ROUND(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4886]!, self._r[4886]!, [_1])
- }
- public var Conversation_StopPoll: String { return self._s[4887]! }
- public var InfoPlist_NSLocationAlwaysUsageDescription: String { return self._s[4889]! }
- public var Passport_Identity_EditIdentityCard: String { return self._s[4890]! }
- public var Appearance_ThemePreview_ChatList_3_Name: String { return self._s[4891]! }
- public var Conversation_Timer_Title: String { return self._s[4892]! }
- public var Common_Next: String { return self._s[4893]! }
- public var Notification_Exceptions_NewException: String { return self._s[4894]! }
- public func Generic_OpenHiddenLinkAlert(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4895]!, self._r[4895]!, [_0])
- }
- public var AccessDenied_CallMicrophone: String { return self._s[4896]! }
- public var VoiceChat_UnmutePeer: String { return self._s[4897]! }
- public var ChatImportActivity_Retry: String { return self._s[4898]! }
- public var SettingsSearch_Synonyms_Data_AutoDownloadUsingCellular: String { return self._s[4899]! }
- public var ChangePhoneNumberCode_Help: String { return self._s[4900]! }
- public var Passport_Identity_OneOfTypeIdentityCard: String { return self._s[4901]! }
- public var Channel_AdminLogFilter_EventsLeaving: String { return self._s[4902]! }
- public var BlockedUsers_LeavePrefix: String { return self._s[4903]! }
- public func Passport_RequestHeader(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4904]!, self._r[4904]!, [_0])
- }
- public var Group_About_Help: String { return self._s[4905]! }
- public var TwoStepAuth_ChangePasswordDescription: String { return self._s[4906]! }
- public var Tour_Title3: String { return self._s[4907]! }
- public var Watch_Conversation_Unblock: String { return self._s[4908]! }
- public var Watch_UserInfo_Block: String { return self._s[4909]! }
- public var Notifications_ChannelNotificationsAlert: String { return self._s[4910]! }
- public var TwoFactorSetup_Hint_Action: String { return self._s[4911]! }
- public var IntentsSettings_SuggestedChatsInfo: String { return self._s[4912]! }
- public var TextFormat_AddLinkTitle: String { return self._s[4913]! }
- public var GroupInfo_InviteLink_RevokeAlert_Revoke: String { return self._s[4914]! }
- public func Notification_VoiceChatScheduled(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4915]!, self._r[4915]!, [_1, _2])
- }
- public var TwoStepAuth_EnterPasswordTitle: String { return self._s[4916]! }
- public var FastTwoStepSetup_PasswordSection: String { return self._s[4918]! }
- public var Compose_ChannelMembers: String { return self._s[4919]! }
- public var Conversation_ForwardTitle: String { return self._s[4920]! }
- public var Conversation_PinnedPoll: String { return self._s[4923]! }
- public func VoiceOver_Chat_AnonymousPollFrom(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4924]!, self._r[4924]!, [_0])
- }
- public var SettingsSearch_Synonyms_EditProfile_AddAccount: String { return self._s[4925]! }
- public var Conversation_ContextMenuStickerPackAdd: String { return self._s[4927]! }
- public var Stats_Overview: String { return self._s[4928]! }
- public var Map_HomeAndWorkTitle: String { return self._s[4929]! }
- public func Time_PreciseDate_m4(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4930]!, self._r[4930]!, [_1, _2, _3])
- }
- public var Passport_Address_CityPlaceholder: String { return self._s[4931]! }
- public var InfoPlist_NSLocationAlwaysAndWhenInUseUsageDescription: String { return self._s[4932]! }
- public var Privacy_PhoneNumber: String { return self._s[4933]! }
- public var ChatList_Search_FilterFiles: String { return self._s[4934]! }
- public var ChatList_DeleteForEveryoneConfirmationAction: String { return self._s[4935]! }
- public var ChannelIntro_CreateChannel: String { return self._s[4936]! }
- public var Conversation_InputTextAnonymousPlaceholder: String { return self._s[4937]! }
- public func Login_EmailCodeBody(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4938]!, self._r[4938]!, [_0])
- }
- public var Weekday_ShortMonday: String { return self._s[4939]! }
- public var Passport_Language_ar: String { return self._s[4941]! }
- public var SettingsSearch_Synonyms_EditProfile_Title: String { return self._s[4942]! }
- public var TwoFactorSetup_Done_Title: String { return self._s[4943]! }
- public var Calls_RatingFeedback: String { return self._s[4944]! }
- public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsPreview: String { return self._s[4945]! }
- public var AutoDownloadSettings_ResetSettings: String { return self._s[4948]! }
- public func VoiceOver_SelfDestructTimerOn(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4949]!, self._r[4949]!, [_0])
- }
- public var Watch_Compose_Send: String { return self._s[4950]! }
- public var PasscodeSettings_ChangePasscode: String { return self._s[4951]! }
- public var WebSearch_RecentSectionClear: String { return self._s[4952]! }
- public func Contacts_AccessDeniedHelpPortrait(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4953]!, self._r[4953]!, [_0])
- }
- public var WallpaperSearch_ColorTeal: String { return self._s[4954]! }
- public var Wallpaper_SetCustomBackgroundInfo: String { return self._s[4955]! }
- public var Permissions_ContactsTitle_v0: String { return self._s[4956]! }
- public var Checkout_PasswordEntry_Pay: String { return self._s[4958]! }
- public var Settings_SavedMessages: String { return self._s[4959]! }
- public var TwoStepAuth_ReEnterPasswordDescription: String { return self._s[4960]! }
- public var Month_ShortMarch: String { return self._s[4961]! }
- public var Message_Location: String { return self._s[4962]! }
- public func PUSH_MESSAGE_GIF(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4963]!, self._r[4963]!, [_1])
- }
- public func Channel_AdminLog_MessageRemovedAdminName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4964]!, self._r[4964]!, [_1])
- }
- public func Notification_CallTimeFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4965]!, self._r[4965]!, [_1, _2])
- }
- public var VoiceOver_Chat_VoiceMessage: String { return self._s[4967]! }
- public func Channel_AdminLog_MessageChangedUnlinkedChannel(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4968]!, self._r[4968]!, [_1, _2])
- }
- public var GroupPermission_NoSendMedia: String { return self._s[4969]! }
- public var Conversation_ClousStorageInfo_Description2: String { return self._s[4970]! }
- public var SharedMedia_CategoryDocs: String { return self._s[4971]! }
- public var Appearance_RemoveThemeConfirmation: String { return self._s[4972]! }
- public var Paint_Framed: String { return self._s[4973]! }
- public var Channel_Setup_LinkTypePublic: String { return self._s[4974]! }
- public var Channel_EditAdmin_PermissionAddAdmins: String { return self._s[4975]! }
- public var Passport_Identity_DoesNotExpire: String { return self._s[4976]! }
- public func ChatImport_SelectionConfirmationUserWithTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4977]!, self._r[4977]!, [_1, _2])
- }
- public var TwoStepAuth_RecoveryUnavailableResetAction: String { return self._s[4978]! }
- public var Channel_SignMessages: String { return self._s[4979]! }
- public var Contacts_AccessDeniedHelpON: String { return self._s[4980]! }
- public var Conversation_ContextMenuStickerPackInfo: String { return self._s[4981]! }
- public func PUSH_CHAT_LEFT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4982]!, self._r[4982]!, [_1, _2])
- }
- public var InviteLink_Create_TimeLimitNoLimit: String { return self._s[4983]! }
- public var ImportStickerPack_ChooseName: String { return self._s[4984]! }
- public var GroupInfo_UpgradeButton: String { return self._s[4985]! }
- public var Channel_EditAdmin_PermissionInviteMembers: String { return self._s[4986]! }
- public func Conversation_ScheduledVoiceChatStartsTomorrowShort(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4987]!, self._r[4987]!, [_0])
- }
- public var AutoDownloadSettings_Files: String { return self._s[4988]! }
- public func Notification_ChangedGroupName(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4989]!, self._r[4989]!, [_0, _1])
- }
- public var Login_SendCodeViaSms: String { return self._s[4991]! }
- public var Update_UpdateApp: String { return self._s[4992]! }
- public var Channel_Setup_TypePublic: String { return self._s[4993]! }
- public var Watch_Compose_CreateMessage: String { return self._s[4994]! }
- public func PUSH_CHAT_MESSAGE_VIDEOS(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[4995]!, self._r[4995]!, [_1, _2, _3])
- }
- public var StickerPacksSettings_ManagingHelp: String { return self._s[4996]! }
- public var VoiceOver_Chat_Video: String { return self._s[4997]! }
- public var Forward_ChannelReadOnly: String { return self._s[4998]! }
- public var StickerPack_HideStickers: String { return self._s[4999]! }
- public var ChatListFolder_NameContacts: String { return self._s[5000]! }
- public var Profile_BotInfo: String { return self._s[5001]! }
- public var Document_TargetConfirmationFormat: String { return self._s[5002]! }
- public var GroupInfo_InviteByLink: String { return self._s[5003]! }
- public var Channel_AdminLog_BanSendStickersAndGifs: String { return self._s[5004]! }
- public var Watch_Stickers_RecentPlaceholder: String { return self._s[5005]! }
- public var Broadcast_AdminLog_EmptyText: String { return self._s[5006]! }
- public var Passport_NotLoggedInMessage: String { return self._s[5007]! }
- public var Conversation_StopQuizConfirmation: String { return self._s[5008]! }
- public var Checkout_PaymentMethod: String { return self._s[5009]! }
- public var ChatList_ArchivedChatsTitle: String { return self._s[5014]! }
- public var TwoStepAuth_SetupPasswordConfirmFailed: String { return self._s[5015]! }
- public var VoiceOver_Chat_RecordPreviewVoiceMessage: String { return self._s[5016]! }
- public var PrivacyLastSeenSettings_GroupsAndChannelsHelp: String { return self._s[5017]! }
- public var SettingsSearch_Synonyms_Privacy_Data_ContactsReset: String { return self._s[5018]! }
- public var Conversation_GigagroupDescription: String { return self._s[5019]! }
- public var Camera_Title: String { return self._s[5020]! }
- public var Map_Directions: String { return self._s[5021]! }
- public var Stats_MessagePublicForwardsTitle: String { return self._s[5023]! }
- public var Privacy_ProfilePhoto_WhoCanSeeMyPhoto: String { return self._s[5024]! }
- public var Profile_EncryptionKey: String { return self._s[5025]! }
- public func LOCAL_CHAT_MESSAGE_FWDS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5026]!, self._r[5026]!, [_1, "\(_2)"])
- }
- public var VoiceChat_VideoPreviewShareCamera: String { return self._s[5027]! }
- public func Compatibility_SecretMediaVersionTooLow(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5028]!, self._r[5028]!, [_0, _1])
- }
- public var Passport_Identity_TypePassport: String { return self._s[5029]! }
- public var CreatePoll_QuizOptionsHeader: String { return self._s[5031]! }
- public var Common_No: String { return self._s[5032]! }
- public var Conversation_SendMessage_ScheduleMessage: String { return self._s[5033]! }
- public var SettingsSearch_Synonyms_Privacy_LastSeen: String { return self._s[5034]! }
- public var Settings_AboutEmpty: String { return self._s[5035]! }
- public var TwoStepAuth_FloodError: String { return self._s[5037]! }
- public var SettingsSearch_Synonyms_Appearance_TextSize: String { return self._s[5038]! }
- public func Notification_VoiceChatScheduledChannel(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5039]!, self._r[5039]!, [_0])
- }
- public func Channel_AdminLog_MessageUnkickedName(_ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5041]!, self._r[5041]!, [_1])
- }
- public var Notification_Exceptions_MessagePreviewAlwaysOn: String { return self._s[5044]! }
- public var Conversation_Edit: String { return self._s[5045]! }
- public var CheckoutInfo_SaveInfo: String { return self._s[5047]! }
- public var VoiceOver_Chat_AnonymousPoll: String { return self._s[5048]! }
- public var Call_CameraTooltip: String { return self._s[5050]! }
- public var InstantPage_FeedbackButtonShort: String { return self._s[5051]! }
- public var Contacts_InviteToTelegram: String { return self._s[5052]! }
- public var Notifications_ResetAllNotifications: String { return self._s[5053]! }
- public var Calls_NewCall: String { return self._s[5054]! }
- public var VoiceOver_Chat_Music: String { return self._s[5057]! }
- public var Channel_AdminLogFilter_EventsInviteLinks: String { return self._s[5058]! }
- public var Channel_Members_AddAdminErrorNotAMember: String { return self._s[5059]! }
- public var Channel_Edit_AboutItem: String { return self._s[5060]! }
- public var Message_VideoExpired: String { return self._s[5061]! }
- public var Passport_Address_TypeTemporaryRegistrationUploadScan: String { return self._s[5062]! }
- public var Settings_TryEnterPassword: String { return self._s[5063]! }
- public func PUSH_CHAT_RETURNED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5064]!, self._r[5064]!, [_1, _2])
- }
- public var NotificationsSound_Input: String { return self._s[5066]! }
- public var Notifications_ClassicTones: String { return self._s[5067]! }
- public var Conversation_StatusTyping: String { return self._s[5068]! }
- public var Checkout_ErrorProviderAccountInvalid: String { return self._s[5069]! }
- public var ChatSettings_AutoDownloadSettings_Delimeter: String { return self._s[5070]! }
- public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChats: String { return self._s[5071]! }
- public var Conversation_MessageLeaveComment: String { return self._s[5072]! }
- public var UserInfo_TapToCall: String { return self._s[5073]! }
- public var EnterPasscode_EnterNewPasscodeNew: String { return self._s[5074]! }
- public func ScheduleVoiceChat_ScheduleOn(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5075]!, self._r[5075]!, [_0, _1])
- }
- public var Conversation_ClearAll: String { return self._s[5077]! }
- public var UserInfo_NotificationsDefault: String { return self._s[5078]! }
- public func TwoFactorSetup_ResetFloodWait(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5079]!, self._r[5079]!, [_0])
- }
- public var Location_ProximityGroupTip: String { return self._s[5080]! }
- public var Map_ChooseAPlace: String { return self._s[5081]! }
- public var GroupInfo_AddParticipantTitle: String { return self._s[5083]! }
- public var ChatList_PeerTypeNonContact: String { return self._s[5084]! }
- public var Conversation_SlideToCancel: String { return self._s[5085]! }
- public var Month_ShortJuly: String { return self._s[5086]! }
- public var SocksProxySetup_ProxyType: String { return self._s[5087]! }
- public func ChatList_DeleteChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5088]!, self._r[5088]!, [_0])
- }
- public var StickerPacks_ActionArchive: String { return self._s[5089]! }
- public var ChatList_EditFolders: String { return self._s[5090]! }
- public var TwoStepAuth_SetPasswordHelp: String { return self._s[5091]! }
- public var ScheduledMessages_RemindersTitle: String { return self._s[5093]! }
- public func GroupPermission_ApplyAlertText(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5094]!, self._r[5094]!, [_0])
- }
- public var Permissions_PeopleNearbyTitle_v0: String { return self._s[5095]! }
- public var Your_cards_expiration_year_is_invalid: String { return self._s[5096]! }
- public var UserInfo_ShareMyContactInfo: String { return self._s[5098]! }
- public func Conversation_ScheduledVoiceChatStartsOnShort(_ _0: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5100]!, self._r[5100]!, [_0])
- }
- public var Passport_DeleteAddress: String { return self._s[5101]! }
- public var Passport_DeletePassportConfirmation: String { return self._s[5102]! }
- public var Passport_Identity_ReverseSide: String { return self._s[5103]! }
- public var CheckoutInfo_ErrorEmailInvalid: String { return self._s[5105]! }
- public var Login_InfoLastNamePlaceholder: String { return self._s[5106]! }
- public var InviteLink_CreatedBy: String { return self._s[5107]! }
- public var Passport_FieldAddress: String { return self._s[5108]! }
- public var SettingsSearch_Synonyms_Calls_Title: String { return self._s[5109]! }
- public var Passport_Identity_ResidenceCountryPlaceholder: String { return self._s[5112]! }
- public var VoiceChat_Panel_TapToJoin: String { return self._s[5113]! }
- public var Map_Home: String { return self._s[5114]! }
- public var PollResults_Title: String { return self._s[5117]! }
- public func InviteLink_OtherPermanentLinkInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) {
- return formatWithArgumentRanges(self._s[5118]!, self._r[5118]!, [_1, _2])
- }
- public var ArchivedChats_IntroText2: String { return self._s[5120]! }
- public var VoiceChat_VideoPreviewTitle: String { return self._s[5121]! }
- public var PasscodeSettings_SimplePasscodeHelp: String { return self._s[5122]! }
- public var VoiceOver_Chat_ContactPhoneNumber: String { return self._s[5123]! }
- public var VoiceChat_Muted: String { return self._s[5125]! }
- public var CallFeedback_ReasonSilentRemote: String { return self._s[5126]! }
- public var Passport_Identity_AddPersonalDetails: String { return self._s[5127]! }
- public var Conversation_AutoremoveActionEnable: String { return self._s[5129]! }
- public var Group_Info_AdminLog: String { return self._s[5130]! }
- public var ChatSettings_AutoPlayTitle: String { return self._s[5131]! }
- public var Appearance_Animations: String { return self._s[5132]! }
- public var Appearance_TextSizeSetting: String { return self._s[5133]! }
- public func LastSeen_MinutesAgo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[0 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func OldChannels_InactiveMonth(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[1 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedMessages(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[2 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func UserCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[3 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceOver_Chat_MessagesSelected(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[4 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ScheduledIn_Hours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[5 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ServiceMessage_GameScoreSimple(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[6 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ScheduledIn_Minutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[7 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func GroupInfo_ShowMoreMembers(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[8 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func InviteLink_InviteLinks(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[9 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Media_SharePhoto(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[10 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func InstantPage_Views(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[11 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceOver_Chat_ContactEmailCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[12 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedVideos(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[13 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func InviteLink_PeopleJoined(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[14 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[15 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func ChatList_DeleteConfirmation(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[16 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func SharedMedia_DeleteItemsConfirmation(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[17 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceOver_Chat_ContactPhoneNumberCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[18 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func InviteText_ContactsCountText(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[19 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func InviteLink_PeopleRemaining(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[20 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_ShortWeeks(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[21 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHAT_MESSAGE_FWDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[22 * 6 + Int(form.rawValue)]!, _2, _1, _3)
- }
- public func ChatList_MessageVideos(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[23 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupTopAdminBans(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[24 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_StatusSubscribers(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[25 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_MessageViewComments(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[26 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_Days(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[27 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Wallpaper_DeleteConfirmation(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[28 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[29 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func StickerPack_StickerCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[30 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_ShortDays(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[31 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceChat_Status_Members(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[32 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func StickerPack_AddMaskCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[33 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func SharedMedia_File(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[34 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ChatList_DeletedChats(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[35 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupTopInviterInvites(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[36 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ChatList_MessageFiles(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[37 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Forward_ConfirmMultipleFiles(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[38 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ScheduledIn_Days(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[39 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupTopAdminKicks(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[40 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func LiveLocation_MenuChatsCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[41 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func StickerPack_RemoveMaskCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[42 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PrivacyLastSeenSettings_AddUsers(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[43 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PasscodeSettings_FailedAttempts(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[44 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedStickers(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[45 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ImportStickerPack_StickerCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[46 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Chat_DeleteMessagesConfirmation(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[47 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ServiceMessage_GameScoreExtended(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[48 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHANNEL_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[49 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func StickerPack_RemoveStickerCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[50 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func SharedMedia_Video(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[51 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedPolls(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[52 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupTopPosterChars(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[53 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_ShortHours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[54 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_TitleComments(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[55 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_StatusMembers(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[56 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Chat_TitlePinnedMessages(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[57 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func SharedMedia_Photo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[58 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Invitation_Members(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[59 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PeopleNearby_ShowMorePeople(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[60 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessagePoll_VotedCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[61 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceChat_Panel_Members(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[62 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Call_Seconds(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[63 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func AttachmentMenu_SendVideo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[64 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ScheduledIn_Seconds(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[65 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func SharedMedia_Generic(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[66 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedVideoMessages(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[67 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_Hours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[68 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupShowMoreTopAdmins(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[69 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_SelectedMessages(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[70 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHAT_MESSAGE_PHOTOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[71 * 6 + Int(form.rawValue)]!, _2, _1, _3)
- }
- public func MessageTimer_ShortSeconds(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[72 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessagePoll_QuizCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[73 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Watch_UserInfo_Mute(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[74 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Notifications_ExceptionMuteExpires_Hours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[75 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ScheduledIn_Months(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[76 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ChatList_Search_Messages(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[77 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHANNEL_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[78 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func ForwardedFiles(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[79 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_ContextMenuSelectAll(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[80 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Notifications_ExceptionMuteExpires_Days(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[81 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceChat_InviteLink_InviteSpeakers(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[82 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_AutoremoveRemainingDays(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[83 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func InviteLink_PeopleJoinedShort(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[84 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Notifications_Exceptions(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[85 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupTopAdminDeletions(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[86 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_Seconds(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[87 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func OldChannels_InactiveWeek(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[88 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHAT_MESSAGE_ROUNDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[89 * 6 + Int(form.rawValue)]!, _2, _1, _3)
- }
- public func Notification_GameScoreSelfExtended(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[90 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func InviteLink_PeopleCanJoin(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[91 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHANNEL_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[92 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func PUSH_CHAT_MESSAGES(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[93 * 6 + Int(form.rawValue)]!, _2, _1, _3)
- }
- public func Stats_GroupShowMoreTopInviters(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[94 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Call_Days(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[95 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ChatList_SelectedChats(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[96 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_LiveLocationMembersCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[97 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[98 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func PUSH_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[99 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func AttachmentMenu_SendItem(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[100 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Notification_GameScoreExtended(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[101 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_StatusOnline(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[102 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Call_ShortMinutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[103 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ScheduledIn_Weeks(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[104 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func SharedMedia_Link(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[105 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHAT_MESSAGE_VIDEOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[106 * 6 + Int(form.rawValue)]!, _2, _1, _3)
- }
- public func StickerPack_AddStickerCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[107 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func CreatePoll_AddMoreOptions(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[108 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Contacts_ImportersCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[109 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Call_Hours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[110 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Watch_LastSeen_HoursAgo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[111 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MuteExpires_Minutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[112 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Notification_GameScoreSelfSimple(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[113 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MuteExpires_Hours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[114 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_MESSAGE_FILES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[115 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func Call_ShortSeconds(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[116 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_ShortMinutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[117 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ChatList_MessagePhotos(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[118 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func AttachmentMenu_SendGif(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[119 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Map_ETAMinutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[120 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Call_Minutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[121 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ScheduledIn_Years(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[122 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Notifications_ExceptionMuteExpires_Minutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[123 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Passport_Scans(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[124 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ChatList_MessageMusic(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[125 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_MessageViews(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[126 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHAT_MESSAGE_DOCS_FIX1(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[127 * 6 + Int(form.rawValue)]!, _2, _1, _3)
- }
- public func ChatListFilter_ShowMoreChats(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[128 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func DialogList_LiveLocationChatsCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[129 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func AttachmentMenu_SendPhoto(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[130 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PollResults_ShowMore(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[131 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Conversation_ContextViewReplies(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[132 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Notification_GameScoreSimple(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[133 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_Minutes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[134 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedAuthorsOthers(_ selector: Int32, _ _0: String, _ _1: String) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[135 * 6 + Int(form.rawValue)]!, _0, _1)
- }
- public func QuickSend_Photos(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[136 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Theme_UsersCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[137 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_Weeks(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[138 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Contacts_InviteContacts(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[139 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func OldChannels_Leave(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[140 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedGifs(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[141 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceOver_Chat_PollOptionCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[142 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func LastSeen_HoursAgo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[143 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func OldChannels_GroupFormat(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[144 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedContacts(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[145 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MessageTimer_Years(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[146 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ServiceMessage_GameScoreSelfSimple(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[147 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[148 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func MessageTimer_Months(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[149 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceChat_InviteLink_InviteListeners(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[150 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Media_ShareItem(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[151 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func GroupInfo_ParticipantCount(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[152 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Watch_LastSeen_MinutesAgo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[153 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MuteExpires_Days(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[154 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Chat_MessagesUnpinned(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[155 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupTopPosterMessages(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[156 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func LiveLocationUpdated_MinutesAgo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[157 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_MessageForwards(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[158 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceOver_Chat_PollVotes(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[159 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Map_ETAHours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[160 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ServiceMessage_GameScoreSelfExtended(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[161 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func OldChannels_InactiveYear(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[162 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Media_ShareVideo(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[163 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func Stats_GroupShowMoreTopPosters(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[164 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MuteFor_Hours(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[165 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func MuteFor_Days(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[166 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func StickerPacks_ArchiveStickerPacksConfirmation(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[167 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedAudios(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[168 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func ForwardedPhotos(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[169 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func VoiceOver_Chat_UnreadMessages(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[170 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHANNEL_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[171 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func ForwardedLocations(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[172 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func StickerPacks_DeleteStickerPacksConfirmation(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[173 * 6 + Int(form.rawValue)]!, stringValue)
- }
- public func PUSH_CHANNEL_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[174 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func PUSH_CHANNEL_MESSAGE_DOCS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String {
- let form = getPluralizationForm(self.lc, selector)
- return String(format: self._ps[175 * 6 + Int(form.rawValue)]!, _1, _2)
- }
- public func Conversation_TitleReplies(_ value: Int32) -> String {
- let form = getPluralizationForm(self.lc, value)
- let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator)
- return String(format: self._ps[176 * 6 + Int(form.rawValue)]!, stringValue)
- }
-
- public init(primaryComponent: PresentationStringsComponent, secondaryComponent: PresentationStringsComponent?, groupingSeparator: String) {
- self.primaryComponent = primaryComponent
- self.secondaryComponent = secondaryComponent
- self.groupingSeparator = groupingSeparator
-
- self.baseLanguageCode = secondaryComponent?.languageCode ?? primaryComponent.languageCode
-
- let languageCode = primaryComponent.pluralizationRulesCode ?? primaryComponent.languageCode
- var rawCode = languageCode as NSString
- var range = rawCode.range(of: "_")
- if range.location != NSNotFound {
- rawCode = rawCode.substring(to: range.location) as NSString
- }
- range = rawCode.range(of: "-")
- if range.location != NSNotFound {
- rawCode = rawCode.substring(to: range.location) as NSString
- }
- rawCode = rawCode.lowercased as NSString
- var lc: UInt32 = 0
- for i in 0 ..< rawCode.length {
- lc = (lc << 8) + UInt32(rawCode.character(at: i))
- }
- self.lc = lc
-
- var _s: [Int: String] = [:]
- var _r: [Int: [(Int, NSRange)]] = [:]
-
- let loadedKeyMapping = keyMapping
-
- let sIdList: [Int] = loadedKeyMapping.0
- let sKeyList: [String] = loadedKeyMapping.1
- let sArgIdList: [Int] = loadedKeyMapping.2
- for i in 0 ..< sIdList.count {
- _s[sIdList[i]] = getValue(primaryComponent, secondaryComponent, sKeyList[i])
- }
- for i in 0 ..< sArgIdList.count {
- _r[sArgIdList[i]] = extractArgumentRanges(_s[sArgIdList[i]]!)
- }
- self._s = _s
- self._r = _r
-
- var _ps: [Int: String] = [:]
- let pIdList: [Int] = loadedKeyMapping.3
- let pKeyList: [String] = loadedKeyMapping.4
- for i in 0 ..< pIdList.count {
- for form in 0 ..< 6 {
- _ps[pIdList[i] * 6 + form] = getValueWithForm(primaryComponent, secondaryComponent, pKeyList[i], PluralizationForm(rawValue: Int32(form))!)
- }
- }
- self._ps = _ps
- }
-
- public static func ==(lhs: PresentationStrings, rhs: PresentationStrings) -> Bool {
- return lhs === rhs
- }
-}
-
diff --git a/submodules/TelegramPresentationData/Sources/PresentationTheme.swift b/submodules/TelegramPresentationData/Sources/PresentationTheme.swift
index c80310bd04..71b1a44f13 100644
--- a/submodules/TelegramPresentationData/Sources/PresentationTheme.swift
+++ b/submodules/TelegramPresentationData/Sources/PresentationTheme.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import TelegramUIPreferences
public final class PresentationThemeGradientColors {
diff --git a/submodules/TelegramPresentationData/Sources/PresentationThemeCodable.swift b/submodules/TelegramPresentationData/Sources/PresentationThemeCodable.swift
index 6cee46cdab..0fcd1a94aa 100644
--- a/submodules/TelegramPresentationData/Sources/PresentationThemeCodable.swift
+++ b/submodules/TelegramPresentationData/Sources/PresentationThemeCodable.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
private func decodeColor(_ values: KeyedDecodingContainer, _ key: Key, decoder: Decoder? = nil, fallbackKey: String? = nil) throws -> UIColor {
diff --git a/submodules/TelegramPresentationData/Sources/PresentationThemeCoder.swift b/submodules/TelegramPresentationData/Sources/PresentationThemeCoder.swift
index 40fde9ac8f..474678ca56 100644
--- a/submodules/TelegramPresentationData/Sources/PresentationThemeCoder.swift
+++ b/submodules/TelegramPresentationData/Sources/PresentationThemeCoder.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
public func encodePresentationTheme(_ theme: PresentationTheme) -> String? {
diff --git a/submodules/TelegramPresentationData/Sources/PresentationThemeEssentialGraphics.swift b/submodules/TelegramPresentationData/Sources/PresentationThemeEssentialGraphics.swift
index b898ce12f1..4e654f2613 100644
--- a/submodules/TelegramPresentationData/Sources/PresentationThemeEssentialGraphics.swift
+++ b/submodules/TelegramPresentationData/Sources/PresentationThemeEssentialGraphics.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import AppBundle
diff --git a/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChat.swift b/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChat.swift
index 6de22efbc3..f2e693ae52 100644
--- a/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChat.swift
+++ b/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChat.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import AppBundle
private func generateLineImage(color: UIColor) -> UIImage? {
diff --git a/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChatList.swift b/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChatList.swift
index 072556f8a7..2732bdbffa 100644
--- a/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChatList.swift
+++ b/submodules/TelegramPresentationData/Sources/Resources/PresentationResourcesChatList.swift
@@ -2,6 +2,7 @@ import Foundation
import UIKit
import Display
import AppBundle
+import PresentationStrings
private func generateStatusCheckImage(theme: PresentationTheme, single: Bool) -> UIImage? {
return generateImage(CGSize(width: single ? 13.0 : 18.0, height: 13.0), rotatedContext: { size, context in
diff --git a/submodules/TelegramPresentationData/Sources/WallpaperUtils.swift b/submodules/TelegramPresentationData/Sources/WallpaperUtils.swift
index f3afab6527..cb821727cc 100644
--- a/submodules/TelegramPresentationData/Sources/WallpaperUtils.swift
+++ b/submodules/TelegramPresentationData/Sources/WallpaperUtils.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
public extension TelegramWallpaper {
var isEmpty: Bool {
diff --git a/submodules/TelegramStringFormatting/BUILD b/submodules/TelegramStringFormatting/BUILD
index c3819e0ffc..d0e98b73dd 100644
--- a/submodules/TelegramStringFormatting/BUILD
+++ b/submodules/TelegramStringFormatting/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/Display:Display",
"//submodules/PlatformRestrictionMatching:PlatformRestrictionMatching",
diff --git a/submodules/TelegramStringFormatting/Sources/DateFormat.swift b/submodules/TelegramStringFormatting/Sources/DateFormat.swift
index ebf1f1c351..c11a1c705b 100644
--- a/submodules/TelegramStringFormatting/Sources/DateFormat.swift
+++ b/submodules/TelegramStringFormatting/Sources/DateFormat.swift
@@ -64,7 +64,7 @@ public func stringForMediumDate(timestamp: Int32, strings: PresentationStrings,
let timeString = stringForShortTimestamp(hours: Int32(timeinfo.tm_hour), minutes: Int32(timeinfo.tm_min), dateTimeFormat: dateTimeFormat)
- return strings.Time_MediumDate(dateString, timeString).0
+ return strings.Time_MediumDate(dateString, timeString).string
}
public func stringForFullDate(timestamp: Int32, strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat) -> String {
@@ -76,7 +76,7 @@ public func stringForFullDate(timestamp: Int32, strings: PresentationStrings, da
let yearString = "\(2000 + timeinfo.tm_year - 100)"
let timeString = stringForShortTimestamp(hours: Int32(timeinfo.tm_hour), minutes: Int32(timeinfo.tm_min), dateTimeFormat: dateTimeFormat)
- let monthFormat: (String, String, String) -> (String, [(Int, NSRange)])
+ let monthFormat: (String, String, String) -> PresentationStrings.FormattedString
switch timeinfo.tm_mon + 1 {
case 1:
monthFormat = strings.Time_PreciseDate_m1
@@ -106,7 +106,7 @@ public func stringForFullDate(timestamp: Int32, strings: PresentationStrings, da
return ""
}
- return monthFormat(dayString, yearString, timeString).0
+ return monthFormat(dayString, yearString, timeString).string
}
public func stringForDate(timestamp: Int32, strings: PresentationStrings) -> String {
diff --git a/submodules/TelegramStringFormatting/Sources/MessageContentKind.swift b/submodules/TelegramStringFormatting/Sources/MessageContentKind.swift
index d2689b2a6b..5cd5cb9b08 100644
--- a/submodules/TelegramStringFormatting/Sources/MessageContentKind.swift
+++ b/submodules/TelegramStringFormatting/Sources/MessageContentKind.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import PlatformRestrictionMatching
@@ -198,7 +197,7 @@ public func stringForMediaKind(_ kind: MessageContentKind, strings: Presentation
if text.isEmpty {
return (strings.Message_Sticker, true)
} else {
- return (strings.Message_StickerText(text).0, true)
+ return (strings.Message_StickerText(text).string, true)
}
case .animation:
return (strings.Message_Animation, true)
diff --git a/submodules/TelegramStringFormatting/Sources/PeerDisplayName.swift b/submodules/TelegramStringFormatting/Sources/PeerDisplayName.swift
index ecc1edd112..7d496cd262 100644
--- a/submodules/TelegramStringFormatting/Sources/PeerDisplayName.swift
+++ b/submodules/TelegramStringFormatting/Sources/PeerDisplayName.swift
@@ -2,7 +2,7 @@ import Foundation
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
-import SyncCore
+import TelegramCore
public func stringForFullAuthorName(message: Message, strings: PresentationStrings, nameDisplayOrder: PresentationPersonNameOrder, accountPeerId: PeerId) -> String {
var authorString = ""
diff --git a/submodules/TelegramStringFormatting/Sources/PeerNotificationSoundStrings.swift b/submodules/TelegramStringFormatting/Sources/PeerNotificationSoundStrings.swift
index 6891d3d69b..ecb3db3f12 100644
--- a/submodules/TelegramStringFormatting/Sources/PeerNotificationSoundStrings.swift
+++ b/submodules/TelegramStringFormatting/Sources/PeerNotificationSoundStrings.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import TelegramPresentationData
private let modernSoundsNamePaths: [KeyPath] = [
@@ -59,7 +58,7 @@ public func localizedPeerNotificationSoundString(strings: PresentationStrings, s
} else {
actualName = name
}
- return strings.UserInfo_NotificationsDefaultSound(actualName).0
+ return strings.UserInfo_NotificationsDefaultSound(actualName).string
} else {
return strings.UserInfo_NotificationsDefault
}
diff --git a/submodules/TelegramStringFormatting/Sources/PresenceStrings.swift b/submodules/TelegramStringFormatting/Sources/PresenceStrings.swift
index 6847f5cd6d..6621d58bad 100644
--- a/submodules/TelegramStringFormatting/Sources/PresenceStrings.swift
+++ b/submodules/TelegramStringFormatting/Sources/PresenceStrings.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
public func stringForTimestamp(day: Int32, month: Int32, year: Int32, dateTimeFormat: PresentationDateTimeFormat) -> String {
@@ -83,29 +82,29 @@ public func stringForMonth(strings: PresentationStrings, month: Int32, ofYear ye
let yearString = "\(1900 + year)"
switch month {
case 0:
- return strings.Time_MonthOfYear_m1(yearString).0
+ return strings.Time_MonthOfYear_m1(yearString).string
case 1:
- return strings.Time_MonthOfYear_m2(yearString).0
+ return strings.Time_MonthOfYear_m2(yearString).string
case 2:
- return strings.Time_MonthOfYear_m3(yearString).0
+ return strings.Time_MonthOfYear_m3(yearString).string
case 3:
- return strings.Time_MonthOfYear_m4(yearString).0
+ return strings.Time_MonthOfYear_m4(yearString).string
case 4:
- return strings.Time_MonthOfYear_m5(yearString).0
+ return strings.Time_MonthOfYear_m5(yearString).string
case 5:
- return strings.Time_MonthOfYear_m6(yearString).0
+ return strings.Time_MonthOfYear_m6(yearString).string
case 6:
- return strings.Time_MonthOfYear_m7(yearString).0
+ return strings.Time_MonthOfYear_m7(yearString).string
case 7:
- return strings.Time_MonthOfYear_m8(yearString).0
+ return strings.Time_MonthOfYear_m8(yearString).string
case 8:
- return strings.Time_MonthOfYear_m9(yearString).0
+ return strings.Time_MonthOfYear_m9(yearString).string
case 9:
- return strings.Time_MonthOfYear_m10(yearString).0
+ return strings.Time_MonthOfYear_m10(yearString).string
case 10:
- return strings.Time_MonthOfYear_m11(yearString).0
+ return strings.Time_MonthOfYear_m11(yearString).string
default:
- return strings.Time_MonthOfYear_m12(yearString).0
+ return strings.Time_MonthOfYear_m12(yearString).string
}
}
@@ -119,15 +118,15 @@ public func stringForUserPresence(strings: PresentationStrings, day: RelativeTim
let dayString: String
switch day {
case .today, .tomorrow:
- dayString = strings.LastSeen_TodayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).0
+ dayString = strings.LastSeen_TodayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).string
case .yesterday:
- dayString = strings.LastSeen_YesterdayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).0
+ dayString = strings.LastSeen_YesterdayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).string
}
return dayString
}
-private func humanReadableStringForTimestamp(strings: PresentationStrings, day: RelativeTimestampFormatDay, dateTimeFormat: PresentationDateTimeFormat, hours: Int32, minutes: Int32, format: HumanReadableStringFormat? = nil) -> (String, [(Int, NSRange)]) {
- let result: (String, [(Int, NSRange)])
+private func humanReadableStringForTimestamp(strings: PresentationStrings, day: RelativeTimestampFormatDay, dateTimeFormat: PresentationDateTimeFormat, hours: Int32, minutes: Int32, format: HumanReadableStringFormat? = nil) -> PresentationStrings.FormattedString {
+ let result: PresentationStrings.FormattedString
switch day {
case .today:
let string = stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)
@@ -144,12 +143,17 @@ private func humanReadableStringForTimestamp(strings: PresentationStrings, day:
}
public struct HumanReadableStringFormat {
- let dateFormatString: (String) -> (String, [(Int, NSRange)])
- let tomorrowFormatString: (String) -> (String, [(Int, NSRange)])
- let todayFormatString: (String) -> (String, [(Int, NSRange)])
- let yesterdayFormatString: (String) -> (String, [(Int, NSRange)])
+ let dateFormatString: (String) -> PresentationStrings.FormattedString
+ let tomorrowFormatString: (String) -> PresentationStrings.FormattedString
+ let todayFormatString: (String) -> PresentationStrings.FormattedString
+ let yesterdayFormatString: (String) -> PresentationStrings.FormattedString
- public init(dateFormatString: @escaping (String) -> (String, [(Int, NSRange)]), tomorrowFormatString: @escaping (String) -> (String, [(Int, NSRange)]), todayFormatString: @escaping (String) -> (String, [(Int, NSRange)]), yesterdayFormatString: @escaping (String) -> (String, [(Int, NSRange)]) = { ($0, []) }) {
+ public init(
+ dateFormatString: @escaping (String) -> PresentationStrings.FormattedString,
+ tomorrowFormatString: @escaping (String) -> PresentationStrings.FormattedString,
+ todayFormatString: @escaping (String) -> PresentationStrings.FormattedString,
+ yesterdayFormatString: @escaping (String) -> PresentationStrings.FormattedString = { PresentationStrings.FormattedString(string: $0, ranges: []) }
+ ) {
self.dateFormatString = dateFormatString
self.tomorrowFormatString = tomorrowFormatString
self.todayFormatString = todayFormatString
@@ -157,7 +161,7 @@ public struct HumanReadableStringFormat {
}
}
-public func humanReadableStringForTimestamp(strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat, timestamp: Int32, alwaysShowTime: Bool = false, allowYesterday: Bool = true, format: HumanReadableStringFormat? = nil) -> (String, [(Int, NSRange)]) {
+public func humanReadableStringForTimestamp(strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat, timestamp: Int32, alwaysShowTime: Bool = false, allowYesterday: Bool = true, format: HumanReadableStringFormat? = nil) -> PresentationStrings.FormattedString {
var t: time_t = time_t(timestamp)
var timeinfo: tm = tm()
localtime_r(&t, &timeinfo)
@@ -174,7 +178,7 @@ public func humanReadableStringForTimestamp(strings: PresentationStrings, dateTi
} else {
string = stringForTimestamp(day: timeinfo.tm_mday, month: timeinfo.tm_mon + 1, year: timeinfo.tm_year, dateTimeFormat: dateTimeFormat)
}
- return format?.dateFormatString(string) ?? (string, [])
+ return format?.dateFormatString(string) ?? PresentationStrings.FormattedString(string: string, ranges: [])
}
let dayDifference = timeinfo.tm_yday - timeinfoNow.tm_yday
@@ -195,7 +199,7 @@ public func humanReadableStringForTimestamp(strings: PresentationStrings, dateTi
} else {
string = stringForTimestamp(day: timeinfo.tm_mday, month: timeinfo.tm_mon + 1, year: timeinfo.tm_year, dateTimeFormat: dateTimeFormat)
}
- return format?.dateFormatString(string) ?? (string, [])
+ return format?.dateFormatString(string) ?? PresentationStrings.FormattedString(string: string, ranges: [])
}
}
@@ -289,7 +293,7 @@ public func stringForRelativeLiveLocationTimestamp(strings: PresentationStrings,
let minutes = timeinfo.tm_min
if dayDifference == 0 {
- return strings.LiveLocationUpdated_TodayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).0
+ return strings.LiveLocationUpdated_TodayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).string
} else {
return stringForFullDate(timestamp: relativeTimestamp, strings: strings, dateTimeFormat: dateTimeFormat)
}
@@ -311,7 +315,7 @@ public func stringForRelativeSymbolicTimestamp(strings: PresentationStrings, rel
let minutes = timeinfo.tm_min
if dayDifference == 0 {
- return strings.Time_TodayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).0
+ return strings.Time_TodayAt(stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: dateTimeFormat)).string
} else {
return stringForFullDate(timestamp: relativeTimestamp, strings: strings, dateTimeFormat: dateTimeFormat)
}
@@ -366,7 +370,7 @@ public func stringAndActivityForUserPresence(strings: PresentationStrings, dateT
localtime_r(&now, &timeinfoNow)
if timeinfo.tm_year != timeinfoNow.tm_year {
- return (strings.LastSeen_AtDate(stringForTimestamp(day: timeinfo.tm_mday, month: timeinfo.tm_mon + 1, year: timeinfo.tm_year, dateTimeFormat: dateTimeFormat)).0, false)
+ return (strings.LastSeen_AtDate(stringForTimestamp(day: timeinfo.tm_mday, month: timeinfo.tm_mon + 1, year: timeinfo.tm_year, dateTimeFormat: dateTimeFormat)).string, false)
}
let dayDifference = timeinfo.tm_yday - timeinfoNow.tm_yday
@@ -384,7 +388,7 @@ public func stringAndActivityForUserPresence(strings: PresentationStrings, dateT
}
return (stringForUserPresence(strings: strings, day: day, dateTimeFormat: dateTimeFormat, hours: timeinfo.tm_hour, minutes: timeinfo.tm_min), false)
} else {
- return (strings.LastSeen_AtDate(stringForTimestamp(day: timeinfo.tm_mday, month: timeinfo.tm_mon + 1, year: timeinfo.tm_year, dateTimeFormat: dateTimeFormat)).0, false)
+ return (strings.LastSeen_AtDate(stringForTimestamp(day: timeinfo.tm_mday, month: timeinfo.tm_mon + 1, year: timeinfo.tm_year, dateTimeFormat: dateTimeFormat)).string, false)
}
}
}
diff --git a/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift b/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift
index 71fa764773..03148bdba2 100644
--- a/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift
+++ b/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TextFormat
@@ -60,19 +59,19 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
if forChatList {
attributedString = NSAttributedString(string: strings.Notification_CreatedGroup, font: titleFont, textColor: primaryTextColor)
} else {
- attributedString = addAttributesToStringWithRanges(strings.Notification_CreatedChatWithTitle(authorName, title), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_CreatedChatWithTitle(authorName, title)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
}
}
case let .addedMembers(peerIds):
if let peerId = peerIds.first, peerId == message.author?.id {
if let peer = message.peers[message.id.peerId] as? TelegramChannel, case .broadcast = peer.info {
- attributedString = addAttributesToStringWithRanges(strings.Notification_JoinedChannel(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, peerId)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_JoinedChannel(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, peerId)]))
} else {
- attributedString = addAttributesToStringWithRanges(strings.Notification_JoinedChat(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, peerId)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_JoinedChat(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, peerId)]))
}
} else {
var attributePeerIds: [(Int, PeerId?)] = [(0, message.author?.id)]
- let resultTitleString: (String, [(Int, NSRange)])
+ let resultTitleString: PresentationStrings.FormattedString
if peerIds.count == 1 {
attributePeerIds.append((1, peerIds.first))
resultTitleString = strings.Notification_Invited(authorName, peerDebugDisplayTitles(peerIds, message.peers))
@@ -80,21 +79,21 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
resultTitleString = strings.Notification_InvitedMultiple(authorName, peerDebugDisplayTitles(peerIds, message.peers))
}
- attributedString = addAttributesToStringWithRanges(resultTitleString, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
+ attributedString = addAttributesToStringWithRanges(resultTitleString._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
}
case let .removedMembers(peerIds):
if peerIds.first == message.author?.id {
if let peer = message.peers[message.id.peerId] as? TelegramChannel, case .broadcast = peer.info {
- attributedString = addAttributesToStringWithRanges(strings.Notification_LeftChannel(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_LeftChannel(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
} else {
- attributedString = addAttributesToStringWithRanges(strings.Notification_LeftChat(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_LeftChat(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
}
} else {
var attributePeerIds: [(Int, PeerId?)] = [(0, message.author?.id)]
if peerIds.count == 1 {
attributePeerIds.append((1, peerIds.first))
}
- attributedString = addAttributesToStringWithRanges(strings.Notification_Kicked(authorName, peerDebugDisplayTitles(peerIds, message.peers)), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_Kicked(authorName, peerDebugDisplayTitles(peerIds, message.peers))._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
}
case let .photoUpdated(image):
if authorName.isEmpty || isChannel {
@@ -122,19 +121,19 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
} else {
if let image = image {
if !image.videoRepresentations.isEmpty {
- attributedString = addAttributesToStringWithRanges(strings.Notification_ChangedGroupVideo(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_ChangedGroupVideo(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
} else {
- attributedString = addAttributesToStringWithRanges(strings.Notification_ChangedGroupPhoto(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_ChangedGroupPhoto(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
}
} else {
- attributedString = addAttributesToStringWithRanges(strings.Notification_RemovedGroupPhoto(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_RemovedGroupPhoto(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
}
}
case let .titleUpdated(title):
if authorName.isEmpty || isChannel {
- attributedString = NSAttributedString(string: strings.Channel_MessageTitleUpdated(title).0, font: titleFont, textColor: primaryTextColor)
+ attributedString = NSAttributedString(string: strings.Channel_MessageTitleUpdated(title).string, font: titleFont, textColor: primaryTextColor)
} else {
- attributedString = addAttributesToStringWithRanges(strings.Notification_ChangedGroupName(authorName, title), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_ChangedGroupName(authorName, title)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
}
case .pinnedMessageUpdated:
enum PinnnedMediaType {
@@ -219,45 +218,45 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
if clippedText.count > 14 {
clippedText = "\(clippedText[...clippedText.index(clippedText.startIndex, offsetBy: 14)])..."
}
- let textWithRanges: (String, [(Int, NSRange)])
+ let textWithRanges: PresentationStrings.FormattedString
if clippedText.isEmpty {
textWithRanges = strings.Message_PinnedGenericMessage(authorName)
} else {
textWithRanges = strings.Notification_PinnedTextMessage(authorName, clippedText)
}
- attributedString = addAttributesToStringWithRanges(textWithRanges, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(textWithRanges._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .game:
- attributedString = addAttributesToStringWithRanges(strings.Message_AuthorPinnedGame(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Message_AuthorPinnedGame(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .photo:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedPhotoMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedPhotoMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .video:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedVideoMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedVideoMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .round:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedRoundMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedRoundMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .audio:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedAudioMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedAudioMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .file:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedDocumentMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedDocumentMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .gif:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedAnimationMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedAnimationMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .sticker:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedStickerMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedStickerMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .location:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedLocationMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedLocationMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .contact:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedContactMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedContactMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case let .poll(kind):
switch kind {
case .poll:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedPollMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedPollMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .quiz:
- attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedQuizMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_PinnedQuizMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
}
case .deleted:
- attributedString = addAttributesToStringWithRanges(strings.Message_PinnedGenericMessage(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Message_PinnedGenericMessage(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
}
case .joinedByLink:
- attributedString = addAttributesToStringWithRanges(strings.Notification_JoinedGroupByLink(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_JoinedGroupByLink(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .channelMigratedFromGroup, .groupMigratedToChannel:
attributedString = NSAttributedString(string: "", font: titleFont, textColor: primaryTextColor)
case let .messageAutoremoveTimeoutUpdated(timeout):
@@ -273,35 +272,26 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
if timeout > 0 {
let timeValue = timeIntervalString(strings: strings, value: timeout, preferLowerValue: true)
- /*
- "Conversation.AutoremoveTimerSetUserYou" = "You set messages to automatically delete after %2$@.";
- "Conversation.AutoremoveTimerSetUser" = "%1$@ set messages to automatically delete after %2$@.";
- "Conversation.AutoremoveTimerRemovedUserYou" = "You disabled the self-destruct timer";
- "Conversation.AutoremoveTimerRemovedUser" = "%1$@ disabled the self-destruct timer";
- "Conversation.AutoremoveTimerSetGroup" = "Messages will automatically delete after %1$@.";
- "Conversation.AutoremoveTimerRemovedGroup" = "Self-destruct timer was disabled";
- */
-
let string: String
if let _ = messagePeer as? TelegramUser {
if message.author?.id == accountPeerId {
- string = strings.Conversation_AutoremoveTimerSetUserYou(timeValue).0
+ string = strings.Conversation_AutoremoveTimerSetUserYou(timeValue).string
} else {
- string = strings.Conversation_AutoremoveTimerSetUser(authorString, timeValue).0
+ string = strings.Conversation_AutoremoveTimerSetUser(authorString, timeValue).string
}
} else if let _ = messagePeer as? TelegramGroup {
- string = strings.Conversation_AutoremoveTimerSetGroup(timeValue).0
+ string = strings.Conversation_AutoremoveTimerSetGroup(timeValue).string
} else if let channel = messagePeer as? TelegramChannel {
if case .group = channel.info {
- string = strings.Conversation_AutoremoveTimerSetGroup(timeValue).0
+ string = strings.Conversation_AutoremoveTimerSetGroup(timeValue).string
} else {
- string = strings.Conversation_AutoremoveTimerSetChannel(timeValue).0
+ string = strings.Conversation_AutoremoveTimerSetChannel(timeValue).string
}
} else {
if message.author?.id == accountPeerId {
- string = strings.Notification_MessageLifetimeChangedOutgoing(timeValue).0
+ string = strings.Notification_MessageLifetimeChangedOutgoing(timeValue).string
} else {
- string = strings.Notification_MessageLifetimeChanged(authorString, timeValue).0
+ string = strings.Notification_MessageLifetimeChanged(authorString, timeValue).string
}
}
attributedString = NSAttributedString(string: string, font: titleFont, textColor: primaryTextColor)
@@ -311,7 +301,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
if message.author?.id == accountPeerId {
string = strings.Conversation_AutoremoveTimerRemovedUserYou
} else {
- string = strings.Conversation_AutoremoveTimerRemovedUser(authorString).0
+ string = strings.Conversation_AutoremoveTimerRemovedUser(authorString).string
}
} else if let _ = messagePeer as? TelegramGroup {
string = strings.Conversation_AutoremoveTimerRemovedGroup
@@ -325,7 +315,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
if message.author?.id == accountPeerId {
string = strings.Notification_MessageLifetimeRemovedOutgoing
} else {
- string = strings.Notification_MessageLifetimeRemoved(authorString).0
+ string = strings.Notification_MessageLifetimeRemoved(authorString).string
}
}
attributedString = NSAttributedString(string: string, font: titleFont, textColor: primaryTextColor)
@@ -335,7 +325,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
case .historyScreenshot:
let text: String
if message.effectivelyIncoming(accountPeerId) {
- text = strings.Notification_SecretChatMessageScreenshot(message.author?.compactDisplayTitle ?? "").0
+ text = strings.Notification_SecretChatMessageScreenshot(message.author?.compactDisplayTitle ?? "").string
} else {
text = strings.Notification_SecretChatMessageScreenshotSelf
}
@@ -423,7 +413,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
}
attributedString = mutableString
} else {
- attributedString = NSAttributedString(string: strings.Message_PaymentSent(formatCurrencyAmount(totalAmount, currency: currency)).0, font: titleFont, textColor: primaryTextColor)
+ attributedString = NSAttributedString(string: strings.Message_PaymentSent(formatCurrencyAmount(totalAmount, currency: currency)).string, font: titleFont, textColor: primaryTextColor)
}
case let .phoneCall(_, discardReason, _, _):
var titleString: String
@@ -450,20 +440,20 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
if let scheduleDate = scheduleDate {
if message.author?.id.namespace == Namespaces.Peer.CloudChannel {
let titleString = humanReadableStringForTimestamp(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: scheduleDate, alwaysShowTime: true, allowYesterday: false, format: HumanReadableStringFormat(dateFormatString: { strings.Notification_VoiceChatScheduledChannel($0) }, tomorrowFormatString: { strings.Notification_VoiceChatScheduledTomorrowChannel($0) }, todayFormatString: { strings.Notification_VoiceChatScheduledTodayChannel($0) }))
- attributedString = NSAttributedString(string: titleString.0, font: titleFont, textColor: primaryTextColor)
+ attributedString = NSAttributedString(string: titleString.string, font: titleFont, textColor: primaryTextColor)
} else {
let titleString = humanReadableStringForTimestamp(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: scheduleDate, alwaysShowTime: true, allowYesterday: false, format: HumanReadableStringFormat(dateFormatString: { strings.Notification_VoiceChatScheduled(authorName, $0) }, tomorrowFormatString: { strings.Notification_VoiceChatScheduledTomorrow(authorName, $0) }, todayFormatString: { strings.Notification_VoiceChatScheduledToday(authorName, $0) }))
let attributePeerIds: [(Int, PeerId?)] = [(0, message.author?.id)]
- attributedString = addAttributesToStringWithRanges(titleString, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
+ attributedString = addAttributesToStringWithRanges(titleString._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
}
} else if let duration = duration {
if message.author?.id.namespace == Namespaces.Peer.CloudChannel {
- let titleString = strings.Notification_VoiceChatEnded(callDurationString(strings: strings, value: duration)).0
+ let titleString = strings.Notification_VoiceChatEnded(callDurationString(strings: strings, value: duration)).string
attributedString = NSAttributedString(string: titleString, font: titleFont, textColor: primaryTextColor)
} else {
let attributePeerIds: [(Int, PeerId?)] = [(0, message.author?.id)]
let titleString = strings.Notification_VoiceChatEndedGroup(authorName, callDurationString(strings: strings, value: duration))
- attributedString = addAttributesToStringWithRanges(titleString, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
+ attributedString = addAttributesToStringWithRanges(titleString._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
}
} else {
if message.author?.id.namespace == Namespaces.Peer.CloudChannel {
@@ -472,13 +462,13 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
} else {
let attributePeerIds: [(Int, PeerId?)] = [(0, message.author?.id)]
let titleString = strings.Notification_VoiceChatStarted(authorName)
- attributedString = addAttributesToStringWithRanges(titleString, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
+ attributedString = addAttributesToStringWithRanges(titleString._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
}
}
case let .customText(text, entities):
attributedString = stringWithAppliedEntities(text, entities: entities, baseColor: primaryTextColor, linkColor: primaryTextColor, baseFont: titleFont, linkFont: titleBoldFont, boldFont: titleBoldFont, italicFont: titleFont, boldItalicFont: titleBoldFont, fixedFont: titleFont, blockQuoteFont: titleFont, underlineLinks: false)
case let .botDomainAccessGranted(domain):
- attributedString = NSAttributedString(string: strings.AuthSessions_Message(domain).0, font: titleFont, textColor: primaryTextColor)
+ attributedString = NSAttributedString(string: strings.AuthSessions_Message(domain).string, font: titleFont, textColor: primaryTextColor)
case let .botSentSecureValues(types):
var typesString = ""
var hasIdentity = false
@@ -508,23 +498,23 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
typesString.append(strings.Notification_PassportValueEmail)
}
}
- attributedString = NSAttributedString(string: strings.Notification_PassportValuesSentMessage(message.peers[message.id.peerId]?.compactDisplayTitle ?? "", typesString).0, font: titleFont, textColor: primaryTextColor)
+ attributedString = NSAttributedString(string: strings.Notification_PassportValuesSentMessage(message.peers[message.id.peerId]?.compactDisplayTitle ?? "", typesString).string, font: titleFont, textColor: primaryTextColor)
case .peerJoined:
- attributedString = addAttributesToStringWithRanges(strings.Notification_Joined(authorName), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_Joined(authorName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, message.author?.id)]))
case .phoneNumberRequest:
attributedString = nil
case let .geoProximityReached(fromId, toId, distance):
let distanceString = stringForDistance(strings: strings, distance: Double(distance))
if fromId == accountPeerId {
- attributedString = addAttributesToStringWithRanges(strings.Notification_ProximityYouReached(distanceString, message.peers[toId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? ""), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(1, toId)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_ProximityYouReached(distanceString, message.peers[toId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? "")._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(1, toId)]))
} else if toId == accountPeerId {
- attributedString = addAttributesToStringWithRanges(strings.Notification_ProximityReachedYou(message.peers[fromId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? "", distanceString), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, fromId)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_ProximityReachedYou(message.peers[fromId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? "", distanceString)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, fromId)]))
} else {
- attributedString = addAttributesToStringWithRanges(strings.Notification_ProximityReached(message.peers[fromId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? "", distanceString, message.peers[toId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? ""), body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, fromId), (2, toId)]))
+ attributedString = addAttributesToStringWithRanges(strings.Notification_ProximityReached(message.peers[fromId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? "", distanceString, message.peers[toId]?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? "")._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, fromId), (2, toId)]))
}
case let .inviteToGroupPhoneCall(_, _, peerIds):
var attributePeerIds: [(Int, PeerId?)] = [(0, message.author?.id)]
- let resultTitleString: (String, [(Int, NSRange)])
+ let resultTitleString: PresentationStrings.FormattedString
if peerIds.count == 1 {
if peerIds[0] == accountPeerId {
attributePeerIds.append((1, peerIds.first))
@@ -537,7 +527,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
resultTitleString = strings.Notification_VoiceChatInvitation(authorName, peerDebugDisplayTitles(peerIds, message.peers))
}
- attributedString = addAttributesToStringWithRanges(resultTitleString, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
+ attributedString = addAttributesToStringWithRanges(resultTitleString._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: attributePeerIds))
case .unknown:
attributedString = nil
}
diff --git a/submodules/TelegramUI/BUILD b/submodules/TelegramUI/BUILD
index e3bd8fe635..586fc7fb26 100644
--- a/submodules/TelegramUI/BUILD
+++ b/submodules/TelegramUI/BUILD
@@ -45,7 +45,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/MtProtoKit:MtProtoKit",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/TelegramUI/Resources/PresentationStrings.mapping b/submodules/TelegramUI/Resources/PresentationStrings.mapping
deleted file mode 100644
index d07b105905..0000000000
Binary files a/submodules/TelegramUI/Resources/PresentationStrings.mapping and /dev/null differ
diff --git a/submodules/TelegramUI/Sources/AccountContext.swift b/submodules/TelegramUI/Sources/AccountContext.swift
index ad8e0acac8..b2d11f4816 100644
--- a/submodules/TelegramUI/Sources/AccountContext.swift
+++ b/submodules/TelegramUI/Sources/AccountContext.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import DeviceAccess
import TelegramPresentationData
@@ -325,14 +324,14 @@ public final class AccountContextImpl: AccountContext {
let presentationData = strongSelf.sharedContext.currentPresentationData.with { $0 }
if let current = current {
if current is TelegramChannel || current is TelegramGroup {
- strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_VoiceChatInProgressTitle, text: presentationData.strings.Call_VoiceChatInProgressMessage(current.compactDisplayTitle, peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
+ strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_VoiceChatInProgressTitle, text: presentationData.strings.Call_VoiceChatInProgressMessage(current.compactDisplayTitle, peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
guard let strongSelf = self else {
return
}
let _ = strongSelf.sharedContext.callManager?.joinGroupCall(context: strongSelf, peerId: peer.id, invite: invite, requestJoinAsPeerId: requestJoinAsPeerId, initialCall: activeCall, endCurrentIfAny: true)
})]), on: .root)
} else {
- strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_CallInProgressTitle, text: presentationData.strings.Call_CallInProgressVoiceChatMessage(current.compactDisplayTitle, peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
+ strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_CallInProgressTitle, text: presentationData.strings.Call_CallInProgressVoiceChatMessage(current.compactDisplayTitle, peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
guard let strongSelf = self else {
return
}
@@ -371,7 +370,7 @@ public final class AccountContextImpl: AccountContext {
let presentationData = strongSelf.sharedContext.currentPresentationData.with { $0 }
if let current = current {
if current is TelegramChannel || current is TelegramGroup {
- strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_VoiceChatInProgressTitle, text: presentationData.strings.Call_VoiceChatInProgressCallMessage(current.compactDisplayTitle, peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
+ strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_VoiceChatInProgressTitle, text: presentationData.strings.Call_VoiceChatInProgressCallMessage(current.compactDisplayTitle, peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
guard let strongSelf = self else {
return
}
@@ -379,7 +378,7 @@ public final class AccountContextImpl: AccountContext {
completion()
})]), on: .root)
} else {
- strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_CallInProgressTitle, text: presentationData.strings.Call_CallInProgressMessage(current.compactDisplayTitle, peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
+ strongSelf.sharedContext.mainWindow?.present(textAlertController(context: strongSelf, title: presentationData.strings.Call_CallInProgressTitle, text: presentationData.strings.Call_CallInProgressMessage(current.compactDisplayTitle, peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
guard let strongSelf = self else {
return
}
diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift
index 91aec62095..b2427dde77 100644
--- a/submodules/TelegramUI/Sources/AppDelegate.swift
+++ b/submodules/TelegramUI/Sources/AppDelegate.swift
@@ -2,7 +2,6 @@ import UIKit
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import UserNotifications
import Intents
import Postbox
@@ -414,8 +413,7 @@ final class SharedApplicationContext {
}, appData: self.deviceToken.get()
|> map { token in
let data = buildConfig.bundleData(withAppToken: token, signatureDict: signatureDict)
- if let data = data, let jsonString = String(data: data, encoding: .utf8) {
- //Logger.shared.log("data", "\(jsonString)")
+ if let data = data, let _ = String(data: data, encoding: .utf8) {
} else {
Logger.shared.log("data", "can't deserialize")
}
@@ -633,6 +631,8 @@ final class SharedApplicationContext {
return .denied
case .notDetermined:
return .notDetermined
+ @unknown default:
+ return .notDetermined
}
} else {
return .denied
@@ -2156,7 +2156,6 @@ final class SharedApplicationContext {
let muteMediaMessageCategory = UIMutableUserNotificationCategory()
muteMediaMessageCategory.identifier = "withMuteMedia"
- let categories = [unknownMessageCategory, replyMessageCategory, replyLegacyMessageCategory, replyLegacyMediaMessageCategory, replyMediaMessageCategory, legacyChannelMessageCategory, muteMessageCategory, muteMediaMessageCategory]
let settings = UIUserNotificationSettings(types: [.badge, .sound, .alert], categories: [])
UIApplication.shared.registerUserNotificationSettings(settings)
UIApplication.shared.registerForRemoteNotifications()
@@ -2190,9 +2189,7 @@ final class SharedApplicationContext {
private func maybeCheckForUpdates() {
#if targetEnvironment(simulator)
- return;
- #endif
-
+ #else
guard let buildConfig = self.buildConfig, !buildConfig.isAppStoreBuild, let appCenterId = buildConfig.appCenterId, !appCenterId.isEmpty else {
return
}
@@ -2237,6 +2234,7 @@ final class SharedApplicationContext {
}))
}
}
+ #endif
}
override var next: UIResponder? {
diff --git a/submodules/TelegramUI/Sources/ApplicationContext.swift b/submodules/TelegramUI/Sources/ApplicationContext.swift
index 20adc4ffc6..ee19463d40 100644
--- a/submodules/TelegramUI/Sources/ApplicationContext.swift
+++ b/submodules/TelegramUI/Sources/ApplicationContext.swift
@@ -5,7 +5,6 @@ import TelegramUIPreferences
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import LegacyComponents
import DeviceAccess
@@ -407,7 +406,7 @@ final class AuthorizedApplicationContext {
var processed = false
for media in firstMessage.media {
- if let action = media as? TelegramMediaAction, case let .geoProximityReached(fromId, toId, distance) = action.action {
+ if let action = media as? TelegramMediaAction, case .geoProximityReached = action.action {
strongSelf.context.sharedContext.openLocationScreen(context: strongSelf.context, messageId: firstMessage.id, navigationController: strongSelf.rootController)
processed = true
break
@@ -465,9 +464,9 @@ final class AuthorizedApplicationContext {
|> deliverOnMainQueue).start(completed: {
controller?.dismiss()
if let strongSelf = self, let botName = botName {
- strongSelf.termsOfServiceProceedToBotDisposable.set((strongSelf.context.engine.peers.resolvePeerByName(name: botName, ageLimit: 10) |> take(1) |> deliverOnMainQueue).start(next: { peerId in
- if let strongSelf = self, let peerId = peerId {
- self?.rootController.pushViewController(ChatControllerImpl(context: strongSelf.context, chatLocation: .peer(peerId)))
+ strongSelf.termsOfServiceProceedToBotDisposable.set((strongSelf.context.engine.peers.resolvePeerByName(name: botName, ageLimit: 10) |> take(1) |> deliverOnMainQueue).start(next: { peer in
+ if let strongSelf = self, let peer = peer {
+ self?.rootController.pushViewController(ChatControllerImpl(context: strongSelf.context, chatLocation: .peer(peer.id)))
}
}))
}
@@ -612,7 +611,7 @@ final class AuthorizedApplicationContext {
switch state {
case .contacts:
splitTest.addEvent(.ContactsRequest)
- DeviceAccess.authorizeAccess(to: .contacts, presentationData: context.sharedContext.currentPresentationData.with { $0 }) { result in
+ DeviceAccess.authorizeAccess(to: .contacts, presentationData: context.sharedContext.currentPresentationData.with { $0 }, { result in
if result {
splitTest.addEvent(.ContactsAllowed)
} else {
@@ -620,12 +619,12 @@ final class AuthorizedApplicationContext {
}
permissionsPosition.set(position + 1)
ApplicationSpecificNotice.setPermissionWarning(accountManager: context.sharedContext.accountManager, permission: .contacts, value: 0)
- }
+ })
case .notifications:
splitTest.addEvent(.NotificationsRequest)
DeviceAccess.authorizeAccess(to: .notifications, registerForNotifications: { result in
context.sharedContext.applicationBindings.registerForNotifications(result)
- }) { result in
+ }, { result in
if result {
splitTest.addEvent(.NotificationsAllowed)
} else {
@@ -633,7 +632,7 @@ final class AuthorizedApplicationContext {
}
permissionsPosition.set(position + 1)
ApplicationSpecificNotice.setPermissionWarning(accountManager: context.sharedContext.accountManager, permission: .notifications, value: 0)
- }
+ })
case .cellularData:
DeviceAccess.authorizeAccess(to: .cellularData, presentationData: context.sharedContext.currentPresentationData.with { $0 }, present: { [weak self] c, a in
if let strongSelf = self {
@@ -648,9 +647,9 @@ final class AuthorizedApplicationContext {
case .siri:
DeviceAccess.authorizeAccess(to: .siri, requestSiriAuthorization: { completion in
return context.sharedContext.applicationBindings.requestSiriAuthorization(completion)
- }) { result in
+ }, { result in
permissionsPosition.set(position + 1)
- }
+ })
default:
break
}
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequenceAwaitingAccountResetControllerNode.swift b/submodules/TelegramUI/Sources/AuthorizationSequenceAwaitingAccountResetControllerNode.swift
index d41d1388b4..81fdb570f2 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequenceAwaitingAccountResetControllerNode.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequenceAwaitingAccountResetControllerNode.swift
@@ -94,7 +94,7 @@ final class AuthorizationSequenceAwaitingAccountResetControllerNode: ASDisplayNo
self.protectedUntil = protectedUntil
self.updateTimerValue()
- self.noticeNode.attributedText = NSAttributedString(string: strings.Login_ResetAccountProtected_Text(number).0, font: Font.regular(16.0), textColor: self.theme.list.itemPrimaryTextColor, paragraphAlignment: .center)
+ self.noticeNode.attributedText = NSAttributedString(string: strings.Login_ResetAccountProtected_Text(number).string, font: Font.regular(16.0), textColor: self.theme.list.itemPrimaryTextColor, paragraphAlignment: .center)
if let (layout, navigationHeight) = self.layoutArguments {
self.containerLayoutUpdated(layout, navigationBarHeight: navigationHeight, transition: .immediate)
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryController.swift b/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryController.swift
index c3df7fed14..939a015821 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryController.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ProgressNavigationButtonNode
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryControllerNode.swift b/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryControllerNode.swift
index 642949cf49..4f59fe7b92 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryControllerNode.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequenceCodeEntryControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TextFormat
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequenceController.swift b/submodules/TelegramUI/Sources/AuthorizationSequenceController.swift
index 8d1675a6a4..13e9f7a1ea 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequenceController.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequenceController.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import MtProtoKit
import MessageUI
@@ -197,7 +196,7 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
let carrier = CTCarrier()
let mnc = carrier.mobileNetworkCode ?? "none"
- strongSelf.presentEmailComposeController(address: "login@stel.com", subject: strongSelf.presentationData.strings.Login_InvalidPhoneEmailSubject(formattedNumber).0, body: strongSelf.presentationData.strings.Login_InvalidPhoneEmailBody(formattedNumber, appVersion, systemVersion, locale, mnc).0, from: controller)
+ strongSelf.presentEmailComposeController(address: "login@stel.com", subject: strongSelf.presentationData.strings.Login_InvalidPhoneEmailSubject(formattedNumber).string, body: strongSelf.presentationData.strings.Login_InvalidPhoneEmailBody(formattedNumber, appVersion, systemVersion, locale, mnc).string, from: controller)
}))
case .phoneLimitExceeded:
text = strongSelf.presentationData.strings.Login_PhoneFloodError
@@ -216,7 +215,7 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
let carrier = CTCarrier()
let mnc = carrier.mobileNetworkCode ?? "none"
- strongSelf.presentEmailComposeController(address: "login@stel.com", subject: strongSelf.presentationData.strings.Login_PhoneBannedEmailSubject(formattedNumber).0, body: strongSelf.presentationData.strings.Login_PhoneBannedEmailBody(formattedNumber, appVersion, systemVersion, locale, mnc).0, from: controller)
+ strongSelf.presentEmailComposeController(address: "login@stel.com", subject: strongSelf.presentationData.strings.Login_PhoneBannedEmailSubject(formattedNumber).string, body: strongSelf.presentationData.strings.Login_PhoneBannedEmailBody(formattedNumber, appVersion, systemVersion, locale, mnc).string, from: controller)
}))
case let .generic(info):
text = strongSelf.presentationData.strings.Login_UnknownError
@@ -238,7 +237,7 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
errorString = "unknown"
}
- strongSelf.presentEmailComposeController(address: "login@stel.com", subject: strongSelf.presentationData.strings.Login_PhoneGenericEmailSubject(formattedNumber).0, body: strongSelf.presentationData.strings.Login_PhoneGenericEmailBody(formattedNumber, errorString, appVersion, systemVersion, locale, mnc).0, from: controller)
+ strongSelf.presentEmailComposeController(address: "login@stel.com", subject: strongSelf.presentationData.strings.Login_PhoneGenericEmailSubject(formattedNumber).string, body: strongSelf.presentationData.strings.Login_PhoneGenericEmailBody(formattedNumber, errorString, appVersion, systemVersion, locale, mnc).string, from: controller)
}))
case .timeout:
text = strongSelf.presentationData.strings.Login_NetworkError
@@ -387,7 +386,7 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
if nextType == nil {
if MFMailComposeViewController.canSendMail(), let controller = controller {
let formattedNumber = formatPhoneNumber(number)
- strongSelf.presentEmailComposeController(address: "sms@stel.com", subject: strongSelf.presentationData.strings.Login_EmailCodeSubject(formattedNumber).0, body: strongSelf.presentationData.strings.Login_EmailCodeBody(formattedNumber).0, from: controller)
+ strongSelf.presentEmailComposeController(address: "sms@stel.com", subject: strongSelf.presentationData.strings.Login_EmailCodeSubject(formattedNumber).string, body: strongSelf.presentationData.strings.Login_EmailCodeBody(formattedNumber).string, from: controller)
} else {
controller?.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: strongSelf.presentationData), title: nil, text: strongSelf.presentationData.strings.Login_EmailNotConfiguredError, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
}
@@ -784,7 +783,7 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
}
controllers.append(self.passwordEntryController(hint: hint, suggestReset: suggestReset, syncContacts: syncContacts))
self.setViewControllers(controllers, animated: !self.viewControllers.isEmpty)
- case let .passwordRecovery(hint, _, _, emailPattern, syncContacts):
+ case let .passwordRecovery(_, _, _, emailPattern, syncContacts):
var controllers: [ViewController] = []
if !self.otherAccountPhoneNumbers.1.isEmpty {
controllers.append(self.splashController())
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequencePasswordRecoveryControllerNode.swift b/submodules/TelegramUI/Sources/AuthorizationSequencePasswordRecoveryControllerNode.swift
index d415d63811..3584d7ef7a 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequencePasswordRecoveryControllerNode.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequencePasswordRecoveryControllerNode.swift
@@ -82,7 +82,7 @@ final class AuthorizationSequencePasswordRecoveryControllerNode: ASDisplayNode,
}
func updateData(emailPattern: String) {
- self.noAccessNode.setAttributedTitle(NSAttributedString(string: self.strings.TwoStepAuth_RecoveryEmailUnavailable(emailPattern).0, font: Font.regular(16.0), textColor: self.theme.list.itemAccentColor, paragraphAlignment: .center), for: [])
+ self.noAccessNode.setAttributedTitle(NSAttributedString(string: self.strings.TwoStepAuth_RecoveryEmailUnavailable(emailPattern).string, font: Font.regular(16.0), textColor: self.theme.list.itemAccentColor, paragraphAlignment: .center), for: [])
}
func containerLayoutUpdated(_ layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
@@ -101,7 +101,6 @@ final class AuthorizationSequencePasswordRecoveryControllerNode: ASDisplayNode,
let noticeSize = self.noticeNode.measure(CGSize(width: layout.size.width - 28.0, height: CGFloat.greatestFiniteMagnitude))
let noAccessSize = self.noAccessNode.measure(CGSize(width: layout.size.width, height: CGFloat.greatestFiniteMagnitude))
- let resetSize = self.noAccessNode.measure(CGSize(width: layout.size.width, height: CGFloat.greatestFiniteMagnitude))
var items: [AuthorizationLayoutItem] = []
items.append(AuthorizationLayoutItem(node: self.titleNode, size: titleSize, spacingBefore: AuthorizationLayoutItemSpacing(weight: 0.0, maxValue: 0.0), spacingAfter: AuthorizationLayoutItemSpacing(weight: 0.0, maxValue: 0.0)))
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryController.swift b/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryController.swift
index e8d01d97ed..9006758168 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryController.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import ProgressNavigationButtonNode
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryControllerNode.swift b/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryControllerNode.swift
index cf198be15b..e2565eb948 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryControllerNode.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequencePhoneEntryControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import PhoneInputNode
import CountrySelectionUI
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequenceSignUpController.swift b/submodules/TelegramUI/Sources/AuthorizationSequenceSignUpController.swift
index ddba34b80a..767d4c30f4 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequenceSignUpController.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequenceSignUpController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import LegacyComponents
import ProgressNavigationButtonNode
diff --git a/submodules/TelegramUI/Sources/AuthorizationSequenceSplashController.swift b/submodules/TelegramUI/Sources/AuthorizationSequenceSplashController.swift
index 26cc9a83cd..5b344155b8 100644
--- a/submodules/TelegramUI/Sources/AuthorizationSequenceSplashController.swift
+++ b/submodules/TelegramUI/Sources/AuthorizationSequenceSplashController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import LegacyComponents
@@ -195,7 +194,7 @@ final class AuthorizationSequenceSplashController: ViewController {
}
let stringsValue: PresentationStrings
if let localizationSettings = localizationSettings {
- stringsValue = PresentationStrings(primaryComponent: PresentationStringsComponent(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStringsComponent(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }), groupingSeparator: "")
+ stringsValue = PresentationStrings(primaryComponent: PresentationStrings.Component(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStrings.Component(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }), groupingSeparator: "")
} else {
stringsValue = defaultPresentationStrings
}
diff --git a/submodules/TelegramUI/Sources/ChatBotInfoItem.swift b/submodules/TelegramUI/Sources/ChatBotInfoItem.swift
index e97d668d82..6ce332d648 100644
--- a/submodules/TelegramUI/Sources/ChatBotInfoItem.swift
+++ b/submodules/TelegramUI/Sources/ChatBotInfoItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TextFormat
import UrlEscaping
diff --git a/submodules/TelegramUI/Sources/ChatBotStartInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatBotStartInputPanelNode.swift
index b733d57ddd..e887368037 100644
--- a/submodules/TelegramUI/Sources/ChatBotStartInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatBotStartInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatButtonKeyboardInputNode.swift b/submodules/TelegramUI/Sources/ChatButtonKeyboardInputNode.swift
index 5a4889686a..f01a55acf0 100644
--- a/submodules/TelegramUI/Sources/ChatButtonKeyboardInputNode.swift
+++ b/submodules/TelegramUI/Sources/ChatButtonKeyboardInputNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatChannelSubscriberInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatChannelSubscriberInputPanelNode.swift
index 8c7a5d526d..b21b3b2adc 100644
--- a/submodules/TelegramUI/Sources/ChatChannelSubscriberInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatChannelSubscriberInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatContextResultPeekContentNode.swift b/submodules/TelegramUI/Sources/ChatContextResultPeekContentNode.swift
index eaced07470..daa7eb2496 100644
--- a/submodules/TelegramUI/Sources/ChatContextResultPeekContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatContextResultPeekContentNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AVFoundation
import PhotoResources
diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift
index fbf469106b..014127d49a 100644
--- a/submodules/TelegramUI/Sources/ChatController.swift
+++ b/submodules/TelegramUI/Sources/ChatController.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SafariServices
import MobileCoreServices
import Intents
@@ -1260,7 +1259,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if value {
openBot()
} else if let botPeer = message.author as? TelegramUser {
- strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.Conversation_BotInteractiveUrlAlert(botPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0, actions: [TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_Cancel, action: { }), TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {
+ strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.Conversation_BotInteractiveUrlAlert(botPeer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string, actions: [TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_Cancel, action: { }), TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {
if let strongSelf = self {
let _ = ApplicationSpecificNotice.setBotGameNotice(accountManager: strongSelf.context.sharedContext.accountManager, peerId: botPeer.id).start()
openBot()
@@ -1626,14 +1625,14 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0 : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0 : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0 : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -1675,7 +1674,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if let cachedUserData = strongSelf.peerView?.cachedData as? CachedUserData, cachedUserData.callsPrivate {
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
- strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
+ strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
return
}
@@ -2213,7 +2212,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
f(.dismissWithoutContent)
})))
if totalGroupCount != 1 {
- actions.append(.action(ContextMenuActionItem(text: strongSelf.presentationData.strings.Conversation_MessageDialogRetryAll(totalGroupCount).0, icon: { theme in
+ actions.append(.action(ContextMenuActionItem(text: strongSelf.presentationData.strings.Conversation_MessageDialogRetryAll(totalGroupCount).string, icon: { theme in
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Resend"), color: theme.actionSheet.primaryTextColor)
}, action: { [weak self] _, f in
if let strongSelf = self {
@@ -5137,7 +5136,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
var reportSpam = true
var items: [ActionSheetItem] = []
- items.append(ActionSheetTextItem(title: presentationData.strings.UserInfo_BlockConfirmationTitle(peer.compactDisplayTitle).0))
+ items.append(ActionSheetTextItem(title: presentationData.strings.UserInfo_BlockConfirmationTitle(peer.compactDisplayTitle).string))
items.append(contentsOf: [
ActionSheetCheckboxItem(title: presentationData.strings.Conversation_Moderate_Report, label: "", value: reportSpam, action: { [weak controller] checkValue in
reportSpam = checkValue
@@ -5700,7 +5699,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
switch subject {
case .stickers:
if untilDate != 0 && untilDate != Int32.max {
- banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedStickersTimed(stringForFullDate(timestamp: untilDate, strings: strongSelf.presentationInterfaceState.strings, dateTimeFormat: strongSelf.presentationInterfaceState.dateTimeFormat)).0
+ banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedStickersTimed(stringForFullDate(timestamp: untilDate, strings: strongSelf.presentationInterfaceState.strings, dateTimeFormat: strongSelf.presentationInterfaceState.dateTimeFormat)).string
} else if personal {
banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedStickers
} else {
@@ -5708,7 +5707,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
case .mediaRecording:
if untilDate != 0 && untilDate != Int32.max {
- banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedMediaTimed(stringForFullDate(timestamp: untilDate, strings: strongSelf.presentationInterfaceState.strings, dateTimeFormat: strongSelf.presentationInterfaceState.dateTimeFormat)).0
+ banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedMediaTimed(stringForFullDate(timestamp: untilDate, strings: strongSelf.presentationInterfaceState.strings, dateTimeFormat: strongSelf.presentationInterfaceState.dateTimeFormat)).string
} else if personal {
banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedMedia
} else {
@@ -5893,7 +5892,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
} else if let currentAutoremoveTimeout = currentAutoremoveTimeout, let rect = strongSelf.chatDisplayNode.frameForInputPanelAccessoryButton(.messageAutoremoveTimeout(currentAutoremoveTimeout)) {
let intervalText = timeIntervalString(strings: strongSelf.presentationData.strings, value: currentAutoremoveTimeout)
- let text: String = strongSelf.presentationData.strings.Conversation_AutoremoveTimerSetToastText(intervalText).0
+ let text: String = strongSelf.presentationData.strings.Conversation_AutoremoveTimerSetToastText(intervalText).string
strongSelf.mediaRecordingModeTooltipController?.dismiss()
@@ -5957,7 +5956,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
})
} else {
var contextItems: [ContextMenuItem] = []
- contextItems.append(.action(ContextMenuActionItem(text: strongSelf.presentationData.strings.Conversation_PinMessagesFor(peer.compactDisplayTitle).0, textColor: .primary, icon: { _ in nil }, action: { c, _ in
+ contextItems.append(.action(ContextMenuActionItem(text: strongSelf.presentationData.strings.Conversation_PinMessagesFor(peer.compactDisplayTitle).string, textColor: .primary, icon: { _ in nil }, action: { c, _ in
c.dismiss(completion: {
pinAction(true, false)
})
@@ -7069,7 +7068,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
self.chatDisplayNode.loadInputPanels(theme: self.presentationInterfaceState.theme, strings: self.presentationInterfaceState.strings, fontSize: self.presentationInterfaceState.fontSize)
self.recentlyUsedInlineBotsDisposable = (self.context.engine.peers.recentlyUsedInlineBots() |> deliverOnMainQueue).start(next: { [weak self] peers in
- self?.recentlyUsedInlineBotsValue = peers.filter({ $0.1 >= 0.14 }).map({ $0.0 })
+ self?.recentlyUsedInlineBotsValue = peers.filter({ $0.1 >= 0.14 }).map({ $0.0._asPeer() })
})
if case .standard(false) = self.presentationInterfaceState.mode, self.raiseToListen == nil {
@@ -7361,7 +7360,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
let bold = MarkdownAttributeSet(font: Font.semibold(13.0), textColor: strongSelf.presentationData.theme.actionSheet.primaryTextColor)
let participantsLimit = strongSelf.context.currentLimitsConfiguration.with { $0 }.maxSupergroupMemberCount
- let text = strongSelf.presentationData.strings.BroadcastGroups_LimitAlert_Text(presentationStringsFormattedNumber(participantsLimit, strongSelf.presentationData.dateTimeFormat.groupingSeparator)).0
+ let text = strongSelf.presentationData.strings.BroadcastGroups_LimitAlert_Text(presentationStringsFormattedNumber(participantsLimit, strongSelf.presentationData.dateTimeFormat.groupingSeparator)).string
let attributedText = parseMarkdownIntoAttributedString(text, attributes: MarkdownAttributes(body: body, bold: bold, link: body, linkAttribute: { _ in return nil }), textAlignment: .center)
let controller = richTextAlertController(context: strongSelf.context, title: attributedTitle, text: attributedText, actions: [TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_Cancel, action: {
@@ -7389,7 +7388,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
let _ = (convertGroupToGigagroup(account: context.account, peerId: peerId)
|> deliverOnMainQueue).start(completed: {
let participantsLimit = context.currentLimitsConfiguration.with { $0 }.maxSupergroupMemberCount
- strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .gigagroupConversion(text: presentationData.strings.BroadcastGroups_Success(presentationStringsFormattedNumber(participantsLimit, presentationData.dateTimeFormat.decimalSeparator)).0), elevatedLayout: false, action: { _ in return false }), in: .current)
+ strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .gigagroupConversion(text: presentationData.strings.BroadcastGroups_Success(presentationStringsFormattedNumber(participantsLimit, presentationData.dateTimeFormat.decimalSeparator)).string), elevatedLayout: false, action: { _ in return false }), in: .current)
})
})])
controller?.present(alertController, in: .window(.root))
@@ -8205,7 +8204,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
let confirmationText: String
switch canClearForEveryone {
case .user:
- text = strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0
+ text = strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string
confirmationText = strongSelf.presentationData.strings.ChatList_DeleteForEveryoneConfirmationText
default:
text = strongSelf.presentationData.strings.Conversation_DeleteMessagesForEveryone
@@ -8363,7 +8362,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if filteredSize == 0 {
title = presentationData.strings.Cache_ClearNone
} else {
- title = presentationData.strings.Cache_Clear("\(dataSizeString(filteredSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").0
+ title = presentationData.strings.Cache_Clear("\(dataSizeString(filteredSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").string
}
if let item = item as? ActionSheetButtonItem {
@@ -8428,7 +8427,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if items.isEmpty {
strongSelf.presentClearCacheSuggestion()
} else {
- items.append(ActionSheetButtonItem(title: presentationData.strings.Cache_Clear("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").0, action: {
+ items.append(ActionSheetButtonItem(title: presentationData.strings.Cache_Clear("\(dataSizeString(totalSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))").string, action: {
let clearCategories = sizeIndex.keys.filter({ sizeIndex[$0]!.0 })
var clearMediaIds = Set()
@@ -8486,7 +8485,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
disposable.set((signal
|> deliverOnMainQueue).start(completed: { [weak self] in
if let strongSelf = self, let _ = strongSelf.validLayout {
- strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(selectedSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).0), elevatedLayout: false, action: { _ in return false }), in: .current)
+ strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.ClearCache_Success("\(dataSizeString(selectedSize, formatting: DataSizeStringFormatting(presentationData: presentationData)))", stringForDeviceType()).string), elevatedLayout: false, action: { _ in return false }), in: .current)
}
}))
@@ -8600,7 +8599,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if editMediaOptions == nil, let (untilDate, personal) = bannedSendMedia {
let banDescription: String
if untilDate != 0 && untilDate != Int32.max {
- banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedMediaTimed(stringForFullDate(timestamp: untilDate, strings: strongSelf.presentationInterfaceState.strings, dateTimeFormat: strongSelf.presentationInterfaceState.dateTimeFormat)).0
+ banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedMediaTimed(stringForFullDate(timestamp: untilDate, strings: strongSelf.presentationInterfaceState.strings, dateTimeFormat: strongSelf.presentationInterfaceState.dateTimeFormat)).string
} else if personal {
banDescription = strongSelf.presentationInterfaceState.strings.Conversation_RestrictedMedia
} else {
@@ -10978,14 +10977,14 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0 : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0 : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0 : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").0
+ text = messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -11284,14 +11283,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
let account = self.context.account
disposable.set((resolveSignal
|> take(1)
- |> mapToSignal { peerId -> Signal in
- return account.postbox.transaction { transaction -> Peer? in
- if let peerId = peerId {
- return transaction.getPeer(peerId)
- } else {
- return nil
- }
- }
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
|> deliverOnMainQueue).start(next: { [weak self] peer in
if let strongSelf = self {
@@ -11320,10 +11313,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
var resolveSignal: Signal
if let peerName = peerName {
resolveSignal = self.context.engine.peers.resolvePeerByName(name: peerName)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return account.postbox.loadedPeerWithId(peerId)
- |> map(Optional.init)
+ |> mapToSignal { peer -> Signal in
+ if let peer = peer {
+ return .single(peer._asPeer())
} else {
return .single(nil)
}
@@ -11423,7 +11415,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
var deleteChat = true
var items: [ActionSheetItem] = []
if !peer.isDeleted {
- items.append(ActionSheetTextItem(title: presentationData.strings.UserInfo_BlockConfirmationTitle(peer.compactDisplayTitle).0))
+ items.append(ActionSheetTextItem(title: presentationData.strings.UserInfo_BlockConfirmationTitle(peer.compactDisplayTitle).string))
}
items.append(contentsOf: [
ActionSheetCheckboxItem(title: presentationData.strings.Conversation_Moderate_Report, label: "", value: reportSpam, action: { [weak controller] checkValue in
@@ -11444,7 +11436,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
return item
})
}),
- ActionSheetButtonItem(title: presentationData.strings.UserInfo_BlockActionTitle(peer.compactDisplayTitle).0, color: .destructive, action: { [weak self] in
+ ActionSheetButtonItem(title: presentationData.strings.UserInfo_BlockActionTitle(peer.compactDisplayTitle).string, color: .destructive, action: { [weak self] in
dismissAction()
guard let strongSelf = self else {
return
@@ -11521,7 +11513,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
var items: [ActionSheetItem] = []
- items.append(ActionSheetTextItem(title: strongSelf.presentationData.strings.Conversation_ShareMyPhoneNumberConfirmation(formatPhoneNumber(phoneNumber), peer.compactDisplayTitle).0))
+ items.append(ActionSheetTextItem(title: strongSelf.presentationData.strings.Conversation_ShareMyPhoneNumberConfirmation(formatPhoneNumber(phoneNumber), peer.compactDisplayTitle).string))
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.Conversation_ShareMyPhoneNumber, action: { [weak actionSheet] in
actionSheet?.dismissAnimated()
guard let strongSelf = self else {
@@ -11537,7 +11529,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
guard let strongSelf = self else {
return
}
- strongSelf.present(OverlayStatusController(theme: strongSelf.presentationData.theme, type: .genericSuccess(strongSelf.presentationData.strings.Conversation_ShareMyPhoneNumber_StatusSuccess(peer.compactDisplayTitle).0, true)), in: .window(.root))
+ strongSelf.present(OverlayStatusController(theme: strongSelf.presentationData.theme, type: .genericSuccess(strongSelf.presentationData.strings.Conversation_ShareMyPhoneNumber_StatusSuccess(peer.compactDisplayTitle).string, true)), in: .window(.root))
})
}))
@@ -11561,7 +11553,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if let phone = peer.phone, !phone.isEmpty {
}
- self?.present(OverlayStatusController(theme: strongSelf.presentationData.theme, type: .genericSuccess(strongSelf.presentationData.strings.AddContact_StatusSuccess(peer.compactDisplayTitle).0, true)), in: .window(.root))
+ self?.present(OverlayStatusController(theme: strongSelf.presentationData.theme, type: .genericSuccess(strongSelf.presentationData.strings.AddContact_StatusSuccess(peer.compactDisplayTitle).string, true)), in: .window(.root))
}
}), completed: nil, cancelled: nil), in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
}
@@ -11876,7 +11868,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
} else if categoryId == 2 {
title = strongSelf.presentationData.strings.Conversation_Moderate_Report
} else if categoryId == 3 {
- title = strongSelf.presentationData.strings.Conversation_Moderate_DeleteAllMessages(author.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0
+ title = strongSelf.presentationData.strings.Conversation_Moderate_DeleteAllMessages(author.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string
}
let index = itemIndex
items.append(ActionSheetCheckboxItem(title: title, label: "", value: actions.contains(categoryId), action: { value in
@@ -11945,7 +11937,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
var unsendPersonalMessages = false
if options.contains(.unsendPersonal) {
canDisplayContextMenu = false
- items.append(ActionSheetTextItem(title: self.presentationData.strings.Chat_UnsendMyMessagesAlertTitle(personalPeerName ?? "").0))
+ items.append(ActionSheetTextItem(title: self.presentationData.strings.Chat_UnsendMyMessagesAlertTitle(personalPeerName ?? "").string))
items.append(ActionSheetSwitchItem(title: self.presentationData.strings.Chat_UnsendMyMessages, isOn: false, action: { value in
unsendPersonalMessages = value
}))
@@ -11954,7 +11946,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if isChannel {
globalTitle = self.presentationData.strings.Conversation_DeleteMessagesForEveryone
} else if let personalPeerName = personalPeerName {
- globalTitle = self.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).0
+ globalTitle = self.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).string
} else {
globalTitle = self.presentationData.strings.Conversation_DeleteMessagesForEveryone
}
@@ -12425,15 +12417,15 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
let reminderActivity = NSUserActivity(activityType: "RemindAboutChatIntent")
self.reminderActivity = reminderActivity
if peer is TelegramGroup {
- reminderActivity.title = self.presentationData.strings.Activity_RemindAboutGroup(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ reminderActivity.title = self.presentationData.strings.Activity_RemindAboutGroup(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
} else if let channel = peer as? TelegramChannel {
if case .broadcast = channel.info {
- reminderActivity.title = self.presentationData.strings.Activity_RemindAboutChannel(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ reminderActivity.title = self.presentationData.strings.Activity_RemindAboutChannel(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
} else {
- reminderActivity.title = self.presentationData.strings.Activity_RemindAboutGroup(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ reminderActivity.title = self.presentationData.strings.Activity_RemindAboutGroup(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
}
} else {
- reminderActivity.title = self.presentationData.strings.Activity_RemindAboutUser(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).0
+ reminderActivity.title = self.presentationData.strings.Activity_RemindAboutUser(peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)).string
}
reminderActivity.userInfo = ["peerId": peerId.toInt64(), "peerTitle": peer.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder)]
reminderActivity.isEligibleForHandoff = true
@@ -12676,7 +12668,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
var isOn: Bool = true
var text: String?
if let myValue = value.value {
- text = strongSelf.presentationData.strings.Conversation_AutoremoveChanged("\(timeIntervalString(strings: strongSelf.presentationData.strings, value: myValue))").0
+ text = strongSelf.presentationData.strings.Conversation_AutoremoveChanged("\(timeIntervalString(strings: strongSelf.presentationData.strings, value: myValue))").string
} else {
isOn = false
text = strongSelf.presentationData.strings.Conversation_AutoremoveOff
diff --git a/submodules/TelegramUI/Sources/ChatControllerInteraction.swift b/submodules/TelegramUI/Sources/ChatControllerInteraction.swift
index c842ab6271..eca10e8719 100644
--- a/submodules/TelegramUI/Sources/ChatControllerInteraction.swift
+++ b/submodules/TelegramUI/Sources/ChatControllerInteraction.swift
@@ -3,7 +3,6 @@ import UIKit
import Postbox
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Display
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatControllerNode.swift b/submodules/TelegramUI/Sources/ChatControllerNode.swift
index 19193334b4..d5b569a1dd 100644
--- a/submodules/TelegramUI/Sources/ChatControllerNode.swift
+++ b/submodules/TelegramUI/Sources/ChatControllerNode.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TextFormat
diff --git a/submodules/TelegramUI/Sources/ChatEditInterfaceMessageState.swift b/submodules/TelegramUI/Sources/ChatEditInterfaceMessageState.swift
index b83b3cd9fc..c272bfb5eb 100644
--- a/submodules/TelegramUI/Sources/ChatEditInterfaceMessageState.swift
+++ b/submodules/TelegramUI/Sources/ChatEditInterfaceMessageState.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
enum ChatEditInterfaceMessageStateContent: Equatable {
case plaintext
diff --git a/submodules/TelegramUI/Sources/ChatEditMessageMediaContext.swift b/submodules/TelegramUI/Sources/ChatEditMessageMediaContext.swift
index a20222c70b..0ab47ae01e 100644
--- a/submodules/TelegramUI/Sources/ChatEditMessageMediaContext.swift
+++ b/submodules/TelegramUI/Sources/ChatEditMessageMediaContext.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatEmptyNode.swift b/submodules/TelegramUI/Sources/ChatEmptyNode.swift
index e5ea648a42..bce351272f 100644
--- a/submodules/TelegramUI/Sources/ChatEmptyNode.swift
+++ b/submodules/TelegramUI/Sources/ChatEmptyNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AppBundle
import LocalizedPeerData
@@ -308,7 +307,7 @@ final class ChatEmptyNodeNearbyChatContent: ASDisplayNode, ChatEmptyNodeStickerC
}
}
- let titleString = interfaceState.strings.Conversation_PeerNearbyTitle(displayName, shortStringForDistance(strings: interfaceState.strings, distance: distance)).0
+ let titleString = interfaceState.strings.Conversation_PeerNearbyTitle(displayName, shortStringForDistance(strings: interfaceState.strings, distance: distance)).string
let serviceColor = serviceMessageColorComponents(theme: interfaceState.theme, wallpaper: interfaceState.chatWallpaper)
self.titleNode.attributedText = NSAttributedString(string: titleString, font: titleFont, textColor: serviceColor.primaryText)
@@ -443,9 +442,9 @@ private final class ChatEmptyNodeSecretChatContent: ASDisplayNode, ChatEmptyNode
let titleString: String
if incoming {
- titleString = interfaceState.strings.Conversation_EncryptedPlaceholderTitleIncoming(title).0
+ titleString = interfaceState.strings.Conversation_EncryptedPlaceholderTitleIncoming(title).string
} else {
- titleString = interfaceState.strings.Conversation_EncryptedPlaceholderTitleOutgoing(title).0
+ titleString = interfaceState.strings.Conversation_EncryptedPlaceholderTitleOutgoing(title).string
}
let serviceColor = serviceMessageColorComponents(theme: interfaceState.theme, wallpaper: interfaceState.chatWallpaper)
@@ -571,7 +570,7 @@ private final class ChatEmptyNodeGroupChatContent: ASDisplayNode, ChatEmptyNodeC
self.subtitleNode.attributedText = NSAttributedString(string: interfaceState.strings.EmptyGroupInfo_Subtitle, font: messageFont, textColor: serviceColor.primaryText)
let strings: [String] = [
- interfaceState.strings.EmptyGroupInfo_Line1("\(interfaceState.limitsConfiguration.maxSupergroupMemberCount)").0,
+ interfaceState.strings.EmptyGroupInfo_Line1("\(interfaceState.limitsConfiguration.maxSupergroupMemberCount)").string,
interfaceState.strings.EmptyGroupInfo_Line2,
interfaceState.strings.EmptyGroupInfo_Line3,
interfaceState.strings.EmptyGroupInfo_Line4
diff --git a/submodules/TelegramUI/Sources/ChatFeedNavigationInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatFeedNavigationInputPanelNode.swift
index 2088e57827..1a936b7428 100644
--- a/submodules/TelegramUI/Sources/ChatFeedNavigationInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatFeedNavigationInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatHistoryEntriesForView.swift b/submodules/TelegramUI/Sources/ChatHistoryEntriesForView.swift
index 99eaf5d0e5..fac66dd98b 100644
--- a/submodules/TelegramUI/Sources/ChatHistoryEntriesForView.swift
+++ b/submodules/TelegramUI/Sources/ChatHistoryEntriesForView.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import TemporaryCachedPeerDataManager
import Emoji
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatHistoryEntry.swift b/submodules/TelegramUI/Sources/ChatHistoryEntry.swift
index 95ae7fa8f8..eef307bdb0 100644
--- a/submodules/TelegramUI/Sources/ChatHistoryEntry.swift
+++ b/submodules/TelegramUI/Sources/ChatHistoryEntry.swift
@@ -1,6 +1,5 @@
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
import TemporaryCachedPeerDataManager
diff --git a/submodules/TelegramUI/Sources/ChatHistoryListNode.swift b/submodules/TelegramUI/Sources/ChatHistoryListNode.swift
index 74be953d83..b1189bdf07 100644
--- a/submodules/TelegramUI/Sources/ChatHistoryListNode.swift
+++ b/submodules/TelegramUI/Sources/ChatHistoryListNode.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import MediaResources
@@ -581,7 +580,7 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
self.accessibilityPageScrolledString = { [weak self] row, count in
if let strongSelf = self {
- return strongSelf.currentPresentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return strongSelf.currentPresentationData.strings.VoiceOver_ScrollStatus(row, count).string
} else {
return ""
}
diff --git a/submodules/TelegramUI/Sources/ChatHistorySearchContainerNode.swift b/submodules/TelegramUI/Sources/ChatHistorySearchContainerNode.swift
index 50ef7caa52..c9fb9f748a 100644
--- a/submodules/TelegramUI/Sources/ChatHistorySearchContainerNode.swift
+++ b/submodules/TelegramUI/Sources/ChatHistorySearchContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import MergeLists
import AccountContext
@@ -159,7 +158,7 @@ final class ChatHistorySearchContainerNode: SearchDisplayControllerContentNode {
self.dimNode.backgroundColor = UIColor.black.withAlphaComponent(0.5)
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.emptyResultsTitleNode = ImmediateTextNode()
@@ -330,7 +329,7 @@ final class ChatHistorySearchContainerNode: SearchDisplayControllerContentNode {
strongSelf.dimNode.isHidden = displayingResults
strongSelf.backgroundColor = displayingResults ? strongSelf.presentationData.theme.list.plainBackgroundColor : nil
- strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.SharedMedia_SearchNoResultsDescription(transition.query).0, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
+ strongSelf.emptyResultsTextNode.attributedText = NSAttributedString(string: strongSelf.presentationData.strings.SharedMedia_SearchNoResultsDescription(transition.query).string, font: Font.regular(15.0), textColor: strongSelf.presentationData.theme.list.freeTextColor)
let emptyResults = displayingResults && strongSelf.currentEntries?.isEmpty ?? false
strongSelf.emptyResultsTitleNode.isHidden = !emptyResults
diff --git a/submodules/TelegramUI/Sources/ChatHistoryViewForLocation.swift b/submodules/TelegramUI/Sources/ChatHistoryViewForLocation.swift
index ce80e0760b..e8c9e35068 100644
--- a/submodules/TelegramUI/Sources/ChatHistoryViewForLocation.swift
+++ b/submodules/TelegramUI/Sources/ChatHistoryViewForLocation.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatImportStatusPanel.swift b/submodules/TelegramUI/Sources/ChatImportStatusPanel.swift
index 0af27ac9e3..d7b488f62f 100644
--- a/submodules/TelegramUI/Sources/ChatImportStatusPanel.swift
+++ b/submodules/TelegramUI/Sources/ChatImportStatusPanel.swift
@@ -35,7 +35,7 @@ final class ChatImportStatusPanel: ASDisplayNode {
let titleFont = Font.medium(min(18.0, floor(presentationData.fontSize.baseDisplaySize * 13.0 / 17.0)))
- let text = presentationData.strings.Conversation_ImportProgress("\(Int(progress * 100.0))").0
+ let text = presentationData.strings.Conversation_ImportProgress("\(Int(progress * 100.0))").string
let attributedString = NSAttributedString(string: text, font: titleFont, textColor: bubbleVariableColor(variableColor: presentationData.theme.theme.chat.serviceMessage.dateTextColor, wallpaper: presentationData.theme.wallpaper))
let makeLabelLayout = TextNode.asyncLayout(self.labelNode)
diff --git a/submodules/TelegramUI/Sources/ChatInfo.swift b/submodules/TelegramUI/Sources/ChatInfo.swift
index 126f2d43a1..2e6de9bead 100644
--- a/submodules/TelegramUI/Sources/ChatInfo.swift
+++ b/submodules/TelegramUI/Sources/ChatInfo.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import Display
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatInfoTitlePanelNode.swift b/submodules/TelegramUI/Sources/ChatInfoTitlePanelNode.swift
index 811fd6b4eb..de3fd66a49 100644
--- a/submodules/TelegramUI/Sources/ChatInfoTitlePanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatInfoTitlePanelNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
private enum ChatInfoTitleButton {
diff --git a/submodules/TelegramUI/Sources/ChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/ChatInputContextPanelNode.swift
index 1d8c0129e0..9e0a727f51 100644
--- a/submodules/TelegramUI/Sources/ChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatInputContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatInputPanelNode.swift
index ff07332179..cdcf05e2ae 100644
--- a/submodules/TelegramUI/Sources/ChatInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatInputPanelNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
class ChatInputPanelNode: ASDisplayNode {
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceInputContextPanels.swift b/submodules/TelegramUI/Sources/ChatInterfaceInputContextPanels.swift
index 4171fca4b1..3a2da7ab2a 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceInputContextPanels.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceInputContextPanels.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import AccountContext
private func inputQueryResultPriority(_ result: ChatPresentationInputQueryResult) -> (Int, Bool) {
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceInputContexts.swift b/submodules/TelegramUI/Sources/ChatInterfaceInputContexts.swift
index fbe8b8c8fd..7fd52addda 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceInputContexts.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceInputContexts.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import AccountContext
@@ -204,7 +203,7 @@ func inputContextQueriesForChatPresentationIntefaceState(_ chatPresentationInter
func inputTextPanelStateForChatPresentationInterfaceState(_ chatPresentationInterfaceState: ChatPresentationInterfaceState, context: AccountContext) -> ChatTextInputPanelState {
var contextPlaceholder: NSAttributedString?
loop: for (_, result) in chatPresentationInterfaceState.inputQueryResults {
- if case let .contextRequestResult(peer, _) = result, let botUser = peer as? TelegramUser, let botInfo = botUser.botInfo, let inlinePlaceholder = botInfo.inlinePlaceholder {
+ if case let .contextRequestResult(peer, _) = result, case let .user(botUser) = peer, let botInfo = botUser.botInfo, let inlinePlaceholder = botInfo.inlinePlaceholder {
let inputQueries = inputContextQueriesForChatPresentationIntefaceState(chatPresentationInterfaceState)
for inputQuery in inputQueries {
if case let .contextRequest(addressName, query) = inputQuery, query.isEmpty {
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceInputNodes.swift b/submodules/TelegramUI/Sources/ChatInterfaceInputNodes.swift
index f59f78096a..4195ba9e65 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceInputNodes.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceInputNodes.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import AccountContext
@@ -50,5 +49,4 @@ func inputNodeForChatPresentationIntefaceState(_ chatPresentationInterfaceState:
case .none, .text:
return nil
}
- return nil
}
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateAccessoryPanels.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateAccessoryPanels.swift
index 85c468508d..d2da6abb8e 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceStateAccessoryPanels.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceStateAccessoryPanels.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import AccountContext
func accessoryPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState: ChatPresentationInterfaceState, context: AccountContext, currentPanel: AccessoryPanelNode?, interfaceInteraction: ChatPanelInterfaceInteraction?) -> AccessoryPanelNode? {
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift
index 06abbb38fd..eb11078a3f 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import Display
import UIKit
@@ -843,13 +842,20 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
if !hasAutoremove {
for media in message.media {
- if media is TelegramMediaAction {
+ if let action = media as? TelegramMediaAction {
if let channel = message.peers[message.id.peerId] as? TelegramChannel {
if channel.flags.contains(.isCreator) || (channel.adminRights?.rights.contains(.canDeleteMessages) == true) {
} else {
isUnremovableAction = true
}
}
+
+ switch action.action {
+ case .historyScreenshot:
+ isUnremovableAction = true
+ default:
+ break
+ }
}
if let file = media as? TelegramMediaFile {
if file.isVideo {
@@ -1489,5 +1495,5 @@ private func stringForRemainingTime(_ duration: Int32, strings: PresentationStri
} else {
durationString = String(format: "%d:%02d", minutes, seconds)
}
- return strings.Conversation_AutoremoveRemainingTime(durationString).0
+ return strings.Conversation_AutoremoveRemainingTime(durationString).string
}
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift
index 3863d95b40..ee8fa435d0 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramUIPreferences
import LegacyComponents
@@ -178,7 +177,8 @@ private func updatedContextQueryResultStateForQuery(context: AccountContext, pee
signal = .single({ _ in return .mentions([]) })
}
- let inlineBots: Signal<[(Peer, Double)], NoError> = types.contains(.contextBots) ? context.engine.peers.recentlyUsedInlineBots() : .single([])
+ let inlineBots: Signal<[(EnginePeer, Double)], NoError> = types.contains(.contextBots) ? context.engine.peers.recentlyUsedInlineBots() : .single([])
+ let strings = context.sharedContext.currentPresentationData.with({ $0 }).strings
let participants = combineLatest(inlineBots, searchPeerMembers(context: context, peerId: peer.id, chatLocation: chatLocation, query: query, scope: .mention))
|> map { inlineBots, peers -> (ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult? in
let filteredInlineBots = inlineBots.sorted(by: { $0.1 > $1.1 }).filter { peer, rating in
@@ -211,7 +211,7 @@ private func updatedContextQueryResultStateForQuery(context: AccountContext, pee
return result == .orderedAscending
}))
sortedPeers = sortedPeers.filter { peer in
- return !peer.debugDisplayTitle.isEmpty
+ return !peer.displayTitle(strings: strings, displayOrder: .firstLast).isEmpty
}
return { _ in return .mentions(sortedPeers) }
}
@@ -265,20 +265,9 @@ private func updatedContextQueryResultStateForQuery(context: AccountContext, pee
let chatPeer = peer
let contextBot = context.engine.peers.resolvePeerByName(name: addressName)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return context.account.postbox.loadedPeerWithId(peerId)
- |> map { peer -> Peer? in
- return peer
- }
- |> take(1)
- } else {
- return .single(nil)
- }
- }
|> castError(ChatContextQueryError.self)
|> mapToSignal { peer -> Signal<(ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult?, ChatContextQueryError> in
- if let user = peer as? TelegramUser, let botInfo = user.botInfo, let _ = botInfo.inlinePlaceholder {
+ if case let .user(user) = peer, let botInfo = user.botInfo, let _ = botInfo.inlinePlaceholder {
let contextResults = context.engine.messages.requestChatContextResults(botId: user.id, peerId: chatPeer.id, query: query, location: context.sharedContext.locationManager.flatMap { locationManager -> Signal<(Double, Double)?, NoError> in
return `deferred` {
Queue.mainQueue().async {
@@ -306,7 +295,7 @@ private func updatedContextQueryResultStateForQuery(context: AccountContext, pee
}
|> map { results -> (ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult? in
return { _ in
- return .contextRequestResult(user, results?.results)
+ return .contextRequestResult(.user(user), results?.results)
}
}
@@ -319,7 +308,7 @@ private func updatedContextQueryResultStateForQuery(context: AccountContext, pee
}
}
}
- return .contextRequestResult(user, passthroughPreviousResult)
+ return .contextRequestResult(.user(user), passthroughPreviousResult)
})
let maybeDelayedContextResults: Signal<(ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult?, ChatContextQueryError>
@@ -400,7 +389,7 @@ func searchQuerySuggestionResultStateForChatInterfacePresentationState(_ chatPre
let participants = searchPeerMembers(context: context, peerId: peer.id, chatLocation: chatPresentationInterfaceState.chatLocation, query: query, scope: .memberSuggestion)
|> map { peers -> (ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult? in
let filteredPeers = peers
- var sortedPeers: [Peer] = []
+ var sortedPeers: [EnginePeer] = []
sortedPeers.append(contentsOf: filteredPeers.sorted(by: { lhs, rhs in
let result = lhs.indexName.indexName(.lastNameFirst).compare(rhs.indexName.indexName(.lastNameFirst))
return result == .orderedAscending
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateInputPanels.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateInputPanels.swift
index b844c30a82..42e06b3cba 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceStateInputPanels.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceStateInputPanels.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import AccountContext
func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState: ChatPresentationInterfaceState, context: AccountContext, currentPanel: ChatInputPanelNode?, currentSecondaryPanel: ChatInputPanelNode?, textInputPanelNode: ChatTextInputPanelNode?, interfaceInteraction: ChatPanelInterfaceInteraction?) -> (primary: ChatInputPanelNode?, secondary: ChatInputPanelNode?) {
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateNavigationButtons.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateNavigationButtons.swift
index 42acaf62f7..a2b80d4158 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceStateNavigationButtons.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceStateNavigationButtons.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatInterfaceTitlePanelNodes.swift b/submodules/TelegramUI/Sources/ChatInterfaceTitlePanelNodes.swift
index 84830a68a0..feaf349334 100644
--- a/submodules/TelegramUI/Sources/ChatInterfaceTitlePanelNodes.swift
+++ b/submodules/TelegramUI/Sources/ChatInterfaceTitlePanelNodes.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import AccountContext
func titlePanelForChatPresentationInterfaceState(_ chatPresentationInterfaceState: ChatPresentationInterfaceState, context: AccountContext, currentPanel: ChatTitleAccessoryPanelNode?, interfaceInteraction: ChatPanelInterfaceInteraction?) -> ChatTitleAccessoryPanelNode? {
diff --git a/submodules/TelegramUI/Sources/ChatLoadingNode.swift b/submodules/TelegramUI/Sources/ChatLoadingNode.swift
index fac49f4b8b..b0d1782f70 100644
--- a/submodules/TelegramUI/Sources/ChatLoadingNode.swift
+++ b/submodules/TelegramUI/Sources/ChatLoadingNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ActivityIndicator
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputGifPane.swift b/submodules/TelegramUI/Sources/ChatMediaInputGifPane.swift
index df19a573e0..0b158eb7b6 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputGifPane.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputGifPane.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import ContextUI
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputGridEntries.swift b/submodules/TelegramUI/Sources/ChatMediaInputGridEntries.swift
index e28034a746..8b51713f92 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputGridEntries.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputGridEntries.swift
@@ -1,7 +1,6 @@
import Postbox
import UIKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputMetaSectionItemNode.swift b/submodules/TelegramUI/Sources/ChatMediaInputMetaSectionItemNode.swift
index 3490c85396..cd4d66d743 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputMetaSectionItemNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputMetaSectionItemNode.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputNode.swift b/submodules/TelegramUI/Sources/ChatMediaInputNode.swift
index c514206dbb..243f33012b 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -509,7 +508,7 @@ final class ChatMediaInputNode: ChatInputNode {
self.listView.transform = CATransform3DMakeRotation(-CGFloat(Double.pi / 2.0), 0.0, 0.0, 1.0)
self.listView.scroller.panGestureRecognizer.cancelsTouchesInView = false
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
self.gifListView = ListView()
@@ -517,7 +516,7 @@ final class ChatMediaInputNode: ChatInputNode {
self.gifListView.transform = CATransform3DMakeRotation(-CGFloat(Double.pi / 2.0), 0.0, 0.0, 1.0)
self.gifListView.scroller.panGestureRecognizer.cancelsTouchesInView = false
self.gifListView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
var paneDidScrollImpl: ((ChatMediaInputPane, ChatMediaInputPaneScrollState, ContainedViewLayoutTransition) -> Void)?
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputPanelEntries.swift b/submodules/TelegramUI/Sources/ChatMediaInputPanelEntries.swift
index bb8b80ea07..13b73a9621 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputPanelEntries.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputPanelEntries.swift
@@ -1,7 +1,6 @@
import Postbox
import UIKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputPeerSpecificItem.swift b/submodules/TelegramUI/Sources/ChatMediaInputPeerSpecificItem.swift
index c2945daf59..1e588c200b 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputPeerSpecificItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputPeerSpecificItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputRecentGifsItem.swift b/submodules/TelegramUI/Sources/ChatMediaInputRecentGifsItem.swift
index 76ae81d613..2cb3a142a2 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputRecentGifsItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputRecentGifsItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputSettingsItem.swift b/submodules/TelegramUI/Sources/ChatMediaInputSettingsItem.swift
index a1e60e847a..e9997e0b7f 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputSettingsItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputSettingsItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputStickerGridItem.swift b/submodules/TelegramUI/Sources/ChatMediaInputStickerGridItem.swift
index 96b8f7ebc8..9254a99e15 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputStickerGridItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputStickerGridItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputStickerPackItem.swift b/submodules/TelegramUI/Sources/ChatMediaInputStickerPackItem.swift
index 49aea9ed90..85f5ad45a9 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputStickerPackItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputStickerPackItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputStickerPane.swift b/submodules/TelegramUI/Sources/ChatMediaInputStickerPane.swift
index f1a54e9d67..e6d95c017a 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputStickerPane.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputStickerPane.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputTrendingItem.swift b/submodules/TelegramUI/Sources/ChatMediaInputTrendingItem.swift
index 1c25f037f8..81de3c865e 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputTrendingItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputTrendingItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMediaInputTrendingPane.swift b/submodules/TelegramUI/Sources/ChatMediaInputTrendingPane.swift
index 603f0fb294..84c99533be 100644
--- a/submodules/TelegramUI/Sources/ChatMediaInputTrendingPane.swift
+++ b/submodules/TelegramUI/Sources/ChatMediaInputTrendingPane.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import MergeLists
@@ -316,7 +315,7 @@ final class ChatMediaInputTrendingPane: ChatMediaInputPane {
}
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
- strongSelf.controllerInteraction.navigationController()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).0, undo: false, info: info, topItem: items.first, context: strongSelf.context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
+ strongSelf.controllerInteraction.navigationController()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).string, undo: false, info: info, topItem: items.first, context: strongSelf.context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
return true
}))
}))
diff --git a/submodules/TelegramUI/Sources/ChatMessageActionButtonsNode.swift b/submodules/TelegramUI/Sources/ChatMessageActionButtonsNode.swift
index 6bc1c9f14f..c3697c6713 100644
--- a/submodules/TelegramUI/Sources/ChatMessageActionButtonsNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageActionButtonsNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatMessageActionItemNode.swift b/submodules/TelegramUI/Sources/ChatMessageActionItemNode.swift
index 1c098b049b..d6c9f0dd2e 100644
--- a/submodules/TelegramUI/Sources/ChatMessageActionItemNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageActionItemNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
import TelegramPresentationData
import TelegramUIPreferences
@@ -177,8 +176,6 @@ class ChatMessageActionBubbleContentNode: ChatMessageBubbleContentNode {
labelRects[i].size.height = 20.0
labelRects[i].origin.x = floor((labelLayout.size.width - labelRects[i].width) / 2.0)
}
-
- let serviceColor = serviceMessageColorComponents(theme: item.presentationData.theme.theme, wallpaper: item.presentationData.theme.wallpaper)
let backgroundMaskImage: (CGPoint, UIImage)?
var backgroundMaskUpdated = false
diff --git a/submodules/TelegramUI/Sources/ChatMessageActionUrlAuthController.swift b/submodules/TelegramUI/Sources/ChatMessageActionUrlAuthController.swift
index fef3a2d68d..583bbab9a2 100644
--- a/submodules/TelegramUI/Sources/ChatMessageActionUrlAuthController.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageActionUrlAuthController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import CheckNode
@@ -162,9 +161,9 @@ private final class ChatMessageActionUrlAuthAlertContentNode: AlertContentNode {
override func updateTheme(_ theme: AlertControllerTheme) {
self.titleNode.attributedText = NSAttributedString(string: strings.Conversation_OpenBotLinkTitle, font: Font.bold(17.0), textColor: theme.primaryColor, paragraphAlignment: .center)
- self.textNode.attributedText = formattedText(strings.Conversation_OpenBotLinkText(self.defaultUrl).0, color: theme.primaryColor, textAlignment: .center)
- self.authorizeLabelNode.attributedText = formattedText(strings.Conversation_OpenBotLinkLogin(self.domain, self.displayName).0, color: theme.primaryColor)
- self.allowWriteLabelNode.attributedText = formattedText(strings.Conversation_OpenBotLinkAllowMessages(self.bot.displayTitle(strings: self.strings, displayOrder: self.nameDisplayOrder)).0, color: theme.primaryColor)
+ self.textNode.attributedText = formattedText(strings.Conversation_OpenBotLinkText(self.defaultUrl).string, color: theme.primaryColor, textAlignment: .center)
+ self.authorizeLabelNode.attributedText = formattedText(strings.Conversation_OpenBotLinkLogin(self.domain, self.displayName).string, color: theme.primaryColor)
+ self.allowWriteLabelNode.attributedText = formattedText(strings.Conversation_OpenBotLinkAllowMessages(self.bot.displayTitle(strings: self.strings, displayOrder: self.nameDisplayOrder)).string, color: theme.primaryColor)
self.actionNodesSeparator.backgroundColor = theme.separatorColor
for actionNode in self.actionNodes {
diff --git a/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift b/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift
index 9735da77e8..6cb1ee9204 100644
--- a/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import CoreImage
import TelegramPresentationData
import Compression
@@ -855,7 +854,6 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
var replyMarkup: ReplyMarkupMessageAttribute?
var ignoreForward = self.telegramDice == nil
- var ignoreSource = false
let availableContentWidth = max(60.0, params.width - params.leftInset - params.rightInset - max(imageSize.width, 160.0) - 20.0 - layoutConstants.bubble.edgeInset * 2.0 - avatarInset - layoutConstants.bubble.contentInsets.left)
@@ -865,8 +863,6 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
if let attribute = attribute as? SourceReferenceMessageAttribute {
if attribute.messageId.peerId == forwardInfo.author?.id {
ignoreForward = true
- } else {
- ignoreSource = true
}
break
}
@@ -888,7 +884,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
let bodyAttributes = MarkdownAttributeSet(font: nameFont, textColor: inlineBotNameColor)
let boldAttributes = MarkdownAttributeSet(font: inlineBotPrefixFont, textColor: inlineBotNameColor)
- let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)"), body: bodyAttributes, argumentAttributes: [0: boldAttributes])
+ let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)")._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
viaBotApply = viaBotLayout(TextNodeLayoutArguments(attributedString: botString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: max(0, availableContentWidth), height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
}
@@ -1349,16 +1345,9 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
})
} else if let _ = self.emojiFile {
if let animationNode = self.animationNode as? AnimatedStickerNode, let _ = recognizer {
- var startTime: Signal
var shouldPlay = false
if !animationNode.isPlaying {
shouldPlay = true
- startTime = .single(0.0)
- } else {
- startTime = animationNode.status
- |> map { $0.timestamp }
- |> take(1)
- |> deliverOnMainQueue
}
let beatingHearts: [UInt32] = [0x2764, 0x1F90E, 0x1F9E1, 0x1F499, 0x1F49A, 0x1F49C, 0x1F49B, 0x1F5A4, 0x1F90D]
@@ -1508,6 +1497,8 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
var bounds = self.bounds
bounds.origin.x = -translation.x
self.bounds = bounds
+
+ self.updateAttachedAvatarNodeOffset(offset: translation.x, transition: .immediate)
if let swipeToReplyNode = self.swipeToReplyNode {
swipeToReplyNode.frame = CGRect(origin: CGPoint(x: bounds.size.width, y: floor((self.contentSize.height - 33.0) / 2.0)), size: CGSize(width: 33.0, height: 33.0))
@@ -1543,6 +1534,9 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
bounds.origin.x = 0.0
self.bounds = bounds
self.layer.animateBounds(from: previousBounds, to: bounds, duration: 0.3, timingFunction: kCAMediaTimingFunctionSpring)
+
+ self.updateAttachedAvatarNodeOffset(offset: 0.0, transition: .animated(duration: 0.3, curve: .spring))
+
if let swipeToReplyNode = self.swipeToReplyNode {
self.swipeToReplyNode = nil
swipeToReplyNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false, completion: { [weak swipeToReplyNode] _ in
diff --git a/submodules/TelegramUI/Sources/ChatMessageAttachedContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageAttachedContentNode.swift
index d01b40ed2e..d1b73fc1a4 100644
--- a/submodules/TelegramUI/Sources/ChatMessageAttachedContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageAttachedContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
@@ -460,7 +459,7 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
switch preparePosition {
case .linear(_, .None), .linear(_, .Neighbour(true, _, _)):
if let count = webpageGalleryMediaCount {
- additionalImageBadgeContent = .text(inset: 0.0, backgroundColor: presentationData.theme.theme.chat.message.mediaDateAndStatusFillColor, foregroundColor: presentationData.theme.theme.chat.message.mediaDateAndStatusTextColor, text: NSAttributedString(string: presentationData.strings.Items_NOfM("1", "\(count)").0))
+ additionalImageBadgeContent = .text(inset: 0.0, backgroundColor: presentationData.theme.theme.chat.message.mediaDateAndStatusFillColor, foregroundColor: presentationData.theme.theme.chat.message.mediaDateAndStatusTextColor, text: NSAttributedString(string: presentationData.strings.Items_NOfM("1", "\(count)").string))
skipStandardStatus = isImage
} else if let mediaBadge = mediaBadge {
additionalImageBadgeContent = .text(inset: 0.0, backgroundColor: presentationData.theme.theme.chat.message.mediaDateAndStatusFillColor, foregroundColor: presentationData.theme.theme.chat.message.mediaDateAndStatusTextColor, text: NSAttributedString(string: mediaBadge))
diff --git a/submodules/TelegramUI/Sources/ChatMessageAvatarAccessoryItem.swift b/submodules/TelegramUI/Sources/ChatMessageAvatarAccessoryItem.swift
index 6fdbe08baa..010ad7b8df 100644
--- a/submodules/TelegramUI/Sources/ChatMessageAvatarAccessoryItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageAvatarAccessoryItem.swift
@@ -4,7 +4,6 @@ import Postbox
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AvatarNode
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageBubbleContentNode.swift
index c91e035fe0..01a062a262 100644
--- a/submodules/TelegramUI/Sources/ChatMessageBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageBubbleContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageBubbleItemNode.swift b/submodules/TelegramUI/Sources/ChatMessageBubbleItemNode.swift
index 20c41358ed..ae3f0cc1a0 100644
--- a/submodules/TelegramUI/Sources/ChatMessageBubbleItemNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageBubbleItemNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TextFormat
@@ -1561,8 +1560,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
} else {
authorNameColor = item.presentationData.theme.theme.chat.message.outgoing.accentTextColor
}
-
- var isScam = effectiveAuthor.isScam
+
if case let .peer(peerId) = item.chatLocation, let authorPeerId = item.message.author?.id, authorPeerId == peerId {
} else if effectiveAuthor.isScam {
@@ -1735,7 +1733,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
let mutableString = NSMutableAttributedString(string: "\(authorNameString) ", attributes: [NSAttributedString.Key.font: nameFont, NSAttributedString.Key.foregroundColor: authorNameColor])
let bodyAttributes = MarkdownAttributeSet(font: nameFont, textColor: inlineBotNameColor)
let boldAttributes = MarkdownAttributeSet(font: inlineBotPrefixFont, textColor: inlineBotNameColor)
- let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)"), body: bodyAttributes, argumentAttributes: [0: boldAttributes])
+ let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)")._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
mutableString.append(botString)
attributedString = mutableString
} else if let authorNameString = authorNameString, let authorNameColor = authorNameColor {
@@ -1743,7 +1741,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
} else if let inlineBotNameString = inlineBotNameString {
let bodyAttributes = MarkdownAttributeSet(font: inlineBotPrefixFont, textColor: inlineBotNameColor)
let boldAttributes = MarkdownAttributeSet(font: nameFont, textColor: inlineBotNameColor)
- attributedString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)"), body: bodyAttributes, argumentAttributes: [0: boldAttributes])
+ attributedString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)")._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
} else {
attributedString = NSAttributedString(string: "", font: nameFont, textColor: inlineBotNameColor)
}
@@ -1861,7 +1859,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
}
for i in 0 ..< contentPropertiesAndLayouts.count {
- let (_, contentNodeProperties, preparePosition, attributes, contentNodeLayout, contentGroupId, itemSelection) = contentPropertiesAndLayouts[i]
+ let (_, contentNodeProperties, preparePosition, _, contentNodeLayout, contentGroupId, itemSelection) = contentPropertiesAndLayouts[i]
if let mosaicRange = mosaicRange, mosaicRange.contains(i), let (framesAndPositions, size) = calculatedGroupFramesAndSize {
let mosaicIndex = i - mosaicRange.lowerBound
@@ -2517,19 +2515,19 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
}
contextSourceNode.updateAbsoluteRect = { [weak strongSelf, weak container, weak contextSourceNode] rect, size in
- guard let strongSelf = strongSelf, let strongContextSourceNode = contextSourceNode, strongContextSourceNode.isExtractedToContextPreview else {
+ guard let _ = strongSelf, let strongContextSourceNode = contextSourceNode, strongContextSourceNode.isExtractedToContextPreview else {
return
}
container?.updateAbsoluteRect(relativeFrame.offsetBy(dx: rect.minX, dy: rect.minY), within: size)
}
contextSourceNode.applyAbsoluteOffset = { [weak strongSelf, weak container, weak contextSourceNode] value, animationCurve, duration in
- guard let strongSelf = strongSelf, let strongContextSourceNode = contextSourceNode, strongContextSourceNode.isExtractedToContextPreview else {
+ guard let _ = strongSelf, let strongContextSourceNode = contextSourceNode, strongContextSourceNode.isExtractedToContextPreview else {
return
}
container?.applyAbsoluteOffset(value: value, animationCurve: animationCurve, duration: duration)
}
contextSourceNode.applyAbsoluteOffsetSpring = { [weak strongSelf, weak container, weak contextSourceNode] value, duration, damping in
- guard let strongSelf = strongSelf, let strongContextSourceNode = contextSourceNode, strongContextSourceNode.isExtractedToContextPreview else {
+ guard let _ = strongSelf, let strongContextSourceNode = contextSourceNode, strongContextSourceNode.isExtractedToContextPreview else {
return
}
container?.applyAbsoluteOffsetSpring(value: value, duration: duration, damping: damping)
@@ -3659,6 +3657,8 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
var shadowBounds = self.shadowNode.bounds
shadowBounds.origin.x = -translation.x
self.shadowNode.bounds = shadowBounds
+
+ self.updateAttachedAvatarNodeOffset(offset: translation.x, transition: .immediate)
if let swipeToReplyNode = self.swipeToReplyNode {
swipeToReplyNode.frame = CGRect(origin: CGPoint(x: bounds.size.width, y: floor((self.contentSize.height - 33.0) / 2.0)), size: CGSize(width: 33.0, height: 33.0))
@@ -3698,6 +3698,9 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
shadowBounds.origin.x = 0.0
self.shadowNode.bounds = shadowBounds
self.layer.animateBounds(from: previousBounds, to: bounds, duration: 0.3, timingFunction: kCAMediaTimingFunctionSpring)
+
+ self.updateAttachedAvatarNodeOffset(offset: 0.0, transition: .animated(duration: 0.3, curve: .spring))
+
self.shadowNode.layer.animateBounds(from: previousShadowBounds, to: shadowBounds, duration: 0.3, timingFunction: kCAMediaTimingFunctionSpring)
if let swipeToReplyNode = self.swipeToReplyNode {
self.swipeToReplyNode = nil
diff --git a/submodules/TelegramUI/Sources/ChatMessageCallBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageCallBubbleContentNode.swift
index 92c898bb44..b1dc6ef568 100644
--- a/submodules/TelegramUI/Sources/ChatMessageCallBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageCallBubbleContentNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import AppBundle
@@ -70,7 +69,6 @@ class ChatMessageCallBubbleContentNode: ChatMessageBubbleContentNode {
return { item, layoutConstants, _, _, _ in
let contentProperties = ChatMessageBubbleContentProperties(hidesSimpleAuthorHeader: false, headerSpacing: 0.0, hidesBackground: .never, forceFullCorners: false, forceAlignment: .none)
return (contentProperties, nil, CGFloat.greatestFiniteMagnitude, { constrainedSize, position in
- let message = item.message
let incoming = item.message.effectivelyIncoming(item.context.account.peerId)
let horizontalInset = layoutConstants.text.bubbleInsets.left + layoutConstants.text.bubbleInsets.right
@@ -173,7 +171,7 @@ class ChatMessageCallBubbleContentNode: ChatMessageBubbleContentNode {
let statusText: String
if let callDuration = callDuration, callDuration > 1 {
- statusText = item.presentationData.strings.Notification_CallFormat(dateText, callDurationString(strings: item.presentationData.strings, value: callDuration)).0
+ statusText = item.presentationData.strings.Notification_CallFormat(dateText, callDurationString(strings: item.presentationData.strings, value: callDuration)).string
} else {
statusText = dateText
}
diff --git a/submodules/TelegramUI/Sources/ChatMessageCommentFooterContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageCommentFooterContentNode.swift
index 68db9b3bab..973dbf4a56 100644
--- a/submodules/TelegramUI/Sources/ChatMessageCommentFooterContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageCommentFooterContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import RadialStatusNode
import AnimatedCountLabelNode
@@ -160,24 +159,25 @@ final class ChatMessageCommentFooterContentNode: ChatMessageBubbleContentNode {
var segments: [AnimatedCountLabelNode.Segment] = []
- let (rawText, ranges) = item.presentationData.strings.Conversation_MessageViewCommentsFormat("\(dateReplies)", commentsPart)
+ let textAndRanges = item.presentationData.strings.Conversation_MessageViewCommentsFormat("\(dateReplies)", commentsPart)
+ let rawText = textAndRanges.string
var textIndex = 0
var latestIndex = 0
- for (index, range) in ranges {
- var lowerSegmentIndex = range.lowerBound
- if index != 0 {
+ for indexAndRange in textAndRanges.ranges {
+ var lowerSegmentIndex = indexAndRange.range.lowerBound
+ if indexAndRange.index != 0 {
lowerSegmentIndex = min(lowerSegmentIndex, latestIndex)
} else {
- if latestIndex < range.lowerBound {
- let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: latestIndex) ..< rawText.index(rawText.startIndex, offsetBy: range.lowerBound)])
+ if latestIndex < indexAndRange.range.lowerBound {
+ let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: latestIndex) ..< rawText.index(rawText.startIndex, offsetBy: indexAndRange.range.lowerBound)])
segments.append(.text(textIndex, NSAttributedString(string: part, font: textFont, textColor: messageTheme.accentTextColor)))
textIndex += 1
}
}
- latestIndex = range.upperBound
+ latestIndex = indexAndRange.range.upperBound
- let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: lowerSegmentIndex) ..< rawText.index(rawText.startIndex, offsetBy: min(rawText.count, range.upperBound))])
- if index == 0 {
+ let part = String(rawText[rawText.index(rawText.startIndex, offsetBy: lowerSegmentIndex) ..< rawText.index(rawText.startIndex, offsetBy: min(rawText.count, indexAndRange.range.upperBound))])
+ if indexAndRange.index == 0 {
segments.append(.number(dateReplies, NSAttributedString(string: part, font: textFont, textColor: messageTheme.accentTextColor)))
} else {
segments.append(.text(textIndex, NSAttributedString(string: part, font: textFont, textColor: messageTheme.accentTextColor)))
diff --git a/submodules/TelegramUI/Sources/ChatMessageContactBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageContactBubbleContentNode.swift
index becd445ba4..2b8b6c441f 100644
--- a/submodules/TelegramUI/Sources/ChatMessageContactBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageContactBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AvatarNode
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageDateAndStatusNode.swift b/submodules/TelegramUI/Sources/ChatMessageDateAndStatusNode.swift
index d7856d1496..bba9996b08 100644
--- a/submodules/TelegramUI/Sources/ChatMessageDateAndStatusNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageDateAndStatusNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import SwiftSignalKit
import TelegramPresentationData
@@ -215,7 +214,6 @@ class ChatMessageDateAndStatusNode: ASDisplayNode {
var currentBackgroundNode = self.backgroundNode
var currentImpressionIcon = self.impressionIcon
var currentRepliesIcon = self.repliesIcon
- var currentSelfExpiringIcon = self.selfExpiringIcon
let currentType = self.type
let currentTheme = self.theme
diff --git a/submodules/TelegramUI/Sources/ChatMessageDateHeader.swift b/submodules/TelegramUI/Sources/ChatMessageDateHeader.swift
index 4dec9bcd94..afd4e1a69b 100644
--- a/submodules/TelegramUI/Sources/ChatMessageDateHeader.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageDateHeader.swift
@@ -4,9 +4,9 @@ import Display
import AsyncDisplayKit
import TelegramPresentationData
import Postbox
-import SyncCore
import AccountContext
import AvatarNode
+import TelegramCore
private let timezoneOffset: Int32 = {
let nowTimestamp = Int32(CFAbsoluteTimeGetCurrent() + NSTimeIntervalSince1970)
@@ -42,6 +42,14 @@ final class ChatMessageDateHeader: ListViewItemHeader {
let stickOverInsets: Bool = true
let height: CGFloat = 34.0
+
+ public func combinesWith(other: ListViewItemHeader) -> Bool {
+ if let other = other as? ChatMessageDateHeader, other.id == self.id {
+ return true
+ } else {
+ return false
+ }
+ }
func node(synchronousLoad: Bool) -> ListViewItemHeaderNode {
return ChatMessageDateHeaderNode(localTimestamp: self.roundedTimestamp, scheduled: self.scheduled, presentationData: self.presentationData, context: self.context, action: self.action)
@@ -145,10 +153,10 @@ final class ChatMessageDateHeaderNode: ListViewItemHeaderNode {
if timeinfo.tm_yday == timeinfoNow.tm_yday {
text = presentationData.strings.Weekday_Today
} else {
- text = presentationData.strings.Date_ChatDateHeader(monthAtIndex(Int(timeinfo.tm_mon), strings: presentationData.strings), "\(timeinfo.tm_mday)").0
+ text = presentationData.strings.Date_ChatDateHeader(monthAtIndex(Int(timeinfo.tm_mon), strings: presentationData.strings), "\(timeinfo.tm_mday)").string
}
} else {
- text = presentationData.strings.Date_ChatDateHeaderYear(monthAtIndex(Int(timeinfo.tm_mon), strings: presentationData.strings), "\(timeinfo.tm_mday)", "\(1900 + timeinfo.tm_year)").0
+ text = presentationData.strings.Date_ChatDateHeaderYear(monthAtIndex(Int(timeinfo.tm_mon), strings: presentationData.strings), "\(timeinfo.tm_mday)", "\(1900 + timeinfo.tm_year)").string
}
if scheduled {
@@ -157,7 +165,7 @@ final class ChatMessageDateHeaderNode: ListViewItemHeaderNode {
} else if timeinfo.tm_year == timeinfoNow.tm_year && timeinfo.tm_yday == timeinfoNow.tm_yday {
text = presentationData.strings.ScheduledMessages_ScheduledToday
} else {
- text = presentationData.strings.ScheduledMessages_ScheduledDate(text).0
+ text = presentationData.strings.ScheduledMessages_ScheduledDate(text).string
}
}
self.text = text
@@ -316,14 +324,22 @@ final class ChatMessageAvatarHeader: ListViewItemHeader {
let peerId: PeerId
let peer: Peer?
let messageReference: MessageReference?
+ let effectiveTimestamp: Int32
let presentationData: ChatPresentationData
let context: AccountContext
let controllerInteraction: ChatControllerInteraction
- init(timestamp: Int32, peerId: PeerId, peer: Peer?, messageReference: MessageReference?, presentationData: ChatPresentationData, context: AccountContext, controllerInteraction: ChatControllerInteraction) {
+ init(timestamp: Int32, peerId: PeerId, peer: Peer?, messageReference: MessageReference?, message: Message, presentationData: ChatPresentationData, context: AccountContext, controllerInteraction: ChatControllerInteraction) {
self.peerId = peerId
self.peer = peer
self.messageReference = messageReference
+
+ var effectiveTimestamp = message.timestamp
+ if let forwardInfo = message.forwardInfo, forwardInfo.flags.contains(.isImported) {
+ effectiveTimestamp = forwardInfo.date
+ }
+ self.effectiveTimestamp = effectiveTimestamp
+
self.presentationData = presentationData
self.context = context
self.controllerInteraction = controllerInteraction
@@ -335,6 +351,17 @@ final class ChatMessageAvatarHeader: ListViewItemHeader {
let height: CGFloat = 38.0
+ public func combinesWith(other: ListViewItemHeader) -> Bool {
+ if let other = other as? ChatMessageAvatarHeader, other.id == self.id {
+ if abs(self.effectiveTimestamp - other.effectiveTimestamp) >= 10 * 60 {
+ return false
+ }
+ return true
+ } else {
+ return false
+ }
+ }
+
func node(synchronousLoad: Bool) -> ListViewItemHeaderNode {
return ChatMessageAvatarHeaderNode(peerId: self.peerId, peer: self.peer, messageReference: self.messageReference, presentationData: self.presentationData, context: self.context, controllerInteraction: self.controllerInteraction, synchronousLoad: synchronousLoad)
}
diff --git a/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousDescriptionContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousDescriptionContentNode.swift
index 5b3cbb1970..04791e6eeb 100644
--- a/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousDescriptionContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousDescriptionContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
final class ChatMessageEventLogPreviousDescriptionContentNode: ChatMessageBubbleContentNode {
private let contentNode: ChatMessageAttachedContentNode
diff --git a/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousLinkContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousLinkContentNode.swift
index c481ff165c..08706ba0a5 100644
--- a/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousLinkContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousLinkContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
final class ChatMessageEventLogPreviousLinkContentNode: ChatMessageBubbleContentNode {
private let contentNode: ChatMessageAttachedContentNode
diff --git a/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousMessageContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousMessageContentNode.swift
index b0e5ba0891..f958b26b8a 100644
--- a/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousMessageContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageEventLogPreviousMessageContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
final class ChatMessageEventLogPreviousMessageContentNode: ChatMessageBubbleContentNode {
private let contentNode: ChatMessageAttachedContentNode
diff --git a/submodules/TelegramUI/Sources/ChatMessageFileBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageFileBubbleContentNode.swift
index 4e374f4aa3..45cbb914ab 100644
--- a/submodules/TelegramUI/Sources/ChatMessageFileBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageFileBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
class ChatMessageFileBubbleContentNode: ChatMessageBubbleContentNode {
diff --git a/submodules/TelegramUI/Sources/ChatMessageForwardInfoNode.swift b/submodules/TelegramUI/Sources/ChatMessageForwardInfoNode.swift
index cc0a226842..91e6b77ac2 100644
--- a/submodules/TelegramUI/Sources/ChatMessageForwardInfoNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageForwardInfoNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import LocalizedPeerData
@@ -119,7 +118,7 @@ class ChatMessageForwardInfoNode: ASDisplayNode {
}
let titleColor: UIColor
- let completeSourceString: (String, [(Int, NSRange)])
+ let completeSourceString: PresentationStrings.FormattedString
switch type {
case let .bubble(incoming):
@@ -140,9 +139,9 @@ class ChatMessageForwardInfoNode: ASDisplayNode {
let rightPart = String(customFormat[range.upperBound...])
let formattedText = leftPart + peerString + rightPart
- completeSourceString = (formattedText, [(0, NSRange(location: leftPart.count, length: peerString.count))])
+ completeSourceString = PresentationStrings.FormattedString(string: formattedText, ranges: [PresentationStrings.FormattedString.Range(index: 0, range: NSRange(location: leftPart.count, length: peerString.count))])
} else {
- completeSourceString = (customFormat, [])
+ completeSourceString = PresentationStrings.FormattedString(string: customFormat, ranges: [])
}
} else {
completeSourceString = strings.Message_GenericForwardedPsa(peerString)
@@ -170,9 +169,9 @@ class ChatMessageForwardInfoNode: ASDisplayNode {
let rightPart = String(customFormat[range.upperBound...])
let formattedText = leftPart + peerString + rightPart
- completeSourceString = (formattedText, [(0, NSRange(location: leftPart.count, length: peerString.count))])
+ completeSourceString = PresentationStrings.FormattedString(string: formattedText, ranges: [PresentationStrings.FormattedString.Range(index: 0, range: NSRange(location: leftPart.count, length: peerString.count))])
} else {
- completeSourceString = (customFormat, [])
+ completeSourceString = PresentationStrings.FormattedString(string: customFormat, ranges: [])
}
} else {
completeSourceString = strings.Message_GenericForwardedPsa(peerString)
@@ -214,9 +213,9 @@ class ChatMessageForwardInfoNode: ASDisplayNode {
highlight = false
}
- let completeString: NSString = completeSourceString.0 as NSString
+ let completeString: NSString = completeSourceString.string as NSString
let string = NSMutableAttributedString(string: completeString as String, attributes: [NSAttributedString.Key.foregroundColor: titleColor, NSAttributedString.Key.font: prefixFont])
- if highlight, let range = completeSourceString.1.first?.1 {
+ if highlight, let range = completeSourceString.ranges.first?.range {
string.addAttributes([NSAttributedString.Key.font: peerFont], range: range)
}
diff --git a/submodules/TelegramUI/Sources/ChatMessageGameBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageGameBubbleContentNode.swift
index 240ee141fa..b17ed19d17 100644
--- a/submodules/TelegramUI/Sources/ChatMessageGameBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageGameBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
final class ChatMessageGameBubbleContentNode: ChatMessageBubbleContentNode {
private var game: TelegramMediaGame?
diff --git a/submodules/TelegramUI/Sources/ChatMessageInstantVideoItemNode.swift b/submodules/TelegramUI/Sources/ChatMessageInstantVideoItemNode.swift
index 259c5d5e0b..e35dd7516d 100644
--- a/submodules/TelegramUI/Sources/ChatMessageInstantVideoItemNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageInstantVideoItemNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TextFormat
@@ -399,7 +398,7 @@ class ChatMessageInstantVideoItemNode: ChatMessageItemView, UIGestureRecognizerD
let bodyAttributes = MarkdownAttributeSet(font: nameFont, textColor: inlineBotNameColor)
let boldAttributes = MarkdownAttributeSet(font: inlineBotPrefixFont, textColor: inlineBotNameColor)
- let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)"), body: bodyAttributes, argumentAttributes: [0: boldAttributes])
+ let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)")._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
viaBotApply = viaBotLayout(TextNodeLayoutArguments(attributedString: botString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: max(0, availableWidth), height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
}
@@ -441,8 +440,6 @@ class ChatMessageInstantVideoItemNode: ChatMessageItemView, UIGestureRecognizerD
replyBackgroundImage = graphics.chatFreeformContentAdditionalInfoBackgroundImage
}
- var updatedShareButtonBackground: UIImage?
-
var updatedShareButtonNode: ChatMessageShareButton?
if needShareButton {
if currentShareButtonNode != nil {
@@ -875,7 +872,7 @@ class ChatMessageInstantVideoItemNode: ChatMessageItemView, UIGestureRecognizerD
private var wasPlaying = false
@objc func seekGesture(_ recognizer: UIPanGestureRecognizer) {
- var location = recognizer.location(in: self.interactiveVideoNode.view)
+ let location = recognizer.location(in: self.interactiveVideoNode.view)
switch recognizer.state {
case .began:
self.interactiveVideoNode.pause()
@@ -916,6 +913,8 @@ class ChatMessageInstantVideoItemNode: ChatMessageItemView, UIGestureRecognizerD
var bounds = self.bounds
bounds.origin.x = -translation.x
self.bounds = bounds
+
+ self.updateAttachedAvatarNodeOffset(offset: translation.x, transition: .immediate)
if let swipeToReplyNode = self.swipeToReplyNode {
swipeToReplyNode.frame = CGRect(origin: CGPoint(x: bounds.size.width, y: floor((self.contentSize.height - 33.0) / 2.0)), size: CGSize(width: 33.0, height: 33.0))
@@ -951,6 +950,9 @@ class ChatMessageInstantVideoItemNode: ChatMessageItemView, UIGestureRecognizerD
bounds.origin.x = 0.0
self.bounds = bounds
self.layer.animateBounds(from: previousBounds, to: bounds, duration: 0.3, timingFunction: kCAMediaTimingFunctionSpring)
+
+ self.updateAttachedAvatarNodeOffset(offset: 0.0, transition: .animated(duration: 0.3, curve: .spring))
+
if let swipeToReplyNode = self.swipeToReplyNode {
self.swipeToReplyNode = nil
swipeToReplyNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false, completion: { [weak swipeToReplyNode] _ in
diff --git a/submodules/TelegramUI/Sources/ChatMessageInteractiveFileNode.swift b/submodules/TelegramUI/Sources/ChatMessageInteractiveFileNode.swift
index 6cdc96120a..e3e40ed745 100644
--- a/submodules/TelegramUI/Sources/ChatMessageInteractiveFileNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageInteractiveFileNode.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import UniversalMediaPlayer
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageInteractiveInstantVideoNode.swift b/submodules/TelegramUI/Sources/ChatMessageInteractiveInstantVideoNode.swift
index f5f84b52b3..8f4687b0af 100644
--- a/submodules/TelegramUI/Sources/ChatMessageInteractiveInstantVideoNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageInteractiveInstantVideoNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import UniversalMediaPlayer
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift b/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift
index 37419dec04..ee678fd115 100644
--- a/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageInteractiveMediaNode.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import UniversalMediaPlayer
@@ -1058,7 +1057,6 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTransitio
if visibility {
return fetchSignal
|> mapToSignal { _ -> Signal in
- return .complete()
}
} else {
return .complete()
diff --git a/submodules/TelegramUI/Sources/ChatMessageInvoiceBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageInvoiceBubbleContentNode.swift
index b38c677bcc..e8f5830a2f 100644
--- a/submodules/TelegramUI/Sources/ChatMessageInvoiceBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageInvoiceBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramStringFormatting
diff --git a/submodules/TelegramUI/Sources/ChatMessageItem.swift b/submodules/TelegramUI/Sources/ChatMessageItem.swift
index 897e312c27..fc9b4e2388 100644
--- a/submodules/TelegramUI/Sources/ChatMessageItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
@@ -358,7 +357,7 @@ public final class ChatMessageItem: ListViewItem, CustomStringConvertible {
if !hasActionMedia && !isBroadcastChannel {
if let effectiveAuthor = effectiveAuthor {
//accessoryItem = ChatMessageAvatarAccessoryItem(context: context, peerId: effectiveAuthor.id, peer: effectiveAuthor, messageReference: MessageReference(message), messageTimestamp: content.index.timestamp, forwardInfo: message.forwardInfo, emptyColor: presentationData.theme.theme.chat.message.incoming.bubble.withoutWallpaper.fill, controllerInteraction: controllerInteraction)
- avatarHeader = ChatMessageAvatarHeader(timestamp: content.index.timestamp, peerId: effectiveAuthor.id, peer: effectiveAuthor, messageReference: MessageReference(message), presentationData: presentationData, context: context, controllerInteraction: controllerInteraction)
+ avatarHeader = ChatMessageAvatarHeader(timestamp: content.index.timestamp, peerId: effectiveAuthor.id, peer: effectiveAuthor, messageReference: MessageReference(message), message: message, presentationData: presentationData, context: context, controllerInteraction: controllerInteraction)
}
}
}
diff --git a/submodules/TelegramUI/Sources/ChatMessageItemView.swift b/submodules/TelegramUI/Sources/ChatMessageItemView.swift
index c335e2e79a..ae3870994d 100644
--- a/submodules/TelegramUI/Sources/ChatMessageItemView.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageItemView.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
import LocalizedPeerData
import ContextUI
@@ -215,7 +214,7 @@ final class ChatMessageAccessibilityData {
if let _ = media as? TelegramMediaImage {
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_PhotoFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_PhotoFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_Photo
}
@@ -226,19 +225,19 @@ final class ChatMessageAccessibilityData {
if !message.text.isEmpty {
text.append("\n")
- text.append(item.presentationData.strings.VoiceOver_Chat_Caption(message.text).0)
+ text.append(item.presentationData.strings.VoiceOver_Chat_Caption(message.text).string)
}
} else if let file = media as? TelegramMediaFile {
var isSpecialFile = false
for attribute in file.attributes {
switch attribute {
- case let .Sticker(displayText, packReference, _):
+ case let .Sticker(displayText, _, _):
isSpecialFile = true
text = displayText
if file.mimeType == "application/x-tgsticker" {
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_AnimatedStickerFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_AnimatedStickerFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_AnimatedSticker
}
@@ -248,7 +247,7 @@ final class ChatMessageAccessibilityData {
} else {
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_StickerFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_StickerFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_Sticker
}
@@ -266,19 +265,19 @@ final class ChatMessageAccessibilityData {
let durationString = voiceMessageDurationFormatter.string(from: Double(audio.duration)) ?? ""
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_VoiceMessageFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_VoiceMessageFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_VoiceMessage
}
} else {
label = item.presentationData.strings.VoiceOver_Chat_YourVoiceMessage
}
- text = item.presentationData.strings.VoiceOver_Chat_Duration(durationString).0
+ text = item.presentationData.strings.VoiceOver_Chat_Duration(durationString).string
} else {
let durationString = musicDurationFormatter.string(from: Double(audio.duration)) ?? ""
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_MusicFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_MusicFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_Music
}
@@ -288,8 +287,8 @@ final class ChatMessageAccessibilityData {
let performer = audio.performer ?? "Unknown"
let title = audio.title ?? "Unknown"
- text = item.presentationData.strings.VoiceOver_Chat_MusicTitle(title, performer).0
- text.append(item.presentationData.strings.VoiceOver_Chat_Duration(durationString).0)
+ text = item.presentationData.strings.VoiceOver_Chat_MusicTitle(title, performer).string
+ text.append(item.presentationData.strings.VoiceOver_Chat_Duration(durationString).string)
}
case let .Video(video):
isSpecialFile = true
@@ -301,7 +300,7 @@ final class ChatMessageAccessibilityData {
if video.flags.contains(.instantRoundVideo) {
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_VideoMessageFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_VideoMessageFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_VideoMessage
}
@@ -311,7 +310,7 @@ final class ChatMessageAccessibilityData {
} else {
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_VideoFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_VideoFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_Video
}
@@ -319,7 +318,7 @@ final class ChatMessageAccessibilityData {
label = item.presentationData.strings.VoiceOver_Chat_YourVideo
}
}
- text = item.presentationData.strings.VoiceOver_Chat_Duration(durationString).0
+ text = item.presentationData.strings.VoiceOver_Chat_Duration(durationString).string
default:
break
}
@@ -331,7 +330,7 @@ final class ChatMessageAccessibilityData {
let sizeString = fileSizeFormatter.string(fromByteCount: Int64(file.size ?? 0))
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_FileFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_FileFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_File
}
@@ -339,17 +338,17 @@ final class ChatMessageAccessibilityData {
label = item.presentationData.strings.VoiceOver_Chat_YourFile
}
text = "\(file.fileName ?? ""). "
- text.append(item.presentationData.strings.VoiceOver_Chat_Size(sizeString).0)
+ text.append(item.presentationData.strings.VoiceOver_Chat_Size(sizeString).string)
}
if !message.text.isEmpty {
text.append("\n")
- text.append(item.presentationData.strings.VoiceOver_Chat_Caption(message.text).0)
+ text.append(item.presentationData.strings.VoiceOver_Chat_Caption(message.text).string)
}
break loop
} else if let webpage = media as? TelegramMediaWebpage, case let .Loaded(content) = webpage.content {
var contentText = item.presentationData.strings.VoiceOver_Chat_PagePreview + ". "
if let title = content.title, !title.isEmpty {
- contentText.append(item.presentationData.strings.VoiceOver_Chat_Title(title).0)
+ contentText.append(item.presentationData.strings.VoiceOver_Chat_Title(title).string)
contentText.append(". ")
}
if let text = content.text, !text.isEmpty {
@@ -359,7 +358,7 @@ final class ChatMessageAccessibilityData {
} else if let contact = media as? TelegramMediaContact {
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_ContactFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_ContactFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_Contact
}
@@ -438,13 +437,13 @@ final class ChatMessageAccessibilityData {
text.append("\(emailAddressesString). ")
}
if !organizationString.isEmpty {
- text.append(item.presentationData.strings.VoiceOver_Chat_ContactOrganization(organizationString).0)
+ text.append(item.presentationData.strings.VoiceOver_Chat_ContactOrganization(organizationString).string)
text.append(".")
}
} else if let poll = media as? TelegramMediaPoll {
if isIncoming {
if announceIncomingAuthors, let authorName = authorName {
- label = item.presentationData.strings.VoiceOver_Chat_AnonymousPollFrom(authorName).0
+ label = item.presentationData.strings.VoiceOver_Chat_AnonymousPollFrom(authorName).string
} else {
label = item.presentationData.strings.VoiceOver_Chat_AnonymousPoll
}
@@ -491,7 +490,7 @@ final class ChatMessageAccessibilityData {
optionVoterCounts = Array(repeating: 0, count: poll.options.count)
}
- text = item.presentationData.strings.VoiceOver_Chat_Title(poll.text).0
+ text = item.presentationData.strings.VoiceOver_Chat_Title(poll.text).string
text.append(". ")
text.append(item.presentationData.strings.VoiceOver_Chat_PollOptionCount(Int32(poll.options.count)))
@@ -603,7 +602,7 @@ final class ChatMessageAccessibilityData {
var replyLabel: String
if replyMessage.flags.contains(.Incoming) {
if let author = replyMessage.author {
- replyLabel = item.presentationData.strings.VoiceOver_Chat_ReplyFrom(author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)).0
+ replyLabel = item.presentationData.strings.VoiceOver_Chat_ReplyFrom(author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)).string
} else {
replyLabel = item.presentationData.strings.VoiceOver_Chat_Reply
}
@@ -639,7 +638,7 @@ final class ChatMessageAccessibilityData {
} else {
peerString = ""
}
- forwardLabel = item.presentationData.strings.VoiceOver_Chat_ForwardedFrom(peerString).0
+ forwardLabel = item.presentationData.strings.VoiceOver_Chat_ForwardedFrom(peerString).string
}
label = "\(forwardLabel). \(label)"
}
@@ -875,4 +874,18 @@ public class ChatMessageItemView: ListViewItemNode {
func getStatusNode() -> ASDisplayNode? {
return nil
}
+
+ private var attachedAvatarNodeOffset: CGFloat = 0.0
+
+ override public func attachedHeaderNodesUpdated() {
+ self.updateAttachedAvatarNodeOffset(offset: self.attachedAvatarNodeOffset, transition: .immediate)
+ }
+
+ func updateAttachedAvatarNodeOffset(offset: CGFloat, transition: ContainedViewLayoutTransition) {
+ for headerNode in self.attachedHeaderNodes {
+ if let headerNode = headerNode as? ChatMessageAvatarHeaderNode {
+ transition.updateSublayerTransformOffset(layer: headerNode.layer, offset: CGPoint(x: offset, y: 0.0))
+ }
+ }
+ }
}
diff --git a/submodules/TelegramUI/Sources/ChatMessageMapBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageMapBubbleContentNode.swift
index e045e7614e..fc60e62bdf 100644
--- a/submodules/TelegramUI/Sources/ChatMessageMapBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageMapBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import LiveLocationTimerNode
import PhotoResources
import MediaResources
diff --git a/submodules/TelegramUI/Sources/ChatMessageMediaBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageMediaBubbleContentNode.swift
index d564507543..7e901a3377 100644
--- a/submodules/TelegramUI/Sources/ChatMessageMediaBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageMediaBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift b/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift
index a6c20c8cb8..f02214c67d 100644
--- a/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -154,14 +153,12 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
self.avatarNode.setPeer(context: item.context, theme: presentationData.theme, peer: avatarPeer, overrideImage: peer.id == item.context.account.peerId ? .savedMessagesIcon : nil, emptyColor: presentationData.theme.list.mediaPlaceholderColor)
}
- var titleIcon: UIImage?
var updatedMedia: Media?
var imageDimensions: CGSize?
var isRound = false
var messageText: String
if item.messages.first?.id.peerId.namespace == Namespaces.Peer.SecretChat {
- titleIcon = PresentationResourcesRootController.inAppNotificationSecretChatIcon(presentationData.theme)
- messageText = item.strings.PUSH_ENCRYPTED_MESSAGE("").0
+ messageText = item.strings.PUSH_ENCRYPTED_MESSAGE("").string
} else if item.messages.count == 1 {
let message = item.messages[0]
for media in message.media {
@@ -199,25 +196,13 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
if item.messages[0].forwardInfo != nil && item.messages[0].sourceReference == nil {
if let author = item.messages[0].author, displayAuthor {
- let rawText = presentationData.strings.PUSH_CHAT_MESSAGE_FWDS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), author.compactDisplayTitle, Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- if !isReminder {
- title = String(rawText[rawText.startIndex ..< index])
- }
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
+ if !isReminder {
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
}
+ messageText = presentationData.strings.PUSH_CHAT_MESSAGE_FWDS_TEXT(Int32(item.messages.count)).replacingOccurrences(of: "{author}", with: author.compactDisplayTitle)
} else {
- let rawText = presentationData.strings.PUSH_MESSAGE_FWDS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_MESSAGE_FWDS_TEXT(Int32(item.messages.count))
}
} else if item.messages[0].groupingKey != nil {
var kind = messageContentKind(contentSettings: item.context.currentContentSettings.with { $0 }, message: item.messages[0], strings: presentationData.strings, nameDisplayOrder: presentationData.nameDisplayOrder, dateTimeFormat: presentationData.dateTimeFormat, accountPeerId: item.context.account.peerId).key
@@ -242,41 +227,17 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
if isChannel {
switch kind {
case .image:
- let rawText = presentationData.strings.PUSH_CHANNEL_MESSAGE_PHOTOS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHANNEL_MESSAGE_PHOTOS_TEXT(Int32(item.messages.count))
case .video:
- let rawText = presentationData.strings.PUSH_CHANNEL_MESSAGE_VIDEOS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHANNEL_MESSAGE_VIDEOS_TEXT(Int32(item.messages.count))
case .file:
- let rawText = presentationData.strings.PUSH_CHANNEL_MESSAGE_DOCS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHANNEL_MESSAGE_DOCS_TEXT(Int32(item.messages.count))
default:
- let rawText = presentationData.strings.PUSH_CHANNEL_MESSAGES(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHANNEL_MESSAGES_TEXT(Int32(item.messages.count))
}
} else if isGroup, var author = item.messages[0].author {
if let sourceReference = item.messages[0].sourceReference, let sourcePeer = item.messages[0].peers[sourceReference.messageId.peerId] {
@@ -284,80 +245,32 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
}
switch kind {
case .image:
- let rawText = presentationData.strings.PUSH_CHAT_MESSAGE_PHOTOS(Int32(item.messages.count), author.compactDisplayTitle, peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHAT_MESSAGE_PHOTOS_TEXT(Int32(item.messages.count)).replacingOccurrences(of: "{author}", with: author.compactDisplayTitle)
case .video:
- let rawText = presentationData.strings.PUSH_CHAT_MESSAGE_VIDEOS(Int32(item.messages.count), author.compactDisplayTitle, peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHAT_MESSAGE_VIDEOS_TEXT(Int32(item.messages.count)).replacingOccurrences(of: "{author}", with: author.compactDisplayTitle)
case .file:
- let rawText = presentationData.strings.PUSH_CHAT_MESSAGE_DOCS_FIX1(Int32(item.messages.count), author.compactDisplayTitle, peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHAT_MESSAGE_DOCS_TEXT(Int32(item.messages.count)).replacingOccurrences(of: "{author}", with: author.compactDisplayTitle)
default:
- let rawText = presentationData.strings.PUSH_CHAT_MESSAGES(Int32(item.messages.count), author.compactDisplayTitle, peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_CHAT_MESSAGES_TEXT(Int32(item.messages.count)).replacingOccurrences(of: "{author}", with: author.compactDisplayTitle)
}
} else {
switch kind {
case .image:
- let rawText = presentationData.strings.PUSH_MESSAGE_PHOTOS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_MESSAGE_PHOTOS_TEXT(Int32(item.messages.count))
case .video:
- let rawText = presentationData.strings.PUSH_MESSAGE_VIDEOS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_MESSAGE_VIDEOS_TEXT(Int32(item.messages.count))
case .file:
- let rawText = presentationData.strings.PUSH_MESSAGE_FILES(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_MESSAGE_FILES_TEXT(Int32(item.messages.count))
default:
- let rawText = presentationData.strings.PUSH_MESSAGES(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
- if let index = rawText.firstIndex(of: "|") {
- title = String(rawText[rawText.startIndex ..< index])
- messageText = String(rawText[rawText.index(after: index)...])
- } else {
- title = nil
- messageText = rawText
- }
+ title = peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder)
+ messageText = presentationData.strings.PUSH_MESSAGES_TEXT(Int32(item.messages.count))
}
}
} else {
diff --git a/submodules/TelegramUI/Sources/ChatMessagePollBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessagePollBubbleContentNode.swift
index 66ca8788f6..324af61074 100644
--- a/submodules/TelegramUI/Sources/ChatMessagePollBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessagePollBubbleContentNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TextFormat
import UrlEscaping
diff --git a/submodules/TelegramUI/Sources/ChatMessageReplyInfoNode.swift b/submodules/TelegramUI/Sources/ChatMessageReplyInfoNode.swift
index 240ba43779..7b58467cd7 100644
--- a/submodules/TelegramUI/Sources/ChatMessageReplyInfoNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageReplyInfoNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Postbox
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageReportInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatMessageReportInputPanelNode.swift
index ecaa0bfe80..8cc77a91bb 100644
--- a/submodules/TelegramUI/Sources/ChatMessageReportInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageReportInputPanelNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageRestrictedBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageRestrictedBubbleContentNode.swift
index 43c88ad003..9aafc15d13 100644
--- a/submodules/TelegramUI/Sources/ChatMessageRestrictedBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageRestrictedBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TextFormat
@@ -138,11 +137,7 @@ class ChatMessageRestrictedBubbleContentNode: ChatMessageBubbleContentNode {
var statusFrame: CGRect?
if let statusSize = statusSize {
- if forceStatusNewline {
- statusFrame = CGRect(origin: CGPoint(x: textFrameWithoutInsets.maxX - statusSize.width, y: textFrameWithoutInsets.maxY), size: statusSize)
- } else {
- statusFrame = CGRect(origin: CGPoint(x: textFrameWithoutInsets.maxX - statusSize.width, y: textFrameWithoutInsets.maxY - statusSize.height), size: statusSize)
- }
+ statusFrame = CGRect(origin: CGPoint(x: textFrameWithoutInsets.maxX - statusSize.width, y: textFrameWithoutInsets.maxY - statusSize.height), size: statusSize)
}
textFrame = textFrame.offsetBy(dx: layoutConstants.text.bubbleInsets.left, dy: layoutConstants.text.bubbleInsets.top)
diff --git a/submodules/TelegramUI/Sources/ChatMessageSelectionInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatMessageSelectionInputPanelNode.swift
index 6a18b93e9b..48dc8bb01d 100644
--- a/submodules/TelegramUI/Sources/ChatMessageSelectionInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageSelectionInputPanelNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatMessageSelectionNode.swift b/submodules/TelegramUI/Sources/ChatMessageSelectionNode.swift
index bf57084183..3921dad579 100644
--- a/submodules/TelegramUI/Sources/ChatMessageSelectionNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageSelectionNode.swift
@@ -3,7 +3,7 @@ import UIKit
import AsyncDisplayKit
import TelegramPresentationData
import CheckNode
-import SyncCore
+import TelegramCore
final class ChatMessageSelectionNode: ASDisplayNode {
private let toggle: (Bool) -> Void
diff --git a/submodules/TelegramUI/Sources/ChatMessageStickerItemNode.swift b/submodules/TelegramUI/Sources/ChatMessageStickerItemNode.swift
index 43b041813b..35aa60b1d2 100644
--- a/submodules/TelegramUI/Sources/ChatMessageStickerItemNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageStickerItemNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TextFormat
import AccountContext
@@ -516,7 +515,7 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
let bodyAttributes = MarkdownAttributeSet(font: nameFont, textColor: inlineBotNameColor)
let boldAttributes = MarkdownAttributeSet(font: inlineBotPrefixFont, textColor: inlineBotNameColor)
- let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)"), body: bodyAttributes, argumentAttributes: [0: boldAttributes])
+ let botString = addAttributesToStringWithRanges(item.presentationData.strings.Conversation_MessageViaUser("@\(inlineBotNameString)")._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
viaBotApply = viaBotLayout(TextNodeLayoutArguments(attributedString: botString, backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: max(0, availableWidth), height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
}
@@ -1018,6 +1017,8 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
var bounds = self.bounds
bounds.origin.x = -translation.x
self.bounds = bounds
+
+ self.updateAttachedAvatarNodeOffset(offset: translation.x, transition: .immediate)
if let swipeToReplyNode = self.swipeToReplyNode {
swipeToReplyNode.frame = CGRect(origin: CGPoint(x: bounds.size.width, y: floor((self.contentSize.height - 33.0) / 2.0)), size: CGSize(width: 33.0, height: 33.0))
@@ -1053,6 +1054,9 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
bounds.origin.x = 0.0
self.bounds = bounds
self.layer.animateBounds(from: previousBounds, to: bounds, duration: 0.3, timingFunction: kCAMediaTimingFunctionSpring)
+
+ self.updateAttachedAvatarNodeOffset(offset: 0.0, transition: .animated(duration: 0.3, curve: .spring))
+
if let swipeToReplyNode = self.swipeToReplyNode {
self.swipeToReplyNode = nil
swipeToReplyNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false, completion: { [weak swipeToReplyNode] _ in
diff --git a/submodules/TelegramUI/Sources/ChatMessageTextBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageTextBubbleContentNode.swift
index d63be62314..db71bcd4b4 100644
--- a/submodules/TelegramUI/Sources/ChatMessageTextBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageTextBubbleContentNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TextFormat
import UrlEscaping
@@ -297,11 +296,7 @@ class ChatMessageTextBubbleContentNode: ChatMessageBubbleContentNode {
var statusFrame: CGRect?
if let statusSize = statusSize {
- if forceStatusNewline {
- statusFrame = CGRect(origin: CGPoint(x: textFrameWithoutInsets.maxX - statusSize.width, y: textFrameWithoutInsets.maxY), size: statusSize)
- } else {
- statusFrame = CGRect(origin: CGPoint(x: textFrameWithoutInsets.maxX - statusSize.width, y: textFrameWithoutInsets.maxY - statusSize.height), size: statusSize)
- }
+ statusFrame = CGRect(origin: CGPoint(x: textFrameWithoutInsets.maxX - statusSize.width, y: textFrameWithoutInsets.maxY - statusSize.height), size: statusSize)
}
textFrame = textFrame.offsetBy(dx: layoutConstants.text.bubbleInsets.left, dy: layoutConstants.text.bubbleInsets.top)
diff --git a/submodules/TelegramUI/Sources/ChatMessageUnsupportedBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageUnsupportedBubbleContentNode.swift
index 81c3423d01..db5623a2eb 100644
--- a/submodules/TelegramUI/Sources/ChatMessageUnsupportedBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageUnsupportedBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
final class ChatMessageUnsupportedBubbleContentNode: ChatMessageBubbleContentNode {
diff --git a/submodules/TelegramUI/Sources/ChatMessageWebpageBubbleContentNode.swift b/submodules/TelegramUI/Sources/ChatMessageWebpageBubbleContentNode.swift
index e40eecd6e8..076dc8dea3 100644
--- a/submodules/TelegramUI/Sources/ChatMessageWebpageBubbleContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatMessageWebpageBubbleContentNode.swift
@@ -5,7 +5,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import TextFormat
import AccountContext
@@ -13,6 +12,7 @@ import WebsiteType
import InstantPageUI
import UrlHandling
import GalleryData
+import TelegramPresentationData
private let titleFont: UIFont = Font.semibold(15.0)
@@ -208,7 +208,6 @@ final class ChatMessageWebpageBubbleContentNode: ChatMessageBubbleContentNode {
} else if let type = webpage.type {
if type == "telegram_background" {
var colors: [UInt32] = []
- var bottomColor: UIColor?
var rotation: Int32?
if let wallpaper = parseWallpaperUrl(webpage.url) {
if case let .color(color) = wallpaper {
diff --git a/submodules/TelegramUI/Sources/ChatOverlayNavigationBar.swift b/submodules/TelegramUI/Sources/ChatOverlayNavigationBar.swift
index 720135e850..7336d9db0e 100644
--- a/submodules/TelegramUI/Sources/ChatOverlayNavigationBar.swift
+++ b/submodules/TelegramUI/Sources/ChatOverlayNavigationBar.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/ChatPanelInterfaceInteraction.swift b/submodules/TelegramUI/Sources/ChatPanelInterfaceInteraction.swift
index 34d50532be..3122008f38 100644
--- a/submodules/TelegramUI/Sources/ChatPanelInterfaceInteraction.swift
+++ b/submodules/TelegramUI/Sources/ChatPanelInterfaceInteraction.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Display
import AccountContext
import ContextUI
diff --git a/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift b/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift
index dd30292821..9fffe16a45 100644
--- a/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/ChatPresentationInterfaceState.swift b/submodules/TelegramUI/Sources/ChatPresentationInterfaceState.swift
index 27475b3b98..2a5f31271e 100644
--- a/submodules/TelegramUI/Sources/ChatPresentationInterfaceState.swift
+++ b/submodules/TelegramUI/Sources/ChatPresentationInterfaceState.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
@@ -17,7 +16,7 @@ enum ChatPresentationInputQueryKind: Int32 {
case emojiSearch
}
-struct ChatInputQueryMentionTypes: OptionSet {
+struct ChatInputQueryMentionTypes: OptionSet, Hashable {
var rawValue: Int32
init(rawValue: Int32) {
@@ -53,26 +52,6 @@ enum ChatPresentationInputQuery: Hashable, Equatable {
return .emojiSearch
}
}
-
- var hashValue: Int {
- switch self {
- case let .emoji(value):
- return 1 &+ value.hashValue
- case let .hashtag(value):
- return 2 &+ value.hashValue
- case let .mention(text, types):
- return 3 &+ text.hashValue &* 31 &+ types.rawValue.hashValue
- case let .command(value):
- return 4 &+ value.hashValue
- case let .contextRequest(addressName, query):
- return 5 &+ addressName.hashValue &* 31 &+ query.hashValue
- case let .emojiSearch(value, languageCode, range):
- var hash = value.hashValue
- hash = hash &* 31 &+ languageCode.hashValue
- hash = hash &* 31 &+ range.hashValue
- return 6 &+ hash
- }
- }
}
enum ChatMediaInputMode {
diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsController.swift b/submodules/TelegramUI/Sources/ChatRecentActionsController.swift
index b601fbe5de..e5ad7400dd 100644
--- a/submodules/TelegramUI/Sources/ChatRecentActionsController.swift
+++ b/submodules/TelegramUI/Sources/ChatRecentActionsController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsControllerNode.swift b/submodules/TelegramUI/Sources/ChatRecentActionsControllerNode.swift
index b24da72856..ce85ec7d92 100644
--- a/submodules/TelegramUI/Sources/ChatRecentActionsControllerNode.swift
+++ b/submodules/TelegramUI/Sources/ChatRecentActionsControllerNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
@@ -112,7 +111,7 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
self.listNode.dynamicBounceEnabled = false
self.listNode.transform = CATransform3DMakeRotation(CGFloat(Double.pi), 0.0, 0.0, 1.0)
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.loadingNode = ChatLoadingNode(theme: self.presentationData.theme, chatWallpaper: self.presentationData.chatWallpaper, bubbleCorners: self.presentationData.chatBubbleCorners)
@@ -283,13 +282,8 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
let resolveSignal: Signal
if let peerName = peerName {
resolveSignal = strongSelf.context.engine.peers.resolvePeerByName(name: peerName)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return context.account.postbox.loadedPeerWithId(peerId)
- |> map(Optional.init)
- } else {
- return .single(nil)
- }
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
} else {
resolveSignal = context.account.postbox.loadedPeerWithId(strongSelf.peer.id)
@@ -732,7 +726,7 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
if displayEmptyNode {
var text: String = ""
if let query = strongSelf.filter.query, hasFilter {
- text = strongSelf.presentationData.strings.Channel_AdminLog_EmptyFilterQueryText(query).0
+ text = strongSelf.presentationData.strings.Channel_AdminLog_EmptyFilterQueryText(query).string
} else {
text = isSupergroup ? strongSelf.presentationData.strings.Group_AdminLog_EmptyText : strongSelf.presentationData.strings.Broadcast_AdminLog_EmptyText
}
@@ -790,17 +784,10 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
let postbox = self.context.account.postbox
self.navigationActionDisposable.set((self.context.engine.peers.resolvePeerByName(name: name, ageLimit: 10)
|> take(1)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return postbox.loadedPeerWithId(peerId) |> map(Optional.init)
- } else {
- return .single(nil)
- }
- }
|> deliverOnMainQueue).start(next: { [weak self] peer in
if let strongSelf = self {
if let peer = peer {
- if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer, mode: .generic, avatarInitiallyExpanded: false, fromChat: false) {
+ if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, peer: peer._asPeer(), mode: .generic, avatarInitiallyExpanded: false, fromChat: false) {
strongSelf.pushController(infoController)
}
}
@@ -971,7 +958,7 @@ final class ChatRecentActionsControllerNode: ViewControllerTracingNode {
var isOn: Bool = true
var text: String?
if let myValue = value.value {
- text = strongSelf.presentationData.strings.Conversation_AutoremoveChanged("\(timeIntervalString(strings: strongSelf.presentationData.strings, value: myValue))").0
+ text = strongSelf.presentationData.strings.Conversation_AutoremoveChanged("\(timeIntervalString(strings: strongSelf.presentationData.strings, value: myValue))").string
} else {
isOn = false
text = strongSelf.presentationData.strings.Conversation_AutoremoveOff
diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsControllerState.swift b/submodules/TelegramUI/Sources/ChatRecentActionsControllerState.swift
index bf8b62e26a..2aaff1ac9f 100644
--- a/submodules/TelegramUI/Sources/ChatRecentActionsControllerState.swift
+++ b/submodules/TelegramUI/Sources/ChatRecentActionsControllerState.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsEmptyNode.swift b/submodules/TelegramUI/Sources/ChatRecentActionsEmptyNode.swift
index 8b4dfd82d5..1588ddca37 100644
--- a/submodules/TelegramUI/Sources/ChatRecentActionsEmptyNode.swift
+++ b/submodules/TelegramUI/Sources/ChatRecentActionsEmptyNode.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
private let titleFont = Font.medium(16.0)
diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsFilterController.swift b/submodules/TelegramUI/Sources/ChatRecentActionsFilterController.swift
index c667bf02b1..3c4606e7e3 100644
--- a/submodules/TelegramUI/Sources/ChatRecentActionsFilterController.swift
+++ b/submodules/TelegramUI/Sources/ChatRecentActionsFilterController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift b/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift
index 5cc933f1a5..065c706c98 100644
--- a/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift
+++ b/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import MergeLists
@@ -28,10 +27,6 @@ struct ChatRecentActionsEntryId: Hashable, Comparable {
return lhs.contentIndex.rawValue < rhs.contentIndex.rawValue
}
}
-
- var hashValue: Int {
- return self.eventId.hashValue &+ 31 &* self.contentIndex.rawValue.hashValue
- }
}
private func eventNeedsHeader(_ event: AdminLogEvent) -> Bool {
@@ -49,13 +44,13 @@ private func eventNeedsHeader(_ event: AdminLogEvent) -> Bool {
}
}
-private func appendAttributedText(text: (String, [(Int, NSRange)]), generateEntities: (Int) -> [MessageTextEntityType], to string: inout String, entities: inout [MessageTextEntity]) {
- for (index, range) in text.1 {
- for type in generateEntities(index) {
- entities.append(MessageTextEntity(range: (string.count + range.lowerBound) ..< (string.count + range.upperBound), type: type))
+private func appendAttributedText(text: PresentationStrings.FormattedString, generateEntities: (Int) -> [MessageTextEntityType], to string: inout String, entities: inout [MessageTextEntity]) {
+ for rangeItem in text.ranges {
+ for type in generateEntities(rangeItem.index) {
+ entities.append(MessageTextEntity(range: (string.count + rangeItem.range.lowerBound) ..< (string.count + rangeItem.range.upperBound), type: type))
}
}
- string.append(text.0)
+ string.append(text.string)
}
private func appendAttributedText(text: String, withEntities: [MessageTextEntityType], to string: inout String, entities: inout [MessageTextEntity]) {
@@ -372,7 +367,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
mediaUpdated = true
}
- let titleText: (String, [(Int, NSRange)])
+ let titleText: PresentationStrings.FormattedString
if mediaUpdated || message.media.isEmpty {
titleText = self.presentationData.strings.Channel_AdminLog_MessageEdited(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "")
} else {
@@ -569,16 +564,16 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
let dateString = formatter.string(from: Date(timeIntervalSince1970: Double(newBanInfo.rights.untilDate)))
if prevBanInfo?.rights.flags != newBanInfo.rights.flags {
- text += self.presentationData.strings.Channel_AdminLog_MessageRestrictedUntil(dateString).0
+ text += self.presentationData.strings.Channel_AdminLog_MessageRestrictedUntil(dateString).string
} else {
- text += self.presentationData.strings.Channel_AdminLog_MessageRestrictedNewSetting(dateString).0
+ text += self.presentationData.strings.Channel_AdminLog_MessageRestrictedNewSetting(dateString).string
}
text += "\n"
} else {
if prevBanInfo?.rights.flags != newBanInfo?.rights.flags {
text += self.presentationData.strings.Channel_AdminLog_MessageRestrictedForever
} else {
- text += self.presentationData.strings.Channel_AdminLog_MessageRestrictedNewSetting(self.presentationData.strings.Channel_AdminLog_MessageRestrictedForever).0
+ text += self.presentationData.strings.Channel_AdminLog_MessageRestrictedNewSetting(self.presentationData.strings.Channel_AdminLog_MessageRestrictedForever).string
}
text += "\n"
}
@@ -968,7 +963,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let titleText: (String, [(Int, NSRange)])
+ let titleText: PresentationStrings.FormattedString
titleText = self.presentationData.strings.Channel_AdminLog_PollStopped(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "")
@@ -1125,7 +1120,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)])
+ let rawText: PresentationStrings.FormattedString
if case .startGroupCall = self.entry.event.action {
rawText = self.presentationData.strings.Channel_AdminLog_StartedVoiceChat(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "")
} else {
@@ -1159,7 +1154,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)])
+ let rawText: PresentationStrings.FormattedString
if isMuted {
rawText = self.presentationData.strings.Channel_AdminLog_MutedParticipant(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", participant?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "")
} else {
@@ -1188,7 +1183,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)])
+ let rawText: PresentationStrings.FormattedString
if joinMuted {
rawText = self.presentationData.strings.Channel_AdminLog_MutedNewMembers(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "")
} else {
@@ -1222,7 +1217,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_UpdatedParticipantVolume(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", participant?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", "\(volume / 100)%")
+ let rawText: PresentationStrings.FormattedString = self.presentationData.strings.Channel_AdminLog_UpdatedParticipantVolume(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", participant?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", "\(volume / 100)%")
appendAttributedText(text: rawText, generateEntities: { index in
if index == 0, let author = author {
@@ -1248,7 +1243,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_DeletedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: ""))
+ let rawText: PresentationStrings.FormattedString = self.presentationData.strings.Channel_AdminLog_DeletedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: ""))
appendAttributedText(text: rawText, generateEntities: { index in
if index == 0, let author = author {
@@ -1274,7 +1269,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_RevokedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: ""))
+ let rawText: PresentationStrings.FormattedString = self.presentationData.strings.Channel_AdminLog_RevokedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: ""))
appendAttributedText(text: rawText, generateEntities: { index in
if index == 0, let author = author {
@@ -1289,7 +1284,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
let message = Message(stableId: self.entry.stableId, stableVersion: 0, id: MessageId(peerId: peer.id, namespace: Namespaces.Message.Cloud, id: Int32(bitPattern: self.entry.stableId)), globallyUniqueId: self.entry.event.id, groupingKey: nil, groupInfo: nil, threadId: nil, timestamp: self.entry.event.date, flags: [.Incoming], tags: [], globalTags: [], localTags: [], forwardInfo: nil, author: author, text: "", attributes: [], media: [TelegramMediaAction(action: action)], peers: peers, associatedMessages: SimpleDictionary(), associatedMessageIds: [])
return ChatMessageItem(presentationData: self.presentationData, context: context, chatLocation: .peer(peer.id), associatedData: ChatMessageItemAssociatedData(automaticDownloadPeerType: .channel, automaticDownloadNetworkType: .cellular, isRecentActions: true), controllerInteraction: controllerInteraction, content: .message(message: message, read: true, selection: .none, attributes: ChatMessageEntryAttributes()))
- case let .editExportedInvitation(previousInvite, updatedInvite):
+ case let .editExportedInvitation(_, updatedInvite):
var peers = SimpleDictionary()
var author: Peer?
if let peer = self.entry.peers[self.entry.event.peerId] {
@@ -1300,7 +1295,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_EditedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", updatedInvite.link.replacingOccurrences(of: "https://", with: ""))
+ let rawText: PresentationStrings.FormattedString = self.presentationData.strings.Channel_AdminLog_EditedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", updatedInvite.link.replacingOccurrences(of: "https://", with: ""))
appendAttributedText(text: rawText, generateEntities: { index in
if index == 0, let author = author {
@@ -1326,7 +1321,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_JoinedViaInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: ""))
+ let rawText: PresentationStrings.FormattedString = self.presentationData.strings.Channel_AdminLog_JoinedViaInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: ""))
appendAttributedText(text: rawText, generateEntities: { index in
if index == 0, let author = author {
@@ -1352,7 +1347,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable {
var text: String = ""
var entities: [MessageTextEntity] = []
- let rawText: (String, [(Int, NSRange)])
+ let rawText: PresentationStrings.FormattedString
if let updatedValue = updatedValue {
rawText = self.presentationData.strings.Channel_AdminLog_MessageChangedAutoremoveTimeoutSet(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", timeIntervalString(strings: self.presentationData.strings, value: updatedValue))
} else {
diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsSearchNavigationContentNode.swift b/submodules/TelegramUI/Sources/ChatRecentActionsSearchNavigationContentNode.swift
index b052b828fc..5c524bf3f9 100644
--- a/submodules/TelegramUI/Sources/ChatRecentActionsSearchNavigationContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatRecentActionsSearchNavigationContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import SearchBarNode
diff --git a/submodules/TelegramUI/Sources/ChatRecordingPreviewInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatRecordingPreviewInputPanelNode.swift
index 5be394c3cd..37e9f2ff92 100644
--- a/submodules/TelegramUI/Sources/ChatRecordingPreviewInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatRecordingPreviewInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift b/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift
index e9aa05efae..156638375c 100644
--- a/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import LocalizedPeerData
import TelegramStringFormatting
@@ -25,7 +24,7 @@ private enum ChatReportPeerTitleButton: Equatable {
return strings.Conversation_BlockUser
case let .addContact(name):
if let name = name {
- return strings.Conversation_AddNameToContacts(name).0
+ return strings.Conversation_AddNameToContacts(name).string
} else {
return strings.Conversation_AddToContacts
}
@@ -151,18 +150,18 @@ private final class ChatInfoTitlePanelInviteInfoNode: ASDisplayNode {
let bottomInset: CGFloat = 6.0
let sideInset: CGFloat = 16.0
- let stringAndRanges: (String, [(Int, NSRange)])
+ let stringAndRanges: PresentationStrings.FormattedString
if let channel = chatPeer as? TelegramChannel, case .broadcast = channel.info {
stringAndRanges = strings.Conversation_NoticeInvitedByInChannel(invitedBy.compactDisplayTitle)
} else {
stringAndRanges = strings.Conversation_NoticeInvitedByInGroup(invitedBy.compactDisplayTitle)
}
- let attributedString = NSMutableAttributedString(string: stringAndRanges.0, font: Font.regular(13.0), textColor: primaryTextColor)
+ let attributedString = NSMutableAttributedString(string: stringAndRanges.string, font: Font.regular(13.0), textColor: primaryTextColor)
let boldAttributes = [NSAttributedString.Key.font: Font.semibold(13.0), NSAttributedString.Key(rawValue: "_Link"): true as NSNumber]
- for (_, range) in stringAndRanges.1 {
- attributedString.addAttributes(boldAttributes, range: range)
+ for range in stringAndRanges.ranges {
+ attributedString.addAttributes(boldAttributes, range: range.range)
}
self.labelNode.attributedText = attributedString
@@ -252,11 +251,11 @@ private final class ChatInfoTitlePanelPeerNearbyInfoNode: ASDisplayNode {
let stringAndRanges = strings.Conversation_PeerNearbyDistance(chatPeer.compactDisplayTitle, shortStringForDistance(strings: strings, distance: distance))
- let attributedString = NSMutableAttributedString(string: stringAndRanges.0, font: Font.regular(13.0), textColor: primaryTextColor)
+ let attributedString = NSMutableAttributedString(string: stringAndRanges.string, font: Font.regular(13.0), textColor: primaryTextColor)
let boldAttributes = [NSAttributedString.Key.font: Font.semibold(13.0), NSAttributedString.Key(rawValue: "_Link"): true as NSNumber]
- for (_, range) in stringAndRanges.1.prefix(1) {
- attributedString.addAttributes(boldAttributes, range: range)
+ for range in stringAndRanges.ranges.prefix(1) {
+ attributedString.addAttributes(boldAttributes, range: range.range)
}
self.labelNode.attributedText = attributedString
diff --git a/submodules/TelegramUI/Sources/ChatRestrictedInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatRestrictedInputPanelNode.swift
index a0af6c9b6d..ba31bbed28 100644
--- a/submodules/TelegramUI/Sources/ChatRestrictedInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatRestrictedInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramStringFormatting
@@ -43,7 +42,7 @@ final class ChatRestrictedInputPanelNode: ChatInputPanelNode {
if let (untilDate, personal) = bannedPermission {
if personal && untilDate != 0 && untilDate != Int32.max {
- self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Conversation_RestrictedTextTimed(stringForFullDate(timestamp: untilDate, strings: interfaceState.strings, dateTimeFormat: interfaceState.dateTimeFormat)).0, font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
+ self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Conversation_RestrictedTextTimed(stringForFullDate(timestamp: untilDate, strings: interfaceState.strings, dateTimeFormat: interfaceState.dateTimeFormat)).string, font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
} else if personal {
self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Conversation_RestrictedText, font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
} else {
diff --git a/submodules/TelegramUI/Sources/ChatScheduleTimeController.swift b/submodules/TelegramUI/Sources/ChatScheduleTimeController.swift
index f60cd888f2..4c0cfeb958 100644
--- a/submodules/TelegramUI/Sources/ChatScheduleTimeController.swift
+++ b/submodules/TelegramUI/Sources/ChatScheduleTimeController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatScheduleTimeControllerNode.swift b/submodules/TelegramUI/Sources/ChatScheduleTimeControllerNode.swift
index fee537ce93..a3a70637cf 100644
--- a/submodules/TelegramUI/Sources/ChatScheduleTimeControllerNode.swift
+++ b/submodules/TelegramUI/Sources/ChatScheduleTimeControllerNode.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramStringFormatting
import AccountContext
@@ -272,19 +271,19 @@ class ChatScheduleTimeControllerNode: ViewControllerTracingNode, UIScrollViewDel
switch mode {
case .scheduledMessages:
if calendar.isDateInToday(date) {
- self.doneButton.title = self.presentationData.strings.Conversation_ScheduleMessage_SendToday(time).0
+ self.doneButton.title = self.presentationData.strings.Conversation_ScheduleMessage_SendToday(time).string
} else if calendar.isDateInTomorrow(date) {
- self.doneButton.title = self.presentationData.strings.Conversation_ScheduleMessage_SendTomorrow(time).0
+ self.doneButton.title = self.presentationData.strings.Conversation_ScheduleMessage_SendTomorrow(time).string
} else {
- self.doneButton.title = self.presentationData.strings.Conversation_ScheduleMessage_SendOn(self.dateFormatter.string(from: date), time).0
+ self.doneButton.title = self.presentationData.strings.Conversation_ScheduleMessage_SendOn(self.dateFormatter.string(from: date), time).string
}
case .reminders:
if calendar.isDateInToday(date) {
- self.doneButton.title = self.presentationData.strings.Conversation_SetReminder_RemindToday(time).0
+ self.doneButton.title = self.presentationData.strings.Conversation_SetReminder_RemindToday(time).string
} else if calendar.isDateInTomorrow(date) {
- self.doneButton.title = self.presentationData.strings.Conversation_SetReminder_RemindTomorrow(time).0
+ self.doneButton.title = self.presentationData.strings.Conversation_SetReminder_RemindTomorrow(time).string
} else {
- self.doneButton.title = self.presentationData.strings.Conversation_SetReminder_RemindOn(self.dateFormatter.string(from: date), time).0
+ self.doneButton.title = self.presentationData.strings.Conversation_SetReminder_RemindOn(self.dateFormatter.string(from: date), time).string
}
}
}
diff --git a/submodules/TelegramUI/Sources/ChatSearchInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatSearchInputPanelNode.swift
index 40e57f5599..172a134d7a 100644
--- a/submodules/TelegramUI/Sources/ChatSearchInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatSearchInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramNotices
@@ -172,7 +171,7 @@ final class ChatSearchInputPanelNode: ChatInputPanelNode {
if let currentId = results.currentId, let index = results.messageIndices.firstIndex(where: { $0.id == currentId }) {
let adjustedIndex = results.messageIndices.count - 1 - index
resultIndex = index
- resultsText = interfaceState.strings.Items_NOfM("\(adjustedIndex + 1)", "\(displayTotalCount)").0
+ resultsText = interfaceState.strings.Items_NOfM("\(adjustedIndex + 1)", "\(displayTotalCount)").string
} else {
resultsText = interfaceState.strings.Conversation_SearchNoResults
}
diff --git a/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift b/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift
index 5875966f27..fcfbc6399c 100644
--- a/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift
+++ b/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import SearchBarNode
import LocalizedPeerData
diff --git a/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift b/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift
index fb249f2872..ba76debd4d 100644
--- a/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift
+++ b/submodules/TelegramUI/Sources/ChatSearchResultsContollerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramStringFormatting
import MergeLists
@@ -145,7 +144,7 @@ class ChatSearchResultsControllerNode: ViewControllerTracingNode, UIScrollViewDe
self.listNode = ListView()
self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/TelegramUI/Sources/ChatSearchResultsController.swift b/submodules/TelegramUI/Sources/ChatSearchResultsController.swift
index 09b180cb4e..6173d30516 100644
--- a/submodules/TelegramUI/Sources/ChatSearchResultsController.swift
+++ b/submodules/TelegramUI/Sources/ChatSearchResultsController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ChatSearchState.swift b/submodules/TelegramUI/Sources/ChatSearchState.swift
index c41271a3a5..bf886b8000 100644
--- a/submodules/TelegramUI/Sources/ChatSearchState.swift
+++ b/submodules/TelegramUI/Sources/ChatSearchState.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
struct ChatSearchState: Equatable {
let query: String
diff --git a/submodules/TelegramUI/Sources/ChatSecretAutoremoveTimerActionSheet.swift b/submodules/TelegramUI/Sources/ChatSecretAutoremoveTimerActionSheet.swift
index 96ed01bd06..5dbe277004 100644
--- a/submodules/TelegramUI/Sources/ChatSecretAutoremoveTimerActionSheet.swift
+++ b/submodules/TelegramUI/Sources/ChatSecretAutoremoveTimerActionSheet.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import UIKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Photos
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ChatSendMessageActionSheetController.swift b/submodules/TelegramUI/Sources/ChatSendMessageActionSheetController.swift
index f434f57f5a..5e8ae640c2 100644
--- a/submodules/TelegramUI/Sources/ChatSendMessageActionSheetController.swift
+++ b/submodules/TelegramUI/Sources/ChatSendMessageActionSheetController.swift
@@ -3,10 +3,10 @@ import UIKit
import Display
import AsyncDisplayKit
import SwiftSignalKit
-import SyncCore
import TelegramPresentationData
import AccountContext
import ContextUI
+import TelegramCore
final class ChatSendMessageActionSheetController: ViewController {
var controllerNode: ChatSendMessageActionSheetControllerNode {
diff --git a/submodules/TelegramUI/Sources/ChatSendMessageActionSheetControllerNode.swift b/submodules/TelegramUI/Sources/ChatSendMessageActionSheetControllerNode.swift
index eb103b5b12..ac6881df7c 100644
--- a/submodules/TelegramUI/Sources/ChatSendMessageActionSheetControllerNode.swift
+++ b/submodules/TelegramUI/Sources/ChatSendMessageActionSheetControllerNode.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import AppBundle
diff --git a/submodules/TelegramUI/Sources/ChatSlowmodeHintController.swift b/submodules/TelegramUI/Sources/ChatSlowmodeHintController.swift
index 06cbd2a77d..aa2490db6d 100644
--- a/submodules/TelegramUI/Sources/ChatSlowmodeHintController.swift
+++ b/submodules/TelegramUI/Sources/ChatSlowmodeHintController.swift
@@ -11,7 +11,7 @@ private func timeoutValue(strings: PresentationStrings, slowmodeState: ChatSlowm
case let .timestamp(untilTimestamp):
let timestamp = Int32(Date().timeIntervalSince1970)
let seconds = max(0, untilTimestamp - timestamp)
- return strings.Chat_SlowmodeTooltip(stringForDuration(seconds)).0
+ return strings.Chat_SlowmodeTooltip(stringForDuration(seconds)).string
}
}
diff --git a/submodules/TelegramUI/Sources/ChatTextInputAudioRecordingOverlayButton.swift b/submodules/TelegramUI/Sources/ChatTextInputAudioRecordingOverlayButton.swift
index ab14602ab7..a4940fff0f 100644
--- a/submodules/TelegramUI/Sources/ChatTextInputAudioRecordingOverlayButton.swift
+++ b/submodules/TelegramUI/Sources/ChatTextInputAudioRecordingOverlayButton.swift
@@ -124,7 +124,7 @@ final class ChatTextInputAudioRecordingOverlay {
var containerNodeRef: ASDisplayNode? = self.containerNode
- var completion: () -> Void = {
+ let completion: () -> Void = {
if let containerNode = containerNodeRef, innerCompleted, outerCompleted, iconCompleted {
containerNode.removeFromSupernode()
containerNodeRef = nil
diff --git a/submodules/TelegramUI/Sources/ChatTextInputMediaRecordingButton.swift b/submodules/TelegramUI/Sources/ChatTextInputMediaRecordingButton.swift
index 144f3db74e..1e4712c80d 100644
--- a/submodules/TelegramUI/Sources/ChatTextInputMediaRecordingButton.swift
+++ b/submodules/TelegramUI/Sources/ChatTextInputMediaRecordingButton.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import LegacyComponents
diff --git a/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift
index fe1c49909e..d54e49846a 100644
--- a/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MobileCoreServices
import TelegramPresentationData
import TextFormat
@@ -103,7 +102,7 @@ private final class AccessoryItemIconButtonNode: HighlightTrackingButtonNode {
}
case let .messageAutoremoveTimeout(timeout):
if let timeout = timeout {
- return (nil, shortTimeIntervalString(strings: strings, value: timeout), strings.VoiceOver_SelfDestructTimerOn(timeIntervalString(strings: strings, value: timeout)).0, 1.0, UIEdgeInsets())
+ return (nil, shortTimeIntervalString(strings: strings, value: timeout), strings.VoiceOver_SelfDestructTimerOn(timeIntervalString(strings: strings, value: timeout)).string, 1.0, UIEdgeInsets())
} else {
return (PresentationResourcesChat.chatInputTextFieldTimerImage(theme), nil, strings.VoiceOver_SelfDestructTimerOff, 1.0, UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 0.0))
}
@@ -2353,14 +2352,6 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate {
backgroundView.frame = self.textInputBackgroundNode.frame
func updateIsCaretHidden(view: UIView, isHidden: Bool) {
- return;
- if String(describing: type(of: view)).contains("TextSelectionView") {
- view.isHidden = isHidden
- } else {
- for subview in view.subviews {
- updateIsCaretHidden(view: subview, isHidden: isHidden)
- }
- }
}
updateIsCaretHidden(view: textInputNode.view, isHidden: true)
diff --git a/submodules/TelegramUI/Sources/ChatTextLinkEditController.swift b/submodules/TelegramUI/Sources/ChatTextLinkEditController.swift
index b2b05defe3..757bce3a52 100644
--- a/submodules/TelegramUI/Sources/ChatTextLinkEditController.swift
+++ b/submodules/TelegramUI/Sources/ChatTextLinkEditController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import UrlEscaping
@@ -251,7 +250,7 @@ private final class ChatTextLinkEditAlertContentNode: AlertContentNode {
override func updateTheme(_ theme: AlertControllerTheme) {
self.titleNode.attributedText = NSAttributedString(string: self.strings.TextFormat_AddLinkTitle, font: Font.bold(17.0), textColor: theme.primaryColor, paragraphAlignment: .center)
- self.textNode.attributedText = NSAttributedString(string: self.strings.TextFormat_AddLinkText(self.text).0, font: Font.regular(13.0), textColor: theme.primaryColor, paragraphAlignment: .center)
+ self.textNode.attributedText = NSAttributedString(string: self.strings.TextFormat_AddLinkText(self.text).string, font: Font.regular(13.0), textColor: theme.primaryColor, paragraphAlignment: .center)
self.actionNodesSeparator.backgroundColor = theme.separatorColor
for actionNode in self.actionNodes {
diff --git a/submodules/TelegramUI/Sources/ChatTimerScreen.swift b/submodules/TelegramUI/Sources/ChatTimerScreen.swift
index b229c1e287..b161cb846e 100644
--- a/submodules/TelegramUI/Sources/ChatTimerScreen.swift
+++ b/submodules/TelegramUI/Sources/ChatTimerScreen.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import SolidRoundedButtonNode
diff --git a/submodules/TelegramUI/Sources/ChatTitleView.swift b/submodules/TelegramUI/Sources/ChatTitleView.swift
index f55c4a9b95..7986280ed6 100644
--- a/submodules/TelegramUI/Sources/ChatTitleView.swift
+++ b/submodules/TelegramUI/Sources/ChatTitleView.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import LegacyComponents
import TelegramPresentationData
@@ -170,18 +169,22 @@ final class ChatTitleView: UIView, NavigationBarTitleView {
commentsPart = commentsPart.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789-,."))
}
- let rawTextAndRanges: (String, [(Int, NSRange)])
+ let rawTextAndRanges: PresentationStrings.FormattedString
switch type {
case .comments:
rawTextAndRanges = self.strings.Conversation_TitleCommentsFormat("\(count)", commentsPart)
case .replies:
rawTextAndRanges = self.strings.Conversation_TitleRepliesFormat("\(count)", commentsPart)
}
-
- let (rawText, ranges) = rawTextAndRanges
+
+ let rawText = rawTextAndRanges.string
+
var textIndex = 0
var latestIndex = 0
- for (index, range) in ranges {
+ for indexAndRange in rawTextAndRanges.ranges {
+ let index = indexAndRange.index
+ let range = indexAndRange.range
+
var lowerSegmentIndex = range.lowerBound
if index != 0 {
lowerSegmentIndex = min(lowerSegmentIndex, latestIndex)
diff --git a/submodules/TelegramUI/Sources/ChatUnblockInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatUnblockInputPanelNode.swift
index fe51476ad9..74d782ef12 100644
--- a/submodules/TelegramUI/Sources/ChatUnblockInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ChatUnblockInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/CheckDiskSpace.swift b/submodules/TelegramUI/Sources/CheckDiskSpace.swift
index 5e8ed7bf52..135ee38241 100644
--- a/submodules/TelegramUI/Sources/CheckDiskSpace.swift
+++ b/submodules/TelegramUI/Sources/CheckDiskSpace.swift
@@ -1,7 +1,6 @@
import Foundation
import Display
import TelegramCore
-import SyncCore
import AccountContext
import AlertUI
import PresentationDataUtils
diff --git a/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift
index a215268547..a1bedd5f47 100644
--- a/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/CommandChatInputContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import TelegramPresentationData
import TelegramUIPreferences
@@ -71,7 +70,7 @@ final class CommandChatInputContextPanelNode: ChatInputContextPanelNode {
self.listView.limitHitTestToNodes = true
self.listView.view.disablesInteractiveTransitionGestureRecognizer = true
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init(context: context, theme: theme, strings: strings, fontSize: fontSize)
diff --git a/submodules/TelegramUI/Sources/CommandChatInputPanelItem.swift b/submodules/TelegramUI/Sources/CommandChatInputPanelItem.swift
index a6d809ba14..bd800e6984 100644
--- a/submodules/TelegramUI/Sources/CommandChatInputPanelItem.swift
+++ b/submodules/TelegramUI/Sources/CommandChatInputPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift
index dfd628d004..f656b43d2b 100644
--- a/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/CommandMenuChatInputContextPanelNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Display
import TelegramPresentationData
import TelegramUIPreferences
@@ -71,11 +70,10 @@ final class CommandMenuChatInputContextPanelNode: ChatInputContextPanelNode {
self.listView.clipsToBounds = false
self.listView.isOpaque = false
self.listView.stackFromBottom = true
-// self.listView.keepBottomItemOverscrollBackground = theme.list.plainBackgroundColor
self.listView.limitHitTestToNodes = true
self.listView.view.disablesInteractiveTransitionGestureRecognizer = true
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init(context: context, theme: theme, strings: strings, fontSize: fontSize)
diff --git a/submodules/TelegramUI/Sources/CommandMenuChatInputPanelItem.swift b/submodules/TelegramUI/Sources/CommandMenuChatInputPanelItem.swift
index 6f7c52ec01..d54c6e9b13 100644
--- a/submodules/TelegramUI/Sources/CommandMenuChatInputPanelItem.swift
+++ b/submodules/TelegramUI/Sources/CommandMenuChatInputPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ComposeController.swift b/submodules/TelegramUI/Sources/ComposeController.swift
index cf1f47b27f..0f709e5c21 100644
--- a/submodules/TelegramUI/Sources/ComposeController.swift
+++ b/submodules/TelegramUI/Sources/ComposeController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import AlertUI
diff --git a/submodules/TelegramUI/Sources/ComposeControllerNode.swift b/submodules/TelegramUI/Sources/ComposeControllerNode.swift
index cd6fdee9b8..00e413ddf1 100644
--- a/submodules/TelegramUI/Sources/ComposeControllerNode.swift
+++ b/submodules/TelegramUI/Sources/ComposeControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
@@ -39,7 +38,6 @@ final class ComposeControllerNode: ASDisplayNode {
self.presentationData = context.sharedContext.currentPresentationData.with { $0 }
var openCreateNewGroupImpl: (() -> Void)?
- var openCreateNewSecretChatImpl: (() -> Void)?
var openCreateContactImpl: (() -> Void)?
var openCreateNewChannelImpl: (() -> Void)?
@@ -68,9 +66,6 @@ final class ComposeControllerNode: ASDisplayNode {
openCreateNewGroupImpl = { [weak self] in
self?.openCreateNewGroup?()
}
- openCreateNewSecretChatImpl = { [weak self] in
- self?.openCreateNewSecretChat?()
- }
openCreateContactImpl = { [weak self] in
self?.contactListNode.listNode.clearHighlightAnimated(true)
self?.openCreateContact?()
diff --git a/submodules/TelegramUI/Sources/ContactMultiselectionController.swift b/submodules/TelegramUI/Sources/ContactMultiselectionController.swift
index 9f7af80a89..26ffc272b3 100644
--- a/submodules/TelegramUI/Sources/ContactMultiselectionController.swift
+++ b/submodules/TelegramUI/Sources/ContactMultiselectionController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ProgressNavigationButtonNode
diff --git a/submodules/TelegramUI/Sources/ContactMultiselectionControllerNode.swift b/submodules/TelegramUI/Sources/ContactMultiselectionControllerNode.swift
index c96e0e47d2..1f60a57dbf 100644
--- a/submodules/TelegramUI/Sources/ContactMultiselectionControllerNode.swift
+++ b/submodules/TelegramUI/Sources/ContactMultiselectionControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import MergeLists
@@ -93,7 +92,7 @@ final class ContactMultiselectionControllerNode: ASDisplayNode {
placeholder = self.presentationData.strings.ChatListFilter_AddChatsTitle
let chatListNode = ChatListNode(context: context, groupId: .root, previewing: false, fillPreloadItems: false, mode: .peers(filter: [.excludeSecretChats], isSelecting: true, additionalCategories: additionalCategories?.categories ?? [], chatListFilters: chatListFilters), theme: self.presentationData.theme, fontSize: self.presentationData.listsFontSize, strings: self.presentationData.strings, dateTimeFormat: self.presentationData.dateTimeFormat, nameSortOrder: self.presentationData.nameSortOrder, nameDisplayOrder: self.presentationData.nameDisplayOrder, disableAnimations: true)
chatListNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
chatListNode.updateState { state in
var state = state
diff --git a/submodules/TelegramUI/Sources/ContactSelectionController.swift b/submodules/TelegramUI/Sources/ContactSelectionController.swift
index 317f3cfeef..d652907355 100644
--- a/submodules/TelegramUI/Sources/ContactSelectionController.swift
+++ b/submodules/TelegramUI/Sources/ContactSelectionController.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ProgressNavigationButtonNode
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ContactSelectionControllerNode.swift b/submodules/TelegramUI/Sources/ContactSelectionControllerNode.swift
index acf802b1bf..4cedfb98ab 100644
--- a/submodules/TelegramUI/Sources/ContactSelectionControllerNode.swift
+++ b/submodules/TelegramUI/Sources/ContactSelectionControllerNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/CreateChannelController.swift b/submodules/TelegramUI/Sources/CreateChannelController.swift
index d93801c7bf..e7dd59bb0c 100644
--- a/submodules/TelegramUI/Sources/CreateChannelController.swift
+++ b/submodules/TelegramUI/Sources/CreateChannelController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import LegacyComponents
import ItemListUI
diff --git a/submodules/TelegramUI/Sources/CreateGroupController.swift b/submodules/TelegramUI/Sources/CreateGroupController.swift
index daf2740e82..250104849b 100644
--- a/submodules/TelegramUI/Sources/CreateGroupController.swift
+++ b/submodules/TelegramUI/Sources/CreateGroupController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import LegacyComponents
diff --git a/submodules/TelegramUI/Sources/DeleteChatInputPanelNode.swift b/submodules/TelegramUI/Sources/DeleteChatInputPanelNode.swift
index 7884461726..e12d8f3e53 100644
--- a/submodules/TelegramUI/Sources/DeleteChatInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/DeleteChatInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
diff --git a/submodules/TelegramUI/Sources/DeviceContactDataManager.swift b/submodules/TelegramUI/Sources/DeviceContactDataManager.swift
index 89292acabb..508978d238 100644
--- a/submodules/TelegramUI/Sources/DeviceContactDataManager.swift
+++ b/submodules/TelegramUI/Sources/DeviceContactDataManager.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Contacts
import AddressBook
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/DisabledContextResultsChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/DisabledContextResultsChatInputContextPanelNode.swift
index a97efe5ac4..da52a17ac4 100644
--- a/submodules/TelegramUI/Sources/DisabledContextResultsChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/DisabledContextResultsChatInputContextPanelNode.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import AsyncDisplayKit
import Display
import TelegramPresentationData
@@ -46,7 +45,7 @@ final class DisabledContextResultsChatInputContextPanelNode: ChatInputContextPan
}
let banDescription: String
if untilDate != 0 && untilDate != Int32.max {
- banDescription = interfaceState.strings.Conversation_RestrictedInlineTimed(stringForFullDate(timestamp: untilDate, strings: interfaceState.strings, dateTimeFormat: interfaceState.dateTimeFormat)).0
+ banDescription = interfaceState.strings.Conversation_RestrictedInlineTimed(stringForFullDate(timestamp: untilDate, strings: interfaceState.strings, dateTimeFormat: interfaceState.dateTimeFormat)).string
} else if personal {
banDescription = interfaceState.strings.Conversation_RestrictedInline
} else {
diff --git a/submodules/TelegramUI/Sources/DocumentPreviewController.swift b/submodules/TelegramUI/Sources/DocumentPreviewController.swift
index 971ca25c4e..e18a9d7fa9 100644
--- a/submodules/TelegramUI/Sources/DocumentPreviewController.swift
+++ b/submodules/TelegramUI/Sources/DocumentPreviewController.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import QuickLook
import Display
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/DrawingStickersScreen.swift b/submodules/TelegramUI/Sources/DrawingStickersScreen.swift
index 9aebe8dbb9..5bc72657e9 100644
--- a/submodules/TelegramUI/Sources/DrawingStickersScreen.swift
+++ b/submodules/TelegramUI/Sources/DrawingStickersScreen.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import TelegramPresentationData
@@ -183,13 +182,13 @@ private final class DrawingStickersScreenNode: ViewControllerTracingNode {
self.stickerListView = ListView()
self.stickerListView.transform = CATransform3DMakeRotation(-CGFloat(Double.pi / 2.0), 0.0, 0.0, 1.0)
self.stickerListView.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.maskListView = ListView()
self.maskListView.transform = CATransform3DMakeRotation(-CGFloat(Double.pi / 2.0), 0.0, 0.0, 1.0)
self.maskListView.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.topSeparatorNode = ASDisplayNode()
diff --git a/submodules/TelegramUI/Sources/EditAccessoryPanelNode.swift b/submodules/TelegramUI/Sources/EditAccessoryPanelNode.swift
index 50eab52af5..f7b3e2e991 100644
--- a/submodules/TelegramUI/Sources/EditAccessoryPanelNode.swift
+++ b/submodules/TelegramUI/Sources/EditAccessoryPanelNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
diff --git a/submodules/TelegramUI/Sources/EmojiResources.swift b/submodules/TelegramUI/Sources/EmojiResources.swift
index 4396a939f9..849c21353f 100644
--- a/submodules/TelegramUI/Sources/EmojiResources.swift
+++ b/submodules/TelegramUI/Sources/EmojiResources.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import WebPBinding
diff --git a/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift
index 8395ca849f..7f0117a7da 100644
--- a/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/EmojisChatInputContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import TelegramPresentationData
import TelegramUIPreferences
@@ -131,7 +130,7 @@ final class EmojisChatInputContextPanelNode: ChatInputContextPanelNode {
self.listView.view.disablesInteractiveTransitionGestureRecognizer = true
self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init(context: context, theme: theme, strings: strings, fontSize: fontSize)
diff --git a/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift b/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift
index 6b4da52b89..7fdb8192a5 100644
--- a/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift
+++ b/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/FeaturedStickersScreen.swift b/submodules/TelegramUI/Sources/FeaturedStickersScreen.swift
index 66a14b33b4..c69f746e39 100644
--- a/submodules/TelegramUI/Sources/FeaturedStickersScreen.swift
+++ b/submodules/TelegramUI/Sources/FeaturedStickersScreen.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/FetchCachedRepresentations.swift b/submodules/TelegramUI/Sources/FetchCachedRepresentations.swift
index 3c67d897f4..e5945e9be1 100644
--- a/submodules/TelegramUI/Sources/FetchCachedRepresentations.swift
+++ b/submodules/TelegramUI/Sources/FetchCachedRepresentations.swift
@@ -3,7 +3,6 @@ import UIKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import ImageIO
import MobileCoreServices
import Display
diff --git a/submodules/TelegramUI/Sources/FetchManager.swift b/submodules/TelegramUI/Sources/FetchManager.swift
index b6a80bd23b..9647c451b7 100644
--- a/submodules/TelegramUI/Sources/FetchManager.swift
+++ b/submodules/TelegramUI/Sources/FetchManager.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/FetchResource.swift b/submodules/TelegramUI/Sources/FetchResource.swift
index 3b436baf37..0210791a26 100644
--- a/submodules/TelegramUI/Sources/FetchResource.swift
+++ b/submodules/TelegramUI/Sources/FetchResource.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
func fetchResource(account: Account, resource: MediaResource, intervals: Signal<[(Range, MediaBoxFetchPriority)], NoError>) -> Signal? {
diff --git a/submodules/TelegramUI/Sources/FetchVideoMediaResource.swift b/submodules/TelegramUI/Sources/FetchVideoMediaResource.swift
index f38a850050..5404666e0d 100644
--- a/submodules/TelegramUI/Sources/FetchVideoMediaResource.swift
+++ b/submodules/TelegramUI/Sources/FetchVideoMediaResource.swift
@@ -3,7 +3,6 @@ import UIKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
import LegacyComponents
import FFMpegBinding
import LocalMediaResources
diff --git a/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift b/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift
index 74f6ab3e69..eab1c6d1ea 100644
--- a/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
diff --git a/submodules/TelegramUI/Sources/GifPaneSearchContentNode.swift b/submodules/TelegramUI/Sources/GifPaneSearchContentNode.swift
index 6c79d3ebfc..de1701f8d2 100644
--- a/submodules/TelegramUI/Sources/GifPaneSearchContentNode.swift
+++ b/submodules/TelegramUI/Sources/GifPaneSearchContentNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import WebSearchUI
@@ -30,25 +29,14 @@ func paneGifSearchForQuery(context: AccountContext, query: String, offset: Strin
let configuration = currentSearchBotsConfiguration(transaction: transaction)
return configuration.gifBotUsername ?? "gif"
}
- |> mapToSignal { botName -> Signal in
+ |> mapToSignal { botName -> Signal in
return context.engine.peers.resolvePeerByName(name: botName)
}
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return context.account.postbox.loadedPeerWithId(peerId)
- |> map { peer -> Peer? in
- return peer
- }
- |> take(1)
- } else {
- return .single(nil)
- }
- }
|> mapToSignal { peer -> Signal<(ChatPresentationInputQueryResult?, Bool, Bool), NoError> in
- if let user = peer as? TelegramUser, let botInfo = user.botInfo, let _ = botInfo.inlinePlaceholder {
+ if case let .user(user) = peer, let botInfo = user.botInfo, let _ = botInfo.inlinePlaceholder {
let results = requestContextResults(context: context, botId: user.id, query: query, peerId: context.account.peerId, offset: offset ?? "", incompleteResults: incompleteResults, staleCachedResults: staleCachedResults, limit: 1)
|> map { results -> (ChatPresentationInputQueryResult?, Bool, Bool) in
- return (.contextRequestResult(user, results?.results), results != nil, results?.isStale ?? false)
+ return (.contextRequestResult(.user(user), results?.results), results != nil, results?.isStale ?? false)
}
let maybeDelayedContextResults: Signal<(ChatPresentationInputQueryResult?, Bool, Bool), NoError>
diff --git a/submodules/TelegramUI/Sources/GridMessageItem.swift b/submodules/TelegramUI/Sources/GridMessageItem.swift
index 4c9b428bc7..e8c3a52717 100644
--- a/submodules/TelegramUI/Sources/GridMessageItem.swift
+++ b/submodules/TelegramUI/Sources/GridMessageItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift
index 13d813efca..39595ecfd5 100644
--- a/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/HashtagChatInputContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import TelegramPresentationData
import TelegramUIPreferences
@@ -77,7 +76,7 @@ final class HashtagChatInputContextPanelNode: ChatInputContextPanelNode {
self.listView.limitHitTestToNodes = true
self.listView.view.disablesInteractiveTransitionGestureRecognizer = true
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init(context: context, theme: theme, strings: strings, fontSize: fontSize)
diff --git a/submodules/TelegramUI/Sources/HashtagChatInputPanelItem.swift b/submodules/TelegramUI/Sources/HashtagChatInputPanelItem.swift
index 1f8a32d4a7..d2b0ed9670 100644
--- a/submodules/TelegramUI/Sources/HashtagChatInputPanelItem.swift
+++ b/submodules/TelegramUI/Sources/HashtagChatInputPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift
index 81340bfc95..be66ae6644 100644
--- a/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import SwiftSignalKit
import TelegramPresentationData
@@ -103,7 +102,7 @@ final class HorizontalListContextResultsChatInputContextPanelNode: ChatInputCont
self.listView.transform = CATransform3DMakeRotation(-CGFloat(CGFloat.pi / 2.0), 0.0, 0.0, 1.0)
self.listView.isHidden = true
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init(context: context, theme: theme, strings: strings, fontSize: fontSize)
diff --git a/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputPanelItem.swift b/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputPanelItem.swift
index 840fa30b8d..471042e3b9 100644
--- a/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputPanelItem.swift
+++ b/submodules/TelegramUI/Sources/HorizontalListContextResultsChatInputPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import AVFoundation
diff --git a/submodules/TelegramUI/Sources/HorizontalStickerGridItem.swift b/submodules/TelegramUI/Sources/HorizontalStickerGridItem.swift
index c8072be6b2..fce7434361 100755
--- a/submodules/TelegramUI/Sources/HorizontalStickerGridItem.swift
+++ b/submodules/TelegramUI/Sources/HorizontalStickerGridItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/TelegramUI/Sources/HorizontalStickersChatContextPanelNode.swift b/submodules/TelegramUI/Sources/HorizontalStickersChatContextPanelNode.swift
index 0ab47cce87..1cfa240838 100755
--- a/submodules/TelegramUI/Sources/HorizontalStickersChatContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/HorizontalStickersChatContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ICloudResources.swift b/submodules/TelegramUI/Sources/ICloudResources.swift
index 5cf472358a..0e90fb30df 100644
--- a/submodules/TelegramUI/Sources/ICloudResources.swift
+++ b/submodules/TelegramUI/Sources/ICloudResources.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import Pdf
diff --git a/submodules/TelegramUI/Sources/InChatPrefetchManager.swift b/submodules/TelegramUI/Sources/InChatPrefetchManager.swift
index 0c22fb6851..8f06916e22 100644
--- a/submodules/TelegramUI/Sources/InChatPrefetchManager.swift
+++ b/submodules/TelegramUI/Sources/InChatPrefetchManager.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import AccountContext
import PhotoResources
diff --git a/submodules/TelegramUI/Sources/InlineReactionSearchPanel.swift b/submodules/TelegramUI/Sources/InlineReactionSearchPanel.swift
index 83151604e4..aa6c55d761 100644
--- a/submodules/TelegramUI/Sources/InlineReactionSearchPanel.swift
+++ b/submodules/TelegramUI/Sources/InlineReactionSearchPanel.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/LegacyCamera.swift b/submodules/TelegramUI/Sources/LegacyCamera.swift
index 6a92bb8726..d687b115fd 100644
--- a/submodules/TelegramUI/Sources/LegacyCamera.swift
+++ b/submodules/TelegramUI/Sources/LegacyCamera.swift
@@ -3,7 +3,6 @@ import UIKit
import LegacyComponents
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import AccountContext
diff --git a/submodules/TelegramUI/Sources/LegacyInstantVideoController.swift b/submodules/TelegramUI/Sources/LegacyInstantVideoController.swift
index ce69f1bad7..85f3fda22d 100644
--- a/submodules/TelegramUI/Sources/LegacyInstantVideoController.swift
+++ b/submodules/TelegramUI/Sources/LegacyInstantVideoController.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/ManageSharedAccountInfo.swift b/submodules/TelegramUI/Sources/ManageSharedAccountInfo.swift
index a18d839225..7745eb5493 100644
--- a/submodules/TelegramUI/Sources/ManageSharedAccountInfo.swift
+++ b/submodules/TelegramUI/Sources/ManageSharedAccountInfo.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import LightweightAccountData
diff --git a/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift b/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift
index 2bbd55a7a9..ab3b23d82a 100644
--- a/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift
+++ b/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import CoreMedia
import AVFoundation
import TelegramCore
-import SyncCore
import TelegramAudio
import UniversalMediaPlayer
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift b/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift
index 6fb6235cb3..0a5a2cdb37 100644
--- a/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift
+++ b/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift
@@ -2,7 +2,6 @@ import Foundation
import Display
import AsyncDisplayKit
import Postbox
-import SyncCore
import TelegramCore
import SwiftSignalKit
import AccountContext
diff --git a/submodules/TelegramUI/Sources/MediaInputPaneTrendingItem.swift b/submodules/TelegramUI/Sources/MediaInputPaneTrendingItem.swift
index 51a9b26dd8..714d203d11 100644
--- a/submodules/TelegramUI/Sources/MediaInputPaneTrendingItem.swift
+++ b/submodules/TelegramUI/Sources/MediaInputPaneTrendingItem.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import StickerResources
import AccountContext
diff --git a/submodules/TelegramUI/Sources/MediaManager.swift b/submodules/TelegramUI/Sources/MediaManager.swift
index 3a1d3e1b1f..3f1d6a3a3b 100644
--- a/submodules/TelegramUI/Sources/MediaManager.swift
+++ b/submodules/TelegramUI/Sources/MediaManager.swift
@@ -4,7 +4,6 @@ import AVFoundation
import MobileCoreServices
import Postbox
import TelegramCore
-import SyncCore
import MediaPlayer
import TelegramAudio
import UniversalMediaPlayer
diff --git a/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift
index 1e908b3475..2b32115f6d 100644
--- a/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/MentionChatInputContextPanelNode.swift
@@ -1,9 +1,7 @@
import Foundation
import UIKit
import AsyncDisplayKit
-import Postbox
import TelegramCore
-import SyncCore
import Display
import TelegramPresentationData
import TelegramUIPreferences
@@ -15,7 +13,7 @@ import ItemListUI
private struct MentionChatInputContextPanelEntry: Comparable, Identifiable {
let index: Int
- let peer: Peer
+ let peer: EnginePeer
let revealed: Bool
var stableId: Int64 {
@@ -23,15 +21,15 @@ private struct MentionChatInputContextPanelEntry: Comparable, Identifiable {
}
static func ==(lhs: MentionChatInputContextPanelEntry, rhs: MentionChatInputContextPanelEntry) -> Bool {
- return lhs.index == rhs.index && lhs.peer.isEqual(rhs.peer) && lhs.revealed == rhs.revealed
+ return lhs.index == rhs.index && lhs.peer == rhs.peer && lhs.revealed == rhs.revealed
}
static func <(lhs: MentionChatInputContextPanelEntry, rhs: MentionChatInputContextPanelEntry) -> Bool {
return lhs.index < rhs.index
}
- func item(context: AccountContext, presentationData: PresentationData, inverted: Bool, setPeerIdRevealed: @escaping (PeerId?) -> Void, peerSelected: @escaping (Peer) -> Void, removeRequested: @escaping (PeerId) -> Void) -> ListViewItem {
- return MentionChatInputPanelItem(context: context, presentationData: ItemListPresentationData(presentationData), inverted: inverted, peer: self.peer, revealed: self.revealed, setPeerIdRevealed: setPeerIdRevealed, peerSelected: peerSelected, removeRequested: removeRequested)
+ func item(context: AccountContext, presentationData: PresentationData, inverted: Bool, setPeerIdRevealed: @escaping (EnginePeer.Id?) -> Void, peerSelected: @escaping (EnginePeer) -> Void, removeRequested: @escaping (EnginePeer.Id) -> Void) -> ListViewItem {
+ return MentionChatInputPanelItem(context: context, presentationData: ItemListPresentationData(presentationData), inverted: inverted, peer: self.peer._asPeer(), revealed: self.revealed, setPeerIdRevealed: setPeerIdRevealed, peerSelected: peerSelected, removeRequested: removeRequested)
}
}
@@ -41,7 +39,7 @@ private struct CommandChatInputContextPanelTransition {
let updates: [ListViewUpdateItem]
}
-private func preparedTransition(from fromEntries: [MentionChatInputContextPanelEntry], to toEntries: [MentionChatInputContextPanelEntry], context: AccountContext, presentationData: PresentationData, inverted: Bool, forceUpdate: Bool, setPeerIdRevealed: @escaping (PeerId?) -> Void, peerSelected: @escaping (Peer) -> Void, removeRequested: @escaping (PeerId) -> Void) -> CommandChatInputContextPanelTransition {
+private func preparedTransition(from fromEntries: [MentionChatInputContextPanelEntry], to toEntries: [MentionChatInputContextPanelEntry], context: AccountContext, presentationData: PresentationData, inverted: Bool, forceUpdate: Bool, setPeerIdRevealed: @escaping (EnginePeer.Id?) -> Void, peerSelected: @escaping (EnginePeer) -> Void, removeRequested: @escaping (EnginePeer.Id) -> Void) -> CommandChatInputContextPanelTransition {
let (deleteIndices, indicesAndItems, updateIndices) = mergeListsStableWithUpdates(leftList: fromEntries, rightList: toEntries, allUpdated: forceUpdate)
let deletions = deleteIndices.map { ListViewDeleteItem(index: $0, directionHint: nil) }
@@ -62,8 +60,8 @@ final class MentionChatInputContextPanelNode: ChatInputContextPanelNode {
private let listView: ListView
private var currentEntries: [MentionChatInputContextPanelEntry]?
- private var currentResults: [Peer] = []
- private var revealedPeerId: PeerId?
+ private var currentResults: [EnginePeer] = []
+ private var revealedPeerId: EnginePeer.Id?
private var enqueuedTransitions: [(CommandChatInputContextPanelTransition, Bool)] = []
private var validLayout: (CGSize, CGFloat, CGFloat, CGFloat)?
@@ -78,7 +76,7 @@ final class MentionChatInputContextPanelNode: ChatInputContextPanelNode {
self.listView.limitHitTestToNodes = true
self.listView.view.disablesInteractiveTransitionGestureRecognizer = true
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init(context: context, theme: theme, strings: strings, fontSize: fontSize)
@@ -93,7 +91,7 @@ final class MentionChatInputContextPanelNode: ChatInputContextPanelNode {
}
}
- func updateResults(_ results: [Peer]) {
+ func updateResults(_ results: [EnginePeer]) {
self.currentResults = results
var entries: [MentionChatInputContextPanelEntry] = []
@@ -160,7 +158,7 @@ final class MentionChatInputContextPanelNode: ChatInputContextPanelNode {
return (textInputState, inputMode)
}
case .search:
- interfaceInteraction.beginMessageSearch(.member(peer), "")
+ interfaceInteraction.beginMessageSearch(.member(peer._asPeer()), "")
}
}
}, removeRequested: { [weak self] peerId in
@@ -228,7 +226,7 @@ final class MentionChatInputContextPanelNode: ChatInputContextPanelNode {
}
private func topInsetForLayout(size: CGSize) -> CGFloat {
- var minimumItemHeights: CGFloat = floor(MentionChatInputPanelItemNode.itemHeight * 3.5)
+ let minimumItemHeights: CGFloat = floor(MentionChatInputPanelItemNode.itemHeight * 3.5)
return max(size.height - minimumItemHeights, 0.0)
}
diff --git a/submodules/TelegramUI/Sources/MentionChatInputPanelItem.swift b/submodules/TelegramUI/Sources/MentionChatInputPanelItem.swift
index 5b4a98c197..1605756d1f 100644
--- a/submodules/TelegramUI/Sources/MentionChatInputPanelItem.swift
+++ b/submodules/TelegramUI/Sources/MentionChatInputPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
@@ -18,13 +17,13 @@ final class MentionChatInputPanelItem: ListViewItem {
fileprivate let revealed: Bool
fileprivate let inverted: Bool
fileprivate let peer: Peer
- private let peerSelected: (Peer) -> Void
- fileprivate let setPeerIdRevealed: (PeerId?) -> Void
- fileprivate let removeRequested: (PeerId) -> Void
+ private let peerSelected: (EnginePeer) -> Void
+ fileprivate let setPeerIdRevealed: (EnginePeer.Id?) -> Void
+ fileprivate let removeRequested: (EnginePeer.Id) -> Void
let selectable: Bool = true
- public init(context: AccountContext, presentationData: ItemListPresentationData, inverted: Bool, peer: Peer, revealed: Bool, setPeerIdRevealed: @escaping (PeerId?) -> Void, peerSelected: @escaping (Peer) -> Void, removeRequested: @escaping (PeerId) -> Void) {
+ public init(context: AccountContext, presentationData: ItemListPresentationData, inverted: Bool, peer: Peer, revealed: Bool, setPeerIdRevealed: @escaping (PeerId?) -> Void, peerSelected: @escaping (EnginePeer) -> Void, removeRequested: @escaping (PeerId) -> Void) {
self.context = context
self.presentationData = presentationData
self.inverted = inverted
@@ -86,7 +85,7 @@ final class MentionChatInputPanelItem: ListViewItem {
if self.revealed {
self.setPeerIdRevealed(nil)
} else {
- self.peerSelected(self.peer)
+ self.peerSelected(EnginePeer(self.peer))
}
}
}
@@ -188,8 +187,6 @@ final class MentionChatInputPanelItemNode: ListViewItemNode {
strongSelf.validLayout = (nodeLayout.contentSize, params.leftInset, params.rightInset)
- let revealOffset = strongSelf.revealOffset
-
if let updatedInverted = updatedInverted {
if updatedInverted {
strongSelf.transform = CATransform3DMakeRotation(CGFloat(Double.pi), 0.0, 0.0, 1.0)
@@ -231,7 +228,7 @@ final class MentionChatInputPanelItemNode: ListViewItemNode {
}
func updateRevealOffset(offset: CGFloat, transition: ContainedViewLayoutTransition) {
- if let (size, leftInset, rightInset) = self.validLayout {
+ if let (size, leftInset, _) = self.validLayout {
transition.updateFrameAdditive(node: self.avatarNode, frame: CGRect(origin: CGPoint(x: min(offset, 0.0) + 12.0 + leftInset, y: self.avatarNode.frame.minY), size: self.avatarNode.frame.size))
transition.updateFrameAdditive(node: self.textNode, frame: CGRect(origin: CGPoint(x: min(offset, 0.0) + 55.0 + leftInset, y: self.textNode.frame.minY), size: self.textNode.frame.size))
}
@@ -240,7 +237,7 @@ final class MentionChatInputPanelItemNode: ListViewItemNode {
override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
super.setHighlighted(highlighted, at: point, animated: animated)
- if let revealNode = self.revealNode, self.revealOffset != 0 {
+ if let _ = self.revealNode, self.revealOffset != 0 {
return
}
@@ -419,7 +416,7 @@ final class MentionChatInputPanelItemNode: ListViewItemNode {
private func updateRevealOffsetInternal(offset: CGFloat, transition: ContainedViewLayoutTransition) {
self.revealOffset = offset
- guard let (size, leftInset, rightInset) = self.validLayout else {
+ guard let (size, _, rightInset) = self.validLayout else {
return
}
diff --git a/submodules/TelegramUI/Sources/MultiplexedVideoNode.swift b/submodules/TelegramUI/Sources/MultiplexedVideoNode.swift
index 0718703b26..9ebfa1d597 100644
--- a/submodules/TelegramUI/Sources/MultiplexedVideoNode.swift
+++ b/submodules/TelegramUI/Sources/MultiplexedVideoNode.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import AVFoundation
import ContextUI
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/NavigateToChatController.swift b/submodules/TelegramUI/Sources/NavigateToChatController.swift
index f464fc7811..da44828a2a 100644
--- a/submodules/TelegramUI/Sources/NavigateToChatController.swift
+++ b/submodules/TelegramUI/Sources/NavigateToChatController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import AccountContext
import GalleryUI
diff --git a/submodules/TelegramUI/Sources/NotificationContainerController.swift b/submodules/TelegramUI/Sources/NotificationContainerController.swift
index d7df98709e..b5d8e6adbf 100644
--- a/submodules/TelegramUI/Sources/NotificationContainerController.swift
+++ b/submodules/TelegramUI/Sources/NotificationContainerController.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/NotificationContentContext.swift b/submodules/TelegramUI/Sources/NotificationContentContext.swift
index e2e5e653f5..90b06a8ae2 100644
--- a/submodules/TelegramUI/Sources/NotificationContentContext.swift
+++ b/submodules/TelegramUI/Sources/NotificationContentContext.swift
@@ -3,7 +3,6 @@ import UserNotifications
import UserNotificationsUI
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/OpenAddContact.swift b/submodules/TelegramUI/Sources/OpenAddContact.swift
index dec7f34047..cead38120e 100644
--- a/submodules/TelegramUI/Sources/OpenAddContact.swift
+++ b/submodules/TelegramUI/Sources/OpenAddContact.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Display
import DeviceAccess
import AccountContext
diff --git a/submodules/TelegramUI/Sources/OpenChatMessage.swift b/submodules/TelegramUI/Sources/OpenChatMessage.swift
index 7d9a6c640d..a379d9859f 100644
--- a/submodules/TelegramUI/Sources/OpenChatMessage.swift
+++ b/submodules/TelegramUI/Sources/OpenChatMessage.swift
@@ -3,7 +3,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import PassKit
import Lottie
@@ -92,11 +91,11 @@ func openChatMessageImpl(_ params: OpenChatMessageParams) -> Bool {
}
switch action {
case .add:
- params.navigationController?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).0, undo: false, info: info, topItem: items.first, context: params.context), elevatedLayout: true, animateInAsReplacement: animateInAsReplacement, action: { _ in
+ params.navigationController?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).string, undo: false, info: info, topItem: items.first, context: params.context), elevatedLayout: true, animateInAsReplacement: animateInAsReplacement, action: { _ in
return true
}))
case let .remove(positionInList):
- params.navigationController?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_RemovedTitle, text: presentationData.strings.StickerPackActionInfo_RemovedText(info.title).0, undo: true, info: info, topItem: items.first, context: params.context), elevatedLayout: true, animateInAsReplacement: animateInAsReplacement, action: { action in
+ params.navigationController?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_RemovedTitle, text: presentationData.strings.StickerPackActionInfo_RemovedText(info.title).string, undo: true, info: info, topItem: items.first, context: params.context), elevatedLayout: true, animateInAsReplacement: animateInAsReplacement, action: { action in
if case .undo = action {
let _ = params.context.engine.stickers.addStickerPackInteractively(info: info, items: items, positionInList: positionInList).start()
}
diff --git a/submodules/TelegramUI/Sources/OpenResolvedUrl.swift b/submodules/TelegramUI/Sources/OpenResolvedUrl.swift
index b368cf9faf..0f2dd98798 100644
--- a/submodules/TelegramUI/Sources/OpenResolvedUrl.swift
+++ b/submodules/TelegramUI/Sources/OpenResolvedUrl.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import SwiftSignalKit
@@ -178,7 +177,7 @@ func openResolvedUrlImpl(_ resolvedUrl: ResolvedUrl, context: AccountContext, ur
})
if !found {
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
- present(textAlertController(context: context, title: nil, text: presentationData.strings.AuthCode_Alert(formattedConfirmationCode(code)).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
+ present(textAlertController(context: context, title: nil, text: presentationData.strings.AuthCode_Alert(formattedConfirmationCode(code)).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
}
}
case let .cancelAccountReset(phone, hash):
@@ -243,13 +242,10 @@ func openResolvedUrlImpl(_ resolvedUrl: ResolvedUrl, context: AccountContext, ur
if let to = to {
if to.hasPrefix("@") {
let _ = (context.engine.peers.resolvePeerByName(name: String(to[to.index(to.startIndex, offsetBy: 1)...]))
- |> deliverOnMainQueue).start(next: { peerId in
- if let peerId = peerId {
- let _ = (context.account.postbox.loadedPeerWithId(peerId)
- |> deliverOnMainQueue).start(next: { peer in
- context.sharedContext.applicationBindings.dismissNativeController()
- continueWithPeer(peer.id)
- })
+ |> deliverOnMainQueue).start(next: { peer in
+ if let peer = peer {
+ context.sharedContext.applicationBindings.dismissNativeController()
+ continueWithPeer(peer.id)
}
})
} else {
diff --git a/submodules/TelegramUI/Sources/OpenUrl.swift b/submodules/TelegramUI/Sources/OpenUrl.swift
index 106fd25f93..240a799b53 100644
--- a/submodules/TelegramUI/Sources/OpenUrl.swift
+++ b/submodules/TelegramUI/Sources/OpenUrl.swift
@@ -2,7 +2,6 @@ import Foundation
import Display
import SafariServices
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import MtProtoKit
diff --git a/submodules/TelegramUI/Sources/OverlayAudioPlayerController.swift b/submodules/TelegramUI/Sources/OverlayAudioPlayerController.swift
index c0050e3893..cc6de0a949 100644
--- a/submodules/TelegramUI/Sources/OverlayAudioPlayerController.swift
+++ b/submodules/TelegramUI/Sources/OverlayAudioPlayerController.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import SwiftSignalKit
@@ -91,14 +90,14 @@ final class OverlayAudioPlayerControllerImpl: ViewController, OverlayAudioPlayer
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0
+ text = presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0
+ text = presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0
+ text = presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
diff --git a/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift b/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift
index 748d69ccf2..f392f8b9e5 100644
--- a/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift
+++ b/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
diff --git a/submodules/TelegramUI/Sources/OverlayInstantVideoNode.swift b/submodules/TelegramUI/Sources/OverlayInstantVideoNode.swift
index 0dd5c3327d..6f9ada6896 100644
--- a/submodules/TelegramUI/Sources/OverlayInstantVideoNode.swift
+++ b/submodules/TelegramUI/Sources/OverlayInstantVideoNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import UniversalMediaPlayer
diff --git a/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift b/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift
index 96391f630f..2f648a2f48 100644
--- a/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift
+++ b/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import UniversalMediaPlayer
diff --git a/submodules/TelegramUI/Sources/OwnershipTransferController.swift b/submodules/TelegramUI/Sources/OwnershipTransferController.swift
index b353e7a8f3..3659921a58 100644
--- a/submodules/TelegramUI/Sources/OwnershipTransferController.swift
+++ b/submodules/TelegramUI/Sources/OwnershipTransferController.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ActivityIndicator
import TextFormat
diff --git a/submodules/TelegramUI/Sources/PaneSearchContainerNode.swift b/submodules/TelegramUI/Sources/PaneSearchContainerNode.swift
index 1059cb07cb..db73a8b356 100644
--- a/submodules/TelegramUI/Sources/PaneSearchContainerNode.swift
+++ b/submodules/TelegramUI/Sources/PaneSearchContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/Pasteboard.swift b/submodules/TelegramUI/Sources/Pasteboard.swift
index 0812d7e1ec..8189c08a48 100644
--- a/submodules/TelegramUI/Sources/Pasteboard.swift
+++ b/submodules/TelegramUI/Sources/Pasteboard.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import MobileCoreServices
import TextFormat
diff --git a/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenDisclosureEncryptionKeyItem.swift b/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenDisclosureEncryptionKeyItem.swift
index 542c5ce334..f532c81631 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenDisclosureEncryptionKeyItem.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenDisclosureEncryptionKeyItem.swift
@@ -1,8 +1,8 @@
import AsyncDisplayKit
import Display
import TelegramPresentationData
-import SyncCore
import EncryptionKeyVisualization
+import TelegramCore
final class PeerInfoScreenDisclosureEncryptionKeyItem: PeerInfoScreenItem {
let id: AnyHashable
diff --git a/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenInfoItem.swift b/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenInfoItem.swift
index 9c345239af..1ff9d4634c 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenInfoItem.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenInfoItem.swift
@@ -7,7 +7,6 @@ import ItemListPeerItem
import SwiftSignalKit
import AccountContext
import Postbox
-import SyncCore
import TelegramCore
import ItemListUI
diff --git a/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenMemberItem.swift b/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenMemberItem.swift
index 12f145a5b7..03019e6908 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenMemberItem.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/ListItems/PeerInfoScreenMemberItem.swift
@@ -7,7 +7,6 @@ import ItemListPeerItem
import SwiftSignalKit
import AccountContext
import Postbox
-import SyncCore
import TelegramCore
import ItemListUI
diff --git a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoGroupsInCommonPaneNode.swift b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoGroupsInCommonPaneNode.swift
index f8ede6a784..1fb029429a 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoGroupsInCommonPaneNode.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoGroupsInCommonPaneNode.swift
@@ -1,7 +1,6 @@
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
@@ -91,7 +90,7 @@ final class PeerInfoGroupsInCommonPaneNode: ASDisplayNode, PeerInfoPaneNode {
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoListPaneNode.swift b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoListPaneNode.swift
index 8ed2fdda00..6545a7e36d 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoListPaneNode.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoListPaneNode.swift
@@ -1,7 +1,6 @@
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoMembersPane.swift b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoMembersPane.swift
index 0cdb4c218b..78a914e13e 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoMembersPane.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoMembersPane.swift
@@ -1,7 +1,6 @@
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
@@ -132,7 +131,7 @@ final class PeerInfoMembersPaneNode: ASDisplayNode, PeerInfoPaneNode {
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
self.listNode = ListView()
self.listNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoVisualMediaPaneNode.swift b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoVisualMediaPaneNode.swift
index 6dfd9daf04..9a5af497b4 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoVisualMediaPaneNode.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/Panes/PeerInfoVisualMediaPaneNode.swift
@@ -1,7 +1,6 @@
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift
index c4b9964353..aaea24f199 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import Postbox
-import SyncCore
import TelegramCore
import SwiftSignalKit
import AccountContext
diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoHeaderNode.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoHeaderNode.swift
index 662ae05eb1..c45236ee00 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoHeaderNode.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoHeaderNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import Postbox
-import SyncCore
import TelegramCore
import AvatarNode
import AccountContext
diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoMembers.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoMembers.swift
index d2caec111c..f6cc4942c8 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoMembers.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoMembers.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import AccountContext
import TemporaryCachedPeerDataManager
diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoPaneContainerNode.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoPaneContainerNode.swift
index 22b50b5d73..8d8a84b24f 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoPaneContainerNode.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoPaneContainerNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import TelegramPresentationData
import Postbox
-import SyncCore
import TelegramCore
import AccountContext
import ContextUI
diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift
index 7a34df2f69..a4884f89dd 100644
--- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift
+++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AccountContext
import TelegramPresentationData
@@ -698,12 +697,12 @@ private func settingsItems(data: PeerInfoScreenData?, context: AccountContext, p
if let settings = data.globalSettings {
if settings.suggestPhoneNumberConfirmation, let peer = data.peer as? TelegramUser {
let phoneNumber = formatPhoneNumber(peer.phone ?? "")
- items[.phone]!.append(PeerInfoScreenInfoItem(id: 0, title: presentationData.strings.Settings_CheckPhoneNumberTitle(phoneNumber).0, text: .markdown(presentationData.strings.Settings_CheckPhoneNumberText), linkAction: { link in
+ items[.phone]!.append(PeerInfoScreenInfoItem(id: 0, title: presentationData.strings.Settings_CheckPhoneNumberTitle(phoneNumber).string, text: .markdown(presentationData.strings.Settings_CheckPhoneNumberText), linkAction: { link in
if case .tap = link {
interaction.openFaq("q-i-have-a-new-phone-number-what-do-i-do")
}
}))
- items[.phone]!.append(PeerInfoScreenActionItem(id: 1, text: presentationData.strings.Settings_KeepPhoneNumber(phoneNumber).0, action: {
+ items[.phone]!.append(PeerInfoScreenActionItem(id: 1, text: presentationData.strings.Settings_KeepPhoneNumber(phoneNumber).string, action: {
let _ = dismissServerProvidedSuggestion(account: context.account, suggestion: .validatePhoneNumber).start()
}))
items[.phone]!.append(PeerInfoScreenActionItem(id: 2, text: presentationData.strings.Settings_ChangePhoneNumber, action: {
@@ -1815,7 +1814,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
if isChannel {
globalTitle = presentationData.strings.Conversation_DeleteMessagesForMe
} else if let personalPeerName = personalPeerName {
- globalTitle = presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).0
+ globalTitle = presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).string
} else {
globalTitle = presentationData.strings.Conversation_DeleteMessagesForEveryone
}
@@ -1949,7 +1948,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
if isChannel {
globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesForMe
} else if let personalPeerName = personalPeerName {
- globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).0
+ globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).string
} else {
globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesForEveryone
}
@@ -3274,14 +3273,8 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
let account = self.context.account
disposable.set((resolveSignal
|> take(1)
- |> mapToSignal { peerId -> Signal in
- return account.postbox.transaction { transaction -> Peer? in
- if let peerId = peerId {
- return transaction.getPeer(peerId)
- } else {
- return nil
- }
- }
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
|> deliverOnMainQueue).start(next: { [weak self] peer in
if let strongSelf = self {
@@ -3308,13 +3301,8 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
var resolveSignal: Signal
if let peerName = peerName {
resolveSignal = self.context.engine.peers.resolvePeerByName(name: peerName)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return account.postbox.loadedPeerWithId(peerId)
- |> map(Optional.init)
- } else {
- return .single(nil)
- }
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
} else {
resolveSignal = self.context.account.postbox.loadedPeerWithId(self.peerId)
@@ -3603,14 +3591,14 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_ContactForwardTooltip_Chat_One(peerName).0
+ text = presentationData.strings.UserInfo_ContactForwardTooltip_Chat_One(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_ContactForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0
+ text = presentationData.strings.UserInfo_ContactForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_ContactForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0
+ text = presentationData.strings.UserInfo_ContactForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -3841,7 +3829,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
}
if let controller = strongSelf.controller {
let displayTitle = peer?.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder) ?? ""
- controller.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.UserInfo_StartSecretChatConfirmation(displayTitle).0, actions: [TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.UserInfo_StartSecretChatStart, action: {
+ controller.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.UserInfo_StartSecretChatConfirmation(displayTitle).string, actions: [TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.UserInfo_StartSecretChatStart, action: {
guard let strongSelf = self else {
return
}
@@ -3927,14 +3915,14 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_LinkForwardTooltip_Chat_One(peerName).0
+ text = presentationData.strings.UserInfo_LinkForwardTooltip_Chat_One(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_LinkForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0
+ text = presentationData.strings.UserInfo_LinkForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_LinkForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0
+ text = presentationData.strings.UserInfo_LinkForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -3986,7 +3974,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
return
}
if cachedUserData.callsPrivate {
- self.controller?.present(textAlertController(context: self.context, title: self.presentationData.strings.Call_ConnectionErrorTitle, text: self.presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
+ self.controller?.present(textAlertController(context: self.context, title: self.presentationData.strings.Call_ConnectionErrorTitle, text: self.presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
return
}
@@ -4215,7 +4203,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
|> deliverOnMainQueue).start(completed: { [weak self] in
if let strongSelf = self, let peer = strongSelf.data?.peer {
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
- let controller = UndoOverlayController(presentationData: presentationData, content: .info(text: presentationData.strings.Conversation_DeletedFromContacts(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false })
+ let controller = UndoOverlayController(presentationData: presentationData, content: .info(text: presentationData.strings.Conversation_DeletedFromContacts(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false })
controller.keepOnParentDismissal = true
strongSelf.controller?.present(controller, in: .window(.root))
@@ -4292,8 +4280,8 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
let deleteChat = false
actionSheet.setItemGroups([
ActionSheetItemGroup(items: [
- ActionSheetTextItem(title: presentationData.strings.UserInfo_BlockConfirmationTitle(peer.compactDisplayTitle).0),
- ActionSheetButtonItem(title: presentationData.strings.UserInfo_BlockActionTitle(peer.compactDisplayTitle).0, color: .destructive, action: {
+ ActionSheetTextItem(title: presentationData.strings.UserInfo_BlockConfirmationTitle(peer.compactDisplayTitle).string),
+ ActionSheetButtonItem(title: presentationData.strings.UserInfo_BlockActionTitle(peer.compactDisplayTitle).string, color: .destructive, action: {
dismissAction()
guard let strongSelf = self else {
return
@@ -4317,9 +4305,9 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
} else {
let text: String
if block {
- text = presentationData.strings.UserInfo_BlockConfirmation(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.UserInfo_BlockConfirmation(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
} else {
- text = presentationData.strings.UserInfo_UnblockConfirmation(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.UserInfo_UnblockConfirmation(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
strongSelf.controller?.present(textAlertController(context: strongSelf.context, title: nil, text: text, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_No, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Yes, action: {
guard let strongSelf = self else {
@@ -4585,14 +4573,14 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_LinkForwardTooltip_Chat_One(peerName).0
+ text = presentationData.strings.UserInfo_LinkForwardTooltip_Chat_One(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_LinkForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0
+ text = presentationData.strings.UserInfo_LinkForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = presentationData.strings.UserInfo_LinkForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0
+ text = presentationData.strings.UserInfo_LinkForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -5506,10 +5494,10 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
let context = self.context
let navigationController = self.controller?.navigationController as? NavigationController
- self.tipsPeerDisposable.set((self.context.engine.peers.resolvePeerByName(name: self.presentationData.strings.Settings_TipsUsername) |> deliverOnMainQueue).start(next: { [weak controller] peerId in
+ self.tipsPeerDisposable.set((self.context.engine.peers.resolvePeerByName(name: self.presentationData.strings.Settings_TipsUsername) |> deliverOnMainQueue).start(next: { [weak controller] peer in
controller?.dismiss()
- if let peerId = peerId, let navigationController = navigationController {
- context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: context, chatLocation: .peer(peerId)))
+ if let peer = peer, let navigationController = navigationController {
+ context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: context, chatLocation: .peer(peer.id)))
}
}))
}
@@ -5617,7 +5605,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
if isChannel {
globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesForMe
} else if let personalPeerName = personalPeerName {
- globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).0
+ globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(personalPeerName).string
} else {
globalTitle = strongSelf.presentationData.strings.Conversation_DeleteMessagesForEveryone
}
@@ -5721,14 +5709,14 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
} else {
if peers.count == 1, let peer = peers.first {
let peerName = peer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).0 : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).0
+ text = messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_Chat_One(peerName).string : presentationData.strings.Conversation_ForwardTooltip_Chat_Many(peerName).string
} else if peers.count == 2, let firstPeer = peers.first, let secondPeer = peers.last {
let firstPeerName = firstPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : firstPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
let secondPeerName = secondPeer.id == strongSelf.context.account.peerId ? presentationData.strings.DialogList_SavedMessages : secondPeer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).0 : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).0
+ text = messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_TwoChats_One(firstPeerName, secondPeerName).string : presentationData.strings.Conversation_ForwardTooltip_TwoChats_Many(firstPeerName, secondPeerName).string
} else if let peer = peers.first {
let peerName = peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)
- text = messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").0 : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").0
+ text = messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_ManyChats_One(peerName, "\(peers.count - 1)").string : presentationData.strings.Conversation_ForwardTooltip_ManyChats_Many(peerName, "\(peers.count - 1)").string
} else {
text = ""
}
@@ -7210,7 +7198,7 @@ func presentAddMembers(context: AccountContext, parentController: ViewController
let result = ValuePromise()
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
if let contactsController = contactsController {
- let alertController = textAlertController(context: context, title: nil, text: presentationData.strings.GroupInfo_AddParticipantConfirmation(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0, actions: [
+ let alertController = textAlertController(context: context, title: nil, text: presentationData.strings.GroupInfo_AddParticipantConfirmation(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string, actions: [
TextAlertAction(type: .genericAction, title: presentationData.strings.Common_No, action: {
result.set(false)
}),
@@ -7245,7 +7233,7 @@ func presentAddMembers(context: AccountContext, parentController: ViewController
case .privacy:
let _ = (context.account.postbox.loadedPeerWithId(memberId)
|> deliverOnMainQueue).start(next: { peer in
- parentController?.present(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(peer.compactDisplayTitle, peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
+ parentController?.present(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(peer.compactDisplayTitle, peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
})
return .complete()
case .notMutualContact:
@@ -7370,7 +7358,7 @@ func presentAddMembers(context: AccountContext, parentController: ViewController
case let .peer(peerId):
let _ = (context.account.postbox.loadedPeerWithId(peerId)
|> deliverOnMainQueue).start(next: { peer in
- parentController?.present(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(peer.compactDisplayTitle, peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
+ parentController?.present(textAlertController(context: context, title: nil, text: presentationData.strings.Privacy_GroupsAndChannels_InviteToGroupError(peer.compactDisplayTitle, peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
})
default:
break
diff --git a/submodules/TelegramUI/Sources/PeerMediaCollectionSectionsNode.swift b/submodules/TelegramUI/Sources/PeerMediaCollectionSectionsNode.swift
index 983769ee0e..a19a693766 100644
--- a/submodules/TelegramUI/Sources/PeerMediaCollectionSectionsNode.swift
+++ b/submodules/TelegramUI/Sources/PeerMediaCollectionSectionsNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import TelegramPresentationData
import SegmentedControlNode
diff --git a/submodules/TelegramUI/Sources/PeerMessagesMediaPlaylist.swift b/submodules/TelegramUI/Sources/PeerMessagesMediaPlaylist.swift
index 631e63ce85..aaa02a6c6a 100644
--- a/submodules/TelegramUI/Sources/PeerMessagesMediaPlaylist.swift
+++ b/submodules/TelegramUI/Sources/PeerMessagesMediaPlaylist.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import AccountContext
import MusicAlbumArtResources
diff --git a/submodules/TelegramUI/Sources/PeerSelectionController.swift b/submodules/TelegramUI/Sources/PeerSelectionController.swift
index 8a3a59fce2..1a48ee0148 100644
--- a/submodules/TelegramUI/Sources/PeerSelectionController.swift
+++ b/submodules/TelegramUI/Sources/PeerSelectionController.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramPresentationData
import ProgressNavigationButtonNode
diff --git a/submodules/TelegramUI/Sources/PeerSelectionControllerNode.swift b/submodules/TelegramUI/Sources/PeerSelectionControllerNode.swift
index 39e7fdb50e..956727cba5 100644
--- a/submodules/TelegramUI/Sources/PeerSelectionControllerNode.swift
+++ b/submodules/TelegramUI/Sources/PeerSelectionControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
@@ -119,7 +118,7 @@ final class PeerSelectionControllerNode: ASDisplayNode {
self?.textInputPanelNode?.updateSendButtonEnabled(count > 0, animated: true)
}
self.chatListNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
self.chatListNode.activateSearch = { [weak self] in
diff --git a/submodules/TelegramUI/Sources/PeerSelectionTextInputPanelNode.swift b/submodules/TelegramUI/Sources/PeerSelectionTextInputPanelNode.swift
index 08e7a34f55..aaec21232f 100644
--- a/submodules/TelegramUI/Sources/PeerSelectionTextInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/PeerSelectionTextInputPanelNode.swift
@@ -5,7 +5,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MobileCoreServices
import TelegramPresentationData
import TextFormat
diff --git a/submodules/TelegramUI/Sources/PeersNearbyManager.swift b/submodules/TelegramUI/Sources/PeersNearbyManager.swift
index ab79fd03b1..300852bdb0 100644
--- a/submodules/TelegramUI/Sources/PeersNearbyManager.swift
+++ b/submodules/TelegramUI/Sources/PeersNearbyManager.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import TelegramApi
import DeviceLocationManager
diff --git a/submodules/TelegramUI/Sources/PollResultsController.swift b/submodules/TelegramUI/Sources/PollResultsController.swift
index 69c0c154b0..1e418571bf 100644
--- a/submodules/TelegramUI/Sources/PollResultsController.swift
+++ b/submodules/TelegramUI/Sources/PollResultsController.swift
@@ -1,6 +1,5 @@
import Foundation
import Postbox
-import SyncCore
import TelegramCore
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/PrefetchManager.swift b/submodules/TelegramUI/Sources/PrefetchManager.swift
index 88d8f64684..383a66ef53 100644
--- a/submodules/TelegramUI/Sources/PrefetchManager.swift
+++ b/submodules/TelegramUI/Sources/PrefetchManager.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import AccountContext
import PhotoResources
diff --git a/submodules/TelegramUI/Sources/PreparedChatHistoryViewTransition.swift b/submodules/TelegramUI/Sources/PreparedChatHistoryViewTransition.swift
index 386b553b7f..f7b55ffc61 100644
--- a/submodules/TelegramUI/Sources/PreparedChatHistoryViewTransition.swift
+++ b/submodules/TelegramUI/Sources/PreparedChatHistoryViewTransition.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import MergeLists
import AccountContext
diff --git a/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift b/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift
index afb5c86d93..730d9cd4f3 100644
--- a/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift
+++ b/submodules/TelegramUI/Sources/ReplyAccessoryPanelNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
diff --git a/submodules/TelegramUI/Sources/SecretChatHandshakeStatusInputPanelNode.swift b/submodules/TelegramUI/Sources/SecretChatHandshakeStatusInputPanelNode.swift
index 0f65294dd5..f44fffea32 100644
--- a/submodules/TelegramUI/Sources/SecretChatHandshakeStatusInputPanelNode.swift
+++ b/submodules/TelegramUI/Sources/SecretChatHandshakeStatusInputPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import LocalizedPeerData
@@ -54,7 +53,7 @@ final class SecretChatHandshakeStatusInputPanelNode: ChatInputPanelNode {
let text: String
switch peer.role {
case .creator:
- text = interfaceState.strings.DialogList_AwaitingEncryption(userPeer.compactDisplayTitle).0
+ text = interfaceState.strings.DialogList_AwaitingEncryption(userPeer.compactDisplayTitle).string
case .participant:
text = interfaceState.strings.Conversation_EncryptionProcessing
}
diff --git a/submodules/TelegramUI/Sources/ShareExtensionContext.swift b/submodules/TelegramUI/Sources/ShareExtensionContext.swift
index 99bb75a188..230a5971ca 100644
--- a/submodules/TelegramUI/Sources/ShareExtensionContext.swift
+++ b/submodules/TelegramUI/Sources/ShareExtensionContext.swift
@@ -2,7 +2,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
@@ -730,9 +729,9 @@ public class ShareRootControllerImpl {
switch result {
case .allowed:
if let groupTitle = groupTitle {
- text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithTitle(groupTitle, peer.debugDisplayTitle).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithTitle(groupTitle, peer.debugDisplayTitle).string
} else {
- text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithoutTitle(peer.debugDisplayTitle).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithoutTitle(peer.debugDisplayTitle).string
}
case let .alert(textValue):
text = textValue
@@ -777,7 +776,7 @@ public class ShareRootControllerImpl {
} else {
resolvedGroupTitle = "Group"
}
- let controller = standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: presentationData.strings.ChatImport_CreateGroupAlertTitle, text: presentationData.strings.ChatImport_CreateGroupAlertText(resolvedGroupTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.ChatImport_CreateGroupAlertImportAction, action: {
+ let controller = standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: presentationData.strings.ChatImport_CreateGroupAlertTitle, text: presentationData.strings.ChatImport_CreateGroupAlertText(resolvedGroupTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.ChatImport_CreateGroupAlertImportAction, action: {
var signal: Signal = context.engine.peers.createSupergroup(title: resolvedGroupTitle, description: nil, isForHistoryImport: true)
|> map(Optional.init)
|> `catch` { _ -> Signal in
@@ -855,9 +854,9 @@ public class ShareRootControllerImpl {
switch result {
case .allowed:
if let title = title {
- text = presentationData.strings.ChatImport_SelectionConfirmationUserWithTitle(title, peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationUserWithTitle(title, peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
} else {
- text = presentationData.strings.ChatImport_SelectionConfirmationUserWithoutTitle(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationUserWithoutTitle(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
case let .alert(textValue):
text = textValue
@@ -957,9 +956,9 @@ public class ShareRootControllerImpl {
switch result {
case .allowed:
if let title = peerTitle {
- text = presentationData.strings.ChatImport_SelectionConfirmationUserWithTitle(title, peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationUserWithTitle(title, peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
} else {
- text = presentationData.strings.ChatImport_SelectionConfirmationUserWithoutTitle(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationUserWithoutTitle(peer.displayTitle(strings: presentationData.strings, displayOrder: presentationData.nameDisplayOrder)).string
}
case let .alert(textValue):
text = textValue
@@ -974,9 +973,9 @@ public class ShareRootControllerImpl {
switch result {
case .allowed:
if let groupTitle = peerTitle {
- text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithTitle(groupTitle, peer.debugDisplayTitle).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithTitle(groupTitle, peer.debugDisplayTitle).string
} else {
- text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithoutTitle(peer.debugDisplayTitle).0
+ text = presentationData.strings.ChatImport_SelectionConfirmationGroupWithoutTitle(peer.debugDisplayTitle).string
}
case let .alert(textValue):
text = textValue
@@ -1021,7 +1020,7 @@ public class ShareRootControllerImpl {
} else {
resolvedGroupTitle = "Group"
}
- let controller = standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: presentationData.strings.ChatImport_CreateGroupAlertTitle, text: presentationData.strings.ChatImport_CreateGroupAlertText(resolvedGroupTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.ChatImport_CreateGroupAlertImportAction, action: {
+ let controller = standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: presentationData.strings.ChatImport_CreateGroupAlertTitle, text: presentationData.strings.ChatImport_CreateGroupAlertText(resolvedGroupTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.ChatImport_CreateGroupAlertImportAction, action: {
var signal: Signal = context.engine.peers.createSupergroup(title: resolvedGroupTitle, description: nil, isForHistoryImport: true)
|> map(Optional.init)
|> `catch` { _ -> Signal in
diff --git a/submodules/TelegramUI/Sources/SharedAccountContext.swift b/submodules/TelegramUI/Sources/SharedAccountContext.swift
index 7e98762c38..aa34a58d58 100644
--- a/submodules/TelegramUI/Sources/SharedAccountContext.swift
+++ b/submodules/TelegramUI/Sources/SharedAccountContext.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/SharedMediaPlayer.swift b/submodules/TelegramUI/Sources/SharedMediaPlayer.swift
index 0277922cae..0b96de1a52 100644
--- a/submodules/TelegramUI/Sources/SharedMediaPlayer.swift
+++ b/submodules/TelegramUI/Sources/SharedMediaPlayer.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import UniversalMediaPlayer
import TelegramAudio
diff --git a/submodules/TelegramUI/Sources/SharedNotificationManager.swift b/submodules/TelegramUI/Sources/SharedNotificationManager.swift
index 603a877a6f..e44b071d69 100644
--- a/submodules/TelegramUI/Sources/SharedNotificationManager.swift
+++ b/submodules/TelegramUI/Sources/SharedNotificationManager.swift
@@ -4,7 +4,6 @@ import UserNotifications
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramCallsUI
@@ -430,7 +429,7 @@ public final class SharedNotificationManager {
self.currentNotificationCall = call
if let notificationCall = call {
- let rawText = strings.PUSH_PHONE_CALL_REQUEST(notificationCall.peer?.displayTitle(strings: strings, displayOrder: nameOrder) ?? "").0
+ let rawText = strings.PUSH_PHONE_CALL_REQUEST(notificationCall.peer?.displayTitle(strings: strings, displayOrder: nameOrder) ?? "").string
let title: String?
let body: String
if let index = rawText.firstIndex(of: "|") {
diff --git a/submodules/TelegramUI/Sources/SharedWakeupManager.swift b/submodules/TelegramUI/Sources/SharedWakeupManager.swift
index 8bcf22faee..ea860b6a02 100644
--- a/submodules/TelegramUI/Sources/SharedWakeupManager.swift
+++ b/submodules/TelegramUI/Sources/SharedWakeupManager.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramCallsUI
import AccountContext
diff --git a/submodules/TelegramUI/Sources/SoftwareVideoLayerFrameManager.swift b/submodules/TelegramUI/Sources/SoftwareVideoLayerFrameManager.swift
index 7961ccc09a..14b1377219 100644
--- a/submodules/TelegramUI/Sources/SoftwareVideoLayerFrameManager.swift
+++ b/submodules/TelegramUI/Sources/SoftwareVideoLayerFrameManager.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import CoreMedia
import UniversalMediaPlayer
diff --git a/submodules/TelegramUI/Sources/SoftwareVideoThumbnailLayer.swift b/submodules/TelegramUI/Sources/SoftwareVideoThumbnailLayer.swift
index 9cdac13884..e54058df92 100644
--- a/submodules/TelegramUI/Sources/SoftwareVideoThumbnailLayer.swift
+++ b/submodules/TelegramUI/Sources/SoftwareVideoThumbnailLayer.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
diff --git a/submodules/TelegramUI/Sources/SpotlightContacts.swift b/submodules/TelegramUI/Sources/SpotlightContacts.swift
index 6f8bf4dd59..a618da2ec4 100644
--- a/submodules/TelegramUI/Sources/SpotlightContacts.swift
+++ b/submodules/TelegramUI/Sources/SpotlightContacts.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import Display
diff --git a/submodules/TelegramUI/Sources/StickerPanePeerSpecificSetupGridItem.swift b/submodules/TelegramUI/Sources/StickerPanePeerSpecificSetupGridItem.swift
index 885253d798..cdd8f1b469 100644
--- a/submodules/TelegramUI/Sources/StickerPanePeerSpecificSetupGridItem.swift
+++ b/submodules/TelegramUI/Sources/StickerPanePeerSpecificSetupGridItem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/StickerPaneSearchContentNode.swift b/submodules/TelegramUI/Sources/StickerPaneSearchContentNode.swift
index d02c198e72..538270ae2e 100644
--- a/submodules/TelegramUI/Sources/StickerPaneSearchContentNode.swift
+++ b/submodules/TelegramUI/Sources/StickerPaneSearchContentNode.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import PresentationDataUtils
import LegacyComponents
@@ -311,7 +310,7 @@ final class StickerPaneSearchContentNode: ASDisplayNode, PaneSearchContentNode {
}
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
- strongSelf.controllerInteraction.navigationController()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).0, undo: false, info: info, topItem: items.first, context: strongSelf.context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
+ strongSelf.controllerInteraction.navigationController()?.presentOverlay(controller: UndoOverlayController(presentationData: presentationData, content: .stickersModified(title: presentationData.strings.StickerPackActionInfo_AddedTitle, text: presentationData.strings.StickerPackActionInfo_AddedText(info.title).string, undo: false, info: info, topItem: items.first, context: strongSelf.context), elevatedLayout: false, animateInAsReplacement: animateInAsReplacement, action: { _ in
return true
}))
}))
diff --git a/submodules/TelegramUI/Sources/StickerPaneSearchGlobaltem.swift b/submodules/TelegramUI/Sources/StickerPaneSearchGlobaltem.swift
index 758f56fb50..e079962089 100644
--- a/submodules/TelegramUI/Sources/StickerPaneSearchGlobaltem.swift
+++ b/submodules/TelegramUI/Sources/StickerPaneSearchGlobaltem.swift
@@ -3,7 +3,6 @@ import UIKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/StickerPaneSearchStickerItem.swift b/submodules/TelegramUI/Sources/StickerPaneSearchStickerItem.swift
index 31c9514759..3fb947655c 100644
--- a/submodules/TelegramUI/Sources/StickerPaneSearchStickerItem.swift
+++ b/submodules/TelegramUI/Sources/StickerPaneSearchStickerItem.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import AsyncDisplayKit
import Postbox
diff --git a/submodules/TelegramUI/Sources/StickersChatInputContextPanelItem.swift b/submodules/TelegramUI/Sources/StickersChatInputContextPanelItem.swift
index b6d6abcde9..e850e9e665 100644
--- a/submodules/TelegramUI/Sources/StickersChatInputContextPanelItem.swift
+++ b/submodules/TelegramUI/Sources/StickersChatInputContextPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/StickersChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/StickersChatInputContextPanelNode.swift
index 1a3cf9a5f3..41489ecbcd 100644
--- a/submodules/TelegramUI/Sources/StickersChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/StickersChatInputContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import SwiftSignalKit
import TelegramPresentationData
@@ -92,7 +91,7 @@ final class StickersChatInputContextPanelNode: ChatInputContextPanelNode {
self.listView.limitHitTestToNodes = true
self.listView.view.disablesInteractiveTransitionGestureRecognizer = true
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
self.stickersInteraction = StickersChatInputContextPanelInteraction()
diff --git a/submodules/TelegramUI/Sources/StoreDownloadedMedia.swift b/submodules/TelegramUI/Sources/StoreDownloadedMedia.swift
index c223c40284..cde6ba0158 100644
--- a/submodules/TelegramUI/Sources/StoreDownloadedMedia.swift
+++ b/submodules/TelegramUI/Sources/StoreDownloadedMedia.swift
@@ -1,7 +1,6 @@
import Foundation
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import Photos
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/StringForMessageTimestampStatus.swift b/submodules/TelegramUI/Sources/StringForMessageTimestampStatus.swift
index 8139c8c98c..403338e8c7 100644
--- a/submodules/TelegramUI/Sources/StringForMessageTimestampStatus.swift
+++ b/submodules/TelegramUI/Sources/StringForMessageTimestampStatus.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import TelegramStringFormatting
@@ -42,7 +41,7 @@ func stringForMessageTimestampStatus(accountPeerId: PeerId, message: Message, da
}
if let forwardInfo = message.forwardInfo, forwardInfo.flags.contains(.isImported) {
- dateText = strings.Message_ImportedDateFormat(dateStringForDay(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: forwardInfo.date), stringForMessageTimestamp(timestamp: forwardInfo.date, dateTimeFormat: dateTimeFormat), dateText).0
+ dateText = strings.Message_ImportedDateFormat(dateStringForDay(strings: strings, dateTimeFormat: dateTimeFormat, timestamp: forwardInfo.date), stringForMessageTimestamp(timestamp: forwardInfo.date, dateTimeFormat: dateTimeFormat), dateText).string
}
var authorTitle: String?
diff --git a/submodules/TelegramUI/Sources/SuppressContactsWarning.swift b/submodules/TelegramUI/Sources/SuppressContactsWarning.swift
index fb07862963..daccca51c3 100644
--- a/submodules/TelegramUI/Sources/SuppressContactsWarning.swift
+++ b/submodules/TelegramUI/Sources/SuppressContactsWarning.swift
@@ -3,7 +3,6 @@ import AsyncDisplayKit
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import DeviceAccess
import AccountContext
import AlertUI
diff --git a/submodules/TelegramUI/Sources/TelegramAccountAuxiliaryMethods.swift b/submodules/TelegramUI/Sources/TelegramAccountAuxiliaryMethods.swift
index f60e0f42f5..e0d2a72d05 100644
--- a/submodules/TelegramUI/Sources/TelegramAccountAuxiliaryMethods.swift
+++ b/submodules/TelegramUI/Sources/TelegramAccountAuxiliaryMethods.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
import MediaResources
import PassportUI
diff --git a/submodules/TelegramUI/Sources/TelegramRootController.swift b/submodules/TelegramUI/Sources/TelegramRootController.swift
index 2b96a8aa10..c00b62f1bd 100644
--- a/submodules/TelegramUI/Sources/TelegramRootController.swift
+++ b/submodules/TelegramUI/Sources/TelegramRootController.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
diff --git a/submodules/TelegramUI/Sources/TextLinkHandling.swift b/submodules/TelegramUI/Sources/TextLinkHandling.swift
index 3ae0393bb1..ec50524c49 100644
--- a/submodules/TelegramUI/Sources/TextLinkHandling.swift
+++ b/submodules/TelegramUI/Sources/TextLinkHandling.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import Display
import SwiftSignalKit
@@ -91,8 +90,8 @@ func handleTextLinkActionImpl(context: AccountContext, peerId: PeerId?, navigate
}
let openPeerMentionImpl: (String) -> Void = { mention in
- navigateDisposable.set((context.engine.peers.resolvePeerByName(name: mention, ageLimit: 10) |> take(1) |> deliverOnMainQueue).start(next: { peerId in
- openResolvedPeerImpl(peerId, .default)
+ navigateDisposable.set((context.engine.peers.resolvePeerByName(name: mention, ageLimit: 10) |> take(1) |> deliverOnMainQueue).start(next: { peer in
+ openResolvedPeerImpl(peer?.id, .default)
}))
}
@@ -114,7 +113,7 @@ func handleTextLinkActionImpl(context: AccountContext, peerId: PeerId?, navigate
}
var displayUrl = rawDisplayUrl
displayUrl = displayUrl.replacingOccurrences(of: "\u{202e}", with: "")
- controller.present(textAlertController(context: context, title: nil, text: presentationData.strings.Generic_OpenHiddenLinkAlert(displayUrl).0, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_No, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Yes, action: {
+ controller.present(textAlertController(context: context, title: nil, text: presentationData.strings.Generic_OpenHiddenLinkAlert(displayUrl).string, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_No, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Yes, action: {
openLinkImpl(url)
})]), in: .window(.root))
} else {
diff --git a/submodules/TelegramUI/Sources/ThemeUpdateManager.swift b/submodules/TelegramUI/Sources/ThemeUpdateManager.swift
index 58dc72a6d5..7a9d169ea1 100644
--- a/submodules/TelegramUI/Sources/ThemeUpdateManager.swift
+++ b/submodules/TelegramUI/Sources/ThemeUpdateManager.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/TransformOutgoingMessageMedia.swift b/submodules/TelegramUI/Sources/TransformOutgoingMessageMedia.swift
index 39ae2767dd..e136eacc70 100644
--- a/submodules/TelegramUI/Sources/TransformOutgoingMessageMedia.swift
+++ b/submodules/TelegramUI/Sources/TransformOutgoingMessageMedia.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
diff --git a/submodules/TelegramUI/Sources/UpgradedAccounts.swift b/submodules/TelegramUI/Sources/UpgradedAccounts.swift
index 765e2f7d7a..fc08028067 100644
--- a/submodules/TelegramUI/Sources/UpgradedAccounts.swift
+++ b/submodules/TelegramUI/Sources/UpgradedAccounts.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift
index fd1c032325..fd8185623d 100644
--- a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift
+++ b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputContextPanelNode.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
-import SyncCore
import Display
import TelegramPresentationData
import TelegramUIPreferences
@@ -142,7 +141,7 @@ final class VerticalListContextResultsChatInputContextPanelNode: ChatInputContex
self.listView.isHidden = true
self.listView.view.disablesInteractiveTransitionGestureRecognizer = true
self.listView.accessibilityPageScrolledString = { row, count in
- return strings.VoiceOver_ScrollStatus(row, count).0
+ return strings.VoiceOver_ScrollStatus(row, count).string
}
super.init(context: context, theme: theme, strings: strings, fontSize: fontSize)
diff --git a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelButtonItem.swift b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelButtonItem.swift
index ff9d5a3af7..4180031e25 100644
--- a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelButtonItem.swift
+++ b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelButtonItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelItem.swift b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelItem.swift
index a361ce4861..cbbfda0c29 100644
--- a/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelItem.swift
+++ b/submodules/TelegramUI/Sources/VerticalListContextResultsChatInputPanelItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/WalletContextImpl.swift b/submodules/TelegramUI/Sources/WalletContextImpl.swift
index 14c74de5af..4f813b2775 100644
--- a/submodules/TelegramUI/Sources/WalletContextImpl.swift
+++ b/submodules/TelegramUI/Sources/WalletContextImpl.swift
@@ -6,7 +6,6 @@ import Display
import WalletUI
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/TelegramUI/Sources/WallpaperPreviewMedia.swift b/submodules/TelegramUI/Sources/WallpaperPreviewMedia.swift
index 7f32ba3261..c1ec05a476 100644
--- a/submodules/TelegramUI/Sources/WallpaperPreviewMedia.swift
+++ b/submodules/TelegramUI/Sources/WallpaperPreviewMedia.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
enum WallpaperPreviewMediaContent: Equatable {
case file(file: TelegramMediaFile, colors: [UInt32], rotation: Int32?, intensity: Int32?, Bool, Bool)
diff --git a/submodules/TelegramUI/Sources/WallpaperUploadManager.swift b/submodules/TelegramUI/Sources/WallpaperUploadManager.swift
index 00a84853a5..7e9ffe3c48 100644
--- a/submodules/TelegramUI/Sources/WallpaperUploadManager.swift
+++ b/submodules/TelegramUI/Sources/WallpaperUploadManager.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
diff --git a/submodules/TelegramUI/Sources/WatchManager.swift b/submodules/TelegramUI/Sources/WatchManager.swift
index a3a9b13d1e..a1ddbcdd11 100644
--- a/submodules/TelegramUI/Sources/WatchManager.swift
+++ b/submodules/TelegramUI/Sources/WatchManager.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AccountContext
import WatchBridge
diff --git a/submodules/TelegramUI/Sources/WebpagePreviewAccessoryPanelNode.swift b/submodules/TelegramUI/Sources/WebpagePreviewAccessoryPanelNode.swift
index 9344843603..6324e67145 100644
--- a/submodules/TelegramUI/Sources/WebpagePreviewAccessoryPanelNode.swift
+++ b/submodules/TelegramUI/Sources/WebpagePreviewAccessoryPanelNode.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
import Display
diff --git a/submodules/TelegramUI/Sources/WidgetDataContext.swift b/submodules/TelegramUI/Sources/WidgetDataContext.swift
index c21891bade..95add664e7 100644
--- a/submodules/TelegramUI/Sources/WidgetDataContext.swift
+++ b/submodules/TelegramUI/Sources/WidgetDataContext.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import WidgetItems
import TelegramPresentationData
import NotificationsPresentationData
@@ -298,7 +297,7 @@ final class WidgetDataContext {
self.notificationPresentationDataDisposable = (presentationData
|> map { presentationData -> NotificationsPresentationData in
- return NotificationsPresentationData(applicationLockedMessageString: presentationData.strings.PUSH_LOCKED_MESSAGE("").0)
+ return NotificationsPresentationData(applicationLockedMessageString: presentationData.strings.PUSH_LOCKED_MESSAGE("").string)
}
|> distinctUntilChanged).start(next: { value in
let path = notificationsPresentationDataPath(rootPath: basePath)
diff --git a/submodules/TelegramUIPreferences/BUILD b/submodules/TelegramUIPreferences/BUILD
index 4f41ca99bc..e3fafaf5a0 100644
--- a/submodules/TelegramUIPreferences/BUILD
+++ b/submodules/TelegramUIPreferences/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
diff --git a/submodules/TelegramUIPreferences/Sources/InAppNotificationSettings.swift b/submodules/TelegramUIPreferences/Sources/InAppNotificationSettings.swift
index 7e4952fdd4..6cb40aac97 100644
--- a/submodules/TelegramUIPreferences/Sources/InAppNotificationSettings.swift
+++ b/submodules/TelegramUIPreferences/Sources/InAppNotificationSettings.swift
@@ -1,7 +1,7 @@
import Foundation
import Postbox
import SwiftSignalKit
-import SyncCore
+import TelegramCore
public enum TotalUnreadCountDisplayStyle: Int32 {
case filtered = 0
diff --git a/submodules/TelegramUIPreferences/Sources/LegacyAutomaticMediaDownloadSettings.swift b/submodules/TelegramUIPreferences/Sources/LegacyAutomaticMediaDownloadSettings.swift
index 38342c0547..7a767be22d 100644
--- a/submodules/TelegramUIPreferences/Sources/LegacyAutomaticMediaDownloadSettings.swift
+++ b/submodules/TelegramUIPreferences/Sources/LegacyAutomaticMediaDownloadSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
public struct AutomaticMediaDownloadCategory: PostboxCoding, Equatable {
public var cellular: Bool
diff --git a/submodules/TelegramUIPreferences/Sources/MediaAutoDownloadSettings.swift b/submodules/TelegramUIPreferences/Sources/MediaAutoDownloadSettings.swift
index 0a9a40b911..2e5d132c07 100644
--- a/submodules/TelegramUIPreferences/Sources/MediaAutoDownloadSettings.swift
+++ b/submodules/TelegramUIPreferences/Sources/MediaAutoDownloadSettings.swift
@@ -3,7 +3,6 @@ import UIKit
import Postbox
import SwiftSignalKit
import TelegramCore
-import SyncCore
public enum MediaAutoDownloadNetworkType {
case wifi
diff --git a/submodules/TelegramUIPreferences/Sources/PostboxKeys.swift b/submodules/TelegramUIPreferences/Sources/PostboxKeys.swift
index 9e68abb6f0..419db87a0b 100644
--- a/submodules/TelegramUIPreferences/Sources/PostboxKeys.swift
+++ b/submodules/TelegramUIPreferences/Sources/PostboxKeys.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
private enum ApplicationSpecificPreferencesKeyValues: Int32 {
diff --git a/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift b/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift
index 8e6e92315a..6f88ddf8f3 100644
--- a/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift
+++ b/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Display
diff --git a/submodules/TelegramUIPreferences/Sources/VoiceCallSettings.swift b/submodules/TelegramUIPreferences/Sources/VoiceCallSettings.swift
index 22ce711ce3..91f87db642 100644
--- a/submodules/TelegramUIPreferences/Sources/VoiceCallSettings.swift
+++ b/submodules/TelegramUIPreferences/Sources/VoiceCallSettings.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
public func effectiveDataSaving(for settings: VoiceCallSettings?, autodownloadSettings: AutodownloadSettings) -> VoiceCallDataSaving {
diff --git a/submodules/TelegramUniversalVideoContent/BUILD b/submodules/TelegramUniversalVideoContent/BUILD
index 02e43b5184..1bdd85e6a7 100644
--- a/submodules/TelegramUniversalVideoContent/BUILD
+++ b/submodules/TelegramUniversalVideoContent/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/MediaPlayer:UniversalMediaPlayer",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/TelegramUniversalVideoContent/Sources/NativeVideoContent.swift b/submodules/TelegramUniversalVideoContent/Sources/NativeVideoContent.swift
index 3a2f8162b4..812bab8a88 100644
--- a/submodules/TelegramUniversalVideoContent/Sources/NativeVideoContent.swift
+++ b/submodules/TelegramUniversalVideoContent/Sources/NativeVideoContent.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramAudio
import UniversalMediaPlayer
import AccountContext
diff --git a/submodules/TelegramUniversalVideoContent/Sources/OverlayUniversalVideoNode.swift b/submodules/TelegramUniversalVideoContent/Sources/OverlayUniversalVideoNode.swift
index da44ebe879..d8cc1a0299 100644
--- a/submodules/TelegramUniversalVideoContent/Sources/OverlayUniversalVideoNode.swift
+++ b/submodules/TelegramUniversalVideoContent/Sources/OverlayUniversalVideoNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import Postbox
import TelegramAudio
import AccountContext
diff --git a/submodules/TelegramUniversalVideoContent/Sources/PlatformVideoContent.swift b/submodules/TelegramUniversalVideoContent/Sources/PlatformVideoContent.swift
index d648892809..e4ec700341 100644
--- a/submodules/TelegramUniversalVideoContent/Sources/PlatformVideoContent.swift
+++ b/submodules/TelegramUniversalVideoContent/Sources/PlatformVideoContent.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import AVFoundation
import UniversalMediaPlayer
import TelegramAudio
diff --git a/submodules/TelegramUniversalVideoContent/Sources/SystemVideoContent.swift b/submodules/TelegramUniversalVideoContent/Sources/SystemVideoContent.swift
index 71182c06ab..8f6c0980eb 100644
--- a/submodules/TelegramUniversalVideoContent/Sources/SystemVideoContent.swift
+++ b/submodules/TelegramUniversalVideoContent/Sources/SystemVideoContent.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramAudio
import LegacyComponents
import UniversalMediaPlayer
diff --git a/submodules/TelegramUniversalVideoContent/Sources/WebEmbedPlayerNode.swift b/submodules/TelegramUniversalVideoContent/Sources/WebEmbedPlayerNode.swift
index 682283a278..b2dff524a4 100644
--- a/submodules/TelegramUniversalVideoContent/Sources/WebEmbedPlayerNode.swift
+++ b/submodules/TelegramUniversalVideoContent/Sources/WebEmbedPlayerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import SwiftSignalKit
import WebKit
import TelegramCore
-import SyncCore
import UniversalMediaPlayer
protocol WebEmbedImplementation {
diff --git a/submodules/TelegramUniversalVideoContent/Sources/WebEmbedVideoContent.swift b/submodules/TelegramUniversalVideoContent/Sources/WebEmbedVideoContent.swift
index a7dfd3c409..18fa2fe598 100644
--- a/submodules/TelegramUniversalVideoContent/Sources/WebEmbedVideoContent.swift
+++ b/submodules/TelegramUniversalVideoContent/Sources/WebEmbedVideoContent.swift
@@ -5,7 +5,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramAudio
import UniversalMediaPlayer
import LegacyComponents
diff --git a/submodules/TelegramUniversalVideoContent/Sources/YoutubeEmbedImplementation.swift b/submodules/TelegramUniversalVideoContent/Sources/YoutubeEmbedImplementation.swift
index eb01468635..6df3c2227c 100644
--- a/submodules/TelegramUniversalVideoContent/Sources/YoutubeEmbedImplementation.swift
+++ b/submodules/TelegramUniversalVideoContent/Sources/YoutubeEmbedImplementation.swift
@@ -1,7 +1,6 @@
import Foundation
import Display
import Postbox
-import SyncCore
import TelegramCore
import AccountContext
import WebKit
diff --git a/submodules/TelegramUpdateUI/BUILD b/submodules/TelegramUpdateUI/BUILD
index 85e20cc246..a86c8f314f 100644
--- a/submodules/TelegramUpdateUI/BUILD
+++ b/submodules/TelegramUpdateUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/ItemListUI:ItemListUI",
"//submodules/PresentationDataUtils:PresentationDataUtils",
diff --git a/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift b/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift
index ebf7e3e051..f219a6e120 100644
--- a/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift
+++ b/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import AccountContext
import ItemListUI
@@ -75,7 +74,7 @@ private enum UpdateInfoControllerEntry: ItemListNodeEntry {
return UpdateInfoItem(theme: theme, appIcon: icon, title: title, text: text, entities: entities, sectionId: self.section, style: .blocks, linkItemAction: { action, itemLink in
arguments.linkAction(action, itemLink)
})
- case let .update(theme, title):
+ case let .update(_, title):
return ItemListActionItem(presentationData: presentationData, title: title, kind: .generic, alignment: .center, sectionId: self.section, style: .blocks, action: {
arguments.openAppStorePage()
})
@@ -86,7 +85,7 @@ private enum UpdateInfoControllerEntry: ItemListNodeEntry {
private func updateInfoControllerEntries(theme: PresentationTheme, strings: PresentationStrings, appIcon: PresentationAppIcon?, appUpdateInfo: AppUpdateInfo) -> [UpdateInfoControllerEntry] {
var entries: [UpdateInfoControllerEntry] = []
- entries.append(.info(theme, appIcon, strings.Update_AppVersion(appUpdateInfo.version).0, appUpdateInfo.text, appUpdateInfo.entities))
+ entries.append(.info(theme, appIcon, strings.Update_AppVersion(appUpdateInfo.version).string, appUpdateInfo.text, appUpdateInfo.entities))
entries.append(.update(theme, strings.Update_UpdateApp))
return entries
diff --git a/submodules/TelegramUpdateUI/Sources/UpdateInfoItem.swift b/submodules/TelegramUpdateUI/Sources/UpdateInfoItem.swift
index e7110d649b..9a721a8bc1 100644
--- a/submodules/TelegramUpdateUI/Sources/UpdateInfoItem.swift
+++ b/submodules/TelegramUpdateUI/Sources/UpdateInfoItem.swift
@@ -4,7 +4,6 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/TelegramVoip/BUILD b/submodules/TelegramVoip/BUILD
index 028b9e5ea2..662a872426 100644
--- a/submodules/TelegramVoip/BUILD
+++ b/submodules/TelegramVoip/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/TgVoip:TgVoip",
diff --git a/submodules/TelegramVoip/Sources/OngoingCallContext.swift b/submodules/TelegramVoip/Sources/OngoingCallContext.swift
index f46761cea9..1205afdcf7 100644
--- a/submodules/TelegramVoip/Sources/OngoingCallContext.swift
+++ b/submodules/TelegramVoip/Sources/OngoingCallContext.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import TelegramUIPreferences
diff --git a/submodules/TemporaryCachedPeerDataManager/BUILD b/submodules/TemporaryCachedPeerDataManager/BUILD
index 21f1c84fdd..d3795aa6d3 100644
--- a/submodules/TemporaryCachedPeerDataManager/BUILD
+++ b/submodules/TemporaryCachedPeerDataManager/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
],
visibility = [
diff --git a/submodules/TemporaryCachedPeerDataManager/Sources/CachedChannelAdmins.swift b/submodules/TemporaryCachedPeerDataManager/Sources/CachedChannelAdmins.swift
index 84f2ae814d..65f2c6b33b 100644
--- a/submodules/TemporaryCachedPeerDataManager/Sources/CachedChannelAdmins.swift
+++ b/submodules/TemporaryCachedPeerDataManager/Sources/CachedChannelAdmins.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
public enum CachedChannelAdminRank: PostboxCoding, Equatable {
diff --git a/submodules/TemporaryCachedPeerDataManager/Sources/ChannelMemberCategoryListContext.swift b/submodules/TemporaryCachedPeerDataManager/Sources/ChannelMemberCategoryListContext.swift
index 682d5ea4c6..d2054d3fb5 100644
--- a/submodules/TemporaryCachedPeerDataManager/Sources/ChannelMemberCategoryListContext.swift
+++ b/submodules/TemporaryCachedPeerDataManager/Sources/ChannelMemberCategoryListContext.swift
@@ -1,6 +1,5 @@
import Foundation
import TelegramCore
-import SyncCore
import Postbox
import SwiftSignalKit
diff --git a/submodules/TemporaryCachedPeerDataManager/Sources/PeerChannelMemberCategoriesContextsManager.swift b/submodules/TemporaryCachedPeerDataManager/Sources/PeerChannelMemberCategoriesContextsManager.swift
index b9372785ab..dade7e25b3 100644
--- a/submodules/TemporaryCachedPeerDataManager/Sources/PeerChannelMemberCategoriesContextsManager.swift
+++ b/submodules/TemporaryCachedPeerDataManager/Sources/PeerChannelMemberCategoriesContextsManager.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import TelegramStringFormatting
diff --git a/submodules/TextFormat/BUILD b/submodules/TextFormat/BUILD
index b182b53814..42516f84ee 100644
--- a/submodules/TextFormat/BUILD
+++ b/submodules/TextFormat/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Display:Display",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/Markdown:Markdown",
diff --git a/submodules/TextFormat/Sources/GenerateTextEntities.swift b/submodules/TextFormat/Sources/GenerateTextEntities.swift
index 8121c86b23..4f7c609271 100644
--- a/submodules/TextFormat/Sources/GenerateTextEntities.swift
+++ b/submodules/TextFormat/Sources/GenerateTextEntities.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
private let dataDetector = try? NSDataDetector(types: NSTextCheckingResult.CheckingType([.link]).rawValue)
private let dataAndPhoneNumberDetector = try? NSDataDetector(types: NSTextCheckingResult.CheckingType([.link, .phoneNumber]).rawValue)
diff --git a/submodules/TextFormat/Sources/StringWithAppliedEntities.swift b/submodules/TextFormat/Sources/StringWithAppliedEntities.swift
index 78dc7c3abd..cfe7903628 100644
--- a/submodules/TextFormat/Sources/StringWithAppliedEntities.swift
+++ b/submodules/TextFormat/Sources/StringWithAppliedEntities.swift
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import TelegramCore
-import SyncCore
public func chatInputStateStringWithAppliedEntities(_ text: String, entities: [MessageTextEntity]) -> NSAttributedString {
var nsString: NSString?
diff --git a/submodules/TgVoipWebrtc/BUILD b/submodules/TgVoipWebrtc/BUILD
index e7da0a33c9..a5203c7319 100644
--- a/submodules/TgVoipWebrtc/BUILD
+++ b/submodules/TgVoipWebrtc/BUILD
@@ -44,7 +44,8 @@ objc_library(
"-Ithird-party/webrtc/webrtc/sdk/objc/components/renderer/metal",
"-Ithird-party/webrtc/webrtc/sdk/objc/components/renderer/opengl",
"-Ithird-party/webrtc/webrtc/sdk/objc/components/video_codec",
- "-Ithird-party/webrtc/dependencies/third_party/libyuv/include",
+ "-Ithird-party/libyuv/third_party/libyuv/include",
+ "-Ithird-party/libyuv",
"-Ithird-party/webrtc/webrtc/sdk/objc/api/video_codec",
"-DWEBRTC_IOS",
"-DWEBRTC_MAC",
@@ -65,6 +66,7 @@ objc_library(
"//third-party/opusfile:opusfile",
"//submodules/ffmpeg:ffmpeg",
"//third-party/rnnoise:rnnoise",
+ "//third-party/libyuv:libyuv",
],
sdk_frameworks = [
"Foundation",
diff --git a/submodules/TooltipUI/BUILD b/submodules/TooltipUI/BUILD
index 7b1a797388..59c221f744 100644
--- a/submodules/TooltipUI/BUILD
+++ b/submodules/TooltipUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AppBundle:AppBundle",
"//submodules/AnimatedStickerNode:AnimatedStickerNode",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramCore:TelegramCore",
"//submodules/TextFormat:TextFormat",
"//submodules/UrlEscaping:UrlEscaping",
diff --git a/submodules/TooltipUI/Sources/TooltipScreen.swift b/submodules/TooltipUI/Sources/TooltipScreen.swift
index 49b47ecb42..cd1f4e00c7 100644
--- a/submodules/TooltipUI/Sources/TooltipScreen.swift
+++ b/submodules/TooltipUI/Sources/TooltipScreen.swift
@@ -5,7 +5,6 @@ import Display
import TelegramPresentationData
import AnimatedStickerNode
import AppBundle
-import SyncCore
import TelegramCore
import TextFormat
import Postbox
diff --git a/submodules/UndoUI/BUILD b/submodules/UndoUI/BUILD
index f1888f5371..22bb401273 100644
--- a/submodules/UndoUI/BUILD
+++ b/submodules/UndoUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/TextFormat:TextFormat",
"//submodules/Markdown:Markdown",
diff --git a/submodules/UndoUI/Sources/UndoOverlayController.swift b/submodules/UndoUI/Sources/UndoOverlayController.swift
index 124e6d17a8..71d5ec6c68 100644
--- a/submodules/UndoUI/Sources/UndoOverlayController.swift
+++ b/submodules/UndoUI/Sources/UndoOverlayController.swift
@@ -2,7 +2,6 @@ import Foundation
import UIKit
import Display
import TelegramPresentationData
-import SyncCore
import Postbox
import TelegramCore
import AccountContext
diff --git a/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift b/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift
index eca7b1c5a6..5c0e1d6143 100644
--- a/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift
+++ b/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import SwiftSignalKit
import Postbox
-import SyncCore
import TelegramCore
import TelegramPresentationData
import TextFormat
@@ -242,11 +241,11 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
self.animationNode = AnimationNode(animation: "anim_success", colors: ["info1.info1.stroke": self.animationBackgroundColor, "info2.info2.Fill": self.animationBackgroundColor], scale: 1.0)
self.animatedStickerNode = nil
- let (rawString, attributes) = presentationData.strings.ChatList_AddedToFolderTooltip(chatTitle, folderTitle)
+ let formattedString = presentationData.strings.ChatList_AddedToFolderTooltip(chatTitle, folderTitle)
- let string = NSMutableAttributedString(attributedString: NSAttributedString(string: rawString, font: Font.regular(14.0), textColor: .white))
- for (_, range) in attributes {
- string.addAttribute(.font, value: Font.regular(14.0), range: range)
+ let string = NSMutableAttributedString(attributedString: NSAttributedString(string: formattedString.string, font: Font.regular(14.0), textColor: .white))
+ for range in formattedString.ranges {
+ string.addAttribute(.font, value: Font.regular(14.0), range: range.range)
}
self.textNode.attributedText = string
@@ -259,11 +258,11 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
self.animationNode = AnimationNode(animation: "anim_success", colors: ["info1.info1.stroke": self.animationBackgroundColor, "info2.info2.Fill": self.animationBackgroundColor], scale: 1.0)
self.animatedStickerNode = nil
- let (rawString, attributes) = presentationData.strings.ChatList_RemovedFromFolderTooltip(chatTitle, folderTitle)
+ let formattedString = presentationData.strings.ChatList_RemovedFromFolderTooltip(chatTitle, folderTitle)
- let string = NSMutableAttributedString(attributedString: NSAttributedString(string: rawString, font: Font.regular(14.0), textColor: .white))
- for (_, range) in attributes {
- string.addAttribute(.font, value: Font.regular(14.0), range: range)
+ let string = NSMutableAttributedString(attributedString: NSAttributedString(string: formattedString.string, font: Font.regular(14.0), textColor: .white))
+ for range in formattedString.ranges {
+ string.addAttribute(.font, value: Font.regular(14.0), range: range.range)
}
self.textNode.attributedText = string
@@ -276,11 +275,11 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
self.animationNode = AnimationNode(animation: "anim_payment", colors: ["info1.info1.stroke": self.animationBackgroundColor, "info2.info2.Fill": self.animationBackgroundColor], scale: 1.0)
self.animatedStickerNode = nil
- let (rawString, attributes) = presentationData.strings.Checkout_SuccessfulTooltip(currencyValue, itemTitle)
+ let formattedString = presentationData.strings.Checkout_SuccessfulTooltip(currencyValue, itemTitle)
- let string = NSMutableAttributedString(attributedString: NSAttributedString(string: rawString, font: Font.regular(14.0), textColor: .white))
- for (_, range) in attributes {
- string.addAttribute(.font, value: Font.semibold(14.0), range: range)
+ let string = NSMutableAttributedString(attributedString: NSAttributedString(string: formattedString.string, font: Font.regular(14.0), textColor: .white))
+ for range in formattedString.ranges {
+ string.addAttribute(.font, value: Font.semibold(14.0), range: range.range)
}
self.textNode.attributedText = string
diff --git a/submodules/UrlHandling/BUILD b/submodules/UrlHandling/BUILD
index fbece7a1ec..9da093721e 100644
--- a/submodules/UrlHandling/BUILD
+++ b/submodules/UrlHandling/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/MtProtoKit:MtProtoKit",
"//submodules/AccountContext:AccountContext",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
diff --git a/submodules/UrlHandling/Sources/UrlHandling.swift b/submodules/UrlHandling/Sources/UrlHandling.swift
index 7bd01c2d33..82c7c9a4cc 100644
--- a/submodules/UrlHandling/Sources/UrlHandling.swift
+++ b/submodules/UrlHandling/Sources/UrlHandling.swift
@@ -3,7 +3,6 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import MtProtoKit
import TelegramPresentationData
import TelegramUIPreferences
@@ -347,14 +346,8 @@ private func resolveInternalUrl(context: AccountContext, url: ParsedInternalUrl)
case let .peerName(name, parameter):
return context.engine.peers.resolvePeerByName(name: name)
|> take(1)
- |> mapToSignal { peerId -> Signal in
- return context.account.postbox.transaction { transaction -> Peer? in
- if let peerId = peerId {
- return transaction.getPeer(peerId)
- } else {
- return nil
- }
- }
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
|> mapToSignal { peer -> Signal in
if let peer = peer {
diff --git a/submodules/WallpaperBackgroundNode/BUILD b/submodules/WallpaperBackgroundNode/BUILD
index 65b2180e3e..2d047a9c80 100644
--- a/submodules/WallpaperBackgroundNode/BUILD
+++ b/submodules/WallpaperBackgroundNode/BUILD
@@ -13,7 +13,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/GradientBackground:GradientBackground",
"//submodules/TelegramPresentationData:TelegramPresentationData",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramCore:TelegramCore",
"//submodules/Postbox:Postbox",
"//submodules/AccountContext:AccountContext",
diff --git a/submodules/WallpaperBackgroundNode/Sources/WallpaperBackgroundNode.swift b/submodules/WallpaperBackgroundNode/Sources/WallpaperBackgroundNode.swift
index 830dd0505a..e7ab2e6551 100644
--- a/submodules/WallpaperBackgroundNode/Sources/WallpaperBackgroundNode.swift
+++ b/submodules/WallpaperBackgroundNode/Sources/WallpaperBackgroundNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import GradientBackground
import TelegramPresentationData
-import SyncCore
import TelegramCore
import AccountContext
import SwiftSignalKit
diff --git a/submodules/WallpaperResources/BUILD b/submodules/WallpaperResources/BUILD
index 4a369c7786..bb2ec51701 100644
--- a/submodules/WallpaperResources/BUILD
+++ b/submodules/WallpaperResources/BUILD
@@ -8,7 +8,6 @@ swift_library(
]),
deps = [
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/Postbox:Postbox",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
diff --git a/submodules/WallpaperResources/Sources/WallpaperCache.swift b/submodules/WallpaperResources/Sources/WallpaperCache.swift
index 7c234b790f..f5e5d10ba1 100644
--- a/submodules/WallpaperResources/Sources/WallpaperCache.swift
+++ b/submodules/WallpaperResources/Sources/WallpaperCache.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import Postbox
import TelegramApi
import TelegramCore
-import SyncCore
import TelegramUIPreferences
import PersistentStringHash
diff --git a/submodules/WallpaperResources/Sources/WallpaperResources.swift b/submodules/WallpaperResources/Sources/WallpaperResources.swift
index d654e55376..26425f5752 100644
--- a/submodules/WallpaperResources/Sources/WallpaperResources.swift
+++ b/submodules/WallpaperResources/Sources/WallpaperResources.swift
@@ -4,7 +4,6 @@ import SwiftSignalKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import MediaResources
import ImageBlur
import FastBlur
diff --git a/submodules/WatchBridge/BUILD b/submodules/WatchBridge/BUILD
index 313426283a..515c17984f 100644
--- a/submodules/WatchBridge/BUILD
+++ b/submodules/WatchBridge/BUILD
@@ -11,7 +11,6 @@ swift_library(
"//submodules/SSignalKit/SSignalKit:SSignalKit",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/WatchCommon/Host:WatchCommon",
"//submodules/WatchBridgeAudio:WatchBridgeAudio",
"//submodules/TelegramPresentationData:TelegramPresentationData",
diff --git a/submodules/WatchBridge/Sources/WatchBridge.swift b/submodules/WatchBridge/Sources/WatchBridge.swift
index 08a9ccc38c..18a6502fbc 100644
--- a/submodules/WatchBridge/Sources/WatchBridge.swift
+++ b/submodules/WatchBridge/Sources/WatchBridge.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
import TelegramCore
-import SyncCore
import WatchCommon
import TelegramPresentationData
import LegacyUI
diff --git a/submodules/WatchBridge/Sources/WatchCommunicationManager.swift b/submodules/WatchBridge/Sources/WatchCommunicationManager.swift
index 629b456a41..4a986cf7e4 100644
--- a/submodules/WatchBridge/Sources/WatchCommunicationManager.swift
+++ b/submodules/WatchBridge/Sources/WatchCommunicationManager.swift
@@ -2,7 +2,6 @@ import Foundation
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import WatchCommon
import SSignalKit
import TelegramUIPreferences
diff --git a/submodules/WatchBridge/Sources/WatchRequestHandlers.swift b/submodules/WatchBridge/Sources/WatchRequestHandlers.swift
index 81249019eb..e9b97e3698 100644
--- a/submodules/WatchBridge/Sources/WatchRequestHandlers.swift
+++ b/submodules/WatchBridge/Sources/WatchRequestHandlers.swift
@@ -3,7 +3,6 @@ import SwiftSignalKit
import Postbox
import Display
import TelegramCore
-import SyncCore
import LegacyComponents
import WatchCommon
import TelegramPresentationData
@@ -751,11 +750,11 @@ final class WatchLocationHandler: WatchRequestHandler {
if let context = context {
return context.engine.peers.resolvePeerByName(name: "foursquare")
|> take(1)
- |> mapToSignal { peerId -> Signal in
- guard let peerId = peerId else {
+ |> mapToSignal { peer -> Signal in
+ guard let peer = peer else {
return .single(nil)
}
- return context.engine.messages.requestChatContextResults(botId: peerId, peerId: context.account.peerId, query: "", location: .single((args.coordinate.latitude, args.coordinate.longitude)), offset: "")
+ return context.engine.messages.requestChatContextResults(botId: peer.id, peerId: context.account.peerId, query: "", location: .single((args.coordinate.latitude, args.coordinate.longitude)), offset: "")
|> map { results -> ChatContextResultCollection? in
return results?.results
}
diff --git a/submodules/WebSearchUI/BUILD b/submodules/WebSearchUI/BUILD
index ec39c0d60c..d93aa711a6 100644
--- a/submodules/WebSearchUI/BUILD
+++ b/submodules/WebSearchUI/BUILD
@@ -12,7 +12,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/Postbox:Postbox",
"//submodules/TelegramCore:TelegramCore",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramPresentationData:TelegramPresentationData",
"//submodules/AccountContext:AccountContext",
"//submodules/LegacyComponents:LegacyComponents",
diff --git a/submodules/WebSearchUI/Sources/LegacyWebSearchEditor.swift b/submodules/WebSearchUI/Sources/LegacyWebSearchEditor.swift
index 5fb3ac16d1..a27dea3ff7 100644
--- a/submodules/WebSearchUI/Sources/LegacyWebSearchEditor.swift
+++ b/submodules/WebSearchUI/Sources/LegacyWebSearchEditor.swift
@@ -3,7 +3,6 @@ import UIKit
import LegacyComponents
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import SSignalKit
import Display
diff --git a/submodules/WebSearchUI/Sources/LegacyWebSearchGallery.swift b/submodules/WebSearchUI/Sources/LegacyWebSearchGallery.swift
index d45a671e63..47a58c964e 100644
--- a/submodules/WebSearchUI/Sources/LegacyWebSearchGallery.swift
+++ b/submodules/WebSearchUI/Sources/LegacyWebSearchGallery.swift
@@ -3,7 +3,6 @@ import UIKit
import LegacyComponents
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Postbox
import SSignalKit
import UIKit
diff --git a/submodules/WebSearchUI/Sources/WebSearchController.swift b/submodules/WebSearchUI/Sources/WebSearchController.swift
index 3fc012211b..ff2cfd27da 100644
--- a/submodules/WebSearchUI/Sources/WebSearchController.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchController.swift
@@ -5,7 +5,6 @@ import SwiftSignalKit
import Display
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramUIPreferences
import AccountContext
@@ -447,23 +446,15 @@ public final class WebSearchController: ViewController {
let account = self.context.account
let context = self.context
let contextBot = self.context.engine.peers.resolvePeerByName(name: name)
- |> mapToSignal { peerId -> Signal in
- if let peerId = peerId {
- return account.postbox.loadedPeerWithId(peerId)
- |> map { peer -> Peer? in
- return peer
- }
- |> take(1)
- } else {
- return .single(nil)
- }
+ |> mapToSignal { peer -> Signal in
+ return .single(peer?._asPeer())
}
|> mapToSignal { peer -> Signal<(ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult?, NoError> in
if let user = peer as? TelegramUser, let botInfo = user.botInfo, let _ = botInfo.inlinePlaceholder {
let results = requestContextResults(context: context, botId: user.id, query: query, peerId: peerId, limit: 64)
|> map { results -> (ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult? in
return { _ in
- return .contextRequestResult(user, results?.results)
+ return .contextRequestResult(.user(user), results?.results)
}
}
diff --git a/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift b/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift
index 450ee647df..f913b8a3ad 100644
--- a/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchControllerNode.swift
@@ -5,7 +5,6 @@ import Postbox
import SwiftSignalKit
import Display
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramPresentationData
import TelegramUIPreferences
@@ -219,7 +218,7 @@ class WebSearchControllerNode: ASDisplayNode {
self.recentQueriesNode = ListView()
self.recentQueriesNode.backgroundColor = theme.list.plainBackgroundColor
self.recentQueriesNode.accessibilityPageScrolledString = { row, count in
- return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
+ return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
super.init()
diff --git a/submodules/WebSearchUI/Sources/WebSearchGalleryController.swift b/submodules/WebSearchUI/Sources/WebSearchGalleryController.swift
index 5f27d7b151..e64647fcc0 100644
--- a/submodules/WebSearchUI/Sources/WebSearchGalleryController.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchGalleryController.swift
@@ -6,7 +6,6 @@ import Postbox
import SwiftSignalKit
import AsyncDisplayKit
import TelegramCore
-import SyncCore
import LegacyComponents
import TelegramPresentationData
import AccountContext
diff --git a/submodules/WebSearchUI/Sources/WebSearchGalleryFooterContentNode.swift b/submodules/WebSearchUI/Sources/WebSearchGalleryFooterContentNode.swift
index 39656af3aa..7ae115385e 100644
--- a/submodules/WebSearchUI/Sources/WebSearchGalleryFooterContentNode.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchGalleryFooterContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import SwiftSignalKit
import LegacyComponents
import TelegramPresentationData
diff --git a/submodules/WebSearchUI/Sources/WebSearchItem.swift b/submodules/WebSearchUI/Sources/WebSearchItem.swift
index cea2a3ec71..41f0592efc 100644
--- a/submodules/WebSearchUI/Sources/WebSearchItem.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import Display
import TelegramCore
-import SyncCore
import SwiftSignalKit
import Postbox
import TelegramPresentationData
diff --git a/submodules/WebSearchUI/Sources/WebSearchNavigationContentNode.swift b/submodules/WebSearchUI/Sources/WebSearchNavigationContentNode.swift
index ef18cec92e..dbc045ef04 100644
--- a/submodules/WebSearchUI/Sources/WebSearchNavigationContentNode.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchNavigationContentNode.swift
@@ -4,7 +4,6 @@ import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import SearchBarNode
diff --git a/submodules/WebSearchUI/Sources/WebSearchRecentQueryItem.swift b/submodules/WebSearchUI/Sources/WebSearchRecentQueryItem.swift
index d7cc659b6b..135bac146c 100644
--- a/submodules/WebSearchUI/Sources/WebSearchRecentQueryItem.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchRecentQueryItem.swift
@@ -5,7 +5,6 @@ import Postbox
import Display
import SwiftSignalKit
import TelegramCore
-import SyncCore
import TelegramPresentationData
import ItemListUI
import PresentationDataUtils
diff --git a/submodules/WebSearchUI/Sources/WebSearchVideoGalleryItem.swift b/submodules/WebSearchUI/Sources/WebSearchVideoGalleryItem.swift
index 50482a3db7..92ba12146b 100644
--- a/submodules/WebSearchUI/Sources/WebSearchVideoGalleryItem.swift
+++ b/submodules/WebSearchUI/Sources/WebSearchVideoGalleryItem.swift
@@ -3,7 +3,6 @@ import UIKit
import AsyncDisplayKit
import SwiftSignalKit
import TelegramCore
-import SyncCore
import Display
import Postbox
import TelegramPresentationData
diff --git a/submodules/WebsiteType/BUILD b/submodules/WebsiteType/BUILD
index dd3c2d8c69..6ede6cadc4 100644
--- a/submodules/WebsiteType/BUILD
+++ b/submodules/WebsiteType/BUILD
@@ -7,7 +7,7 @@ swift_library(
"Sources/**/*.swift",
]),
deps = [
- "//submodules/SyncCore:SyncCore",
+ "//submodules/TelegramCore:TelegramCore",
],
visibility = [
"//visibility:public",
diff --git a/submodules/WebsiteType/Sources/WebsiteType.swift b/submodules/WebsiteType/Sources/WebsiteType.swift
index 53b6950108..a8bf0ad6c1 100644
--- a/submodules/WebsiteType/Sources/WebsiteType.swift
+++ b/submodules/WebsiteType/Sources/WebsiteType.swift
@@ -1,5 +1,5 @@
import Foundation
-import SyncCore
+import TelegramCore
public enum WebsiteType {
case generic
diff --git a/submodules/WidgetItemsUtils/BUILD b/submodules/WidgetItemsUtils/BUILD
index a17c9cfcbc..3dca4cc574 100644
--- a/submodules/WidgetItemsUtils/BUILD
+++ b/submodules/WidgetItemsUtils/BUILD
@@ -9,7 +9,6 @@ swift_library(
deps = [
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Postbox:Postbox",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramCore:TelegramCore",
"//submodules/WidgetItems:WidgetItems",
],
diff --git a/submodules/WidgetItemsUtils/Sources/WidgetItemsUtils.swift b/submodules/WidgetItemsUtils/Sources/WidgetItemsUtils.swift
index 11b3148aae..c5c1c11359 100644
--- a/submodules/WidgetItemsUtils/Sources/WidgetItemsUtils.swift
+++ b/submodules/WidgetItemsUtils/Sources/WidgetItemsUtils.swift
@@ -1,7 +1,6 @@
import Foundation
import Postbox
-import SyncCore
import TelegramCore
import WidgetItems
diff --git a/submodules/WidgetSetupScreen/BUILD b/submodules/WidgetSetupScreen/BUILD
index d674747929..29632e76f3 100644
--- a/submodules/WidgetSetupScreen/BUILD
+++ b/submodules/WidgetSetupScreen/BUILD
@@ -10,7 +10,6 @@ swift_library(
"//submodules/Display:Display",
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
"//submodules/Postbox:Postbox",
- "//submodules/SyncCore:SyncCore",
"//submodules/TelegramCore:TelegramCore",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/ItemListUI:ItemListUI",
diff --git a/submodules/WidgetSetupScreen/Sources/WidgetSetupScreen.swift b/submodules/WidgetSetupScreen/Sources/WidgetSetupScreen.swift
index 0cd4a2c91a..e29cdbadb7 100644
--- a/submodules/WidgetSetupScreen/Sources/WidgetSetupScreen.swift
+++ b/submodules/WidgetSetupScreen/Sources/WidgetSetupScreen.swift
@@ -4,7 +4,6 @@ import Display
import SwiftSignalKit
import Postbox
import TelegramCore
-import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
diff --git a/third-party/libyuv/BUILD b/third-party/libyuv/BUILD
new file mode 100644
index 0000000000..9936c678c3
--- /dev/null
+++ b/third-party/libyuv/BUILD
@@ -0,0 +1,142 @@
+
+config_setting(
+ name = "debug_build",
+ values = {
+ "compilation_mode": "dbg",
+ },
+)
+
+optimization_flags = select({
+ ":debug_build": ["-O2", "-DNDEBUG"],
+ "//conditions:default": ["-DNDEBUG"],
+})
+
+common_flags = []
+
+arm_specific_flags = [
+ "-DLIBYUV_NEON",
+]
+
+arm64_specific_flags = [
+ "-DLIBYUV_NEON",
+]
+
+x86_64_specific_flags = [
+ "-DHAVE_SSE2",
+]
+
+arch_specific_cflags = select({
+ "@build_bazel_rules_apple//apple:ios_armv7": common_flags + arm_specific_flags,
+ "@build_bazel_rules_apple//apple:ios_arm64": common_flags + arm64_specific_flags,
+ "//build-system:ios_sim_arm64": common_flags + arm64_specific_flags,
+ "@build_bazel_rules_apple//apple:ios_x86_64": common_flags + x86_64_specific_flags,
+})
+
+cc_library(
+ name = "libyuv",
+ srcs = [ "third_party/libyuv/" + path for path in [
+ # Headers
+ "include/libyuv.h",
+ "include/libyuv/basic_types.h",
+ "include/libyuv/compare.h",
+ "include/libyuv/compare_row.h",
+ "include/libyuv/convert.h",
+ "include/libyuv/convert_argb.h",
+ "include/libyuv/convert_from.h",
+ "include/libyuv/convert_from_argb.h",
+ "include/libyuv/cpu_id.h",
+ "include/libyuv/mjpeg_decoder.h",
+ "include/libyuv/planar_functions.h",
+ "include/libyuv/rotate.h",
+ "include/libyuv/rotate_argb.h",
+ "include/libyuv/rotate_row.h",
+ "include/libyuv/row.h",
+ "include/libyuv/scale.h",
+ "include/libyuv/scale_argb.h",
+ "include/libyuv/scale_row.h",
+ "include/libyuv/scale_uv.h",
+ "include/libyuv/version.h",
+ "include/libyuv/video_common.h",
+
+ # Source Files
+ "source/compare.cc",
+ "source/compare_common.cc",
+ "source/compare_gcc.cc",
+ "source/compare_win.cc",
+ "source/convert.cc",
+ "source/convert_argb.cc",
+ "source/convert_from.cc",
+ "source/convert_from_argb.cc",
+ "source/convert_jpeg.cc",
+ "source/convert_to_argb.cc",
+ "source/convert_to_i420.cc",
+ "source/cpu_id.cc",
+ "source/mjpeg_decoder.cc",
+ "source/mjpeg_validate.cc",
+ "source/planar_functions.cc",
+ "source/rotate.cc",
+ "source/rotate_any.cc",
+ "source/rotate_argb.cc",
+ "source/rotate_common.cc",
+ "source/rotate_gcc.cc",
+ "source/rotate_win.cc",
+ "source/row_any.cc",
+ "source/row_common.cc",
+ "source/row_gcc.cc",
+ "source/row_win.cc",
+ "source/scale.cc",
+ "source/scale_any.cc",
+ "source/scale_argb.cc",
+ "source/scale_common.cc",
+ "source/scale_gcc.cc",
+ "source/scale_uv.cc",
+ "source/scale_win.cc",
+ "source/video_common.cc",
+
+ # ARM Source Files
+ "source/compare_neon.cc",
+ "source/compare_neon64.cc",
+ "source/rotate_neon.cc",
+ "source/rotate_neon64.cc",
+ "source/row_neon.cc",
+ "source/row_neon64.cc",
+ "source/scale_neon.cc",
+ "source/scale_neon64.cc",
+ ]],
+ copts = [
+ "-ffp-contract=fast",
+ "-Ithird-party/libyuv/third_party/libyuv/include",
+ ] + arch_specific_cflags + optimization_flags,
+ visibility = ["//visibility:public"],
+)
+
+
+objc_library(
+ name = "LibYuvBinding",
+ enable_modules = True,
+ module_name = "LibYuvBinding",
+ srcs = glob([
+ "LibYuvBinding/Sources/**/*.m",
+ "LibYuvBinding/Sources/**/*.c",
+ "LibYuvBinding/Sources/**/*.h",
+ ]),
+ hdrs = glob([
+ "LibYuvBinding/PublicHeaders/**/*.h",
+ ]),
+ includes = [
+ "LibYuvBinding/PublicHeaders",
+ ],
+ copts = [
+ "-Ithird-party/libyuv/third_party/libyuv/include",
+ ],
+ deps = [
+ ":libyuv",
+ ],
+ sdk_frameworks = [
+ "Foundation",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
+
diff --git a/third-party/libyuv/LibYuvBinding/PublicHeaders/LibYuvBinding/LibYuvBinding.h b/third-party/libyuv/LibYuvBinding/PublicHeaders/LibYuvBinding/LibYuvBinding.h
new file mode 100644
index 0000000000..7cd4095930
--- /dev/null
+++ b/third-party/libyuv/LibYuvBinding/PublicHeaders/LibYuvBinding/LibYuvBinding.h
@@ -0,0 +1,21 @@
+#ifndef LIBYUV_BINDING_H
+#define LIBYUV_BINDING_H
+
+#import
+
+bool libyuv_I420ToNV12(
+ const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height
+);
+
+#endif
diff --git a/third-party/libyuv/LibYuvBinding/Sources/LibYuvBinding.m b/third-party/libyuv/LibYuvBinding/Sources/LibYuvBinding.m
new file mode 100644
index 0000000000..8876bfc135
--- /dev/null
+++ b/third-party/libyuv/LibYuvBinding/Sources/LibYuvBinding.m
@@ -0,0 +1,33 @@
+#include
+
+#include "libyuv/convert_from.h"
+
+bool libyuv_I420ToNV12(
+ const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height
+) {
+ return I420ToNV12(
+ src_y,
+ src_stride_y,
+ src_u,
+ src_stride_u,
+ src_v,
+ src_stride_v,
+ dst_y,
+ dst_stride_y,
+ dst_uv,
+ dst_stride_uv,
+ width,
+ height
+ ) == 0;
+}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/AUTHORS b/third-party/libyuv/third_party/libyuv/AUTHORS
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/AUTHORS
rename to third-party/libyuv/third_party/libyuv/AUTHORS
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/Android.bp b/third-party/libyuv/third_party/libyuv/Android.bp
similarity index 74%
rename from third-party/webrtc/dependencies/third_party/libyuv/Android.bp
rename to third-party/libyuv/third_party/libyuv/Android.bp
index d0b2343262..e2ea47a038 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/Android.bp
+++ b/third-party/libyuv/third_party/libyuv/Android.bp
@@ -1,6 +1,32 @@
+package {
+ default_applicable_licenses: ["external_libyuv_files_license"],
+}
+
+// Added automatically by a large-scale-change
+//
+// large-scale-change included anything that looked like it might be a license
+// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
+//
+// Please consider removing redundant or irrelevant files from 'license_text:'.
+// See: http://go/android-license-faq
+license {
+ name: "external_libyuv_files_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "LICENSE",
+ "LICENSE_THIRD_PARTY",
+ "PATENTS",
+ ],
+}
+
cc_library {
name: "libyuv",
vendor_available: true,
+ product_available: true,
+ host_supported: true,
vndk: {
enabled: true,
},
@@ -61,9 +87,21 @@ cc_library {
"-DHAVE_JPEG",
],
+ arch: {
+ arm: {
+ cflags: ["-mfpu=neon"],
+ },
+ },
+
shared_libs: ["libjpeg"],
export_include_dirs: ["include"],
+
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.media.swcodec",
+ ],
+ min_sdk_version: "29",
}
// compatibilty static library until all uses of libyuv_static are replaced
@@ -72,6 +110,11 @@ cc_library_static {
name: "libyuv_static",
vendor_available: true,
whole_static_libs: ["libyuv"],
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.media.swcodec",
+ ],
+ min_sdk_version: "29",
}
cc_test {
@@ -108,19 +151,19 @@ cc_test {
}
cc_test {
- name: "i444tonv12_eg",
+ name: "cpuid",
gtest: false,
srcs: [
- "util/i444tonv12_eg.cc",
+ "util/cpuid.c",
],
static_libs: ["libyuv"],
}
cc_test {
- name: "cpuid",
+ name: "i444tonv12_eg",
gtest: false,
srcs: [
- "util/cpuid.c",
+ "util/i444tonv12_eg.cc",
],
static_libs: ["libyuv"],
}
@@ -136,6 +179,15 @@ cc_test {
static_libs: ["libyuv"],
}
+cc_test {
+ name: "yuvconstants",
+ gtest: false,
+ srcs: [
+ "util/yuvconstants.c",
+ ],
+ static_libs: ["libyuv"],
+}
+
cc_test {
name: "yuvconvert",
gtest: false,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/Android.mk b/third-party/libyuv/third_party/libyuv/Android.mk
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/Android.mk
rename to third-party/libyuv/third_party/libyuv/Android.mk
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/BUILD.gn b/third-party/libyuv/third_party/libyuv/BUILD.gn
similarity index 94%
rename from third-party/webrtc/dependencies/third_party/libyuv/BUILD.gn
rename to third-party/libyuv/third_party/libyuv/BUILD.gn
index d733e71de8..e1c7c1da4d 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/BUILD.gn
+++ b/third-party/libyuv/third_party/libyuv/BUILD.gn
@@ -10,8 +10,8 @@ import("//testing/test.gni")
import("libyuv.gni")
declare_args() {
- # Set to false to disable building with gflags.
- libyuv_use_gflags = true
+ # Set to false to disable building with absl flags.
+ libyuv_use_absl_flags = true
# When building a shared library using a target in WebRTC or
# Chromium projects that depends on libyuv, setting this flag
@@ -40,6 +40,7 @@ group("default") {
":i444tonv12_eg",
":libyuv_unittest",
":psnr",
+ ":yuvconstants",
":yuvconvert",
]
}
@@ -293,9 +294,12 @@ if (libyuv_include_tests) {
]
defines = []
- if (libyuv_use_gflags) {
- defines += [ "LIBYUV_USE_GFLAGS" ]
- deps += [ "//third_party/gflags" ]
+ if (libyuv_use_absl_flags) {
+ defines += [ "LIBYUV_USE_ABSL_FLAGS" ]
+ deps += [
+ "//third_party/abseil-cpp/absl/flags:flag",
+ "//third_party/abseil-cpp/absl/flags:parse",
+ ]
}
configs += [ ":libyuv_unittest_warnings_config" ]
@@ -357,6 +361,17 @@ if (libyuv_include_tests) {
}
}
+ executable("yuvconstants") {
+ sources = [
+ # sources
+ "util/yuvconstants.c",
+ ]
+ deps = [ ":libyuv" ]
+ if (is_linux || is_chromeos) {
+ cflags = [ "-fexceptions" ]
+ }
+ }
+
executable("psnr") {
sources = [
# sources
@@ -376,9 +391,7 @@ if (libyuv_include_tests) {
# sources
"util/i444tonv12_eg.cc",
]
- deps = [
- ":libyuv",
- ]
+ deps = [ ":libyuv" ]
}
executable("cpuid") {
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/CM_linux_packages.cmake b/third-party/libyuv/third_party/libyuv/CM_linux_packages.cmake
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/CM_linux_packages.cmake
rename to third-party/libyuv/third_party/libyuv/CM_linux_packages.cmake
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/CMakeLists.txt b/third-party/libyuv/third_party/libyuv/CMakeLists.txt
similarity index 93%
rename from third-party/webrtc/dependencies/third_party/libyuv/CMakeLists.txt
rename to third-party/libyuv/third_party/libyuv/CMakeLists.txt
index ed4948f066..636531eee0 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/CMakeLists.txt
+++ b/third-party/libyuv/third_party/libyuv/CMakeLists.txt
@@ -71,12 +71,6 @@ if(TEST)
if(NACL AND NACL_LIBC STREQUAL "newlib")
target_link_libraries(libyuv_unittest glibc-compat)
endif()
-
- find_library(GFLAGS_LIBRARY gflags)
- if(NOT GFLAGS_LIBRARY STREQUAL "GFLAGS_LIBRARY-NOTFOUND")
- target_link_libraries(libyuv_unittest gflags)
- add_definitions(-DLIBYUV_USE_GFLAGS)
- endif()
endif()
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/DEPS b/third-party/libyuv/third_party/libyuv/DEPS
similarity index 65%
rename from third-party/webrtc/dependencies/third_party/libyuv/DEPS
rename to third-party/libyuv/third_party/libyuv/DEPS
index de18543450..b4bf027833 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/DEPS
+++ b/third-party/libyuv/third_party/libyuv/DEPS
@@ -1,18 +1,26 @@
+gclient_gn_args_file = 'src/build/config/gclient_args.gni'
+gclient_gn_args = [
+ 'generate_location_tags',
+]
+
vars = {
'chromium_git': 'https://chromium.googlesource.com',
- 'chromium_revision': '64c8c30faaf969c15c028131dfcd0819208039c1',
+ 'chromium_revision': 'eaac4f14d951eb92181830ed7c346d3ad3ebe7a5',
'gn_version': 'git_revision:6f13aaac55a977e1948910942675c69f2b4f7a94',
+
+ # Keep the Chromium default of generating location tags.
+ 'generate_location_tags': True,
}
deps = {
'src/build':
- Var('chromium_git') + '/chromium/src/build' + '@' + '2d2f9f2b85592bb9af5753ef300c055e6feb709f',
+ Var('chromium_git') + '/chromium/src/build' + '@' + 'fd86d60f33cbc794537c4da2ef7e298d7f81138e',
'src/buildtools':
- Var('chromium_git') + '/chromium/src/buildtools' + '@' + '6302c1175607a436e18947a5abe9df2209e845fc',
+ Var('chromium_git') + '/chromium/src/buildtools' + '@' + '37dc929ecb351687006a61744b116cda601753d7',
'src/testing':
- Var('chromium_git') + '/chromium/src/testing' + '@' + '40b44171056045ed1f85ca0b57485e46c03d7867',
+ Var('chromium_git') + '/chromium/src/testing' + '@' + 'c4bd9205eeb6037d567de781d736ab81ff63ecee',
'src/third_party':
- Var('chromium_git') + '/chromium/src/third_party' + '@' + '24ccdf9b7553446791983bf357261c5e0a4314a0',
+ Var('chromium_git') + '/chromium/src/third_party' + '@' + 'f7d9d7e9dd45109820780e5bfbc3e6f0892d56d7',
'src/buildtools/linux64': {
'packages': [
@@ -46,47 +54,41 @@ deps = {
},
'src/buildtools/clang_format/script':
- Var('chromium_git') + '/chromium/llvm-project/cfe/tools/clang-format.git' + '@' + '96636aa0e9f047f17447f2d45a094d0b59ed7917',
+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '99803d74e35962f63a775f29477882afd4d57d94',
'src/buildtools/third_party/libc++/trunk':
- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + 'd9040c75cfea5928c804ab7c235fed06a63f743a',
+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '79a2e924d96e2fc1e4b937c42efd08898fa472d7',
'src/buildtools/third_party/libc++abi/trunk':
- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '196ba1aaa8ac285d94f4ea8d9836390a45360533',
+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '7d5c92f6cfb1ddb73158233a194bb568c5b13554',
'src/buildtools/third_party/libunwind/trunk':
- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'd999d54f4bca789543a2eb6c995af2d9b5a1f3ed',
+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'd7b11d7989774617bd7df93af95734faac8c0b2c',
'src/third_party/catapult':
- Var('chromium_git') + '/catapult.git' + '@' + 'ccc9dd2835f5a7c5c82ae3c1a2fbc2fe2fd9dfd1',
+ Var('chromium_git') + '/catapult.git' + '@' + '5cb305306ad74c3b68e432ee221a1943dd79b64d',
'src/third_party/colorama/src':
Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
'src/third_party/depot_tools':
- Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '91bb7506bd20ed22b8787e7a8b9975cc07e97175',
+ Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'a806594b95a39141fdbf1f359087a44ffb2deaaf',
'src/third_party/freetype/src':
- Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '26e2a89598d69c7aba76c83f6a1fcf1db17574ab',
+ Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '86b9c9347f99174f4fea3e9deca5800e57a987f2',
'src/third_party/googletest/src':
- Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '4fe018038f87675c083d0cfb6a6b57c274fb1753',
+ Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '4ec4cd23f486bf70efcc5d2caa40f24368f752e3',
'src/third_party/harfbuzz-ng/src':
- Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + 'c39ab82c90479341dcf28eaa8174af6f08c0d7ae',
+ Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + 'cc9bb294919e846ef8a0731b5e9f304f95ef3bb8',
'src/third_party/libjpeg_turbo':
- Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'd5148db386ceb4a608058320071cbed890bd6ad2',
+ Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'ad8b3b0f84baf155f3bde5626c3bf9d20535bcae',
'src/third_party/nasm':
- Var('chromium_git') + '/chromium/deps/nasm.git' + '@' + '19f3fad68da99277b2882939d3b2fa4c4b8d51d9',
- 'src/third_party/yasm/source/patched-yasm':
- Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + '720b70524a4424b15fc57e82263568c8ba0496ad',
+ Var('chromium_git') + '/chromium/deps/nasm.git' + '@' + 'e9be5fd6d723a435ca2da162f9e0ffcb688747c1',
'src/tools':
- Var('chromium_git') + '/chromium/src/tools' + '@' + '1bb7c085e67a0fc8c63511af83299d1632f5a3f3',
+ Var('chromium_git') + '/chromium/src/tools' + '@' + '4f73c6f51dc2198347630219417cbf21a7064bdd',
'src/tools/swarming_client':
- Var('chromium_git') + '/infra/luci/client-py.git' + '@' + 'd46ea7635f2911208268170512cb611412488fd8',
+ Var('chromium_git') + '/infra/luci/client-py.git' + '@' + 'a32a1607f6093d338f756c7e7c7b4333b0c50c9c',
# libyuv-only dependencies (not present in Chromium).
- 'src/third_party/gflags':
- Var('chromium_git') + '/external/webrtc/deps/third_party/gflags' + '@' + '892576179b45861b53e04a112996a738309cf364',
- 'src/third_party/gflags/src':
- Var('chromium_git') + '/external/github.com/gflags/gflags' + '@' + '03bebcb065c83beff83d50ae025a55a4bf94dfca',
'src/third_party/gtest-parallel':
Var('chromium_git') + '/external/webrtc/deps/third_party/gtest-parallel' + '@' + '1dad0e9f6d82ff994130b529d7d814b40eb32b0e',
'src/third_party/lss': {
- 'url': Var('chromium_git') + '/linux-syscall-support.git' + '@' + '29f7c7e018f4ce706a709f0b0afbf8bacf869480',
+ 'url': Var('chromium_git') + '/linux-syscall-support.git' + '@' + '92a65a8f5d705d1928874420c8d0d15bde8c89e5',
'condition': 'checkout_android or checkout_linux',
},
@@ -102,13 +104,13 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/auto/src': {
- 'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + 'f40317ae215863102cf87fe0679ad66f4b19454e',
+ 'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + '00cb81ed0959a55eb671e89768934094ca0e5e6f',
'condition': 'checkout_android',
},
'src/third_party/boringssl/src':
- 'https://boringssl.googlesource.com/boringssl.git' + '@' + '1607f54fed72c6589d560254626909a64124f091',
+ 'https://boringssl.googlesource.com/boringssl.git' + '@' + 'a10017c548b0805eb98e7847c37370dbd37cd8d6',
'src/base': {
- 'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'e096814b0448fba1095c6e7be7c7a0b5d7264251',
+ 'url': Var('chromium_git') + '/chromium/src/base' + '@' + '4045370905def8e415021737f13e02ed6444a45c',
'condition': 'checkout_android',
},
'src/third_party/bazel': {
@@ -132,9 +134,19 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/android_ndk': {
- 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '27c0a8d090c666a50e40fceb4ee5b40b1a2d3f87',
+ 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '401019bf85744311b26c88ced255cd53401af8b7',
'condition': 'checkout_android',
},
+ 'src/third_party/androidx': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/androidx',
+ 'version': 'YiuL0FMMTU_K_n0aBAT3GBA4dMfL8JHhn6dkcz5SFgAC',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
'src/third_party/android_support_test_runner': {
'packages': [
{
@@ -151,10 +163,6 @@ deps = {
'package': 'chromium/third_party/android_sdk/public/build-tools/30.0.1',
'version': '8LZujEmLjSh0g3JciDA3cslSptxKs9HOa_iUPXkOeYQC',
},
- {
- 'package': 'chromium/third_party/android_sdk/public/cmdline-tools',
- 'version': 'ijpIFSitwBfaEdO9VXBGPqDHUVzPimXy_whw3aHTN9oC',
- },
{
'package': 'chromium/third_party/android_sdk/public/emulator',
'version': 'A4EvXZUIuQho0QRDJopMUpgyp6NA3aiDQjGKPUKbowMC',
@@ -179,6 +187,10 @@ deps = {
'package': 'chromium/third_party/android_sdk/public/sources/android-29',
'version': '4gxhM8E62bvZpQs7Q3d0DinQaW0RLCIefhXrQBFkNy8C',
},
+ {
+ 'package': 'chromium/third_party/android_sdk/public/cmdline-tools',
+ 'version': 'V__2Ycej-H2-6AcXX5A3gi7sIk74SuN44PBm2uC_N1sC',
+ },
],
'condition': 'checkout_android',
'dep_type': 'cipd',
@@ -257,7 +269,7 @@ deps = {
},
'src/third_party/icu': {
- 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'c2a4cae149aae7fd30c4cbe3cf1b30df03b386f1',
+ 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '2a822c5626ab1ed40366758e4740b4f0ea40237d',
},
'src/third_party/icu4j': {
'packages': [
@@ -302,7 +314,7 @@ deps = {
'condition': 'checkout_android',
},
'src/third_party/libunwindstack': {
- 'url': Var('chromium_git') + '/chromium/src/third_party/libunwindstack.git' + '@' + '11659d420a71e7323b379ea8781f07c6f384bc7e',
+ 'url': Var('chromium_git') + '/chromium/src/third_party/libunwindstack.git' + '@' + 'b34a0059a648f179ef05da2c0927f564bdaea2b3',
'condition': 'checkout_android',
},
'src/third_party/mockito/src': {
@@ -333,7 +345,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/r8',
- 'version': 'N9LppKV-9lFkp7JQtmcLHhm7xHqFv0SPa6aDPtgNCdwC',
+ 'version': 'Nu_mvQJe34CotIXadFlA3w732CJ9EvQGuVs4udcZedAC',
},
],
'condition': 'checkout_android',
@@ -343,7 +355,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/proguard',
- 'version': '3bd778c422ea5496de2ef25c007a517dbb5ce5ca',
+ 'version': 'Fd91BJFVlmiO6c46YMTsdy7n2f5Sk2hVVGlzPLvqZPsC',
},
],
'condition': 'checkout_android',
@@ -357,16 +369,12 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/robolectric',
- 'version': '1KXoOiNP1a_uZNdM2ybWKwAQNow1dHTXTig-ZK4Xgq8C',
+ 'version': 'iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
- 'src/third_party/robolectric/robolectric': {
- 'url': Var('chromium_git') + '/external/robolectric.git' + '@' + '2f3e0a3ac450a17dbf2e7d4eaab3a1f14dda50e6',
- 'condition': 'checkout_android',
- },
'src/third_party/sqlite4java': {
'packages': [
{
@@ -381,16 +389,12 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/turbine',
- 'version': 'O_jNDJ4VdwYKBSDbd2BJ3mknaTFoVkvE7Po8XIiKy8sC',
+ 'version': 'Om6yIEXgJxuqghErK29h9RcMH6VaymMbxwScwXmcN6EC',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
- 'src/third_party/turbine/src': {
- 'url': Var('chromium_git') + '/external/github.com/google/turbine.git' + '@' + '0f2a5024fe4a9bb745bcd5ac7c655cebe11649bc',
- 'condition': 'checkout_android',
- },
'src/third_party/ub-uiautomator/lib': {
'url': Var('chromium_git') + '/chromium/third_party/ub-uiautomator.git' + '@' + '00270549ce3161ae72ceb24712618ea28b4f9434',
'condition': 'checkout_android',
@@ -408,24 +412,18 @@ deps = {
# iOS deps:
'src/ios': {
- 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + '60ef55beac67e3c0eda1c35ab7944c786b377313',
+ 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + '57422bee2ccad3d8b1f0f288845c86df024430d5',
'condition': 'checkout_ios'
},
- # Win deps:
- # Dependencies used by libjpeg-turbo
- 'src/third_party/yasm/binaries': {
- 'url': Var('chromium_git') + '/chromium/deps/yasm/binaries.git' + '@' + '52f9b3f4b0aa06da24ef8b123058bb61ee468881',
- 'condition': 'checkout_win',
- },
-
+ # Everything coming after this is automatically updated by the auto-roller.
# === ANDROID_DEPS Generated Code Start ===
# Generated by //third_party/android_deps/fetch_all.py
'src/third_party/android_deps/libs/android_arch_core_common': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_core_common',
- 'version': 'version:1.1.1-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -436,7 +434,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_core_runtime',
- 'version': 'version:1.1.1-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -447,7 +445,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_common',
- 'version': 'version:1.1.1-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -458,7 +456,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_common_java8',
- 'version': 'version:1.1.1-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -469,7 +467,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_livedata',
- 'version': 'version:1.1.1-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -480,7 +478,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_livedata_core',
- 'version': 'version:1.1.1-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -491,7 +489,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_runtime',
- 'version': 'version:1.1.1-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -502,766 +500,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_viewmodel',
- 'version': 'version:1.1.1-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_activity_activity': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_activity_activity',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_annotation_annotation': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_annotation_annotation',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_annotation_annotation_experimental': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_annotation_annotation_experimental',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_appcompat_appcompat': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_appcompat_appcompat',
- 'version': 'version:1.2.0-beta01-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_appcompat_appcompat_resources': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_appcompat_appcompat_resources',
- 'version': 'version:1.2.0-beta01-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_arch_core_core_common': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_arch_core_core_common',
- 'version': 'version:2.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_arch_core_core_runtime': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_arch_core_core_runtime',
- 'version': 'version:2.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_asynclayoutinflater_asynclayoutinflater': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_asynclayoutinflater_asynclayoutinflater',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_cardview_cardview': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_cardview_cardview',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_collection_collection': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_collection_collection',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_concurrent_concurrent_futures': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_concurrent_concurrent_futures',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_coordinatorlayout_coordinatorlayout': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_coordinatorlayout_coordinatorlayout',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_core_core': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_core_core',
- 'version': 'version:1.3.0-beta01-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_cursoradapter_cursoradapter': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_cursoradapter_cursoradapter',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_customview_customview': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_customview_customview',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_documentfile_documentfile': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_documentfile_documentfile',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_drawerlayout_drawerlayout': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_drawerlayout_drawerlayout',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_exifinterface_exifinterface': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_exifinterface_exifinterface',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_fragment_fragment': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_fragment_fragment',
- 'version': 'version:1.2.5-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_gridlayout_gridlayout': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_gridlayout_gridlayout',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_interpolator_interpolator': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_interpolator_interpolator',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_leanback_leanback': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_leanback_leanback',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_leanback_leanback_preference': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_leanback_leanback_preference',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_legacy_legacy_preference_v14': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_legacy_legacy_preference_v14',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_legacy_legacy_support_core_ui': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_legacy_legacy_support_core_ui',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_legacy_legacy_support_core_utils': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_legacy_legacy_support_core_utils',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_legacy_legacy_support_v13': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_legacy_legacy_support_v13',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_legacy_legacy_support_v4': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_legacy_legacy_support_v4',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common',
- 'version': 'version:2.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common_java8': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common_java8',
- 'version': 'version:2.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_livedata': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_livedata',
- 'version': 'version:2.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_livedata_core': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_livedata_core',
- 'version': 'version:2.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_runtime': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_runtime',
- 'version': 'version:2.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_viewmodel': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_viewmodel',
- 'version': 'version:2.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_viewmodel_savedstate': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_viewmodel_savedstate',
- 'version': 'version:2.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_loader_loader': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_loader_loader',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_localbroadcastmanager_localbroadcastmanager': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_localbroadcastmanager_localbroadcastmanager',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_media_media': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_media_media',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_mediarouter_mediarouter': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_mediarouter_mediarouter',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_multidex_multidex': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_multidex_multidex',
- 'version': 'version:2.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_palette_palette': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_palette_palette',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_preference_preference': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_preference_preference',
- 'version': 'version:1.1.1-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_print_print': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_print_print',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_recyclerview_recyclerview': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_recyclerview_recyclerview',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_savedstate_savedstate': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_savedstate_savedstate',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_slice_slice_builders': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_slice_slice_builders',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_slice_slice_core': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_slice_slice_core',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_slidingpanelayout_slidingpanelayout': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_slidingpanelayout_slidingpanelayout',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_swiperefreshlayout_swiperefreshlayout': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_swiperefreshlayout_swiperefreshlayout',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_core': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_core',
- 'version': 'version:1.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_espresso_espresso_contrib': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_espresso_espresso_contrib',
- 'version': 'version:3.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_espresso_espresso_core': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_espresso_espresso_core',
- 'version': 'version:3.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_espresso_espresso_idling_resource': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_espresso_espresso_idling_resource',
- 'version': 'version:3.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_espresso_espresso_intents': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_espresso_espresso_intents',
- 'version': 'version:3.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_espresso_espresso_web': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_espresso_espresso_web',
- 'version': 'version:3.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_ext_junit': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_ext_junit',
- 'version': 'version:1.1.1-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_monitor': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_monitor',
- 'version': 'version:1.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_rules': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_rules',
- 'version': 'version:1.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_runner': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_runner',
- 'version': 'version:1.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_test_uiautomator_uiautomator': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_test_uiautomator_uiautomator',
- 'version': 'version:2.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_transition_transition': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_transition_transition',
- 'version': 'version:1.2.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_tvprovider_tvprovider': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_tvprovider_tvprovider',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_vectordrawable_vectordrawable': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_vectordrawable_vectordrawable',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_vectordrawable_vectordrawable_animated': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_vectordrawable_vectordrawable_animated',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_versionedparcelable_versionedparcelable': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_versionedparcelable_versionedparcelable',
- 'version': 'version:1.1.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_viewpager2_viewpager2': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_viewpager2_viewpager2',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_viewpager_viewpager': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_viewpager_viewpager',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_webkit_webkit': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_webkit_webkit',
- 'version': 'version:1.3.0-rc01-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/androidx_window_window': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/androidx_window_window',
- 'version': 'version:1.0.0-alpha01-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -1272,7 +511,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/backport_util_concurrent_backport_util_concurrent',
- 'version': 'version:3.1-cr0',
+ 'version': 'version:2@3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -1283,7 +522,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/classworlds_classworlds',
- 'version': 'version:1.1-alpha-2-cr0',
+ 'version': 'version:2@1.1-alpha-2.cr0',
},
],
'condition': 'checkout_android',
@@ -1294,7 +533,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_animated_vector_drawable',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1305,7 +544,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_appcompat_v7',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1316,7 +555,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_asynclayoutinflater',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1327,7 +566,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_cardview_v7',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1338,7 +577,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_collections',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1349,7 +588,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_coordinatorlayout',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1360,7 +599,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_cursoradapter',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1371,7 +610,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_customview',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1382,7 +621,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_design',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1393,7 +632,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_documentfile',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1404,18 +643,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_drawerlayout',
- 'version': 'version:28.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_gridlayout_v7': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_gridlayout_v7',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1426,18 +654,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_interpolator',
- 'version': 'version:28.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_leanback_v17': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_leanback_v17',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1448,7 +665,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_loader',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1459,18 +676,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_localbroadcastmanager',
- 'version': 'version:28.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_mediarouter_v7': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_mediarouter_v7',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1481,51 +687,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_multidex',
- 'version': 'version:1.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_palette_v7': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_palette_v7',
- 'version': 'version:28.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_preference_leanback_v17': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_leanback_v17',
- 'version': 'version:28.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_preference_v14': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_v14',
- 'version': 'version:28.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_preference_v7': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_v7',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@1.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1536,7 +698,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_print',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1547,7 +709,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_recyclerview_v7',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1558,7 +720,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_slidingpanelayout',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1569,7 +731,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_annotations',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1580,7 +742,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_compat',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1591,7 +753,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_ui',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1602,7 +764,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_utils',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1613,7 +775,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_fragment',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1624,18 +786,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_media_compat',
- 'version': 'version:28.0.0-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_support_support_v13': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_support_support_v13',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1646,7 +797,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_v4',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1657,7 +808,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_support_vector_drawable',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1668,7 +819,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_swiperefreshlayout',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1679,7 +830,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_transition',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1690,7 +841,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_versionedparcelable',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1701,29 +852,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_support_viewpager',
- 'version': 'version:28.0.0-cr0',
+ 'version': 'version:2@28.0.0.cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
- 'src/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_core': {
+ 'src/third_party/android_deps/libs/com_android_tools_common': {
'packages': [
{
- 'package': 'chromium/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_core',
- 'version': 'version:1.0.0-beta08-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_processor': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_processor',
- 'version': 'version:1.0.0-beta08-cr0',
+ 'package': 'chromium/third_party/android_deps/libs/com_android_tools_common',
+ 'version': 'version:2@30.0.0-alpha10.cr0',
},
],
'condition': 'checkout_android',
@@ -1734,7 +874,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs',
- 'version': 'version:1.0.10-cr0',
+ 'version': 'version:2@1.1.1.cr0',
},
],
'condition': 'checkout_android',
@@ -1745,7 +885,29 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration',
- 'version': 'version:1.0.10-cr0',
+ 'version': 'version:2@1.1.1.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_android_tools_layoutlib_layoutlib_api': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_android_tools_layoutlib_layoutlib_api',
+ 'version': 'version:2@30.0.0-alpha10.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_android_tools_sdk_common': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_android_tools_sdk_common',
+ 'version': 'version:2@30.0.0-alpha10.cr0',
},
],
'condition': 'checkout_android',
@@ -1756,7 +918,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_github_ben_manes_caffeine_caffeine',
- 'version': 'version:2.8.0-cr0',
+ 'version': 'version:2@2.8.8.cr0',
},
],
'condition': 'checkout_android',
@@ -1767,7 +929,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_github_kevinstern_software_and_algorithms',
- 'version': 'version:1.0-cr0',
+ 'version': 'version:2@1.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_android_datatransport_transport_api': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_android_datatransport_transport_api',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -1778,7 +951,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1789,7 +962,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone',
- 'version': 'version:17.1.0-cr0',
+ 'version': 'version:2@17.5.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1800,7 +973,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1811,7 +984,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_base',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.5.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1822,7 +995,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_basement',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.5.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1833,7 +1006,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1844,7 +1017,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1855,7 +1028,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_clearcut',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_android_gms_play_services_cloud_messaging': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cloud_messaging',
+ 'version': 'version:2@16.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1866,7 +1050,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_fido',
- 'version': 'version:18.1.0-cr0',
+ 'version': 'version:2@19.0.0-beta.cr0',
},
],
'condition': 'checkout_android',
@@ -1877,7 +1061,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_flags',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1888,7 +1072,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_gcm',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1899,7 +1083,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_iid',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1910,7 +1094,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_instantapps',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1921,7 +1105,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_location',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1932,7 +1116,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_phenotype',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1943,7 +1127,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_places_placereport',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1954,7 +1138,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_stats',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1965,7 +1149,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tasks',
- 'version': 'version:17.0.0-cr0',
+ 'version': 'version:2@17.2.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1976,7 +1160,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision',
- 'version': 'version:18.0.0-cr0',
+ 'version': 'version:2@18.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1987,7 +1171,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common',
- 'version': 'version:18.0.0-cr0',
+ 'version': 'version:2@18.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -1998,7 +1182,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_material_material',
- 'version': 'version:1.2.0-alpha06-cr0',
+ 'version': 'version:2@1.4.0-rc01.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_android_play_core': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core',
+ 'version': 'version:2@1.10.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2009,7 +1204,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_auto_auto_common',
- 'version': 'version:0.10-cr0',
+ 'version': 'version:2@0.10.cr0',
},
],
'condition': 'checkout_android',
@@ -2020,7 +1215,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_auto_service_auto_service',
- 'version': 'version:1.0-rc6-cr0',
+ 'version': 'version:2@1.0-rc6.cr0',
},
],
'condition': 'checkout_android',
@@ -2031,7 +1226,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_auto_service_auto_service_annotations',
- 'version': 'version:1.0-rc6-cr0',
+ 'version': 'version:2@1.0-rc6.cr0',
},
],
'condition': 'checkout_android',
@@ -2042,18 +1237,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_auto_value_auto_value_annotations',
- 'version': 'version:1.7-cr0',
+ 'version': 'version:2@1.7.cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
- 'src/third_party/android_deps/libs/com_google_code_findbugs_jFormatString': {
+ 'src/third_party/android_deps/libs/com_google_code_findbugs_jformatstring': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_code_findbugs_jformatstring',
- 'version': 'version:3.0.0-cr0',
+ 'version': 'version:2@3.0.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2064,7 +1259,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_code_findbugs_jsr305',
- 'version': 'version:3.0.2-cr0',
+ 'version': 'version:2@3.0.2.cr0',
},
],
'condition': 'checkout_android',
@@ -2075,7 +1270,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_code_gson_gson',
- 'version': 'version:2.8.0-cr0',
+ 'version': 'version:2@2.8.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2086,7 +1281,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger',
- 'version': 'version:2.26-cr0',
+ 'version': 'version:2@2.30.cr0',
},
],
'condition': 'checkout_android',
@@ -2097,7 +1292,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger_compiler',
- 'version': 'version:2.26-cr0',
+ 'version': 'version:2@2.30.cr0',
},
],
'condition': 'checkout_android',
@@ -2108,7 +1303,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger_producers',
- 'version': 'version:2.26-cr0',
+ 'version': 'version:2@2.30.cr0',
},
],
'condition': 'checkout_android',
@@ -2119,7 +1314,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger_spi',
- 'version': 'version:2.26-cr0',
+ 'version': 'version:2@2.30.cr0',
},
],
'condition': 'checkout_android',
@@ -2130,7 +1325,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_annotation',
- 'version': 'version:2.4.0-cr0',
+ 'version': 'version:2@2.7.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2141,7 +1336,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations',
- 'version': 'version:2.4.0-cr0',
+ 'version': 'version:2@2.7.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2152,7 +1347,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_check_api',
- 'version': 'version:2.4.0-cr0',
+ 'version': 'version:2@2.7.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2163,7 +1358,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_core',
- 'version': 'version:2.4.0-cr0',
+ 'version': 'version:2@2.7.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2174,7 +1369,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_type_annotations',
- 'version': 'version:2.4.0-cr0',
+ 'version': 'version:2@2.7.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2185,7 +1380,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_javac',
- 'version': 'version:9+181-r4173-1-cr0',
+ 'version': 'version:2@9+181-r4173-1.cr0',
},
],
'condition': 'checkout_android',
@@ -2196,7 +1391,128 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_javac_shaded',
- 'version': 'version:9-dev-r4023-3-cr0',
+ 'version': 'version:2@9-dev-r4023-3.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_annotations': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_annotations',
+ 'version': 'version:2@16.0.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_common': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_common',
+ 'version': 'version:2@19.5.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_components': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_components',
+ 'version': 'version:2@16.1.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_encoders': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_encoders',
+ 'version': 'version:2@16.1.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_encoders_json': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_encoders_json',
+ 'version': 'version:2@17.1.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_iid': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_iid',
+ 'version': 'version:2@21.0.1.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_iid_interop': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_iid_interop',
+ 'version': 'version:2@17.0.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_installations': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_installations',
+ 'version': 'version:2@16.3.5.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_installations_interop': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_installations_interop',
+ 'version': 'version:2@16.0.1.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_measurement_connector': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_measurement_connector',
+ 'version': 'version:2@18.0.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_firebase_firebase_messaging': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_messaging',
+ 'version': 'version:2@21.0.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2207,7 +1523,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_googlejavaformat_google_java_format',
- 'version': 'version:1.5-cr0',
+ 'version': 'version:2@1.5.cr0',
},
],
'condition': 'checkout_android',
@@ -2218,7 +1534,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_guava_failureaccess',
- 'version': 'version:1.0.1-cr0',
+ 'version': 'version:2@1.0.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2229,7 +1545,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava',
- 'version': 'version:27.1-jre-cr0',
+ 'version': 'version:2@30.1-jre.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/com_google_guava_guava_android': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava_android',
+ 'version': 'version:2@30.1-android.cr0',
},
],
'condition': 'checkout_android',
@@ -2240,7 +1567,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_guava_listenablefuture',
- 'version': 'version:1.0-cr0',
+ 'version': 'version:2@1.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2251,7 +1578,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_j2objc_j2objc_annotations',
- 'version': 'version:1.1-cr0',
+ 'version': 'version:2@1.3.cr0',
},
],
'condition': 'checkout_android',
@@ -2262,7 +1589,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_protobuf_protobuf_java',
- 'version': 'version:3.4.0-cr0',
+ 'version': 'version:2@3.4.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2273,7 +1600,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_protobuf_protobuf_javalite',
- 'version': 'version:3.13.0-cr0',
+ 'version': 'version:2@3.13.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2284,7 +1611,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_googlecode_java_diff_utils_diffutils',
- 'version': 'version:1.3.0-cr0',
+ 'version': 'version:2@1.3.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2295,7 +1622,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_squareup_javapoet',
- 'version': 'version:1.11.1-cr0',
+ 'version': 'version:2@1.13.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2306,18 +1633,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_squareup_javawriter',
- 'version': 'version:2.1.1-cr0',
+ 'version': 'version:2@2.1.1.cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
- 'src/third_party/android_deps/libs/commons_cli_commons_cli': {
+ 'src/third_party/android_deps/libs/io_github_java_diff_utils_java_diff_utils': {
'packages': [
{
- 'package': 'chromium/third_party/android_deps/libs/commons_cli_commons_cli',
- 'version': 'version:1.3.1-cr0',
+ 'package': 'chromium/third_party/android_deps/libs/io_github_java_diff_utils_java_diff_utils',
+ 'version': 'version:2@4.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2328,7 +1655,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/javax_annotation_javax_annotation_api',
- 'version': 'version:1.3.2-cr0',
+ 'version': 'version:2@1.3.2.cr0',
},
],
'condition': 'checkout_android',
@@ -2339,7 +1666,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/javax_annotation_jsr250_api',
- 'version': 'version:1.0-cr0',
+ 'version': 'version:2@1.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2350,7 +1677,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/javax_inject_javax_inject',
- 'version': 'version:1-cr0',
+ 'version': 'version:2@1.cr0',
},
],
'condition': 'checkout_android',
@@ -2361,18 +1688,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/nekohtml_nekohtml',
- 'version': 'version:1.9.6.2-cr0',
+ 'version': 'version:2@1.9.6.2.cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
- 'src/third_party/android_deps/libs/nekohtml_xercesMinimal': {
+ 'src/third_party/android_deps/libs/nekohtml_xercesminimal': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/nekohtml_xercesminimal',
- 'version': 'version:1.9.6.2-cr0',
+ 'version': 'version:2@1.9.6.2.cr0',
},
],
'condition': 'checkout_android',
@@ -2383,7 +1710,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/net_ltgt_gradle_incap_incap',
- 'version': 'version:0.2-cr0',
+ 'version': 'version:2@0.2.cr0',
},
],
'condition': 'checkout_android',
@@ -2394,7 +1721,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/net_sf_kxml_kxml2',
- 'version': 'version:2.3.0-cr0',
+ 'version': 'version:2@2.3.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2405,7 +1732,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_ant_ant',
- 'version': 'version:1.8.0-cr0',
+ 'version': 'version:2@1.8.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2416,7 +1743,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_ant_ant_launcher',
- 'version': 'version:1.8.0-cr0',
+ 'version': 'version:2@1.8.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2427,7 +1754,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_ant_tasks',
- 'version': 'version:2.1.3-cr0',
+ 'version': 'version:2@2.1.3.cr0',
},
],
'condition': 'checkout_android',
@@ -2438,7 +1765,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_artifact',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2449,7 +1776,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_artifact_manager',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2460,7 +1787,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_error_diagnostics',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2471,7 +1798,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_model',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2482,7 +1809,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_plugin_registry',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2493,7 +1820,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_profile',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2504,7 +1831,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_project',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2515,7 +1842,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_repository_metadata',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2526,7 +1853,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_settings',
- 'version': 'version:2.2.1-cr0',
+ 'version': 'version:2@2.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2537,7 +1864,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_file',
- 'version': 'version:1.0-beta-6-cr0',
+ 'version': 'version:2@1.0-beta-6.cr0',
},
],
'condition': 'checkout_android',
@@ -2548,7 +1875,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_http_lightweight',
- 'version': 'version:1.0-beta-6-cr0',
+ 'version': 'version:2@1.0-beta-6.cr0',
},
],
'condition': 'checkout_android',
@@ -2559,7 +1886,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_http_shared',
- 'version': 'version:1.0-beta-6-cr0',
+ 'version': 'version:2@1.0-beta-6.cr0',
},
],
'condition': 'checkout_android',
@@ -2570,7 +1897,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_provider_api',
- 'version': 'version:1.0-beta-6-cr0',
+ 'version': 'version:2@1.0-beta-6.cr0',
},
],
'condition': 'checkout_android',
@@ -2581,7 +1908,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_ccil_cowan_tagsoup_tagsoup',
- 'version': 'version:1.2.1-cr0',
+ 'version': 'version:2@1.2.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2592,7 +1919,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_checkerframework_checker_compat_qual',
- 'version': 'version:2.5.3-cr0',
+ 'version': 'version:2@2.5.5.cr0',
},
],
'condition': 'checkout_android',
@@ -2603,7 +1930,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_checkerframework_checker_qual',
- 'version': 'version:2.10.0-cr0',
+ 'version': 'version:2@3.8.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2614,7 +1941,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_checkerframework_dataflow_shaded',
- 'version': 'version:3.1.2-cr0',
+ 'version': 'version:2@3.11.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2625,7 +1952,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_codehaus_mojo_animal_sniffer_annotations',
- 'version': 'version:1.17-cr0',
+ 'version': 'version:2@1.17.cr0',
},
],
'condition': 'checkout_android',
@@ -2636,7 +1963,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_codehaus_plexus_plexus_container_default',
- 'version': 'version:1.0-alpha-9-stable-1-cr0',
+ 'version': 'version:2@1.0-alpha-9-stable-1.cr0',
},
],
'condition': 'checkout_android',
@@ -2647,7 +1974,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_codehaus_plexus_plexus_interpolation',
- 'version': 'version:1.11-cr0',
+ 'version': 'version:2@1.11.cr0',
},
],
'condition': 'checkout_android',
@@ -2658,18 +1985,18 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_codehaus_plexus_plexus_utils',
- 'version': 'version:1.5.15-cr0',
+ 'version': 'version:2@1.5.15.cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
- 'src/third_party/android_deps/libs/org_jdom_jdom2': {
+ 'src/third_party/android_deps/libs/org_eclipse_jgit_org_eclipse_jgit': {
'packages': [
{
- 'package': 'chromium/third_party/android_deps/libs/org_jdom_jdom2',
- 'version': 'version:2.0.6-cr0',
+ 'package': 'chromium/third_party/android_deps/libs/org_eclipse_jgit_org_eclipse_jgit',
+ 'version': 'version:2@4.4.1.201607150455-r.cr0',
},
],
'condition': 'checkout_android',
@@ -2680,7 +2007,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_jetbrains_annotations',
- 'version': 'version:13.0-cr0',
+ 'version': 'version:2@13.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2691,7 +2018,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib',
- 'version': 'version:1.3.50-cr0',
+ 'version': 'version:2@1.5.10.cr0',
},
],
'condition': 'checkout_android',
@@ -2702,7 +2029,51 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common',
- 'version': 'version:1.3.50-cr0',
+ 'version': 'version:2@1.5.10.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7',
+ 'version': 'version:2@1.5.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk8': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk8',
+ 'version': 'version:2@1.5.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android',
+ 'version': 'version:2@1.5.0.cr0',
+ },
+ ],
+ 'condition': 'checkout_android',
+ 'dep_type': 'cipd',
+ },
+
+ 'src/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm': {
+ 'packages': [
+ {
+ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm',
+ 'version': 'version:2@1.5.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2713,7 +2084,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_metadata_jvm',
- 'version': 'version:0.1.0-cr0',
+ 'version': 'version:2@0.1.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2724,7 +2095,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm',
- 'version': 'version:7.0-cr0',
+ 'version': 'version:2@7.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2735,7 +2106,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_analysis',
- 'version': 'version:7.0-cr0',
+ 'version': 'version:2@7.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2746,7 +2117,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_commons',
- 'version': 'version:7.0-cr0',
+ 'version': 'version:2@7.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2757,7 +2128,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_tree',
- 'version': 'version:7.0-cr0',
+ 'version': 'version:2@7.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2768,7 +2139,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_util',
- 'version': 'version:7.0-cr0',
+ 'version': 'version:2@7.0.cr0',
},
],
'condition': 'checkout_android',
@@ -2779,7 +2150,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_pcollections_pcollections',
- 'version': 'version:2.1.2-cr0',
+ 'version': 'version:2@2.1.2.cr0',
},
],
'condition': 'checkout_android',
@@ -2790,7 +2161,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_annotations',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2801,7 +2172,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_junit',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2812,7 +2183,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_pluginapi',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2823,7 +2194,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_plugins_maven_dependency_resolver',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2834,7 +2205,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_resources',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2845,7 +2216,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_robolectric',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2856,7 +2227,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_sandbox',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2867,7 +2238,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadowapi',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2878,18 +2249,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_framework',
- 'version': 'version:4.3.1-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/org_robolectric_shadows_multidex': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_multidex',
- 'version': 'version:4.3.1-cr1',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2900,7 +2260,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_playservices',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2911,7 +2271,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils',
- 'version': 'version:4.3.1-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2922,18 +2282,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils_reflector',
- 'version': 'version:4.3.1-cr0',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
- 'src/third_party/android_deps/libs/org_threeten_threeten_extra': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_deps/libs/org_threeten_threeten_extra',
- 'version': 'version:1.5.0-cr0',
+ 'version': 'version:2@4.3.1.cr0',
},
],
'condition': 'checkout_android',
@@ -2943,9 +2292,6 @@ deps = {
# === ANDROID_DEPS Generated Code End ===
}
-# Define rules for which include paths are allowed in our source.
-include_rules = [ '+gflags' ]
-
pre_deps_hooks = [
{
# Remove any symlinks from before 177567c518b121731e507e9b9c4049c4dc96e4c8.
@@ -3141,6 +2487,16 @@ hooks = [
'--root', 'src',
],
},
+ {
+ 'name': 'Generate component metadata for tests',
+ 'pattern': '.',
+ 'action': [
+ 'vpython',
+ 'src/testing/generate_location_tags.py',
+ '--out',
+ 'src/testing/location_tags.json',
+ ],
+ },
]
recursedeps = []
diff --git a/third-party/libyuv/third_party/libyuv/DIR_METADATA b/third-party/libyuv/third_party/libyuv/DIR_METADATA
new file mode 100644
index 0000000000..8bc04f159c
--- /dev/null
+++ b/third-party/libyuv/third_party/libyuv/DIR_METADATA
@@ -0,0 +1,3 @@
+monorail {
+ component: "Internals>Images>Codecs"
+}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/LICENSE b/third-party/libyuv/third_party/libyuv/LICENSE
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/LICENSE
rename to third-party/libyuv/third_party/libyuv/LICENSE
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/OWNERS b/third-party/libyuv/third_party/libyuv/OWNERS
similarity index 85%
rename from third-party/webrtc/dependencies/third_party/libyuv/OWNERS
rename to third-party/libyuv/third_party/libyuv/OWNERS
index 755c220be4..a96669f9ae 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/OWNERS
+++ b/third-party/libyuv/third_party/libyuv/OWNERS
@@ -8,5 +8,3 @@ per-file .gitignore=*
per-file AUTHORS=*
per-file DEPS=*
per-file PRESUBMIT.py=mbonadei@chromium.org
-
-# COMPONENT: Internals>Images>Codecs
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/PATENTS b/third-party/libyuv/third_party/libyuv/PATENTS
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/PATENTS
rename to third-party/libyuv/third_party/libyuv/PATENTS
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/PRESUBMIT.py b/third-party/libyuv/third_party/libyuv/PRESUBMIT.py
similarity index 55%
rename from third-party/webrtc/dependencies/third_party/libyuv/PRESUBMIT.py
rename to third-party/libyuv/third_party/libyuv/PRESUBMIT.py
index 2cf1542ff1..b867239a10 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/PRESUBMIT.py
+++ b/third-party/libyuv/third_party/libyuv/PRESUBMIT.py
@@ -6,50 +6,27 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-import os
-
-
-def _RunPythonTests(input_api, output_api):
- def join(*args):
- return input_api.os_path.join(input_api.PresubmitLocalPath(), *args)
-
- test_directories = [
- root for root, _, files in os.walk(join('tools_libyuv'))
- if any(f.endswith('_test.py') for f in files)
- ]
-
- tests = []
- for directory in test_directories:
- tests.extend(
- input_api.canned_checks.GetUnitTestsInDirectory(
- input_api,
- output_api,
- directory,
- whitelist=[r'.+_test\.py$']))
- return input_api.RunTests(tests, parallel=True)
-
def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit."""
results = []
results.extend(input_api.canned_checks.RunPylint(input_api, output_api,
- black_list=(r'^base[\\\/].*\.py$',
- r'^build[\\\/].*\.py$',
- r'^buildtools[\\\/].*\.py$',
- r'^ios[\\\/].*\.py$',
- r'^out.*[\\\/].*\.py$',
- r'^testing[\\\/].*\.py$',
- r'^third_party[\\\/].*\.py$',
- r'^tools[\\\/].*\.py$',
- # TODO(kjellander): should arguably be checked.
- r'^tools_libyuv[\\\/]valgrind[\\\/].*\.py$',
- r'^xcodebuild.*[\\\/].*\.py$',),
+ files_to_skip=(r'^base[\\\/].*\.py$',
+ r'^build[\\\/].*\.py$',
+ r'^buildtools[\\\/].*\.py$',
+ r'^ios[\\\/].*\.py$',
+ r'^out.*[\\\/].*\.py$',
+ r'^testing[\\\/].*\.py$',
+ r'^third_party[\\\/].*\.py$',
+ r'^tools[\\\/].*\.py$',
+ # TODO(kjellander): should arguably be checked.
+ r'^tools_libyuv[\\\/]valgrind[\\\/].*\.py$',
+ r'^xcodebuild.*[\\\/].*\.py$',),
disabled_warnings=['F0401', # Failed to import x
'E0611', # No package y in x
'W0232', # Class has no __init__ method
],
pylintrc='pylintrc'))
- results.extend(_RunPythonTests(input_api, output_api))
return results
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/README.chromium b/third-party/libyuv/third_party/libyuv/README.chromium
similarity index 93%
rename from third-party/webrtc/dependencies/third_party/libyuv/README.chromium
rename to third-party/libyuv/third_party/libyuv/README.chromium
index 4a7e30b087..b60adf7c75 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/README.chromium
+++ b/third-party/libyuv/third_party/libyuv/README.chromium
@@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
-Version: 1768
+Version: 1789
License: BSD
License File: LICENSE
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/README.md b/third-party/libyuv/third_party/libyuv/README.md
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/README.md
rename to third-party/libyuv/third_party/libyuv/README.md
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/build_overrides/build.gni b/third-party/libyuv/third_party/libyuv/build_overrides/build.gni
similarity index 87%
rename from third-party/webrtc/dependencies/third_party/libyuv/build_overrides/build.gni
rename to third-party/libyuv/third_party/libyuv/build_overrides/build.gni
index a83860a8eb..c849031338 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/build_overrides/build.gni
+++ b/third-party/libyuv/third_party/libyuv/build_overrides/build.gni
@@ -6,9 +6,6 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-# Some non-Chromium builds don't use Chromium's third_party/binutils.
-linux_use_bundled_binutils_override = true
-
# Variable that can be used to support multiple build scenarios, like having
# Chromium specific targets in a client project's GN file etc.
build_with_chromium = false
@@ -50,6 +47,13 @@ declare_args() {
enable_base_tracing = false
use_perfetto_client_library = false
+ # Limits the defined //third_party/android_deps targets to only "buildCompile"
+ # and "buildCompileNoDeps" targets. This is useful for third-party
+ # repositories which do not use JUnit tests. For instance,
+ # limit_android_deps == true removes "gn gen" requirement for
+ # //third_party/robolectric .
+ limit_android_deps = false
+
# Allows googletest to pretty-print various absl types.
# Defined here rather than in gtest.gni to match chromium.
gtest_enable_absl_printers = true
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/build_overrides/gtest.gni b/third-party/libyuv/third_party/libyuv/build_overrides/gtest.gni
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/build_overrides/gtest.gni
rename to third-party/libyuv/third_party/libyuv/build_overrides/gtest.gni
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/cleanup_links.py b/third-party/libyuv/third_party/libyuv/cleanup_links.py
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/cleanup_links.py
rename to third-party/libyuv/third_party/libyuv/cleanup_links.py
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/codereview.settings b/third-party/libyuv/third_party/libyuv/codereview.settings
similarity index 60%
rename from third-party/webrtc/dependencies/third_party/libyuv/codereview.settings
rename to third-party/libyuv/third_party/libyuv/codereview.settings
index 00ba1d37d0..b226fae57a 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/codereview.settings
+++ b/third-party/libyuv/third_party/libyuv/codereview.settings
@@ -1,6 +1,5 @@
-# This file is used by git cl to get repository specific information.
+# This file is used by `git cl` to get repository specific information.
CODE_REVIEW_SERVER: codereview.chromium.org
GERRIT_HOST: True
PROJECT: libyuv
-TRY_ON_UPLOAD: False
VIEW_VC: https://chromium.googlesource.com/libyuv/libyuv/+/
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/docs/deprecated_builds.md b/third-party/libyuv/third_party/libyuv/docs/deprecated_builds.md
similarity index 99%
rename from third-party/webrtc/dependencies/third_party/libyuv/docs/deprecated_builds.md
rename to third-party/libyuv/third_party/libyuv/docs/deprecated_builds.md
index 29e0bf9bc3..ba42966cc2 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/docs/deprecated_builds.md
+++ b/third-party/libyuv/third_party/libyuv/docs/deprecated_builds.md
@@ -239,6 +239,7 @@ If you get a compile error for atlthunk.lib on Windows, read http://www.chromium
ninja -C out/Debug libyuv_unittest
ninja -C out/Debug compare
ninja -C out/Debug yuvconvert
+ ninja -C out/Debug yuvconstants
ninja -C out/Debug psnr
ninja -C out/Debug cpuid
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/docs/environment_variables.md b/third-party/libyuv/third_party/libyuv/docs/environment_variables.md
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/docs/environment_variables.md
rename to third-party/libyuv/third_party/libyuv/docs/environment_variables.md
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/docs/filtering.md b/third-party/libyuv/third_party/libyuv/docs/filtering.md
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/docs/filtering.md
rename to third-party/libyuv/third_party/libyuv/docs/filtering.md
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/docs/formats.md b/third-party/libyuv/third_party/libyuv/docs/formats.md
similarity index 80%
rename from third-party/webrtc/dependencies/third_party/libyuv/docs/formats.md
rename to third-party/libyuv/third_party/libyuv/docs/formats.md
index a29ed5c304..12ea9465e4 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/docs/formats.md
+++ b/third-party/libyuv/third_party/libyuv/docs/formats.md
@@ -4,7 +4,9 @@ Formats (FOURCC) supported by libyuv are detailed here.
# Core Formats
-There are 2 core formats supported by libyuv - I420 and ARGB. All YUV formats can be converted to/from I420. All RGB formats can be converted to/from ARGB.
+There are 2 core formats supported by libyuv - I420 and ARGB.
+ All YUV formats can be converted to/from I420.
+ All RGB formats can be converted to/from ARGB.
Filtering functions such as scaling and planar functions work on I420 and/or ARGB.
@@ -52,12 +54,14 @@ The following is extracted from video_common.h as a complete list of formats sup
// 1 Secondary YUV format: row biplanar.
FOURCC_M420 = FOURCC('M', '4', '2', '0'), // deprecated.
- // 11 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp, 1 10 bpc
+ // 13 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp, 1 10 bpc, 2 64 bpp
FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'),
FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'),
FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'),
FOURCC_AR30 = FOURCC('A', 'R', '3', '0'), // 10 bit per channel. 2101010.
FOURCC_AB30 = FOURCC('A', 'B', '3', '0'), // ABGR version of 10 bit
+ FOURCC_AR64 = FOURCC('A', 'R', '6', '4'), // 16 bit per channel.
+ FOURCC_AB64 = FOURCC('A', 'B', '6', '4'), // ABGR version of 16 bit
FOURCC_24BG = FOURCC('2', '4', 'B', 'G'),
FOURCC_RAW = FOURCC('r', 'a', 'w', ' '),
FOURCC_RGBA = FOURCC('R', 'G', 'B', 'A'),
@@ -109,6 +113,27 @@ The following is extracted from video_common.h as a complete list of formats sup
I444, NV24 and NV42 are full width, full height
I400 and J400 have no chroma channel.
+# Color space
+ The YUV formats start with a letter to specify the color space. e.g. I420
+ I = BT.601 limited range
+ J = BT.601 full range (J = JPEG that uses this)
+ H = BT.709 limited range (H for HD)
+ F = BT.709 full range (F for Full range)
+ U = BT.2020 limited range (U for UHD)
+ V = BT.2020 full range
+ For YUV to RGB conversions, a matrix can be passed. See also convert_argh.h
+
+# HDR formats
+ Planar formats with 10 or 12 bits use the following fourcc:
+ I010, I012, P010, P012 are half width, half height
+ I210, I212, P210, P212 are half width, full height
+ I410, I412, P410, P412 are full width, full height
+ where
+ I is the color space (see above) and 3 planes: Y, U and V.
+ P is a biplanar format, similar to NV12 but 16 bits, with the valid bits in the high bits. There is a Y plane and a UV plane.
+ 0, 2 or 4 is the last digit of subsampling: 4:2:0, 4:2:2, or 4:4:4
+ 10 or 12 is the bits per channel. The bits are in the low bits of a 16 bit channel.
+
# The ARGB FOURCC
There are 4 ARGB layouts - ARGB, BGRA, ABGR and RGBA. ARGB is most common by far, used for screen formats, and windows webcam drivers.
@@ -157,6 +182,13 @@ The 2 bit alpha has 4 values. Here are the comparable 8 bit alpha values.
The 10 bit RGB values range from 0 to 1023.
XR30 is the same as AR30 but with no alpha channel.
+# AB64 and AR64
+
+AB64 is similar to ABGR, with 16 bit (2 bytes) per channel. Each channel stores an unsigned short.
+In memory R is the lowest and A is the highest.
+Each channel has value ranges from 0 to 65535.
+AR64 is similar to ARGB.
+
# NV12 and NV21
NV12 is a biplanar format with a full sized Y plane followed by a single
@@ -167,3 +199,10 @@ height chroma channel, and therefore is a 420 subsampling.
NV16 is 16 bits per pixel, with half width and full height. aka 422.
NV24 is 24 bits per pixel with full sized chroma channel. aka 444.
Most NV12 functions allow the destination Y pointer to be NULL.
+
+# YUY2 and UYVY
+
+YUY2 is a packed YUV format with half width, full height.
+
+YUY2 is YUYV in memory
+UYVY is UYVY in memory
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/docs/getting_started.md b/third-party/libyuv/third_party/libyuv/docs/getting_started.md
similarity index 99%
rename from third-party/webrtc/dependencies/third_party/libyuv/docs/getting_started.md
rename to third-party/libyuv/third_party/libyuv/docs/getting_started.md
index 3e339712e1..e363c4ef09 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/docs/getting_started.md
+++ b/third-party/libyuv/third_party/libyuv/docs/getting_started.md
@@ -165,6 +165,7 @@ Running test with C code:
ninja -C out/Debug libyuv_unittest
ninja -C out/Debug compare
ninja -C out/Debug yuvconvert
+ ninja -C out/Debug yuvconstants
ninja -C out/Debug psnr
ninja -C out/Debug cpuid
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/docs/rotation.md b/third-party/libyuv/third_party/libyuv/docs/rotation.md
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/docs/rotation.md
rename to third-party/libyuv/third_party/libyuv/docs/rotation.md
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/download_vs_toolchain.py b/third-party/libyuv/third_party/libyuv/download_vs_toolchain.py
similarity index 94%
rename from third-party/webrtc/dependencies/third_party/libyuv/download_vs_toolchain.py
rename to third-party/libyuv/third_party/libyuv/download_vs_toolchain.py
index 4b3457899f..49d069305d 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/download_vs_toolchain.py
+++ b/third-party/libyuv/third_party/libyuv/download_vs_toolchain.py
@@ -22,7 +22,7 @@ sys.path.insert(0, os.path.join(checkout_root, 'build'))
sys.path.insert(0, os.path.join(checkout_root, 'tools', 'find_depot_tools'))
-import vs_toolchain
+import vs_toolchain # pylint: disable=wrong-import-position
if __name__ == '__main__':
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv.h b/third-party/libyuv/third_party/libyuv/include/libyuv.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/basic_types.h b/third-party/libyuv/third_party/libyuv/include/libyuv/basic_types.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/basic_types.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/basic_types.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/compare.h b/third-party/libyuv/third_party/libyuv/include/libyuv/compare.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/compare.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/compare.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/compare_row.h b/third-party/libyuv/third_party/libyuv/include/libyuv/compare_row.h
similarity index 93%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/compare_row.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/compare_row.h
index e95b9d93eb..64115b3a3f 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/compare_row.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/compare_row.h
@@ -55,20 +55,20 @@ extern "C" {
// The following are available for Visual C and clangcl 32 bit:
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
+ !defined(__clang__) && \
(defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
#define HAS_HASHDJB2_AVX2
#define HAS_SUMSQUAREERROR_AVX2
#endif
-// The following are available for GCC and clangcl 64 bit:
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+// The following are available for GCC and clangcl:
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#define HAS_HAMMINGDISTANCE_SSSE3
#endif
-// The following are available for GCC and clangcl 64 bit:
+// The following are available for GCC and clangcl:
#if !defined(LIBYUV_DISABLE_X86) && defined(CLANG_HAS_AVX2) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+ (defined(__x86_64__) || defined(__i386__))
#define HAS_HAMMINGDISTANCE_AVX2
#endif
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert.h b/third-party/libyuv/third_party/libyuv/include/libyuv/convert.h
similarity index 62%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/convert.h
index 026b153cef..93e7550be8 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/convert.h
@@ -89,6 +89,23 @@ int I422ToI420(const uint8_t* src_y,
int width,
int height);
+// Convert I422 to I444.
+LIBYUV_API
+int I422ToI444(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
// Convert I422 to NV21.
LIBYUV_API
int I422ToNV21(const uint8_t* src_y,
@@ -122,6 +139,23 @@ int I420Copy(const uint8_t* src_y,
int width,
int height);
+// Convert I420 to I444.
+LIBYUV_API
+int I420ToI444(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
// Copy I010 to I010
#define I010ToI010 I010Copy
#define H010ToH010 I010Copy
@@ -159,6 +193,229 @@ int I010ToI420(const uint16_t* src_y,
int width,
int height);
+#define H210ToH422 I210ToI422
+LIBYUV_API
+int I210ToI422(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+#define H410ToH444 I410ToI444
+LIBYUV_API
+int I410ToI444(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+#define H012ToH420 I012ToI420
+LIBYUV_API
+int I012ToI420(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+#define H212ToH422 I212ToI422
+LIBYUV_API
+int I212ToI422(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+#define H412ToH444 I412ToI444
+LIBYUV_API
+int I412ToI444(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+#define I412ToI012 I410ToI010
+#define H410ToH010 I410ToI010
+#define H412ToH012 I410ToI010
+LIBYUV_API
+int I410ToI010(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+#define I212ToI012 I210ToI010
+#define H210ToH010 I210ToI010
+#define H212ToH012 I210ToI010
+LIBYUV_API
+int I210ToI010(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+// Convert I010 to I410
+LIBYUV_API
+int I010ToI410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+// Convert I012 to I412
+#define I012ToI412 I010ToI410
+
+// Convert I210 to I410
+LIBYUV_API
+int I210ToI410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
+// Convert I212 to I412
+#define I212ToI412 I210ToI410
+
+// Convert I010 to P010
+LIBYUV_API
+int I010ToP010(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
+// Convert I210 to P210
+LIBYUV_API
+int I210ToP210(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
+// Convert I012 to P012
+LIBYUV_API
+int I012ToP012(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
+// Convert I212 to P212
+LIBYUV_API
+int I212ToP212(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
// Convert I400 (grey) to I420.
LIBYUV_API
int I400ToI420(const uint8_t* src_y,
@@ -215,6 +472,70 @@ int NV21ToI420(const uint8_t* src_y,
int width,
int height);
+// Convert NV12 to NV24.
+LIBYUV_API
+int NV12ToNV24(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
+// Convert NV16 to NV24.
+LIBYUV_API
+int NV16ToNV24(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
+// Convert P010 to P410.
+LIBYUV_API
+int P010ToP410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
+// Convert P012 to P412.
+#define P012ToP412 P010ToP410
+
+// Convert P016 to P416.
+#define P016ToP416 P010ToP410
+
+// Convert P210 to P410.
+LIBYUV_API
+int P210ToP410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
+
+// Convert P212 to P412.
+#define P212ToP412 P210ToP410
+
+// Convert P216 to P416.
+#define P216ToP416 P210ToP410
+
// Convert YUY2 to I420.
LIBYUV_API
int YUY2ToI420(const uint8_t* src_yuy2,
@@ -372,6 +693,19 @@ int RAWToI420(const uint8_t* src_raw,
int width,
int height);
+// RGB big endian (rgb in memory) to J420.
+LIBYUV_API
+int RAWToJ420(const uint8_t* src_raw,
+ int src_stride_raw,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
// RGB16 (RGBP fourcc) little endian to I420.
LIBYUV_API
int RGB565ToI420(const uint8_t* src_rgb565,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_argb.h b/third-party/libyuv/third_party/libyuv/include/libyuv/convert_argb.h
similarity index 78%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_argb.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/convert_argb.h
index 715a3dad97..eb4ebd54a8 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_argb.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/convert_argb.h
@@ -21,16 +21,20 @@ extern "C" {
#endif
// Conversion matrix for YUV to RGB
-LIBYUV_API extern const struct YuvConstants kYuvI601Constants; // BT.601
-LIBYUV_API extern const struct YuvConstants kYuvJPEGConstants; // JPeg
-LIBYUV_API extern const struct YuvConstants kYuvH709Constants; // BT.709
-LIBYUV_API extern const struct YuvConstants kYuv2020Constants; // BT.2020
+LIBYUV_API extern const struct YuvConstants kYuvI601Constants; // BT.601
+LIBYUV_API extern const struct YuvConstants kYuvJPEGConstants; // BT.601 full
+LIBYUV_API extern const struct YuvConstants kYuvH709Constants; // BT.709
+LIBYUV_API extern const struct YuvConstants kYuvF709Constants; // BT.709 full
+LIBYUV_API extern const struct YuvConstants kYuv2020Constants; // BT.2020
+LIBYUV_API extern const struct YuvConstants kYuvV2020Constants; // BT.2020 full
// Conversion matrix for YVU to BGR
-LIBYUV_API extern const struct YuvConstants kYvuI601Constants; // BT.601
-LIBYUV_API extern const struct YuvConstants kYvuJPEGConstants; // JPeg
-LIBYUV_API extern const struct YuvConstants kYvuH709Constants; // BT.709
-LIBYUV_API extern const struct YuvConstants kYvu2020Constants; // BT.2020
+LIBYUV_API extern const struct YuvConstants kYvuI601Constants; // BT.601
+LIBYUV_API extern const struct YuvConstants kYvuJPEGConstants; // BT.601 full
+LIBYUV_API extern const struct YuvConstants kYvuH709Constants; // BT.709
+LIBYUV_API extern const struct YuvConstants kYvuF709Constants; // BT.709 full
+LIBYUV_API extern const struct YuvConstants kYvu2020Constants; // BT.2020
+LIBYUV_API extern const struct YuvConstants kYvuV2020Constants; // BT.2020 full
// Macros for end swapped destination Matrix conversions.
// Swap UV and pass mirrored kYvuJPEGConstants matrix.
@@ -38,7 +42,10 @@ LIBYUV_API extern const struct YuvConstants kYvu2020Constants; // BT.2020
#define kYuvI601ConstantsVU kYvuI601Constants
#define kYuvJPEGConstantsVU kYvuJPEGConstants
#define kYuvH709ConstantsVU kYvuH709Constants
+#define kYuvF709ConstantsVU kYvuF709Constants
#define kYuv2020ConstantsVU kYvu2020Constants
+#define kYuvV2020ConstantsVU kYvuV2020Constants
+
#define NV12ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
NV21ToARGBMatrix(a, b, c, d, e, f, g##VU, h, i)
#define NV21ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
@@ -47,8 +54,30 @@ LIBYUV_API extern const struct YuvConstants kYvu2020Constants; // BT.2020
NV21ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
#define NV21ToRAWMatrix(a, b, c, d, e, f, g, h, i) \
NV12ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
+#define I010ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
+ I010ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
+#define I210ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
+ I210ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
+#define I410ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
+ I410ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
+#define I010ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
+ I010ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
+#define I210ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
+ I210ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
+#define I410ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
+ I410ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
#define I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
I420AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
+#define I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
+ I422AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
+#define I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
+ I444AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
+#define I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
+ I010AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
+#define I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
+ I210AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
+#define I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
+ I410AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
// Alias.
#define ARGBToARGB ARGBCopy
@@ -562,6 +591,70 @@ int I420AlphaToABGR(const uint8_t* src_y,
int height,
int attenuate);
+// Convert I422 with Alpha to preattenuated ARGB.
+LIBYUV_API
+int I422AlphaToARGB(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int attenuate);
+
+// Convert I422 with Alpha to preattenuated ABGR.
+LIBYUV_API
+int I422AlphaToABGR(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_abgr,
+ int dst_stride_abgr,
+ int width,
+ int height,
+ int attenuate);
+
+// Convert I444 with Alpha to preattenuated ARGB.
+LIBYUV_API
+int I444AlphaToARGB(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int attenuate);
+
+// Convert I444 with Alpha to preattenuated ABGR.
+LIBYUV_API
+int I444AlphaToABGR(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_abgr,
+ int dst_stride_abgr,
+ int width,
+ int height,
+ int attenuate);
+
// Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
LIBYUV_API
int I400ToARGB(const uint8_t* src_y,
@@ -713,19 +806,6 @@ int I010ToAR30(const uint16_t* src_y,
int width,
int height);
-// Convert I010 to AB30.
-LIBYUV_API
-int I010ToAB30(const uint16_t* src_y,
- int src_stride_y,
- const uint16_t* src_u,
- int src_stride_u,
- const uint16_t* src_v,
- int src_stride_v,
- uint8_t* dst_ab30,
- int dst_stride_ab30,
- int width,
- int height);
-
// Convert H010 to AR30.
LIBYUV_API
int H010ToAR30(const uint16_t* src_y,
@@ -739,6 +819,19 @@ int H010ToAR30(const uint16_t* src_y,
int width,
int height);
+// Convert I010 to AB30.
+LIBYUV_API
+int I010ToAB30(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ab30,
+ int dst_stride_ab30,
+ int width,
+ int height);
+
// Convert H010 to AB30.
LIBYUV_API
int H010ToAB30(const uint16_t* src_y,
@@ -972,6 +1065,42 @@ int AR30ToAB30(const uint8_t* src_ar30,
int width,
int height);
+// Convert AR64 to ARGB.
+LIBYUV_API
+int AR64ToARGB(const uint16_t* src_ar64,
+ int src_stride_ar64,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height);
+
+// Convert AB64 to ABGR.
+#define AB64ToABGR AR64ToARGB
+
+// Convert AB64 to ARGB.
+LIBYUV_API
+int AB64ToARGB(const uint16_t* src_ab64,
+ int src_stride_ab64,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height);
+
+// Convert AR64 to ABGR.
+#define AR64ToABGR AB64ToARGB
+
+// Convert AR64 To AB64.
+LIBYUV_API
+int AR64ToAB64(const uint16_t* src_ar64,
+ int src_stride_ar64,
+ uint16_t* dst_ab64,
+ int dst_stride_ab64,
+ int width,
+ int height);
+
+// Convert AB64 To AR64.
+#define AB64ToAR64 AR64ToAB64
+
// src_width/height provided by capture
// dst_width/height for clipping determine final size.
LIBYUV_API
@@ -1284,6 +1413,19 @@ int I420ToAR30(const uint8_t* src_y,
int width,
int height);
+// Convert I420 to AB30.
+LIBYUV_API
+int I420ToAB30(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ab30,
+ int dst_stride_ab30,
+ int width,
+ int height);
+
// Convert H420 to AR30.
LIBYUV_API
int H420ToAR30(const uint8_t* src_y,
@@ -1297,6 +1439,19 @@ int H420ToAR30(const uint8_t* src_y,
int width,
int height);
+// Convert H420 to AB30.
+LIBYUV_API
+int H420ToAB30(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ab30,
+ int dst_stride_ab30,
+ int width,
+ int height);
+
// Convert I420 to ARGB with matrix.
LIBYUV_API
int I420ToARGBMatrix(const uint8_t* src_y,
@@ -1339,7 +1494,7 @@ int I444ToARGBMatrix(const uint8_t* src_y,
int width,
int height);
-// multiply 10 bit yuv into high bits to allow any number of bits.
+// Convert 10 bit 420 YUV to ARGB with matrix.
LIBYUV_API
int I010ToAR30Matrix(const uint16_t* src_y,
int src_stride_y,
@@ -1353,7 +1508,7 @@ int I010ToAR30Matrix(const uint16_t* src_y,
int width,
int height);
-// multiply 10 bit yuv into high bits to allow any number of bits.
+// Convert 10 bit 420 YUV to ARGB with matrix.
LIBYUV_API
int I210ToAR30Matrix(const uint16_t* src_y,
int src_stride_y,
@@ -1367,6 +1522,20 @@ int I210ToAR30Matrix(const uint16_t* src_y,
int width,
int height);
+// Convert 10 bit 444 YUV to ARGB with matrix.
+LIBYUV_API
+int I410ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
// Convert 10 bit YUV to ARGB with matrix.
LIBYUV_API
int I010ToARGBMatrix(const uint16_t* src_y,
@@ -1381,6 +1550,34 @@ int I010ToARGBMatrix(const uint16_t* src_y,
int width,
int height);
+// multiply 12 bit yuv into high bits to allow any number of bits.
+LIBYUV_API
+int I012ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
+// Convert 12 bit YUV to ARGB with matrix.
+LIBYUV_API
+int I012ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
// Convert 10 bit 422 YUV to ARGB with matrix.
LIBYUV_API
int I210ToARGBMatrix(const uint16_t* src_y,
@@ -1395,6 +1592,87 @@ int I210ToARGBMatrix(const uint16_t* src_y,
int width,
int height);
+// Convert 10 bit 444 YUV to ARGB with matrix.
+LIBYUV_API
+int I410ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
+// Convert P010 to ARGB with matrix.
+LIBYUV_API
+int P010ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
+// Convert P210 to ARGB with matrix.
+LIBYUV_API
+int P210ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
+// Convert P010 to AR30 with matrix.
+LIBYUV_API
+int P010ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
+// Convert P210 to AR30 with matrix.
+LIBYUV_API
+int P210ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height);
+
+// P012 and P010 use most significant bits so the conversion is the same.
+// Convert P012 to ARGB with matrix.
+#define P012ToARGBMatrix P010ToARGBMatrix
+// Convert P012 to AR30 with matrix.
+#define P012ToAR30Matrix P010ToAR30Matrix
+// Convert P212 to ARGB with matrix.
+#define P212ToARGBMatrix P210ToARGBMatrix
+// Convert P212 to AR30 with matrix.
+#define P212ToAR30Matrix P210ToAR30Matrix
+
+// Convert P016 to ARGB with matrix.
+#define P016ToARGBMatrix P010ToARGBMatrix
+// Convert P016 to AR30 with matrix.
+#define P016ToAR30Matrix P010ToAR30Matrix
+// Convert P216 to ARGB with matrix.
+#define P216ToARGBMatrix P210ToARGBMatrix
+// Convert P216 to AR30 with matrix.
+#define P216ToAR30Matrix P210ToAR30Matrix
+
// Convert I420 with Alpha to preattenuated ARGB with matrix.
LIBYUV_API
int I420AlphaToARGBMatrix(const uint8_t* src_y,
@@ -1412,6 +1690,91 @@ int I420AlphaToARGBMatrix(const uint8_t* src_y,
int height,
int attenuate);
+// Convert I422 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I422AlphaToARGBMatrix(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate);
+
+// Convert I444 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I444AlphaToARGBMatrix(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate);
+
+// Convert I010 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I010AlphaToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate);
+
+// Convert I210 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I210AlphaToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate);
+
+// Convert I410 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I410AlphaToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate);
+
// Convert NV12 to ARGB with matrix.
LIBYUV_API
int NV12ToARGBMatrix(const uint8_t* src_y,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_from.h b/third-party/libyuv/third_party/libyuv/include/libyuv/convert_from.h
similarity index 91%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_from.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/convert_from.h
index 5140ed4f3e..32f42a6330 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_from.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/convert_from.h
@@ -39,6 +39,24 @@ int I420ToI010(const uint8_t* src_y,
int width,
int height);
+// Convert 8 bit YUV to 12 bit.
+#define H420ToH012 I420ToI012
+LIBYUV_API
+int I420ToI012(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height);
+
LIBYUV_API
int I420ToI422(const uint8_t* src_y,
int src_stride_y,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_from_argb.h b/third-party/libyuv/third_party/libyuv/include/libyuv/convert_from_argb.h
similarity index 93%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_from_argb.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/convert_from_argb.h
index d992363ceb..bf48786041 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/convert_from_argb.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/convert_from_argb.h
@@ -153,6 +153,30 @@ int ARGBToI444(const uint8_t* src_argb,
int width,
int height);
+// Convert ARGB to AR64.
+LIBYUV_API
+int ARGBToAR64(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ int width,
+ int height);
+
+// Convert ABGR to AB64.
+#define ABGRToAB64 ARGBToAR64
+
+// Convert ARGB to AB64.
+LIBYUV_API
+int ARGBToAB64(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint16_t* dst_ab64,
+ int dst_stride_ab64,
+ int width,
+ int height);
+
+// Convert ABGR to AR64.
+#define ABGRToAR64 ARGBToAB64
+
// Convert ARGB To I422.
LIBYUV_API
int ARGBToI422(const uint8_t* src_argb,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/cpu_id.h b/third-party/libyuv/third_party/libyuv/include/libyuv/cpu_id.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/cpu_id.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/cpu_id.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/macros_msa.h b/third-party/libyuv/third_party/libyuv/include/libyuv/macros_msa.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/macros_msa.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/macros_msa.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/mjpeg_decoder.h b/third-party/libyuv/third_party/libyuv/include/libyuv/mjpeg_decoder.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/mjpeg_decoder.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/mjpeg_decoder.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/planar_functions.h b/third-party/libyuv/third_party/libyuv/include/libyuv/planar_functions.h
similarity index 83%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/planar_functions.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/planar_functions.h
index 8d868b9542..def773cb44 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/planar_functions.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/planar_functions.h
@@ -105,6 +105,50 @@ void MergeUVPlane(const uint8_t* src_u,
int width,
int height);
+// Split interleaved msb UV plane into separate lsb U and V planes.
+LIBYUV_API
+void SplitUVPlane_16(const uint16_t* src_uv,
+ int src_stride_uv,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height,
+ int depth);
+
+// Merge separate lsb U and V planes into one interleaved msb UV plane.
+LIBYUV_API
+void MergeUVPlane_16(const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height,
+ int depth);
+
+// Convert lsb plane to msb plane
+LIBYUV_API
+void ConvertToMSBPlane_16(const uint16_t* src_y,
+ int src_stride_y,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ int width,
+ int height,
+ int depth);
+
+// Convert msb plane to lsb plane
+LIBYUV_API
+void ConvertToLSBPlane_16(const uint16_t* src_y,
+ int src_stride_y,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ int width,
+ int height,
+ int depth);
+
// Scale U and V to half width and height and merge into interleaved UV plane.
// width and height are source size, allowing odd sizes.
// Use for converting I444 or I422 to NV12.
@@ -153,6 +197,92 @@ void MergeRGBPlane(const uint8_t* src_r,
int width,
int height);
+// Split interleaved ARGB plane into separate R, G, B and A planes.
+// dst_a can be NULL to discard alpha plane.
+LIBYUV_API
+void SplitARGBPlane(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint8_t* dst_r,
+ int dst_stride_r,
+ uint8_t* dst_g,
+ int dst_stride_g,
+ uint8_t* dst_b,
+ int dst_stride_b,
+ uint8_t* dst_a,
+ int dst_stride_a,
+ int width,
+ int height);
+
+// Merge separate R, G, B and A planes into one interleaved ARGB plane.
+// src_a can be NULL to fill opaque value to alpha.
+LIBYUV_API
+void MergeARGBPlane(const uint8_t* src_r,
+ int src_stride_r,
+ const uint8_t* src_g,
+ int src_stride_g,
+ const uint8_t* src_b,
+ int src_stride_b,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height);
+
+// Merge separate 'depth' bit R, G and B planes stored in lsb
+// into one interleaved XR30 plane.
+// depth should in range [10, 16]
+LIBYUV_API
+void MergeXR30Plane(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ int width,
+ int height,
+ int depth);
+
+// Merge separate 'depth' bit R, G, B and A planes stored in lsb
+// into one interleaved AR64 plane.
+// src_a can be NULL to fill opaque value to alpha.
+// depth should in range [1, 16]
+LIBYUV_API
+void MergeAR64Plane(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ int width,
+ int height,
+ int depth);
+
+// Merge separate 'depth' bit R, G, B and A planes stored in lsb
+// into one interleaved ARGB plane.
+// src_a can be NULL to fill opaque value to alpha.
+// depth should in range [8, 16]
+LIBYUV_API
+void MergeARGB16To8Plane(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int depth);
+
// Copy I400. Supports inverting.
LIBYUV_API
int I400ToI400(const uint8_t* src_y,
@@ -201,14 +331,28 @@ int I444Copy(const uint8_t* src_y,
int height);
// Copy NV12. Supports inverting.
-int NV12Copy(const uint8_t* src_y, int src_stride_y, const uint8_t* src_uv,
- int src_stride_uv, uint8_t* dst_y, int dst_stride_y,
- uint8_t* dst_uv, int dst_stride_uv, int width, int height);
+int NV12Copy(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height);
// Copy NV21. Supports inverting.
-int NV21Copy(const uint8_t* src_y, int src_stride_y, const uint8_t* src_vu,
- int src_stride_vu, uint8_t* dst_y, int dst_stride_y,
- uint8_t* dst_vu, int dst_stride_vu, int width, int height);
+int NV21Copy(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_vu,
+ int src_stride_vu,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_vu,
+ int dst_stride_vu,
+ int width,
+ int height);
// Convert YUY2 to I422.
LIBYUV_API
@@ -855,7 +999,7 @@ void ARGBAffineRow_SSE2(const uint8_t* src_argb,
int width);
// Shuffle ARGB channel order. e.g. BGRA to ARGB.
-// shuffler is 16 bytes and must be aligned.
+// shuffler is 16 bytes.
LIBYUV_API
int ARGBShuffle(const uint8_t* src_bgra,
int src_stride_bgra,
@@ -865,6 +1009,17 @@ int ARGBShuffle(const uint8_t* src_bgra,
int width,
int height);
+// Shuffle AR64 channel order. e.g. AR64 to AB64.
+// shuffler is 16 bytes.
+LIBYUV_API
+int AR64Shuffle(const uint16_t* src_ar64,
+ int src_stride_ar64,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ const uint8_t* shuffler,
+ int width,
+ int height);
+
// Sobel ARGB effect with planar output.
LIBYUV_API
int ARGBSobelToPlane(const uint8_t* src_argb,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/rotate.h b/third-party/libyuv/third_party/libyuv/include/libyuv/rotate.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/rotate.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/rotate.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/rotate_argb.h b/third-party/libyuv/third_party/libyuv/include/libyuv/rotate_argb.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/rotate_argb.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/rotate_argb.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/rotate_row.h b/third-party/libyuv/third_party/libyuv/include/libyuv/rotate_row.h
similarity index 98%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/rotate_row.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/rotate_row.h
index 022293eef2..f4c701fb4f 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/rotate_row.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/rotate_row.h
@@ -32,8 +32,9 @@ extern "C" {
#define LIBYUV_DISABLE_X86
#endif
#endif
-// The following are available for Visual C and clangcl 32 bit:
-#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
+// The following are available for Visual C 32 bit:
+#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
+ !defined(__clang__)
#define HAS_TRANSPOSEWX8_SSSE3
#define HAS_TRANSPOSEUVWX8_SSE2
#endif
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/row.h b/third-party/libyuv/third_party/libyuv/include/libyuv/row.h
similarity index 79%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/row.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/row.h
index a27788c1f6..1444a04786 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/row.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/row.h
@@ -176,6 +176,7 @@ extern "C" {
// TODO(fbarchard): fix build error on android_full_debug=1
// https://code.google.com/p/libyuv/issues/detail?id=517
#define HAS_I422ALPHATOARGBROW_SSSE3
+#define HAS_I444ALPHATOARGBROW_SSSE3
#endif
#endif
@@ -240,13 +241,14 @@ extern "C" {
// TODO(fbarchard): fix build error on android_full_debug=1
// https://code.google.com/p/libyuv/issues/detail?id=517
#define HAS_I422ALPHATOARGBROW_AVX2
+#define HAS_I444ALPHATOARGBROW_AVX2
#endif
#endif
-// The following are available for AVX2 Visual C and clangcl 32 bit:
+// The following are available for AVX2 Visual C 32 bit:
// TODO(fbarchard): Port to gcc.
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
- (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
+ !defined(__clang__) && defined(VISUALC_HAS_AVX2)
#define HAS_ARGB1555TOARGBROW_AVX2
#define HAS_ARGB4444TOARGBROW_AVX2
#define HAS_ARGBTOARGB1555ROW_AVX2
@@ -259,37 +261,62 @@ extern "C" {
// The following are also available on x64 Visual C.
#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \
(!defined(__clang__) || defined(__SSSE3__))
+#define HAS_I444ALPHATOARGBROW_SSSE3
+#define HAS_I444TOARGBROW_SSSE3
#define HAS_I422ALPHATOARGBROW_SSSE3
#define HAS_I422TOARGBROW_SSSE3
#endif
// The following are available for gcc/clang x86 platforms:
// TODO(fbarchard): Port to Visual C
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#define HAS_ABGRTOAR30ROW_SSSE3
#define HAS_ARGBTOAR30ROW_SSSE3
+#define HAS_ARGBTOAR64ROW_SSSE3
+#define HAS_ARGBTOAB64ROW_SSSE3
+#define HAS_AR64TOARGBROW_SSSE3
+#define HAS_AB64TOARGBROW_SSSE3
#define HAS_CONVERT16TO8ROW_SSSE3
#define HAS_CONVERT8TO16ROW_SSE2
#define HAS_HALFMERGEUVROW_SSSE3
#define HAS_I210TOAR30ROW_SSSE3
#define HAS_I210TOARGBROW_SSSE3
+#define HAS_I212TOAR30ROW_SSSE3
+#define HAS_I212TOARGBROW_SSSE3
#define HAS_I400TOARGBROW_SSE2
#define HAS_I422TOAR30ROW_SSSE3
+#define HAS_I410TOAR30ROW_SSSE3
+#define HAS_I410TOARGBROW_SSSE3
+#define HAS_MERGEARGBROW_SSE2
+#define HAS_MERGEXRGBROW_SSE2
#define HAS_MERGERGBROW_SSSE3
-#define HAS_MIRRORUVROW_AVX2
#define HAS_MIRRORUVROW_SSSE3
+#define HAS_P210TOAR30ROW_SSSE3
+#define HAS_P210TOARGBROW_SSSE3
+#define HAS_P410TOAR30ROW_SSSE3
+#define HAS_P410TOARGBROW_SSSE3
#define HAS_RAWTORGBAROW_SSSE3
#define HAS_RGB24MIRRORROW_SSSE3
#define HAS_RGBATOYJROW_SSSE3
+#define HAS_SPLITARGBROW_SSE2
+#define HAS_SPLITARGBROW_SSSE3
+#define HAS_SPLITXRGBROW_SSE2
+#define HAS_SPLITXRGBROW_SSSE3
#define HAS_SPLITRGBROW_SSSE3
#define HAS_SWAPUVROW_SSSE3
+
+#if defined(__x86_64__) || !defined(__pic__)
+// TODO(fbarchard): fix build error on android_full_debug=1
+// https://code.google.com/p/libyuv/issues/detail?id=517
+#define HAS_I210ALPHATOARGBROW_SSSE3
+#define HAS_I410ALPHATOARGBROW_SSSE3
+#endif
#endif
// The following are available for AVX2 gcc/clang x86 platforms:
// TODO(fbarchard): Port to Visual C
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
+#if !defined(LIBYUV_DISABLE_X86) && \
+ (defined(__x86_64__) || defined(__i386__)) && \
(defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
#define HAS_ABGRTOAR30ROW_AVX2
#define HAS_ABGRTOUVROW_AVX2
@@ -297,29 +324,59 @@ extern "C" {
#define HAS_ARGBTOAR30ROW_AVX2
#define HAS_ARGBTORAWROW_AVX2
#define HAS_ARGBTORGB24ROW_AVX2
+#define HAS_ARGBTOAR64ROW_AVX2
+#define HAS_ARGBTOAB64ROW_AVX2
+#define HAS_AR64TOARGBROW_AVX2
+#define HAS_AB64TOARGBROW_AVX2
#define HAS_CONVERT16TO8ROW_AVX2
#define HAS_CONVERT8TO16ROW_AVX2
+#define HAS_DIVIDEROW_16_AVX2
#define HAS_HALFMERGEUVROW_AVX2
+#define HAS_MERGEAR64ROW_AVX2
+#define HAS_MERGEARGB16TO8ROW_AVX2
+#define HAS_MERGEARGBROW_AVX2
+#define HAS_MERGEXR30ROW_AVX2
+#define HAS_MERGEXR64ROW_AVX2
+#define HAS_MERGEXRGB16TO8ROW_AVX2
+#define HAS_MERGEXRGBROW_AVX2
#define HAS_I210TOAR30ROW_AVX2
#define HAS_I210TOARGBROW_AVX2
+#define HAS_I212TOAR30ROW_AVX2
+#define HAS_I212TOARGBROW_AVX2
#define HAS_I400TOARGBROW_AVX2
+#define HAS_I410TOAR30ROW_AVX2
+#define HAS_I410TOARGBROW_AVX2
+#define HAS_P210TOAR30ROW_AVX2
+#define HAS_P210TOARGBROW_AVX2
+#define HAS_P410TOAR30ROW_AVX2
+#define HAS_P410TOARGBROW_AVX2
#define HAS_I422TOAR30ROW_AVX2
#define HAS_I422TOUYVYROW_AVX2
#define HAS_I422TOYUY2ROW_AVX2
#define HAS_MERGEUVROW_16_AVX2
+#define HAS_MIRRORUVROW_AVX2
#define HAS_MULTIPLYROW_16_AVX2
#define HAS_RGBATOYJROW_AVX2
+#define HAS_SPLITARGBROW_AVX2
+#define HAS_SPLITXRGBROW_AVX2
+#define HAS_SPLITUVROW_16_AVX2
#define HAS_SWAPUVROW_AVX2
// TODO(fbarchard): Fix AVX2 version of YUV24
// #define HAS_NV21TOYUV24ROW_AVX2
+
+#if defined(__x86_64__) || !defined(__pic__)
+// TODO(fbarchard): fix build error on android_full_debug=1
+// https://code.google.com/p/libyuv/issues/detail?id=517
+#define HAS_I210ALPHATOARGBROW_AVX2
+#define HAS_I410ALPHATOARGBROW_AVX2
+#endif
#endif
// The following are available for AVX512 clang x86 platforms:
// TODO(fbarchard): Port to GCC and Visual C
// TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
- (defined(CLANG_HAS_AVX512))
+#if !defined(LIBYUV_DISABLE_X86) && \
+ (defined(__x86_64__) || defined(__i386__)) && (defined(CLANG_HAS_AVX512))
#define HAS_ARGBTORGB24ROW_AVX512VBMI
#endif
@@ -342,6 +399,10 @@ extern "C" {
#define HAS_ARGBTORGB24ROW_NEON
#define HAS_ARGBTORGB565DITHERROW_NEON
#define HAS_ARGBTORGB565ROW_NEON
+#define HAS_ARGBTOAR64ROW_NEON
+#define HAS_ARGBTOAB64ROW_NEON
+#define HAS_AR64TOARGBROW_NEON
+#define HAS_AB64TOARGBROW_NEON
#define HAS_ARGBTOUV444ROW_NEON
#define HAS_ARGBTOUVJROW_NEON
#define HAS_ARGBTOUVROW_NEON
@@ -354,9 +415,11 @@ extern "C" {
#define HAS_BGRATOYROW_NEON
#define HAS_BYTETOFLOATROW_NEON
#define HAS_COPYROW_NEON
+#define HAS_DIVIDEROW_16_NEON
#define HAS_HALFFLOATROW_NEON
#define HAS_HALFMERGEUVROW_NEON
#define HAS_I400TOARGBROW_NEON
+#define HAS_I444ALPHATOARGBROW_NEON
#define HAS_I422ALPHATOARGBROW_NEON
#define HAS_I422TOARGB1555ROW_NEON
#define HAS_I422TOARGB4444ROW_NEON
@@ -368,10 +431,19 @@ extern "C" {
#define HAS_I422TOYUY2ROW_NEON
#define HAS_I444TOARGBROW_NEON
#define HAS_J400TOARGBROW_NEON
+#define HAS_MERGEAR64ROW_NEON
+#define HAS_MERGEARGB16TO8ROW_NEON
+#define HAS_MERGEARGBROW_NEON
+#define HAS_MERGEXR30ROW_NEON
+#define HAS_MERGEXR64ROW_NEON
+#define HAS_MERGEXRGB16TO8ROW_NEON
+#define HAS_MERGEXRGBROW_NEON
#define HAS_MERGEUVROW_NEON
+#define HAS_MERGEUVROW_16_NEON
#define HAS_MIRRORROW_NEON
#define HAS_MIRRORUVROW_NEON
#define HAS_MIRRORSPLITUVROW_NEON
+#define HAS_MULTIPLYROW_16_NEON
#define HAS_NV12TOARGBROW_NEON
#define HAS_NV12TORGB24ROW_NEON
#define HAS_NV12TORGB565ROW_NEON
@@ -395,8 +467,11 @@ extern "C" {
#define HAS_RGBATOYJROW_NEON
#define HAS_RGBATOYROW_NEON
#define HAS_SETROW_NEON
+#define HAS_SPLITARGBROW_NEON
+#define HAS_SPLITXRGBROW_NEON
#define HAS_SPLITRGBROW_NEON
#define HAS_SPLITUVROW_NEON
+#define HAS_SPLITUVROW_16_NEON
#define HAS_SWAPUVROW_NEON
#define HAS_UYVYTOARGBROW_NEON
#define HAS_UYVYTOUV422ROW_NEON
@@ -472,24 +547,14 @@ extern "C" {
#define HAS_BGRATOYROW_MSA
#define HAS_HALFFLOATROW_MSA
#define HAS_I400TOARGBROW_MSA
-#define HAS_I422ALPHATOARGBROW_MSA
-#define HAS_I422TOARGBROW_MSA
-#define HAS_I422TORGB24ROW_MSA
-#define HAS_I422TORGBAROW_MSA
#define HAS_I422TOUYVYROW_MSA
#define HAS_I422TOYUY2ROW_MSA
-#define HAS_I444TOARGBROW_MSA
-#define HAS_I422TOARGB1555ROW_MSA
-#define HAS_I422TORGB565ROW_MSA
#define HAS_INTERPOLATEROW_MSA
#define HAS_J400TOARGBROW_MSA
#define HAS_MERGEUVROW_MSA
#define HAS_MIRRORROW_MSA
#define HAS_MIRRORUVROW_MSA
#define HAS_MIRRORSPLITUVROW_MSA
-#define HAS_NV12TOARGBROW_MSA
-#define HAS_NV12TORGB565ROW_MSA
-#define HAS_NV21TOARGBROW_MSA
#define HAS_RAWTOARGBROW_MSA
#define HAS_RAWTORGB24ROW_MSA
#define HAS_RAWTOUVROW_MSA
@@ -509,10 +574,8 @@ extern "C" {
#define HAS_SOBELXYROW_MSA
#define HAS_SOBELYROW_MSA
#define HAS_SPLITUVROW_MSA
-#define HAS_UYVYTOARGBROW_MSA
#define HAS_UYVYTOUVROW_MSA
#define HAS_UYVYTOYROW_MSA
-#define HAS_YUY2TOARGBROW_MSA
#define HAS_YUY2TOUV422ROW_MSA
#define HAS_YUY2TOUVROW_MSA
#define HAS_YUY2TOYROW_MSA
@@ -562,8 +625,6 @@ extern "C" {
#define HAS_I400TOARGBROW_MMI
#define HAS_I422TOUYVYROW_MMI
#define HAS_I422TOYUY2ROW_MMI
-#define HAS_I422TOARGBROW_MMI
-#define HAS_I444TOARGBROW_MMI
#define HAS_INTERPOLATEROW_MMI
#define HAS_J400TOARGBROW_MMI
#define HAS_MERGERGBROW_MMI
@@ -594,20 +655,6 @@ extern "C" {
#define HAS_YUY2TOUV422ROW_MMI
#define HAS_YUY2TOUVROW_MMI
#define HAS_YUY2TOYROW_MMI
-#define HAS_I210TOARGBROW_MMI
-#define HAS_I422TOARGB4444ROW_MMI
-#define HAS_I422TOARGB1555ROW_MMI
-#define HAS_I422TORGB565ROW_MMI
-#define HAS_NV21TORGB24ROW_MMI
-#define HAS_NV12TORGB24ROW_MMI
-#define HAS_I422ALPHATOARGBROW_MMI
-#define HAS_I422TORGB24ROW_MMI
-#define HAS_NV12TOARGBROW_MMI
-#define HAS_NV21TOARGBROW_MMI
-#define HAS_NV12TORGB565ROW_MMI
-#define HAS_YUY2TOARGBROW_MMI
-#define HAS_UYVYTOARGBROW_MMI
-#define HAS_I422TORGBAROW_MMI
#endif
#if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
@@ -616,6 +663,7 @@ extern "C" {
#else
#define SIMD_ALIGNED(var) __declspec(align(16)) var
#endif
+#define LIBYUV_NOINLINE __declspec(noinline)
typedef __declspec(align(16)) int16_t vec16[8];
typedef __declspec(align(16)) int32_t vec32[4];
typedef __declspec(align(16)) float vecf32[4];
@@ -636,6 +684,7 @@ typedef __declspec(align(32)) uint8_t ulvec8[32];
#else
#define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
#endif
+#define LIBYUV_NOINLINE __attribute__((noinline))
typedef int16_t __attribute__((vector_size(16))) vec16;
typedef int32_t __attribute__((vector_size(16))) vec32;
typedef float __attribute__((vector_size(16))) vecf32;
@@ -651,6 +700,7 @@ typedef uint32_t __attribute__((vector_size(32))) ulvec32;
typedef uint8_t __attribute__((vector_size(32))) ulvec8;
#else
#define SIMD_ALIGNED(var) var
+#define LIBYUV_NOINLINE
typedef int16_t vec16[8];
typedef int32_t vec32[4];
typedef float vecf32[4];
@@ -666,33 +716,18 @@ typedef uint32_t ulvec32[8];
typedef uint8_t ulvec8[32];
#endif
-#if defined(__aarch64__)
-// This struct is for Arm64 color conversion.
+#if defined(__aarch64__) || defined(__arm__)
+// This struct is for ARM color conversion.
struct YuvConstants {
- uvec16 kUVToRB;
- uvec16 kUVToRB2;
- uvec16 kUVToG;
- uvec16 kUVToG2;
- vec16 kUVBiasBGR;
- vec32 kYToRgb;
-};
-#elif defined(__arm__)
-// This struct is for ArmV7 color conversion.
-struct YuvConstants {
- uvec8 kUVToRB;
- uvec8 kUVToG;
- vec16 kUVBiasBGR;
- vec32 kYToRgb;
+ uvec8 kUVCoeff;
+ vec16 kRGBCoeffBias;
};
#else
// This struct is for Intel color conversion.
struct YuvConstants {
- int8_t kUVToB[32];
- int8_t kUVToG[32];
- int8_t kUVToR[32];
- int16_t kUVBiasB[16];
- int16_t kUVBiasG[16];
- int16_t kUVBiasR[16];
+ uint8_t kUVToB[32];
+ uint8_t kUVToG[32];
+ uint8_t kUVToR[32];
int16_t kYToRgb[16];
int16_t kYBiasToRgb[16];
};
@@ -701,11 +736,8 @@ struct YuvConstants {
#define KUVTOB 0
#define KUVTOG 32
#define KUVTOR 64
-#define KUVBIASB 96
-#define KUVBIASG 128
-#define KUVBIASR 160
-#define KYTORGB 192
-#define KYBIASTORGB 224
+#define KYTORGB 96
+#define KYBIASTORGB 128
#endif
@@ -795,6 +827,13 @@ void I422ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width);
+void I444AlphaToARGBRow_NEON(const uint8_t* src_y,
+ const uint8_t* src_u,
+ const uint8_t* src_v,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
@@ -802,12 +841,6 @@ void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width);
-void I422ToARGBRow_NEON(const uint8_t* src_y,
- const uint8_t* src_u,
- const uint8_t* src_v,
- uint8_t* dst_argb,
- const struct YuvConstants* yuvconstants,
- int width);
void I422ToRGBARow_NEON(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
@@ -976,11 +1009,11 @@ void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width);
void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width);
void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width);
void RGB24ToYRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
-void RGB24ToYJRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
+void RGB24ToYJRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
void RAWToYRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_y, int width);
-void RAWToYJRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_y, int width);
-void RGB24ToYJRow_AVX2(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
-void RAWToYJRow_AVX2(const uint8_t* src_raw, uint8_t* dst_y, int width);
+void RAWToYJRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_yj, int width);
+void RGB24ToYJRow_AVX2(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
+void RAWToYJRow_AVX2(const uint8_t* src_raw, uint8_t* dst_yj, int width);
void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width);
void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width);
void RGBAToYJRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width);
@@ -1175,16 +1208,16 @@ void RGB565ToYRow_MMI(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
void ARGB1555ToYRow_MMI(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
void ARGB4444ToYRow_MMI(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
-void ARGBToYRow_C(const uint8_t* src_argb, uint8_t* dst_y, int width);
-void ARGBToYJRow_C(const uint8_t* src_argb, uint8_t* dst_y, int width);
-void RGBAToYJRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
-void BGRAToYRow_C(const uint8_t* src_argb, uint8_t* dst_y, int width);
-void ABGRToYRow_C(const uint8_t* src_argb, uint8_t* dst_y, int width);
-void RGBAToYRow_C(const uint8_t* src_argb, uint8_t* dst_y, int width);
-void RGB24ToYRow_C(const uint8_t* src_argb, uint8_t* dst_y, int width);
-void RGB24ToYJRow_C(const uint8_t* src_argb, uint8_t* dst_yj, int width);
-void RAWToYRow_C(const uint8_t* src_argb, uint8_t* dst_y, int width);
-void RAWToYJRow_C(const uint8_t* src_argb, uint8_t* dst_yj, int width);
+void ARGBToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void ARGBToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void RGBAToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void BGRAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void ABGRToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void RGBAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void RGB24ToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void RGB24ToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void RAWToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
+void RAWToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
void RGB565ToYRow_C(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
void ARGB1555ToYRow_C(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
void ARGB4444ToYRow_C(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
@@ -1286,42 +1319,42 @@ void RGBAToUVRow_SSSE3(const uint8_t* src_rgba,
uint8_t* dst_v,
int width);
void ARGBToUVRow_Any_AVX2(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ABGRToUVRow_Any_AVX2(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ARGBToUVJRow_Any_AVX2(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ARGBToUVRow_Any_SSSE3(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ARGBToUVJRow_Any_SSSE3(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void BGRAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ABGRToUVRow_Any_SSSE3(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void RGBAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -1330,7 +1363,7 @@ void ARGBToUV444Row_Any_NEON(const uint8_t* src_ptr,
uint8_t* dst_v,
int width);
void ARGBToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -1353,47 +1386,47 @@ void ARGBToUVRow_Any_MMI(const uint8_t* src_ptr,
uint8_t* dst_v,
int width);
void ARGBToUVJRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void BGRAToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ABGRToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void RGBAToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void RGB24ToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void RAWToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void RGB565ToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ARGB1555ToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
void ARGB4444ToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -1602,7 +1635,7 @@ void MirrorSplitUVRow_C(const uint8_t* src_uv,
void ARGBMirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
-void ARGBMirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width);
+void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width);
void ARGBMirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width);
void ARGBMirrorRow_MMI(const uint8_t* src, uint8_t* dst, int width);
void ARGBMirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
@@ -1618,9 +1651,13 @@ void ARGBMirrorRow_Any_NEON(const uint8_t* src_ptr,
void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void ARGBMirrorRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
-void RGB24MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width);
-void RGB24MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width);
-void RGB24MirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
+void RGB24MirrorRow_SSSE3(const uint8_t* src_rgb24,
+ uint8_t* dst_rgb24,
+ int width);
+void RGB24MirrorRow_NEON(const uint8_t* src_rgb24,
+ uint8_t* dst_rgb24,
+ int width);
+void RGB24MirrorRow_C(const uint8_t* src_rgb24, uint8_t* dst_rgb24, int width);
void RGB24MirrorRow_Any_SSSE3(const uint8_t* src_ptr,
uint8_t* dst_ptr,
int width);
@@ -1817,26 +1854,449 @@ void MergeRGBRow_Any_MMI(const uint8_t* src_r,
const uint8_t* src_b,
uint8_t* dst_rgb,
int width);
+void MergeARGBRow_C(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width);
+void MergeARGBRow_SSE2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width);
+void MergeARGBRow_AVX2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width);
+void MergeARGBRow_NEON(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width);
+void MergeARGBRow_Any_SSE2(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_ptr,
+ int width);
+void MergeARGBRow_Any_AVX2(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_ptr,
+ int width);
+void MergeARGBRow_Any_NEON(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_ptr,
+ int width);
+void SplitARGBRow_C(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_SSE2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_SSSE3(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_AVX2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_NEON(const uint8_t* src_rgba,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_Any_SSE2(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_Any_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_Any_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void SplitARGBRow_Any_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width);
+void MergeXRGBRow_C(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width);
+void MergeXRGBRow_SSE2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width);
+void MergeXRGBRow_AVX2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width);
+void MergeXRGBRow_NEON(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width);
+void MergeXRGBRow_Any_SSE2(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ uint8_t* dst_ptr,
+ int width);
+void MergeXRGBRow_Any_AVX2(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ uint8_t* dst_ptr,
+ int width);
+void MergeXRGBRow_Any_NEON(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ uint8_t* dst_ptr,
+ int width);
+void SplitXRGBRow_C(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_SSE2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_SSSE3(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_AVX2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_NEON(const uint8_t* src_rgba,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_Any_SSE2(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_Any_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_Any_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+void SplitXRGBRow_Any_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width);
+
+void MergeXR30Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int depth,
+ int width);
+void MergeAR64Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint16_t* dst_ar64,
+ int depth,
+ int width);
+void MergeARGB16To8Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint8_t* dst_argb,
+ int depth,
+ int width);
+void MergeXR64Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint16_t* dst_ar64,
+ int depth,
+ int width);
+void MergeXRGB16To8Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_argb,
+ int depth,
+ int width);
+void MergeXR30Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int depth,
+ int width);
+void MergeAR64Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint16_t* dst_ar64,
+ int depth,
+ int width);
+void MergeARGB16To8Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint8_t* dst_argb,
+ int depth,
+ int width);
+void MergeXR64Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint16_t* dst_ar64,
+ int depth,
+ int width);
+void MergeXRGB16To8Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_argb,
+ int depth,
+ int width);
+void MergeXR30Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int depth,
+ int width);
+void MergeXR30Row_10_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int /* depth */,
+ int width);
+void MergeAR64Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint16_t* dst_ar64,
+ int depth,
+ int width);
+void MergeARGB16To8Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint8_t* dst_argb,
+ int depth,
+ int width);
+void MergeXR64Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint16_t* dst_ar64,
+ int depth,
+ int width);
+void MergeXRGB16To8Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_argb,
+ int depth,
+ int width);
+void MergeXR30Row_Any_AVX2(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ uint8_t* dst_ptr,
+ int depth,
+ int width);
+void MergeAR64Row_Any_AVX2(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ const uint16_t* a_buf,
+ uint16_t* dst_ptr,
+ int depth,
+ int width);
+void MergeXR64Row_Any_AVX2(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ uint16_t* dst_ptr,
+ int depth,
+ int width);
+void MergeARGB16To8Row_Any_AVX2(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_ptr,
+ int depth,
+ int width);
+void MergeXRGB16To8Row_Any_AVX2(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ uint8_t* dst_ptr,
+ int depth,
+ int width);
+void MergeXR30Row_Any_NEON(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ uint8_t* dst_ptr,
+ int depth,
+ int width);
+void MergeXR30Row_10_Any_NEON(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ uint8_t* dst_ptr,
+ int depth,
+ int width);
+void MergeAR64Row_Any_NEON(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ const uint16_t* a_buf,
+ uint16_t* dst_ptr,
+ int depth,
+ int width);
+void MergeARGB16To8Row_Any_NEON(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_ptr,
+ int depth,
+ int width);
+void MergeXR64Row_Any_NEON(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ uint16_t* dst_ptr,
+ int depth,
+ int width);
+void MergeXRGB16To8Row_Any_NEON(const uint16_t* r_buf,
+ const uint16_t* g_buf,
+ const uint16_t* b_buf,
+ uint8_t* dst_ptr,
+ int depth,
+ int width);
void MergeUVRow_16_C(const uint16_t* src_u,
const uint16_t* src_v,
uint16_t* dst_uv,
- int scale, /* 64 for 10 bit */
+ int depth,
int width);
void MergeUVRow_16_AVX2(const uint16_t* src_u,
const uint16_t* src_v,
uint16_t* dst_uv,
- int scale,
+ int depth,
int width);
+void MergeUVRow_16_Any_AVX2(const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint16_t* dst_uv,
+ int depth,
+ int width);
+void MergeUVRow_16_NEON(const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint16_t* dst_uv,
+ int depth,
+ int width);
+void MergeUVRow_16_Any_NEON(const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint16_t* dst_uv,
+ int depth,
+ int width);
+
+void SplitUVRow_16_C(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width);
+void SplitUVRow_16_AVX2(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width);
+void SplitUVRow_16_Any_AVX2(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width);
+void SplitUVRow_16_NEON(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width);
+void SplitUVRow_16_Any_NEON(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width);
-void MultiplyRow_16_AVX2(const uint16_t* src_y,
- uint16_t* dst_y,
- int scale,
- int width);
void MultiplyRow_16_C(const uint16_t* src_y,
uint16_t* dst_y,
int scale,
int width);
+void MultiplyRow_16_AVX2(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width);
+void MultiplyRow_16_Any_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int scale,
+ int width);
+void MultiplyRow_16_NEON(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width);
+void MultiplyRow_16_Any_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int scale,
+ int width);
+
+void DivideRow_16_C(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width);
+void DivideRow_16_AVX2(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width);
+void DivideRow_16_Any_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int scale,
+ int width);
+void DivideRow_16_NEON(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width);
+void DivideRow_16_Any_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int scale,
+ int width);
void Convert8To16Row_C(const uint8_t* src_y,
uint16_t* dst_y,
@@ -2258,6 +2718,71 @@ void ARGBToARGB4444Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
void ABGRToAR30Row_C(const uint8_t* src_abgr, uint8_t* dst_ar30, int width);
void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width);
+void ARGBToAR64Row_C(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
+void ARGBToAB64Row_C(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
+void AR64ToARGBRow_C(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
+void AB64ToARGBRow_C(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
+void AR64ShuffleRow_C(const uint8_t* src_ar64,
+ uint8_t* dst_ar64,
+ const uint8_t* shuffler,
+ int width);
+void ARGBToAR64Row_SSSE3(const uint8_t* src_argb,
+ uint16_t* dst_ar64,
+ int width);
+void ARGBToAB64Row_SSSE3(const uint8_t* src_argb,
+ uint16_t* dst_ab64,
+ int width);
+void AR64ToARGBRow_SSSE3(const uint16_t* src_ar64,
+ uint8_t* dst_argb,
+ int width);
+void AB64ToARGBRow_SSSE3(const uint16_t* src_ab64,
+ uint8_t* dst_argb,
+ int width);
+void ARGBToAR64Row_AVX2(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
+void ARGBToAB64Row_AVX2(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
+void AR64ToARGBRow_AVX2(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
+void AB64ToARGBRow_AVX2(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
+void ARGBToAR64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
+void ARGBToAB64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
+void AR64ToARGBRow_NEON(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
+void AB64ToARGBRow_NEON(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
+void ARGBToAR64Row_Any_SSSE3(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int width);
+void ARGBToAB64Row_Any_SSSE3(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int width);
+void AR64ToARGBRow_Any_SSSE3(const uint16_t* src_ptr,
+ uint8_t* dst_ptr,
+ int width);
+void AB64ToARGBRow_Any_SSSE3(const uint16_t* src_ptr,
+ uint8_t* dst_ptr,
+ int width);
+void ARGBToAR64Row_Any_AVX2(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int width);
+void ARGBToAB64Row_Any_AVX2(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int width);
+void AR64ToARGBRow_Any_AVX2(const uint16_t* src_ptr,
+ uint8_t* dst_ptr,
+ int width);
+void AB64ToARGBRow_Any_AVX2(const uint16_t* src_ptr,
+ uint8_t* dst_ptr,
+ int width);
+void ARGBToAR64Row_Any_NEON(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int width);
+void ARGBToAB64Row_Any_NEON(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int width);
+void AR64ToARGBRow_Any_NEON(const uint16_t* src_ptr,
+ uint8_t* dst_ptr,
+ int width);
+void AB64ToARGBRow_Any_NEON(const uint16_t* src_ptr,
+ uint8_t* dst_ptr,
+ int width);
+
void J400ToARGBRow_SSE2(const uint8_t* src_y, uint8_t* dst_argb, int width);
void J400ToARGBRow_AVX2(const uint8_t* src_y, uint8_t* dst_argb, int width);
void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width);
@@ -2306,6 +2831,51 @@ void I210ToARGBRow_C(const uint16_t* src_y,
uint8_t* rgb_buf,
const struct YuvConstants* yuvconstants,
int width);
+void I212ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I212ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I210AlphaToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ const uint16_t* src_a,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410AlphaToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ const uint16_t* src_a,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I444AlphaToARGBRow_C(const uint8_t* src_y,
+ const uint8_t* src_u,
+ const uint8_t* src_v,
+ const uint8_t* src_a,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422AlphaToARGBRow_C(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
@@ -2350,6 +2920,27 @@ void UYVYToARGBRow_C(const uint8_t* src_uyvy,
uint8_t* rgb_buf,
const struct YuvConstants* yuvconstants,
int width);
+void P210ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+
void I422ToRGBARow_C(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
@@ -2404,18 +2995,6 @@ void I444ToARGBRow_AVX2(const uint8_t* y_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width);
-void I444ToARGBRow_SSSE3(const uint8_t* y_buf,
- const uint8_t* u_buf,
- const uint8_t* v_buf,
- uint8_t* dst_argb,
- const struct YuvConstants* yuvconstants,
- int width);
-void I444ToARGBRow_AVX2(const uint8_t* y_buf,
- const uint8_t* u_buf,
- const uint8_t* v_buf,
- uint8_t* dst_argb,
- const struct YuvConstants* yuvconstants,
- int width);
void I422ToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2441,6 +3020,44 @@ void I210ToARGBRow_SSSE3(const uint16_t* y_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width);
+void I212ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I212ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I210AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422ToAR30Row_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2459,6 +3076,58 @@ void I210ToAR30Row_AVX2(const uint16_t* y_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width);
+void I212ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I212ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I210AlphaToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410AlphaToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I444AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I444AlphaToARGBRow_AVX2(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2543,6 +3212,48 @@ void UYVYToARGBRow_AVX2(const uint8_t* uyvy_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width);
+
+void P210ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+
void I422ToRGBARow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2645,6 +3356,44 @@ void I210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
uint8_t* dst_ptr,
const struct YuvConstants* yuvconstants,
int width);
+void I212ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I212ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I210AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422ToAR30Row_Any_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2663,6 +3412,58 @@ void I210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
uint8_t* dst_ptr,
const struct YuvConstants* yuvconstants,
int width);
+void I212ToARGBRow_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I212ToAR30Row_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I210AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I410AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I444AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void I444AlphaToARGBRow_Any_AVX2(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2747,6 +3548,46 @@ void UYVYToARGBRow_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
const struct YuvConstants* yuvconstants,
int width);
+void P210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToARGBRow_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422ToRGBARow_Any_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2828,15 +3669,15 @@ void I400ToARGBRow_MMI(const uint8_t* src_y,
int width);
void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
- const struct YuvConstants* yuvconstants,
+ const struct YuvConstants* param,
int width);
void I400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
- const struct YuvConstants* yuvconstants,
+ const struct YuvConstants* param,
int width);
void I400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
uint8_t* dst_ptr,
- const struct YuvConstants* yuvconstants,
+ const struct YuvConstants* param,
int width);
void I400ToARGBRow_Any_MSA(const uint8_t* src_ptr,
uint8_t* dst_ptr,
@@ -2848,11 +3689,11 @@ void I400ToARGBRow_Any_MMI(const uint8_t* src_ptr,
int width);
// ARGB preattenuated alpha blend.
-void ARGBBlendRow_SSSE3(const uint8_t* src_argb0,
+void ARGBBlendRow_SSSE3(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
-void ARGBBlendRow_NEON(const uint8_t* src_argb0,
+void ARGBBlendRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -2864,7 +3705,7 @@ void ARGBBlendRow_MMI(const uint8_t* src_argb0,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
-void ARGBBlendRow_C(const uint8_t* src_argb0,
+void ARGBBlendRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -2908,11 +3749,11 @@ void BlendPlaneRow_C(const uint8_t* src0,
// ARGB multiply images. Same API as Blend, but these require
// pointer and width alignment for SSE2.
-void ARGBMultiplyRow_C(const uint8_t* src_argb0,
+void ARGBMultiplyRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
-void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
+void ARGBMultiplyRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -2920,7 +3761,7 @@ void ARGBMultiplyRow_Any_SSE2(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_ptr,
int width);
-void ARGBMultiplyRow_AVX2(const uint8_t* src_argb0,
+void ARGBMultiplyRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -2928,7 +3769,7 @@ void ARGBMultiplyRow_Any_AVX2(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_ptr,
int width);
-void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
+void ARGBMultiplyRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -2954,11 +3795,11 @@ void ARGBMultiplyRow_Any_MMI(const uint8_t* y_buf,
int width);
// ARGB add images.
-void ARGBAddRow_C(const uint8_t* src_argb0,
+void ARGBAddRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
-void ARGBAddRow_SSE2(const uint8_t* src_argb0,
+void ARGBAddRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -2966,7 +3807,7 @@ void ARGBAddRow_Any_SSE2(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_ptr,
int width);
-void ARGBAddRow_AVX2(const uint8_t* src_argb0,
+void ARGBAddRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -2974,7 +3815,7 @@ void ARGBAddRow_Any_AVX2(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_ptr,
int width);
-void ARGBAddRow_NEON(const uint8_t* src_argb0,
+void ARGBAddRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -3001,11 +3842,11 @@ void ARGBAddRow_Any_MMI(const uint8_t* y_buf,
// ARGB subtract images. Same API as Blend, but these require
// pointer and width alignment for SSE2.
-void ARGBSubtractRow_C(const uint8_t* src_argb0,
+void ARGBSubtractRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
-void ARGBSubtractRow_SSE2(const uint8_t* src_argb0,
+void ARGBSubtractRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -3013,7 +3854,7 @@ void ARGBSubtractRow_Any_SSE2(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_ptr,
int width);
-void ARGBSubtractRow_AVX2(const uint8_t* src_argb0,
+void ARGBSubtractRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -3021,7 +3862,7 @@ void ARGBSubtractRow_Any_AVX2(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_ptr,
int width);
-void ARGBSubtractRow_NEON(const uint8_t* src_argb0,
+void ARGBSubtractRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width);
@@ -3164,6 +4005,13 @@ void I422ToARGBRow_Any_NEON(const uint8_t* y_buf,
uint8_t* dst_ptr,
const struct YuvConstants* yuvconstants,
int width);
+void I444AlphaToARGBRow_Any_NEON(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_ptr,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I422AlphaToARGBRow_Any_NEON(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -3221,9 +4069,9 @@ void NV21ToRGB24Row_Any_NEON(const uint8_t* y_buf,
uint8_t* dst_ptr,
const struct YuvConstants* yuvconstants,
int width);
-void NV21ToYUV24Row_Any_NEON(const uint8_t* src_y,
- const uint8_t* src_vu,
- uint8_t* dst_yuv24,
+void NV21ToYUV24Row_Any_NEON(const uint8_t* y_buf,
+ const uint8_t* uv_buf,
+ uint8_t* dst_ptr,
int width);
void NV12ToRGB565Row_Any_NEON(const uint8_t* y_buf,
const uint8_t* uv_buf,
@@ -3238,6 +4086,46 @@ void UYVYToARGBRow_Any_NEON(const uint8_t* src_ptr,
uint8_t* dst_ptr,
const struct YuvConstants* yuvconstants,
int width);
+void P210ToARGBRow_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToARGBRow_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToAR30Row_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToAR30Row_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToARGBRow_Any_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToARGBRow_Any_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P210ToAR30Row_Any_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
+void P410ToAR30Row_Any_NEON(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width);
void I444ToARGBRow_Any_MSA(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -3385,7 +4273,7 @@ void YUY2ToUV422Row_C(const uint8_t* src_yuy2,
int width);
void YUY2ToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void YUY2ToUVRow_Any_AVX2(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -3395,7 +4283,7 @@ void YUY2ToUV422Row_Any_AVX2(const uint8_t* src_ptr,
int width);
void YUY2ToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void YUY2ToUVRow_Any_SSE2(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -3405,7 +4293,7 @@ void YUY2ToUV422Row_Any_SSE2(const uint8_t* src_ptr,
int width);
void YUY2ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void YUY2ToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -3506,7 +4394,7 @@ void UYVYToUV422Row_C(const uint8_t* src_uyvy,
int width);
void UYVYToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void UYVYToUVRow_Any_AVX2(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -3516,7 +4404,7 @@ void UYVYToUV422Row_Any_AVX2(const uint8_t* src_ptr,
int width);
void UYVYToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void UYVYToUVRow_Any_SSE2(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -3526,7 +4414,7 @@ void UYVYToUV422Row_Any_SSE2(const uint8_t* src_ptr,
int width);
void UYVYToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void UYVYToUVRow_Any_NEON(const uint8_t* src_ptr,
- int src_stride_ptr,
+ int src_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width);
@@ -3563,29 +4451,29 @@ void SwapUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_vu, int width);
void SwapUVRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void AYUVToYRow_C(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
void AYUVToUVRow_C(const uint8_t* src_ayuv,
- int stride_ayuv,
+ int src_stride_ayuv,
uint8_t* dst_uv,
int width);
void AYUVToVURow_C(const uint8_t* src_ayuv,
- int stride_ayuv,
+ int src_stride_ayuv,
uint8_t* dst_vu,
int width);
void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
void AYUVToUVRow_NEON(const uint8_t* src_ayuv,
- int stride_ayuv,
+ int src_stride_ayuv,
uint8_t* dst_uv,
int width);
void AYUVToVURow_NEON(const uint8_t* src_ayuv,
- int stride_ayuv,
+ int src_stride_ayuv,
uint8_t* dst_vu,
int width);
-void AYUVToYRow_Any_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
-void AYUVToUVRow_Any_NEON(const uint8_t* src_ayuv,
- int stride_ayuv,
- uint8_t* dst_uv,
+void AYUVToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
+void AYUVToUVRow_Any_NEON(const uint8_t* src_ptr,
+ int src_stride,
+ uint8_t* dst_vu,
int width);
-void AYUVToVURow_Any_NEON(const uint8_t* src_ayuv,
- int stride_ayuv,
+void AYUVToVURow_Any_NEON(const uint8_t* src_ptr,
+ int src_stride,
uint8_t* dst_vu,
int width);
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale.h b/third-party/libyuv/third_party/libyuv/include/libyuv/scale.h
similarity index 80%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/scale.h
index add5a9eb62..3d4b60052d 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/scale.h
@@ -49,6 +49,18 @@ void ScalePlane_16(const uint16_t* src,
int dst_height,
enum FilterMode filtering);
+// Sample is expected to be in the low 12 bits.
+LIBYUV_API
+void ScalePlane_12(const uint16_t* src,
+ int src_stride,
+ int src_width,
+ int src_height,
+ uint16_t* dst,
+ int dst_stride,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering);
+
// Scales a YUV 4:2:0 image from the src width and height to the
// dst width and height.
// If filtering is kFilterNone, a simple nearest-neighbor algorithm is
@@ -97,6 +109,25 @@ int I420Scale_16(const uint16_t* src_y,
int dst_height,
enum FilterMode filtering);
+LIBYUV_API
+int I420Scale_12(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ int src_width,
+ int src_height,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering);
+
// Scales a YUV 4:4:4 image from the src width and height to the
// dst width and height.
// If filtering is kFilterNone, a simple nearest-neighbor algorithm is
@@ -145,6 +176,25 @@ int I444Scale_16(const uint16_t* src_y,
int dst_height,
enum FilterMode filtering);
+LIBYUV_API
+int I444Scale_12(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ int src_width,
+ int src_height,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering);
+
// Scales an NV12 image from the src width and height to the
// dst width and height.
// If filtering is kFilterNone, a simple nearest-neighbor algorithm is
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_argb.h b/third-party/libyuv/third_party/libyuv/include/libyuv/scale_argb.h
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_argb.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/scale_argb.h
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_row.h b/third-party/libyuv/third_party/libyuv/include/libyuv/scale_row.h
similarity index 76%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_row.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/scale_row.h
index a386d49989..461ac36f33 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_row.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/scale_row.h
@@ -74,18 +74,39 @@ extern "C" {
// The following are available for gcc/clang x86 platforms:
// TODO(fbarchard): Port to Visual C
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#define HAS_SCALEUVROWDOWN2BOX_SSSE3
+#define HAS_SCALEROWUP2LINEAR_SSE2
+#define HAS_SCALEROWUP2LINEAR_SSSE3
+#define HAS_SCALEROWUP2BILINEAR_SSE2
+#define HAS_SCALEROWUP2BILINEAR_SSSE3
+#define HAS_SCALEROWUP2LINEAR_12_SSSE3
+#define HAS_SCALEROWUP2BILINEAR_12_SSSE3
+#define HAS_SCALEROWUP2LINEAR_16_SSE2
+#define HAS_SCALEROWUP2BILINEAR_16_SSE2
+#define HAS_SCALEUVROWUP2LINEAR_SSSE3
+#define HAS_SCALEUVROWUP2BILINEAR_SSSE3
+#define HAS_SCALEUVROWUP2LINEAR_16_SSE2
+#define HAS_SCALEUVROWUP2BILINEAR_16_SSE2
#endif
// The following are available for gcc/clang x86 platforms, but
// require clang 3.4 or gcc 4.7.
// TODO(fbarchard): Port to Visual C
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || defined(__i386__)) && !defined(_MSC_VER) && \
+#if !defined(LIBYUV_DISABLE_X86) && \
+ (defined(__x86_64__) || defined(__i386__)) && \
(defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
#define HAS_SCALEUVROWDOWN2BOX_AVX2
+#define HAS_SCALEROWUP2LINEAR_AVX2
+#define HAS_SCALEROWUP2BILINEAR_AVX2
+#define HAS_SCALEROWUP2LINEAR_12_AVX2
+#define HAS_SCALEROWUP2BILINEAR_12_AVX2
+#define HAS_SCALEROWUP2LINEAR_16_AVX2
+#define HAS_SCALEROWUP2BILINEAR_16_AVX2
+#define HAS_SCALEUVROWUP2LINEAR_AVX2
+#define HAS_SCALEUVROWUP2BILINEAR_AVX2
+#define HAS_SCALEUVROWUP2LINEAR_16_AVX2
+#define HAS_SCALEUVROWUP2BILINEAR_16_AVX2
#endif
// The following are available on all x86 platforms, but
@@ -114,6 +135,16 @@ extern "C" {
#define HAS_SCALEROWDOWN4_NEON
#define HAS_SCALEUVROWDOWN2BOX_NEON
#define HAS_SCALEUVROWDOWNEVEN_NEON
+#define HAS_SCALEROWUP2LINEAR_NEON
+#define HAS_SCALEROWUP2BILINEAR_NEON
+#define HAS_SCALEROWUP2LINEAR_12_NEON
+#define HAS_SCALEROWUP2BILINEAR_12_NEON
+#define HAS_SCALEROWUP2LINEAR_16_NEON
+#define HAS_SCALEROWUP2BILINEAR_16_NEON
+#define HAS_SCALEUVROWUP2LINEAR_NEON
+#define HAS_SCALEUVROWUP2BILINEAR_NEON
+#define HAS_SCALEUVROWUP2LINEAR_16_NEON
+#define HAS_SCALEUVROWUP2BILINEAR_16_NEON
#endif
#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
@@ -279,6 +310,40 @@ void ScaleRowDown34_1_Box_16_C(const uint16_t* src_ptr,
ptrdiff_t src_stride,
uint16_t* d,
int dst_width);
+
+void ScaleRowUp2_Linear_C(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_C(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_C(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_C(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_Any_C(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_Any_C(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_Any_C(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_Any_C(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+
void ScaleCols_C(uint8_t* dst_ptr,
const uint8_t* src_ptr,
int dst_width,
@@ -416,6 +481,40 @@ void ScaleUVRowDownEvenBox_C(const uint8_t* src_uv,
int src_stepx,
uint8_t* dst_uv,
int dst_width);
+
+void ScaleUVRowUp2_Linear_C(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_C(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_Any_C(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_Any_C(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_C(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_C(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_Any_C(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_Any_C(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+
void ScaleUVCols_C(uint8_t* dst_uv,
const uint8_t* src_uv,
int dst_width,
@@ -508,6 +607,120 @@ void ScaleRowDown38_2_Box_SSSE3(const uint8_t* src_ptr,
ptrdiff_t src_stride,
uint8_t* dst_ptr,
int dst_width);
+
+void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_SSE2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_Any_SSE2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_Any_SSE2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_12_Any_SSSE3(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_12_Any_SSSE3(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_Any_SSE2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_Any_SSSE3(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_Any_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_Any_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_Any_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_Any_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_12_Any_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_12_Any_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_Any_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_Any_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+
void ScaleRowDown2_Any_SSSE3(const uint8_t* src_ptr,
ptrdiff_t src_stride,
uint8_t* dst_ptr,
@@ -1033,6 +1246,103 @@ void ScaleUVRowDownEvenBox_Any_MMI(const uint8_t* src_ptr,
uint8_t* dst_ptr,
int dst_width);
+void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_Any_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_Any_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_Any_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_Any_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_Any_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_Any_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_SSE2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_Any_SSE2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_Any_SSE2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_Any_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_Any_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleUVRowUp2_Linear_16_Any_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleUVRowUp2_Bilinear_16_Any_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+
// ScaleRowDown2Box also used by planar functions
// NEON downscalers with interpolation.
@@ -1143,6 +1453,55 @@ void ScaleRowDown38_2_Box_Any_NEON(const uint8_t* src_ptr,
uint8_t* dst_ptr,
int dst_width);
+void ScaleRowUp2_Linear_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_12_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_12_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_Any_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_Any_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_12_Any_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_12_Any_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+void ScaleRowUp2_Linear_16_Any_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width);
+void ScaleRowUp2_Bilinear_16_Any_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width);
+
void ScaleAddRow_NEON(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width);
void ScaleAddRow_Any_NEON(const uint8_t* src_ptr,
uint16_t* dst_ptr,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_uv.h b/third-party/libyuv/third_party/libyuv/include/libyuv/scale_uv.h
similarity index 70%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_uv.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/scale_uv.h
index 1b6327aaed..8e74e3195b 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/scale_uv.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/scale_uv.h
@@ -30,6 +30,19 @@ int UVScale(const uint8_t* src_uv,
int dst_height,
enum FilterMode filtering);
+// Scale a 16 bit UV image.
+// This function is currently incomplete, it can't handle all cases.
+LIBYUV_API
+int UVScale_16(const uint16_t* src_uv,
+ int src_stride_uv,
+ int src_width,
+ int src_height,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering);
+
#ifdef __cplusplus
} // extern "C"
} // namespace libyuv
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/version.h b/third-party/libyuv/third_party/libyuv/include/libyuv/version.h
similarity index 94%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/version.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/version.h
index efaac73e3a..8b06777fcb 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/version.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/version.h
@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_
#define INCLUDE_LIBYUV_VERSION_H_
-#define LIBYUV_VERSION 1768
+#define LIBYUV_VERSION 1789
#endif // INCLUDE_LIBYUV_VERSION_H_
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/video_common.h b/third-party/libyuv/third_party/libyuv/include/libyuv/video_common.h
similarity index 87%
rename from third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/video_common.h
rename to third-party/libyuv/third_party/libyuv/include/libyuv/video_common.h
index b9823d71d0..32b8a5210b 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/include/libyuv/video_common.h
+++ b/third-party/libyuv/third_party/libyuv/include/libyuv/video_common.h
@@ -60,17 +60,19 @@ enum FourCC {
FOURCC_YUY2 = FOURCC('Y', 'U', 'Y', '2'),
FOURCC_UYVY = FOURCC('U', 'Y', 'V', 'Y'),
FOURCC_I010 = FOURCC('I', '0', '1', '0'), // bt.601 10 bit 420
- FOURCC_I210 = FOURCC('I', '0', '1', '0'), // bt.601 10 bit 422
+ FOURCC_I210 = FOURCC('I', '2', '1', '0'), // bt.601 10 bit 422
// 1 Secondary YUV format: row biplanar. deprecated.
FOURCC_M420 = FOURCC('M', '4', '2', '0'),
- // 11 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp, 1 10 bpc
+ // 13 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp, 1 10 bpc 2 64 bpp
FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'),
FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'),
FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'),
FOURCC_AR30 = FOURCC('A', 'R', '3', '0'), // 10 bit per channel. 2101010.
FOURCC_AB30 = FOURCC('A', 'B', '3', '0'), // ABGR version of 10 bit
+ FOURCC_AR64 = FOURCC('A', 'R', '6', '4'), // 16 bit per channel.
+ FOURCC_AB64 = FOURCC('A', 'B', '6', '4'), // ABGR version of 16 bit
FOURCC_24BG = FOURCC('2', '4', 'B', 'G'),
FOURCC_RAW = FOURCC('r', 'a', 'w', ' '),
FOURCC_RGBA = FOURCC('R', 'G', 'B', 'A'),
@@ -94,16 +96,23 @@ enum FourCC {
FOURCC('J', '4', '4', '4'), // jpeg (bt.601 full), unofficial fourcc
FOURCC_J400 =
FOURCC('J', '4', '0', '0'), // jpeg (bt.601 full), unofficial fourcc
+ FOURCC_F420 = FOURCC('F', '4', '2', '0'), // bt.709 full, unofficial fourcc
+ FOURCC_F422 = FOURCC('F', '4', '2', '2'), // bt.709 full, unofficial fourcc
+ FOURCC_F444 = FOURCC('F', '4', '4', '4'), // bt.709 full, unofficial fourcc
FOURCC_H420 = FOURCC('H', '4', '2', '0'), // bt.709, unofficial fourcc
FOURCC_H422 = FOURCC('H', '4', '2', '2'), // bt.709, unofficial fourcc
FOURCC_H444 = FOURCC('H', '4', '4', '4'), // bt.709, unofficial fourcc
FOURCC_U420 = FOURCC('U', '4', '2', '0'), // bt.2020, unofficial fourcc
FOURCC_U422 = FOURCC('U', '4', '2', '2'), // bt.2020, unofficial fourcc
FOURCC_U444 = FOURCC('U', '4', '4', '4'), // bt.2020, unofficial fourcc
+ FOURCC_F010 = FOURCC('F', '0', '1', '0'), // bt.709 full range 10 bit 420
FOURCC_H010 = FOURCC('H', '0', '1', '0'), // bt.709 10 bit 420
FOURCC_U010 = FOURCC('U', '0', '1', '0'), // bt.2020 10 bit 420
- FOURCC_H210 = FOURCC('H', '0', '1', '0'), // bt.709 10 bit 422
- FOURCC_U210 = FOURCC('U', '0', '1', '0'), // bt.2020 10 bit 422
+ FOURCC_F210 = FOURCC('F', '2', '1', '0'), // bt.709 full range 10 bit 422
+ FOURCC_H210 = FOURCC('H', '2', '1', '0'), // bt.709 10 bit 422
+ FOURCC_U210 = FOURCC('U', '2', '1', '0'), // bt.2020 10 bit 422
+ FOURCC_P010 = FOURCC('P', '0', '1', '0'),
+ FOURCC_P210 = FOURCC('P', '2', '1', '0'),
// 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc.
FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420.
@@ -156,6 +165,8 @@ enum FourCCBpp {
FOURCC_BPP_RGBA = 32,
FOURCC_BPP_AR30 = 32,
FOURCC_BPP_AB30 = 32,
+ FOURCC_BPP_AR64 = 64,
+ FOURCC_BPP_AB64 = 64,
FOURCC_BPP_24BG = 24,
FOURCC_BPP_RAW = 24,
FOURCC_BPP_RGBP = 16,
@@ -173,7 +184,12 @@ enum FourCCBpp {
FOURCC_BPP_J400 = 8,
FOURCC_BPP_H420 = 12,
FOURCC_BPP_H422 = 16,
- FOURCC_BPP_H010 = 24,
+ FOURCC_BPP_I010 = 15,
+ FOURCC_BPP_I210 = 20,
+ FOURCC_BPP_H010 = 15,
+ FOURCC_BPP_H210 = 20,
+ FOURCC_BPP_P010 = 15,
+ FOURCC_BPP_P210 = 20,
FOURCC_BPP_MJPG = 0, // 0 means unknown.
FOURCC_BPP_H264 = 0,
FOURCC_BPP_IYUV = 12,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/libyuv.gni b/third-party/libyuv/third_party/libyuv/libyuv.gni
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/libyuv.gni
rename to third-party/libyuv/third_party/libyuv/libyuv.gni
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/linux.mk b/third-party/libyuv/third_party/libyuv/linux.mk
similarity index 88%
rename from third-party/webrtc/dependencies/third_party/libyuv/linux.mk
rename to third-party/libyuv/third_party/libyuv/linux.mk
index 3e93b710d4..f5e73ea497 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/linux.mk
+++ b/third-party/libyuv/third_party/libyuv/linux.mk
@@ -66,7 +66,7 @@ LOCAL_OBJ_FILES := \
.c.o:
$(CC) -c $(CFLAGS) $*.c -o $*.o
-all: libyuv.a i444tonv12_eg yuvconvert cpuid psnr
+all: libyuv.a i444tonv12_eg yuvconvert yuvconstants cpuid psnr
libyuv.a: $(LOCAL_OBJ_FILES)
$(AR) $(ARFLAGS) $@ $(LOCAL_OBJ_FILES)
@@ -75,13 +75,17 @@ libyuv.a: $(LOCAL_OBJ_FILES)
yuvconvert: util/yuvconvert.cc libyuv.a
$(CXX) $(CXXFLAGS) -Iutil/ -o $@ util/yuvconvert.cc libyuv.a
+# A C test utility that generates yuvconstants for yuv to rgb.
+yuvconstants: util/yuvconstants.c libyuv.a
+ $(CXX) $(CXXFLAGS) -Iutil/ -lm -o $@ util/yuvconstants.c libyuv.a
+
# A standalone test utility
psnr: util/psnr.cc
$(CXX) $(CXXFLAGS) -Iutil/ -o $@ util/psnr.cc util/psnr_main.cc util/ssim.cc
# A simple conversion example.
i444tonv12_eg: util/i444tonv12_eg.cc libyuv.a
- $(CC) $(CFLAGS) -o $@ util/i444tonv12_eg.cc libyuv.a
+ $(CXX) $(CXXFLAGS) -o $@ util/i444tonv12_eg.cc libyuv.a
# A C test utility that uses libyuv conversion from C.
# gcc 4.4 and older require -fno-exceptions to avoid link error on __gxx_personality_v0
@@ -90,4 +94,4 @@ cpuid: util/cpuid.c libyuv.a
$(CC) $(CFLAGS) -o $@ util/cpuid.c libyuv.a
clean:
- /bin/rm -f source/*.o *.ii *.s libyuv.a i444tonv12_eg yuvconvert cpuid psnr
+ /bin/rm -f source/*.o *.ii *.s libyuv.a i444tonv12_eg yuvconvert yuvconstants cpuid psnr
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/public.mk b/third-party/libyuv/third_party/libyuv/public.mk
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/public.mk
rename to third-party/libyuv/third_party/libyuv/public.mk
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/pylintrc b/third-party/libyuv/third_party/libyuv/pylintrc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/pylintrc
rename to third-party/libyuv/third_party/libyuv/pylintrc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare.cc b/third-party/libyuv/third_party/libyuv/source/compare.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare.cc
rename to third-party/libyuv/third_party/libyuv/source/compare.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_common.cc b/third-party/libyuv/third_party/libyuv/source/compare_common.cc
similarity index 78%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare_common.cc
rename to third-party/libyuv/third_party/libyuv/source/compare_common.cc
index d4b170ad98..d1cab8d2b4 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_common.cc
+++ b/third-party/libyuv/third_party/libyuv/source/compare_common.cc
@@ -17,36 +17,6 @@ namespace libyuv {
extern "C" {
#endif
-#if ORIGINAL_OPT
-uint32_t HammingDistance_C1(const uint8_t* src_a,
- const uint8_t* src_b,
- int count) {
- uint32_t diff = 0u;
-
- int i;
- for (i = 0; i < count; ++i) {
- int x = src_a[i] ^ src_b[i];
- if (x & 1)
- ++diff;
- if (x & 2)
- ++diff;
- if (x & 4)
- ++diff;
- if (x & 8)
- ++diff;
- if (x & 16)
- ++diff;
- if (x & 32)
- ++diff;
- if (x & 64)
- ++diff;
- if (x & 128)
- ++diff;
- }
- return diff;
-}
-#endif
-
// Hakmem method for hamming distance.
uint32_t HammingDistance_C(const uint8_t* src_a,
const uint8_t* src_b,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_gcc.cc b/third-party/libyuv/third_party/libyuv/source/compare_gcc.cc
similarity index 99%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare_gcc.cc
rename to third-party/libyuv/third_party/libyuv/source/compare_gcc.cc
index 6700f9697e..b834b42ac4 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_gcc.cc
+++ b/third-party/libyuv/third_party/libyuv/source/compare_gcc.cc
@@ -19,8 +19,7 @@ extern "C" {
#endif
// This module is for GCC x86 and x64.
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#if defined(__x86_64__)
uint32_t HammingDistance_SSE42(const uint8_t* src_a,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_mmi.cc b/third-party/libyuv/third_party/libyuv/source/compare_mmi.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare_mmi.cc
rename to third-party/libyuv/third_party/libyuv/source/compare_mmi.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_msa.cc b/third-party/libyuv/third_party/libyuv/source/compare_msa.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare_msa.cc
rename to third-party/libyuv/third_party/libyuv/source/compare_msa.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_neon.cc b/third-party/libyuv/third_party/libyuv/source/compare_neon.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare_neon.cc
rename to third-party/libyuv/third_party/libyuv/source/compare_neon.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_neon64.cc b/third-party/libyuv/third_party/libyuv/source/compare_neon64.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare_neon64.cc
rename to third-party/libyuv/third_party/libyuv/source/compare_neon64.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_win.cc b/third-party/libyuv/third_party/libyuv/source/compare_win.cc
similarity index 96%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/compare_win.cc
rename to third-party/libyuv/third_party/libyuv/source/compare_win.cc
index d57d3d9d1c..9bb27f1dd1 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/compare_win.cc
+++ b/third-party/libyuv/third_party/libyuv/source/compare_win.cc
@@ -22,8 +22,9 @@ namespace libyuv {
extern "C" {
#endif
-// This module is for 32 bit Visual C x86 and clangcl
-#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
+// This module is for 32 bit Visual C x86
+#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \
+ !defined(__clang__) && defined(_M_IX86)
uint32_t HammingDistance_SSE42(const uint8_t* src_a,
const uint8_t* src_b,
@@ -77,8 +78,7 @@ __declspec(naked) uint32_t
}
}
-// Visual C 2012 required for AVX2.
-#if _MSC_VER >= 1700
+#ifdef HAS_SUMSQUAREERROR_AVX2
// C4752: found Intel(R) Advanced Vector Extensions; consider using /arch:AVX.
#pragma warning(disable : 4752)
__declspec(naked) uint32_t
@@ -118,7 +118,7 @@ __declspec(naked) uint32_t
ret
}
}
-#endif // _MSC_VER >= 1700
+#endif // HAS_SUMSQUAREERROR_AVX2
uvec32 kHash16x33 = {0x92d9e201, 0, 0, 0}; // 33 ^ 16
uvec32 kHashMul0 = {
@@ -196,7 +196,7 @@ __declspec(naked) uint32_t
}
// Visual C 2012 required for AVX2.
-#if _MSC_VER >= 1700
+#ifdef HAS_HASHDJB2_AVX2
__declspec(naked) uint32_t
HashDjb2_AVX2(const uint8_t* src, int count, uint32_t seed) {
__asm {
@@ -231,7 +231,7 @@ __declspec(naked) uint32_t
ret
}
}
-#endif // _MSC_VER >= 1700
+#endif // HAS_HASHDJB2_AVX2
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/convert.cc b/third-party/libyuv/third_party/libyuv/source/convert.cc
similarity index 77%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/convert.cc
rename to third-party/libyuv/third_party/libyuv/source/convert.cc
index 98258b9bc9..69f7fb6e01 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/convert.cc
+++ b/third-party/libyuv/third_party/libyuv/source/convert.cc
@@ -15,7 +15,8 @@
#include "libyuv/planar_functions.h"
#include "libyuv/rotate.h"
#include "libyuv/row.h"
-#include "libyuv/scale.h" // For ScalePlane()
+#include "libyuv/scale.h" // For ScalePlane()
+#include "libyuv/scale_uv.h" // For UVScale()
#ifdef __cplusplus
namespace libyuv {
@@ -48,7 +49,7 @@ static int I4xxToI420(const uint8_t* src_y,
const int dst_y_height = Abs(src_y_height);
const int dst_uv_width = SUBSAMPLE(dst_y_width, 1, 1);
const int dst_uv_height = SUBSAMPLE(dst_y_height, 1, 1);
- if (src_uv_width == 0 || src_uv_height == 0) {
+ if (src_uv_width <= 0 || src_uv_height == 0) {
return -1;
}
if (dst_y) {
@@ -148,6 +149,52 @@ int I010Copy(const uint16_t* src_y,
return 0;
}
+static int Planar16bitTo8bit(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height,
+ int subsample_x,
+ int subsample_y,
+ int depth) {
+ int uv_width = SUBSAMPLE(width, subsample_x, subsample_x);
+ int uv_height = SUBSAMPLE(height, subsample_y, subsample_y);
+ int scale = 1 << (24 - depth);
+ if (!src_u || !src_v || !dst_u || !dst_v || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ uv_height = -uv_height;
+ src_y = src_y + (height - 1) * src_stride_y;
+ src_u = src_u + (uv_height - 1) * src_stride_u;
+ src_v = src_v + (uv_height - 1) * src_stride_v;
+ src_stride_y = -src_stride_y;
+ src_stride_u = -src_stride_u;
+ src_stride_v = -src_stride_v;
+ }
+
+ // Convert Y plane.
+ Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width,
+ height);
+ // Convert UV planes.
+ Convert16To8Plane(src_u, src_stride_u, dst_u, dst_stride_u, scale, uv_width,
+ uv_height);
+ Convert16To8Plane(src_v, src_stride_v, dst_v, dst_stride_v, scale, uv_width,
+ uv_height);
+ return 0;
+}
+
// Convert 10 bit YUV to 8 bit.
LIBYUV_API
int I010ToI420(const uint16_t* src_y,
@@ -164,34 +211,295 @@ int I010ToI420(const uint16_t* src_y,
int dst_stride_v,
int width,
int height) {
- int halfwidth = (width + 1) >> 1;
- int halfheight = (height + 1) >> 1;
- if (!src_u || !src_v || !dst_u || !dst_v || width <= 0 || height == 0) {
+ return Planar16bitTo8bit(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u,
+ dst_stride_u, dst_v, dst_stride_v, width, height, 1,
+ 1, 10);
+}
+
+LIBYUV_API
+int I210ToI422(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ return Planar16bitTo8bit(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u,
+ dst_stride_u, dst_v, dst_stride_v, width, height, 1,
+ 0, 10);
+}
+
+LIBYUV_API
+int I410ToI444(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ return Planar16bitTo8bit(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u,
+ dst_stride_u, dst_v, dst_stride_v, width, height, 0,
+ 0, 10);
+}
+
+LIBYUV_API
+int I012ToI420(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ return Planar16bitTo8bit(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u,
+ dst_stride_u, dst_v, dst_stride_v, width, height, 1,
+ 1, 12);
+}
+
+LIBYUV_API
+int I212ToI422(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ return Planar16bitTo8bit(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u,
+ dst_stride_u, dst_v, dst_stride_v, width, height, 1,
+ 0, 12);
+}
+
+LIBYUV_API
+int I412ToI444(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ return Planar16bitTo8bit(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u,
+ dst_stride_u, dst_v, dst_stride_v, width, height, 0,
+ 0, 12);
+}
+
+// Any Ix10 To I010 format with mirroring.
+static int Ix10ToI010(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height,
+ int subsample_x,
+ int subsample_y) {
+ const int dst_y_width = Abs(width);
+ const int dst_y_height = Abs(height);
+ const int src_uv_width = SUBSAMPLE(width, subsample_x, subsample_x);
+ const int src_uv_height = SUBSAMPLE(height, subsample_y, subsample_y);
+ const int dst_uv_width = SUBSAMPLE(dst_y_width, 1, 1);
+ const int dst_uv_height = SUBSAMPLE(dst_y_height, 1, 1);
+ if (width <= 0 || height == 0) {
return -1;
}
- // Negative height means invert the image.
- if (height < 0) {
- height = -height;
- halfheight = (height + 1) >> 1;
- src_y = src_y + (height - 1) * src_stride_y;
- src_u = src_u + (halfheight - 1) * src_stride_u;
- src_v = src_v + (halfheight - 1) * src_stride_v;
- src_stride_y = -src_stride_y;
- src_stride_u = -src_stride_u;
- src_stride_v = -src_stride_v;
+ if (dst_y) {
+ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ dst_y_width, dst_y_height, kFilterBilinear);
+ }
+ ScalePlane_12(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u,
+ dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear);
+ ScalePlane_12(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v,
+ dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear);
+ return 0;
+}
+
+LIBYUV_API
+int I410ToI010(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ return Ix10ToI010(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u,
+ dst_v, dst_stride_v, width, height, 0, 0);
+}
+
+LIBYUV_API
+int I210ToI010(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ return Ix10ToI010(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u,
+ dst_v, dst_stride_v, width, height, 1, 0);
+}
+
+// Any I[420]1[02] to P[420]1[02] format with mirroring.
+static int IxxxToPxxx(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height,
+ int subsample_x,
+ int subsample_y,
+ int depth) {
+ const int uv_width = SUBSAMPLE(width, subsample_x, subsample_x);
+ const int uv_height = SUBSAMPLE(height, subsample_y, subsample_y);
+ if (width <= 0 || height == 0) {
+ return -1;
}
- // Convert Y plane.
- Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, 16384, width,
- height);
- // Convert UV planes.
- Convert16To8Plane(src_u, src_stride_u, dst_u, dst_stride_u, 16384, halfwidth,
- halfheight);
- Convert16To8Plane(src_v, src_stride_v, dst_v, dst_stride_v, 16384, halfwidth,
- halfheight);
+ ConvertToMSBPlane_16(src_y, src_stride_y, dst_y, dst_stride_y, width, height,
+ depth);
+ MergeUVPlane_16(src_u, src_stride_u, src_v, src_stride_v, dst_uv,
+ dst_stride_uv, uv_width, uv_height, depth);
return 0;
}
+LIBYUV_API
+int I010ToP010(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv,
+ width, height, 1, 1, 10);
+}
+
+LIBYUV_API
+int I210ToP210(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv,
+ width, height, 1, 0, 10);
+}
+
+LIBYUV_API
+int I012ToP012(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv,
+ width, height, 1, 1, 12);
+}
+
+LIBYUV_API
+int I212ToP212(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv,
+ width, height, 1, 0, 12);
+}
+
// 422 chroma is 1/2 width, 1x height
// 420 chroma is 1/2 width, 1/2 height
LIBYUV_API
@@ -613,6 +921,104 @@ int NV21ToI420(const uint8_t* src_y,
width, height);
}
+LIBYUV_API
+int NV12ToNV24(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ if (width <= 0 || height == 0) {
+ return -1;
+ }
+
+ if (dst_y) {
+ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ Abs(width), Abs(height), kFilterBilinear);
+ }
+ UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1),
+ SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width),
+ Abs(height), kFilterBilinear);
+ return 0;
+}
+
+LIBYUV_API
+int NV16ToNV24(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ if (width <= 0 || height == 0) {
+ return -1;
+ }
+
+ if (dst_y) {
+ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ Abs(width), Abs(height), kFilterBilinear);
+ }
+ UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv,
+ dst_stride_uv, Abs(width), Abs(height), kFilterBilinear);
+ return 0;
+}
+
+LIBYUV_API
+int P010ToP410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ if (width <= 0 || height == 0) {
+ return -1;
+ }
+
+ if (dst_y) {
+ ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ Abs(width), Abs(height), kFilterBilinear);
+ }
+ UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1),
+ SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width),
+ Abs(height), kFilterBilinear);
+ return 0;
+}
+
+LIBYUV_API
+int P210ToP410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ if (width <= 0 || height == 0) {
+ return -1;
+ }
+
+ if (dst_y) {
+ ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ Abs(width), Abs(height), kFilterBilinear);
+ }
+ UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv,
+ dst_stride_uv, Abs(width), Abs(height), kFilterBilinear);
+ return 0;
+}
+
// Convert YUY2 to I420.
LIBYUV_API
int YUY2ToI420(const uint8_t* src_yuy2,
@@ -962,6 +1368,18 @@ int ARGBToI420(const uint8_t* src_argb,
src_argb = src_argb + (height - 1) * src_stride_argb;
src_stride_argb = -src_stride_argb;
}
+#if defined(HAS_ARGBTOYROW_NEON) && defined(HAS_ARGBTOUVROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBToYRow = ARGBToYRow_Any_NEON;
+ ARGBToUVRow = ARGBToUVRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToYRow = ARGBToYRow_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ ARGBToUVRow = ARGBToUVRow_NEON;
+ }
+ }
+ }
+#endif
#if defined(HAS_ARGBTOYROW_SSSE3) && defined(HAS_ARGBTOUVROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
ARGBToUVRow = ARGBToUVRow_Any_SSSE3;
@@ -982,22 +1400,6 @@ int ARGBToI420(const uint8_t* src_argb,
}
}
#endif
-#if defined(HAS_ARGBTOYROW_NEON)
- if (TestCpuFlag(kCpuHasNEON)) {
- ARGBToYRow = ARGBToYRow_Any_NEON;
- if (IS_ALIGNED(width, 8)) {
- ARGBToYRow = ARGBToYRow_NEON;
- }
- }
-#endif
-#if defined(HAS_ARGBTOUVROW_NEON)
- if (TestCpuFlag(kCpuHasNEON)) {
- ARGBToUVRow = ARGBToUVRow_Any_NEON;
- if (IS_ALIGNED(width, 16)) {
- ARGBToUVRow = ARGBToUVRow_NEON;
- }
- }
-#endif
#if defined(HAS_ARGBTOYROW_MMI) && defined(HAS_ARGBTOUVROW_MMI)
if (TestCpuFlag(kCpuHasMMI)) {
ARGBToYRow = ARGBToYRow_Any_MMI;
@@ -1365,7 +1767,7 @@ int RGB24ToI420(const uint8_t* src_rgb24,
}
// Neon version does direct RGB24 to YUV.
-#if defined(HAS_RGB24TOYROW_NEON)
+#if defined(HAS_RGB24TOYROW_NEON) && defined(HAS_RGB24TOUVROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
RGB24ToUVRow = RGB24ToUVRow_Any_NEON;
RGB24ToYRow = RGB24ToYRow_Any_NEON;
@@ -1402,6 +1804,14 @@ int RGB24ToI420(const uint8_t* src_rgb24,
#endif
// Other platforms do intermediate conversion from RGB24 to ARGB.
#else
+#if defined(HAS_RGB24TOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ RGB24ToARGBRow = RGB24ToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ RGB24ToARGBRow = RGB24ToARGBRow_NEON;
+ }
+ }
+#endif
#if defined(HAS_RGB24TOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
RGB24ToARGBRow = RGB24ToARGBRow_Any_SSSE3;
@@ -1410,6 +1820,18 @@ int RGB24ToI420(const uint8_t* src_rgb24,
}
}
#endif
+#if defined(HAS_ARGBTOYROW_NEON) && defined(HAS_ARGBTOUVROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBToUVRow = ARGBToUVRow_Any_NEON;
+ ARGBToYRow = ARGBToYRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToYRow = ARGBToYRow_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ ARGBToUVRow = ARGBToUVRow_NEON;
+ }
+ }
+ }
+#endif
#if defined(HAS_ARGBTOYROW_SSSE3) && defined(HAS_ARGBTOUVROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
ARGBToUVRow = ARGBToUVRow_Any_SSSE3;
@@ -1554,6 +1976,14 @@ int RGB24ToJ420(const uint8_t* src_rgb24,
}
#endif
#else
+#if defined(HAS_RGB24TOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ RGB24ToARGBRow = RGB24ToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ RGB24ToARGBRow = RGB24ToARGBRow_NEON;
+ }
+ }
+#endif
#if defined(HAS_RGB24TOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
RGB24ToARGBRow = RGB24ToARGBRow_Any_SSSE3;
@@ -1562,6 +1992,18 @@ int RGB24ToJ420(const uint8_t* src_rgb24,
}
}
#endif
+#if defined(HAS_ARGBTOYJROW_NEON) && defined(HAS_ARGBTOUVJROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBToUVJRow = ARGBToUVJRow_Any_NEON;
+ ARGBToYJRow = ARGBToYJRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToYJRow = ARGBToYJRow_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ ARGBToUVJRow = ARGBToUVJRow_NEON;
+ }
+ }
+ }
+#endif
#if defined(HAS_ARGBTOYJROW_SSSE3) && defined(HAS_ARGBTOUVJROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
ARGBToUVJRow = ARGBToUVJRow_Any_SSSE3;
@@ -1705,6 +2147,26 @@ int RAWToI420(const uint8_t* src_raw,
#endif
// Other platforms do intermediate conversion from RAW to ARGB.
#else
+#if defined(HAS_RAWTOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ RAWToARGBRow = RAWToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ RAWToARGBRow = RAWToARGBRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOYROW_NEON) && defined(HAS_ARGBTOUVROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBToUVRow = ARGBToUVRow_Any_NEON;
+ ARGBToYRow = ARGBToYRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToYRow = ARGBToYRow_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ ARGBToUVRow = ARGBToUVRow_NEON;
+ }
+ }
+ }
+#endif
#if defined(HAS_RAWTOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
RAWToARGBRow = RAWToARGBRow_Any_SSSE3;
@@ -1780,6 +2242,178 @@ int RAWToI420(const uint8_t* src_raw,
return 0;
}
+// TODO(fbarchard): Use Matrix version to implement I420 and J420.
+// Convert RAW to J420.
+LIBYUV_API
+int RAWToJ420(const uint8_t* src_raw,
+ int src_stride_raw,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ int y;
+#if (defined(HAS_RAWTOYJROW_NEON) && defined(HAS_RAWTOUVJROW_NEON)) || \
+ defined(HAS_RAWTOYJROW_MSA) || defined(HAS_RAWTOYJROW_MMI)
+ void (*RAWToUVJRow)(const uint8_t* src_raw, int src_stride_raw,
+ uint8_t* dst_u, uint8_t* dst_v, int width) =
+ RAWToUVJRow_C;
+ void (*RAWToYJRow)(const uint8_t* src_raw, uint8_t* dst_y, int width) =
+ RAWToYJRow_C;
+#else
+ void (*RAWToARGBRow)(const uint8_t* src_rgb, uint8_t* dst_argb, int width) =
+ RAWToARGBRow_C;
+ void (*ARGBToUVJRow)(const uint8_t* src_argb0, int src_stride_argb,
+ uint8_t* dst_u, uint8_t* dst_v, int width) =
+ ARGBToUVJRow_C;
+ void (*ARGBToYJRow)(const uint8_t* src_argb, uint8_t* dst_y, int width) =
+ ARGBToYJRow_C;
+#endif
+ if (!src_raw || !dst_y || !dst_u || !dst_v || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ src_raw = src_raw + (height - 1) * src_stride_raw;
+ src_stride_raw = -src_stride_raw;
+ }
+
+// Neon version does direct RAW to YUV.
+#if defined(HAS_RAWTOYJROW_NEON) && defined(HAS_RAWTOUVJROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ RAWToUVJRow = RAWToUVJRow_Any_NEON;
+ RAWToYJRow = RAWToYJRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ RAWToYJRow = RAWToYJRow_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ RAWToUVJRow = RAWToUVJRow_NEON;
+ }
+ }
+ }
+// MMI and MSA version does direct RAW to YUV.
+#elif (defined(HAS_RAWTOYJROW_MMI) || defined(HAS_RAWTOYJROW_MSA))
+#if defined(HAS_RAWTOYJROW_MMI) && defined(HAS_RAWTOUVJROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ RAWToUVJRow = RAWToUVJRow_Any_MMI;
+ RAWToYJRow = RAWToYJRow_Any_MMI;
+ if (IS_ALIGNED(width, 8)) {
+ RAWToYJRow = RAWToYJRow_MMI;
+ if (IS_ALIGNED(width, 16)) {
+ RAWToUVJRow = RAWToUVJRow_MMI;
+ }
+ }
+ }
+#endif
+#if defined(HAS_RAWTOYJROW_MSA) && defined(HAS_RAWTOUVJROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ RAWToUVJRow = RAWToUVJRow_Any_MSA;
+ RAWToYJRow = RAWToYJRow_Any_MSA;
+ if (IS_ALIGNED(width, 16)) {
+ RAWToYJRow = RAWToYJRow_MSA;
+ RAWToUVJRow = RAWToUVJRow_MSA;
+ }
+ }
+#endif
+#else
+#if defined(HAS_RAWTOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ RAWToARGBRow = RAWToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ RAWToARGBRow = RAWToARGBRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOYJROW_NEON) && defined(HAS_ARGBTOUVJROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBToUVJRow = ARGBToUVJRow_Any_NEON;
+ ARGBToYJRow = ARGBToYJRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToYJRow = ARGBToYJRow_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ ARGBToUVJRow = ARGBToUVJRow_NEON;
+ }
+ }
+ }
+#endif
+#if defined(HAS_RAWTOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ RAWToARGBRow = RAWToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 16)) {
+ RAWToARGBRow = RAWToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOYJROW_SSSE3) && defined(HAS_ARGBTOUVJROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBToUVJRow = ARGBToUVJRow_Any_SSSE3;
+ ARGBToYJRow = ARGBToYJRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 16)) {
+ ARGBToUVJRow = ARGBToUVJRow_SSSE3;
+ ARGBToYJRow = ARGBToYJRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOYJROW_AVX2) && defined(HAS_ARGBTOUVJROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBToUVJRow = ARGBToUVJRow_Any_AVX2;
+ ARGBToYJRow = ARGBToYJRow_Any_AVX2;
+ if (IS_ALIGNED(width, 32)) {
+ ARGBToUVJRow = ARGBToUVJRow_AVX2;
+ ARGBToYJRow = ARGBToYJRow_AVX2;
+ }
+ }
+#endif
+#endif
+
+ {
+#if !((defined(HAS_RAWTOYJROW_NEON) && defined(HAS_RAWTOUVJROW_NEON)) || \
+ defined(HAS_RAWTOYJROW_MSA) || defined(HAS_RAWTOYJROW_MMI))
+ // Allocate 2 rows of ARGB.
+ const int kRowSize = (width * 4 + 31) & ~31;
+ align_buffer_64(row, kRowSize * 2);
+#endif
+
+ for (y = 0; y < height - 1; y += 2) {
+#if ((defined(HAS_RAWTOYJROW_NEON) && defined(HAS_RAWTOUVJROW_NEON)) || \
+ defined(HAS_RAWTOYJROW_MSA) || defined(HAS_RAWTOYJROW_MMI))
+ RAWToUVJRow(src_raw, src_stride_raw, dst_u, dst_v, width);
+ RAWToYJRow(src_raw, dst_y, width);
+ RAWToYJRow(src_raw + src_stride_raw, dst_y + dst_stride_y, width);
+#else
+ RAWToARGBRow(src_raw, row, width);
+ RAWToARGBRow(src_raw + src_stride_raw, row + kRowSize, width);
+ ARGBToUVJRow(row, kRowSize, dst_u, dst_v, width);
+ ARGBToYJRow(row, dst_y, width);
+ ARGBToYJRow(row + kRowSize, dst_y + dst_stride_y, width);
+#endif
+ src_raw += src_stride_raw * 2;
+ dst_y += dst_stride_y * 2;
+ dst_u += dst_stride_u;
+ dst_v += dst_stride_v;
+ }
+ if (height & 1) {
+#if ((defined(HAS_RAWTOYJROW_NEON) && defined(HAS_RAWTOUVJROW_NEON)) || \
+ defined(HAS_RAWTOYJROW_MSA) || defined(HAS_RAWTOYJROW_MMI))
+ RAWToUVJRow(src_raw, 0, dst_u, dst_v, width);
+ RAWToYJRow(src_raw, dst_y, width);
+#else
+ RAWToARGBRow(src_raw, row, width);
+ ARGBToUVJRow(row, 0, dst_u, dst_v, width);
+ ARGBToYJRow(row, dst_y, width);
+#endif
+ }
+#if !((defined(HAS_RAWTOYJROW_NEON) && defined(HAS_RAWTOUVJROW_NEON)) || \
+ defined(HAS_RAWTOYJROW_MSA) || defined(HAS_RAWTOYJROW_MMI))
+ free_aligned_buffer_64(row);
+#endif
+ }
+ return 0;
+}
+
// Convert RGB565 to I420.
LIBYUV_API
int RGB565ToI420(const uint8_t* src_rgb565,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_argb.cc b/third-party/libyuv/third_party/libyuv/source/convert_argb.cc
similarity index 76%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/convert_argb.cc
rename to third-party/libyuv/third_party/libyuv/source/convert_argb.cc
index 5e7225faf2..d8f7b27738 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_argb.cc
+++ b/third-party/libyuv/third_party/libyuv/source/convert_argb.cc
@@ -888,6 +888,63 @@ int U010ToAB30(const uint16_t* src_y,
&kYuv2020Constants, width, height);
}
+// Convert 12 bit YUV to ARGB with matrix.
+// TODO(fbarchard): Consider passing scale multiplier to I212ToARGB to
+// multiply 12 bit yuv into high bits to allow any number of bits.
+LIBYUV_API
+int I012ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*I212ToAR30Row)(const uint16_t* y_buf, const uint16_t* u_buf,
+ const uint16_t* v_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) =
+ I212ToAR30Row_C;
+ if (!src_y || !src_u || !src_v || !dst_ar30 || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30;
+ dst_stride_ar30 = -dst_stride_ar30;
+ }
+#if defined(HAS_I212TOAR30ROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I212ToAR30Row = I212ToAR30Row_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I212ToAR30Row = I212ToAR30Row_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I212TOAR30ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I212ToAR30Row = I212ToAR30Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I212ToAR30Row = I212ToAR30Row_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ I212ToAR30Row(src_y, src_u, src_v, dst_ar30, yuvconstants, width);
+ dst_ar30 += dst_stride_ar30;
+ src_y += src_stride_y;
+ if (y & 1) {
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ }
+ return 0;
+}
+
// Convert 10 bit YUV to ARGB with matrix.
// TODO(fbarchard): Consider passing scale multiplier to I210ToARGB to
// multiply 10 bit yuv into high bits to allow any number of bits.
@@ -1045,6 +1102,58 @@ int U210ToAB30(const uint16_t* src_y,
&kYuv2020Constants, width, height);
}
+LIBYUV_API
+int I410ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*I410ToAR30Row)(const uint16_t* y_buf, const uint16_t* u_buf,
+ const uint16_t* v_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) =
+ I410ToAR30Row_C;
+ if (!src_y || !src_u || !src_v || !dst_ar30 || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30;
+ dst_stride_ar30 = -dst_stride_ar30;
+ }
+#if defined(HAS_I410TOAR30ROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I410ToAR30Row = I410ToAR30Row_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I410ToAR30Row = I410ToAR30Row_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I410TOAR30ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I410ToAR30Row = I410ToAR30Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I410ToAR30Row = I410ToAR30Row_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ I410ToAR30Row(src_y, src_u, src_v, dst_ar30, yuvconstants, width);
+ dst_ar30 += dst_stride_ar30;
+ src_y += src_stride_y;
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ return 0;
+}
+
// Convert 10 bit YUV to ARGB with matrix.
LIBYUV_API
int I010ToARGBMatrix(const uint16_t* src_y,
@@ -1087,14 +1196,6 @@ int I010ToARGBMatrix(const uint16_t* src_y,
I210ToARGBRow = I210ToARGBRow_AVX2;
}
}
-#endif
-#if defined(HAS_I210TOARGBROW_MMI)
- if (TestCpuFlag(kCpuHasMMI)) {
- I210ToARGBRow = I210ToARGBRow_Any_MMI;
- if (IS_ALIGNED(width, 4)) {
- I210ToARGBRow = I210ToARGBRow_MMI;
- }
- }
#endif
for (y = 0; y < height; ++y) {
I210ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
@@ -1216,6 +1317,61 @@ int U010ToABGR(const uint16_t* src_y,
width, height);
}
+// Convert 12 bit YUV to ARGB with matrix.
+LIBYUV_API
+int I012ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*I212ToARGBRow)(const uint16_t* y_buf, const uint16_t* u_buf,
+ const uint16_t* v_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) =
+ I212ToARGBRow_C;
+ if (!src_y || !src_u || !src_v || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_I212TOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I212ToARGBRow = I212ToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I212ToARGBRow = I212ToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I212TOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I212ToARGBRow = I212ToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I212ToARGBRow = I212ToARGBRow_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ I212ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
+ dst_argb += dst_stride_argb;
+ src_y += src_stride_y;
+ if (y & 1) {
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ }
+ return 0;
+}
+
// Convert 10 bit 422 YUV to ARGB with matrix.
LIBYUV_API
int I210ToARGBMatrix(const uint16_t* src_y,
@@ -1258,14 +1414,6 @@ int I210ToARGBMatrix(const uint16_t* src_y,
I210ToARGBRow = I210ToARGBRow_AVX2;
}
}
-#endif
-#if defined(HAS_I210TOARGBROW_MMI)
- if (TestCpuFlag(kCpuHasMMI)) {
- I210ToARGBRow = I210ToARGBRow_Any_MMI;
- if (IS_ALIGNED(width, 4)) {
- I210ToARGBRow = I210ToARGBRow_MMI;
- }
- }
#endif
for (y = 0; y < height; ++y) {
I210ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
@@ -1385,6 +1533,254 @@ int U210ToABGR(const uint16_t* src_y,
width, height);
}
+LIBYUV_API
+int I410ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*I410ToARGBRow)(const uint16_t* y_buf, const uint16_t* u_buf,
+ const uint16_t* v_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) =
+ I410ToARGBRow_C;
+ if (!src_y || !src_u || !src_v || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_I410TOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I410ToARGBRow = I410ToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I410ToARGBRow = I410ToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I410TOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I410ToARGBRow = I410ToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I410ToARGBRow = I410ToARGBRow_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ I410ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
+ dst_argb += dst_stride_argb;
+ src_y += src_stride_y;
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ return 0;
+}
+
+LIBYUV_API
+int P010ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*P210ToARGBRow)(
+ const uint16_t* y_buf, const uint16_t* uv_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) = P210ToARGBRow_C;
+ if (!src_y || !src_uv || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_P210TOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ P210ToARGBRow = P210ToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ P210ToARGBRow = P210ToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_P210TOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ P210ToARGBRow = P210ToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ P210ToARGBRow = P210ToARGBRow_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ P210ToARGBRow(src_y, src_uv, dst_argb, yuvconstants, width);
+ dst_argb += dst_stride_argb;
+ src_y += src_stride_y;
+ if (y & 1) {
+ src_uv += src_stride_uv;
+ }
+ }
+ return 0;
+}
+
+LIBYUV_API
+int P210ToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*P210ToARGBRow)(
+ const uint16_t* y_buf, const uint16_t* uv_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) = P210ToARGBRow_C;
+ if (!src_y || !src_uv || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_P210TOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ P210ToARGBRow = P210ToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ P210ToARGBRow = P210ToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_P210TOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ P210ToARGBRow = P210ToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ P210ToARGBRow = P210ToARGBRow_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ P210ToARGBRow(src_y, src_uv, dst_argb, yuvconstants, width);
+ dst_argb += dst_stride_argb;
+ src_y += src_stride_y;
+ src_uv += src_stride_uv;
+ }
+ return 0;
+}
+
+LIBYUV_API
+int P010ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*P210ToAR30Row)(
+ const uint16_t* y_buf, const uint16_t* uv_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) = P210ToAR30Row_C;
+ if (!src_y || !src_uv || !dst_ar30 || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30;
+ dst_stride_ar30 = -dst_stride_ar30;
+ }
+#if defined(HAS_P210TOAR30ROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ P210ToAR30Row = P210ToAR30Row_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ P210ToAR30Row = P210ToAR30Row_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_P210TOAR30ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ P210ToAR30Row = P210ToAR30Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ P210ToAR30Row = P210ToAR30Row_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ P210ToAR30Row(src_y, src_uv, dst_ar30, yuvconstants, width);
+ dst_ar30 += dst_stride_ar30;
+ src_y += src_stride_y;
+ if (y & 1) {
+ src_uv += src_stride_uv;
+ }
+ }
+ return 0;
+}
+
+LIBYUV_API
+int P210ToAR30Matrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height) {
+ int y;
+ void (*P210ToAR30Row)(
+ const uint16_t* y_buf, const uint16_t* uv_buf, uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants, int width) = P210ToAR30Row_C;
+ if (!src_y || !src_uv || !dst_ar30 || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30;
+ dst_stride_ar30 = -dst_stride_ar30;
+ }
+#if defined(HAS_P210TOAR30ROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ P210ToAR30Row = P210ToAR30Row_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ P210ToAR30Row = P210ToAR30Row_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_P210TOAR30ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ P210ToAR30Row = P210ToAR30Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ P210ToAR30Row = P210ToAR30Row_AVX2;
+ }
+ }
+#endif
+ for (y = 0; y < height; ++y) {
+ P210ToAR30Row(src_y, src_uv, dst_ar30, yuvconstants, width);
+ dst_ar30 += dst_stride_ar30;
+ src_y += src_stride_y;
+ src_uv += src_stride_uv;
+ }
+ return 0;
+}
+
// Convert I420 with Alpha to preattenuated ARGB with matrix.
LIBYUV_API
int I420AlphaToARGBMatrix(const uint8_t* src_y,
@@ -1516,6 +1912,264 @@ int I420AlphaToARGBMatrix(const uint8_t* src_y,
return 0;
}
+// Convert I422 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I422AlphaToARGBMatrix(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate) {
+ int y;
+ void (*I422AlphaToARGBRow)(const uint8_t* y_buf, const uint8_t* u_buf,
+ const uint8_t* v_buf, const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) = I422AlphaToARGBRow_C;
+ void (*ARGBAttenuateRow)(const uint8_t* src_argb, uint8_t* dst_argb,
+ int width) = ARGBAttenuateRow_C;
+ if (!src_y || !src_u || !src_v || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_I422ALPHATOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I422ALPHATOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_I422ALPHATOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_I422ALPHATOARGBROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_Any_MMI;
+ if (IS_ALIGNED(width, 4)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_MMI;
+ }
+ }
+#endif
+#if defined(HAS_I422ALPHATOARGBROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ I422AlphaToARGBRow = I422AlphaToARGBRow_MSA;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MMI;
+ if (IS_ALIGNED(width, 2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MMI;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MSA;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ I422AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants,
+ width);
+ if (attenuate) {
+ ARGBAttenuateRow(dst_argb, dst_argb, width);
+ }
+ dst_argb += dst_stride_argb;
+ src_a += src_stride_a;
+ src_y += src_stride_y;
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ return 0;
+}
+
+// Convert I444 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I444AlphaToARGBMatrix(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate) {
+ int y;
+ void (*I444AlphaToARGBRow)(const uint8_t* y_buf, const uint8_t* u_buf,
+ const uint8_t* v_buf, const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) = I444AlphaToARGBRow_C;
+ void (*ARGBAttenuateRow)(const uint8_t* src_argb, uint8_t* dst_argb,
+ int width) = ARGBAttenuateRow_C;
+ if (!src_y || !src_u || !src_v || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_I444ALPHATOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I444ALPHATOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_I444ALPHATOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_I444ALPHATOARGBROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MMI;
+ if (IS_ALIGNED(width, 4)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_MMI;
+ }
+ }
+#endif
+#if defined(HAS_I444ALPHATOARGBROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ I444AlphaToARGBRow = I444AlphaToARGBRow_MSA;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MMI;
+ if (IS_ALIGNED(width, 2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MMI;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MSA;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ I444AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants,
+ width);
+ if (attenuate) {
+ ARGBAttenuateRow(dst_argb, dst_argb, width);
+ }
+ dst_argb += dst_stride_argb;
+ src_a += src_stride_a;
+ src_y += src_stride_y;
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ return 0;
+}
+
// Convert I420 with Alpha to ARGB.
LIBYUV_API
int I420AlphaToARGB(const uint8_t* src_y,
@@ -1559,6 +2213,409 @@ int I420AlphaToABGR(const uint8_t* src_y,
width, height, attenuate);
}
+// Convert I422 with Alpha to ARGB.
+LIBYUV_API
+int I422AlphaToARGB(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int attenuate) {
+ return I422AlphaToARGBMatrix(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, src_a, src_stride_a, dst_argb,
+ dst_stride_argb, &kYuvI601Constants, width,
+ height, attenuate);
+}
+
+// Convert I422 with Alpha to ABGR.
+LIBYUV_API
+int I422AlphaToABGR(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_abgr,
+ int dst_stride_abgr,
+ int width,
+ int height,
+ int attenuate) {
+ return I422AlphaToARGBMatrix(
+ src_y, src_stride_y, src_v, src_stride_v, // Swap U and V
+ src_u, src_stride_u, src_a, src_stride_a, dst_abgr, dst_stride_abgr,
+ &kYvuI601Constants, // Use Yvu matrix
+ width, height, attenuate);
+}
+
+// Convert I444 with Alpha to ARGB.
+LIBYUV_API
+int I444AlphaToARGB(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int attenuate) {
+ return I444AlphaToARGBMatrix(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, src_a, src_stride_a, dst_argb,
+ dst_stride_argb, &kYuvI601Constants, width,
+ height, attenuate);
+}
+
+// Convert I444 with Alpha to ABGR.
+LIBYUV_API
+int I444AlphaToABGR(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_abgr,
+ int dst_stride_abgr,
+ int width,
+ int height,
+ int attenuate) {
+ return I444AlphaToARGBMatrix(
+ src_y, src_stride_y, src_v, src_stride_v, // Swap U and V
+ src_u, src_stride_u, src_a, src_stride_a, dst_abgr, dst_stride_abgr,
+ &kYvuI601Constants, // Use Yvu matrix
+ width, height, attenuate);
+}
+
+// Convert I010 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I010AlphaToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate) {
+ int y;
+ void (*I210AlphaToARGBRow)(const uint16_t* y_buf, const uint16_t* u_buf,
+ const uint16_t* v_buf, const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) = I210AlphaToARGBRow_C;
+ void (*ARGBAttenuateRow)(const uint8_t* src_argb, uint8_t* dst_argb,
+ int width) = ARGBAttenuateRow_C;
+ if (!src_y || !src_u || !src_v || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_I210ALPHATOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I210ALPHATOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MMI;
+ if (IS_ALIGNED(width, 2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MMI;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MSA;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ I210AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants,
+ width);
+ if (attenuate) {
+ ARGBAttenuateRow(dst_argb, dst_argb, width);
+ }
+ dst_argb += dst_stride_argb;
+ src_a += src_stride_a;
+ src_y += src_stride_y;
+ if (y & 1) {
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ }
+ return 0;
+}
+
+// Convert I210 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I210AlphaToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate) {
+ int y;
+ void (*I210AlphaToARGBRow)(const uint16_t* y_buf, const uint16_t* u_buf,
+ const uint16_t* v_buf, const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) = I210AlphaToARGBRow_C;
+ void (*ARGBAttenuateRow)(const uint8_t* src_argb, uint8_t* dst_argb,
+ int width) = ARGBAttenuateRow_C;
+ if (!src_y || !src_u || !src_v || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_I210ALPHATOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I210ALPHATOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I210AlphaToARGBRow = I210AlphaToARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MMI;
+ if (IS_ALIGNED(width, 2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MMI;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MSA;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ I210AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants,
+ width);
+ if (attenuate) {
+ ARGBAttenuateRow(dst_argb, dst_argb, width);
+ }
+ dst_argb += dst_stride_argb;
+ src_a += src_stride_a;
+ src_y += src_stride_y;
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ return 0;
+}
+
+// Convert I410 with Alpha to preattenuated ARGB with matrix.
+LIBYUV_API
+int I410AlphaToARGBMatrix(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ const struct YuvConstants* yuvconstants,
+ int width,
+ int height,
+ int attenuate) {
+ int y;
+ void (*I410AlphaToARGBRow)(const uint16_t* y_buf, const uint16_t* u_buf,
+ const uint16_t* v_buf, const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) = I410AlphaToARGBRow_C;
+ void (*ARGBAttenuateRow)(const uint8_t* src_argb, uint8_t* dst_argb,
+ int width) = ARGBAttenuateRow_C;
+ if (!src_y || !src_u || !src_v || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+#if defined(HAS_I410ALPHATOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ I410AlphaToARGBRow = I410AlphaToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ I410AlphaToARGBRow = I410AlphaToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_I410ALPHATOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ I410AlphaToARGBRow = I410AlphaToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ I410AlphaToARGBRow = I410AlphaToARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MMI;
+ if (IS_ALIGNED(width, 2)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MMI;
+ }
+ }
+#endif
+#if defined(HAS_ARGBATTENUATEROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAttenuateRow = ARGBAttenuateRow_MSA;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ I410AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants,
+ width);
+ if (attenuate) {
+ ARGBAttenuateRow(dst_argb, dst_argb, width);
+ }
+ dst_argb += dst_stride_argb;
+ src_a += src_stride_a;
+ src_y += src_stride_y;
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ }
+ return 0;
+}
+
// Convert I400 to ARGB with matrix.
LIBYUV_API
int I400ToARGBMatrix(const uint8_t* src_y,
@@ -1734,6 +2791,10 @@ static const uvec8 kShuffleMaskABGRToARGB = {
static const uvec8 kShuffleMaskRGBAToARGB = {
1u, 2u, 3u, 0u, 5u, 6u, 7u, 4u, 9u, 10u, 11u, 8u, 13u, 14u, 15u, 12u};
+// Shuffle table for converting AR64 to AB64.
+static const uvec8 kShuffleMaskAR64ToAB64 = {
+ 4u, 5u, 2u, 3u, 0u, 1u, 6u, 7u, 12u, 13u, 10u, 11u, 8u, 9u, 14u, 15u};
+
// Convert BGRA to ARGB.
LIBYUV_API
int BGRAToARGB(const uint8_t* src_bgra,
@@ -1743,7 +2804,7 @@ int BGRAToARGB(const uint8_t* src_bgra,
int width,
int height) {
return ARGBShuffle(src_bgra, src_stride_bgra, dst_argb, dst_stride_argb,
- (const uint8_t*)(&kShuffleMaskBGRAToARGB), width, height);
+ (const uint8_t*)&kShuffleMaskBGRAToARGB, width, height);
}
// Convert ARGB to BGRA (same as BGRAToARGB).
@@ -1755,7 +2816,7 @@ int ARGBToBGRA(const uint8_t* src_bgra,
int width,
int height) {
return ARGBShuffle(src_bgra, src_stride_bgra, dst_argb, dst_stride_argb,
- (const uint8_t*)(&kShuffleMaskBGRAToARGB), width, height);
+ (const uint8_t*)&kShuffleMaskBGRAToARGB, width, height);
}
// Convert ABGR to ARGB.
@@ -1767,7 +2828,7 @@ int ABGRToARGB(const uint8_t* src_abgr,
int width,
int height) {
return ARGBShuffle(src_abgr, src_stride_abgr, dst_argb, dst_stride_argb,
- (const uint8_t*)(&kShuffleMaskABGRToARGB), width, height);
+ (const uint8_t*)&kShuffleMaskABGRToARGB, width, height);
}
// Convert ARGB to ABGR to (same as ABGRToARGB).
@@ -1779,7 +2840,7 @@ int ARGBToABGR(const uint8_t* src_abgr,
int width,
int height) {
return ARGBShuffle(src_abgr, src_stride_abgr, dst_argb, dst_stride_argb,
- (const uint8_t*)(&kShuffleMaskABGRToARGB), width, height);
+ (const uint8_t*)&kShuffleMaskABGRToARGB, width, height);
}
// Convert RGBA to ARGB.
@@ -1791,7 +2852,19 @@ int RGBAToARGB(const uint8_t* src_rgba,
int width,
int height) {
return ARGBShuffle(src_rgba, src_stride_rgba, dst_argb, dst_stride_argb,
- (const uint8_t*)(&kShuffleMaskRGBAToARGB), width, height);
+ (const uint8_t*)&kShuffleMaskRGBAToARGB, width, height);
+}
+
+// Convert AR64 To AB64.
+LIBYUV_API
+int AR64ToAB64(const uint16_t* src_ar64,
+ int src_stride_ar64,
+ uint16_t* dst_ab64,
+ int dst_stride_ab64,
+ int width,
+ int height) {
+ return AR64Shuffle(src_ar64, src_stride_ar64, dst_ab64, dst_stride_ab64,
+ (const uint8_t*)&kShuffleMaskAR64ToAB64, width, height);
}
// Convert RGB24 to ARGB.
@@ -2300,6 +3373,124 @@ int AR30ToAB30(const uint8_t* src_ar30,
return 0;
}
+// Convert AR64 to ARGB.
+LIBYUV_API
+int AR64ToARGB(const uint16_t* src_ar64,
+ int src_stride_ar64,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height) {
+ int y;
+ void (*AR64ToARGBRow)(const uint16_t* src_ar64, uint8_t* dst_argb,
+ int width) = AR64ToARGBRow_C;
+ if (!src_ar64 || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ src_ar64 = src_ar64 + (height - 1) * src_stride_ar64;
+ src_stride_ar64 = -src_stride_ar64;
+ }
+ // Coalesce rows.
+ if (src_stride_ar64 == width * 4 && dst_stride_argb == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_ar64 = dst_stride_argb = 0;
+ }
+#if defined(HAS_AR64TOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ AR64ToARGBRow = AR64ToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ AR64ToARGBRow = AR64ToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_AR64TOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ AR64ToARGBRow = AR64ToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ AR64ToARGBRow = AR64ToARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_AR64TOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ AR64ToARGBRow = AR64ToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ AR64ToARGBRow = AR64ToARGBRow_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ AR64ToARGBRow(src_ar64, dst_argb, width);
+ src_ar64 += src_stride_ar64;
+ dst_argb += dst_stride_argb;
+ }
+ return 0;
+}
+
+// Convert AB64 to ARGB.
+LIBYUV_API
+int AB64ToARGB(const uint16_t* src_ab64,
+ int src_stride_ab64,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height) {
+ int y;
+ void (*AB64ToARGBRow)(const uint16_t* src_ar64, uint8_t* dst_argb,
+ int width) = AB64ToARGBRow_C;
+ if (!src_ab64 || !dst_argb || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ src_ab64 = src_ab64 + (height - 1) * src_stride_ab64;
+ src_stride_ab64 = -src_stride_ab64;
+ }
+ // Coalesce rows.
+ if (src_stride_ab64 == width * 4 && dst_stride_argb == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_ab64 = dst_stride_argb = 0;
+ }
+#if defined(HAS_AB64TOARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ AB64ToARGBRow = AB64ToARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ AB64ToARGBRow = AB64ToARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_AB64TOARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ AB64ToARGBRow = AB64ToARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ AB64ToARGBRow = AB64ToARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_AB64TOARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ AB64ToARGBRow = AB64ToARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ AB64ToARGBRow = AB64ToARGBRow_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ AB64ToARGBRow(src_ab64, dst_argb, width);
+ src_ab64 += src_stride_ab64;
+ dst_argb += dst_stride_argb;
+ }
+ return 0;
+}
+
// Convert NV12 to ARGB with matrix.
LIBYUV_API
int NV12ToARGBMatrix(const uint8_t* src_y,
@@ -4119,6 +5310,40 @@ int H420ToAR30(const uint8_t* src_y,
&kYvuH709Constants, width, height);
}
+// Convert I420 to AB30.
+LIBYUV_API
+int I420ToAB30(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ab30,
+ int dst_stride_ab30,
+ int width,
+ int height) {
+ return I420ToAR30Matrix(src_y, src_stride_y, src_v, src_stride_v, src_u,
+ src_stride_u, dst_ab30, dst_stride_ab30,
+ &kYvuI601Constants, width, height);
+}
+
+// Convert H420 to AB30.
+LIBYUV_API
+int H420ToAB30(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_ab30,
+ int dst_stride_ab30,
+ int width,
+ int height) {
+ return I420ToAR30Matrix(src_y, src_stride_y, src_v, src_stride_v, src_u,
+ src_stride_u, dst_ab30, dst_stride_ab30,
+ &kYvuH709Constants, width, height);
+}
+
#ifdef __cplusplus
} // extern "C"
} // namespace libyuv
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_from.cc b/third-party/libyuv/third_party/libyuv/source/convert_from.cc
similarity index 83%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/convert_from.cc
rename to third-party/libyuv/third_party/libyuv/source/convert_from.cc
index f2cfc1d8f5..687f0a72c2 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_from.cc
+++ b/third-party/libyuv/third_party/libyuv/source/convert_from.cc
@@ -30,6 +30,8 @@ static __inline int Abs(int v) {
}
// I420 To any I4xx YUV format with mirroring.
+// TODO(fbarchard): Consider kFilterNone for Y, or CopyPlane
+
static int I420ToI4xx(const uint8_t* src_y,
int src_stride_y,
const uint8_t* src_u,
@@ -109,6 +111,50 @@ int I420ToI010(const uint8_t* src_y,
return 0;
}
+// Convert 8 bit YUV to 12 bit.
+LIBYUV_API
+int I420ToI012(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ int halfwidth = (width + 1) >> 1;
+ int halfheight = (height + 1) >> 1;
+ if (!src_u || !src_v || !dst_u || !dst_v || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ halfheight = (height + 1) >> 1;
+ src_y = src_y + (height - 1) * src_stride_y;
+ src_u = src_u + (halfheight - 1) * src_stride_u;
+ src_v = src_v + (halfheight - 1) * src_stride_v;
+ src_stride_y = -src_stride_y;
+ src_stride_u = -src_stride_u;
+ src_stride_v = -src_stride_v;
+ }
+
+ // Convert Y plane.
+ Convert8To16Plane(src_y, src_stride_y, dst_y, dst_stride_y, 4096, width,
+ height);
+ // Convert UV planes.
+ Convert8To16Plane(src_u, src_stride_u, dst_u, dst_stride_u, 4096, halfwidth,
+ halfheight);
+ Convert8To16Plane(src_v, src_stride_v, dst_v, dst_stride_v, 4096, halfwidth,
+ halfheight);
+ return 0;
+}
+
// 420 chroma is 1/2 width, 1/2 height
// 422 chroma is 1/2 width, 1x height
LIBYUV_API
@@ -159,6 +205,102 @@ int I420ToI444(const uint8_t* src_y,
dst_uv_height);
}
+// 420 chroma to 444 chroma, 10/12 bit version
+LIBYUV_API
+int I010ToI410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ if (width == 0 || height == 0) {
+ return -1;
+ }
+
+ if (dst_y) {
+ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ Abs(width), Abs(height), kFilterBilinear);
+ }
+ ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1),
+ SUBSAMPLE(height, 1, 1), dst_u, dst_stride_u, Abs(width),
+ Abs(height), kFilterBilinear);
+ ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1),
+ SUBSAMPLE(height, 1, 1), dst_v, dst_stride_v, Abs(width),
+ Abs(height), kFilterBilinear);
+ return 0;
+}
+
+// 422 chroma to 444 chroma, 10/12 bit version
+LIBYUV_API
+int I210ToI410(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ if (width == 0 || height == 0) {
+ return -1;
+ }
+
+ if (dst_y) {
+ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ Abs(width), Abs(height), kFilterBilinear);
+ }
+ ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u,
+ dst_stride_u, Abs(width), Abs(height), kFilterBilinear);
+ ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v,
+ dst_stride_v, Abs(width), Abs(height), kFilterBilinear);
+ return 0;
+}
+
+// 422 chroma is 1/2 width, 1x height
+// 444 chroma is 1x width, 1x height
+LIBYUV_API
+int I422ToI444(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_u,
+ int dst_stride_u,
+ uint8_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height) {
+ if (width == 0 || height == 0) {
+ return -1;
+ }
+
+ if (dst_y) {
+ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y,
+ Abs(width), Abs(height), kFilterBilinear);
+ }
+ ScalePlane(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u,
+ dst_stride_u, Abs(width), Abs(height), kFilterBilinear);
+ ScalePlane(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v,
+ dst_stride_v, Abs(width), Abs(height), kFilterBilinear);
+ return 0;
+}
+
// Copy to I400. Source can be I420,422,444,400,NV12,NV21
LIBYUV_API
int I400Copy(const uint8_t* src_y,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_from_argb.cc b/third-party/libyuv/third_party/libyuv/source/convert_from_argb.cc
similarity index 95%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/convert_from_argb.cc
rename to third-party/libyuv/third_party/libyuv/source/convert_from_argb.cc
index 4ba4bb5e0f..e14615847d 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_from_argb.cc
+++ b/third-party/libyuv/third_party/libyuv/source/convert_from_argb.cc
@@ -2009,6 +2009,124 @@ int ARGBToJ422(const uint8_t* src_argb,
return 0;
}
+// Convert ARGB to AR64.
+LIBYUV_API
+int ARGBToAR64(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ int width,
+ int height) {
+ int y;
+ void (*ARGBToAR64Row)(const uint8_t* src_argb, uint16_t* dst_ar64,
+ int width) = ARGBToAR64Row_C;
+ if (!src_argb || !dst_ar64 || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ src_argb = src_argb + (height - 1) * src_stride_argb;
+ src_stride_argb = -src_stride_argb;
+ }
+ // Coalesce rows.
+ if (src_stride_argb == width * 4 && dst_stride_ar64 == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_argb = dst_stride_ar64 = 0;
+ }
+#if defined(HAS_ARGBTOAR64ROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBToAR64Row = ARGBToAR64Row_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBToAR64Row = ARGBToAR64Row_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOAR64ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBToAR64Row = ARGBToAR64Row_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToAR64Row = ARGBToAR64Row_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOAR64ROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBToAR64Row = ARGBToAR64Row_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToAR64Row = ARGBToAR64Row_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ ARGBToAR64Row(src_argb, dst_ar64, width);
+ src_argb += src_stride_argb;
+ dst_ar64 += dst_stride_ar64;
+ }
+ return 0;
+}
+
+// Convert ARGB to AB64.
+LIBYUV_API
+int ARGBToAB64(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint16_t* dst_ab64,
+ int dst_stride_ab64,
+ int width,
+ int height) {
+ int y;
+ void (*ARGBToAB64Row)(const uint8_t* src_argb, uint16_t* dst_ar64,
+ int width) = ARGBToAB64Row_C;
+ if (!src_argb || !dst_ab64 || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ src_argb = src_argb + (height - 1) * src_stride_argb;
+ src_stride_argb = -src_stride_argb;
+ }
+ // Coalesce rows.
+ if (src_stride_argb == width * 4 && dst_stride_ab64 == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_argb = dst_stride_ab64 = 0;
+ }
+#if defined(HAS_ARGBTOAB64ROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ARGBToAB64Row = ARGBToAB64Row_Any_SSSE3;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBToAB64Row = ARGBToAB64Row_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOAB64ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ARGBToAB64Row = ARGBToAB64Row_Any_AVX2;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToAB64Row = ARGBToAB64Row_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBTOAB64ROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ARGBToAB64Row = ARGBToAB64Row_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBToAB64Row = ARGBToAB64Row_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ ARGBToAB64Row(src_argb, dst_ab64, width);
+ src_argb += src_stride_argb;
+ dst_ab64 += dst_stride_ab64;
+ }
+ return 0;
+}
+
// Convert ARGB to J400.
LIBYUV_API
int ARGBToJ400(const uint8_t* src_argb,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_jpeg.cc b/third-party/libyuv/third_party/libyuv/source/convert_jpeg.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/convert_jpeg.cc
rename to third-party/libyuv/third_party/libyuv/source/convert_jpeg.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_to_argb.cc b/third-party/libyuv/third_party/libyuv/source/convert_to_argb.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/convert_to_argb.cc
rename to third-party/libyuv/third_party/libyuv/source/convert_to_argb.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_to_i420.cc b/third-party/libyuv/third_party/libyuv/source/convert_to_i420.cc
similarity index 93%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/convert_to_i420.cc
rename to third-party/libyuv/third_party/libyuv/source/convert_to_i420.cc
index ac6eeab24e..5869ecd7b9 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/convert_to_i420.cc
+++ b/third-party/libyuv/third_party/libyuv/source/convert_to_i420.cc
@@ -89,18 +89,26 @@ int ConvertToI420(const uint8_t* sample,
switch (format) {
// Single plane formats
- case FOURCC_YUY2:
+ case FOURCC_YUY2: { // TODO(fbarchard): Find better odd crop fix.
+ uint8_t* u = (crop_x & 1) ? dst_v : dst_u;
+ uint8_t* v = (crop_x & 1) ? dst_u : dst_v;
+ int stride_u = (crop_x & 1) ? dst_stride_v : dst_stride_u;
+ int stride_v = (crop_x & 1) ? dst_stride_u : dst_stride_v;
src = sample + (aligned_src_width * crop_y + crop_x) * 2;
- r = YUY2ToI420(src, aligned_src_width * 2, dst_y, dst_stride_y, dst_u,
- dst_stride_u, dst_v, dst_stride_v, crop_width,
- inv_crop_height);
+ r = YUY2ToI420(src, aligned_src_width * 2, dst_y, dst_stride_y, u,
+ stride_u, v, stride_v, crop_width, inv_crop_height);
break;
- case FOURCC_UYVY:
+ }
+ case FOURCC_UYVY: {
+ uint8_t* u = (crop_x & 1) ? dst_v : dst_u;
+ uint8_t* v = (crop_x & 1) ? dst_u : dst_v;
+ int stride_u = (crop_x & 1) ? dst_stride_v : dst_stride_u;
+ int stride_v = (crop_x & 1) ? dst_stride_u : dst_stride_v;
src = sample + (aligned_src_width * crop_y + crop_x) * 2;
- r = UYVYToI420(src, aligned_src_width * 2, dst_y, dst_stride_y, dst_u,
- dst_stride_u, dst_v, dst_stride_v, crop_width,
- inv_crop_height);
+ r = UYVYToI420(src, aligned_src_width * 2, dst_y, dst_stride_y, u,
+ stride_u, v, stride_v, crop_width, inv_crop_height);
break;
+ }
case FOURCC_RGBP:
src = sample + (src_width * crop_y + crop_x) * 2;
r = RGB565ToI420(src, src_width * 2, dst_y, dst_stride_y, dst_u,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/cpu_id.cc b/third-party/libyuv/third_party/libyuv/source/cpu_id.cc
similarity index 99%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/cpu_id.cc
rename to third-party/libyuv/third_party/libyuv/source/cpu_id.cc
index fe89452b77..588168d65a 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/cpu_id.cc
+++ b/third-party/libyuv/third_party/libyuv/source/cpu_id.cc
@@ -133,7 +133,7 @@ int GetXCR0() {
#pragma optimize("g", on)
#endif
-// based on libvpx arm_cpudetect.c
+// Based on libvpx arm_cpudetect.c
// For Arm, but public to allow testing on any CPU
LIBYUV_API SAFEBUFFERS int ArmCpuCaps(const char* cpuinfo_name) {
char cpuinfo_line[512];
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/mjpeg_decoder.cc b/third-party/libyuv/third_party/libyuv/source/mjpeg_decoder.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/mjpeg_decoder.cc
rename to third-party/libyuv/third_party/libyuv/source/mjpeg_decoder.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/mjpeg_validate.cc b/third-party/libyuv/third_party/libyuv/source/mjpeg_validate.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/mjpeg_validate.cc
rename to third-party/libyuv/third_party/libyuv/source/mjpeg_validate.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/planar_functions.cc b/third-party/libyuv/third_party/libyuv/source/planar_functions.cc
similarity index 79%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/planar_functions.cc
rename to third-party/libyuv/third_party/libyuv/source/planar_functions.cc
index 4e8908c2eb..7cea06c8d7 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/planar_functions.cc
+++ b/third-party/libyuv/third_party/libyuv/source/planar_functions.cc
@@ -10,6 +10,7 @@
#include "libyuv/planar_functions.h"
+#include
#include // for memset()
#include "libyuv/cpu_id.h"
@@ -350,9 +351,16 @@ int I420ToI400(const uint8_t* src_y,
}
// Copy NV12. Supports inverting.
-int NV12Copy(const uint8_t* src_y, int src_stride_y, const uint8_t* src_uv,
- int src_stride_uv, uint8_t* dst_y, int dst_stride_y,
- uint8_t* dst_uv, int dst_stride_uv, int width, int height) {
+int NV12Copy(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_uv,
+ int src_stride_uv,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height) {
if (!src_y || !dst_y || !src_uv || !dst_uv || width <= 0 || height == 0) {
return -1;
}
@@ -375,9 +383,16 @@ int NV12Copy(const uint8_t* src_y, int src_stride_y, const uint8_t* src_uv,
}
// Copy NV21. Supports inverting.
-int NV21Copy(const uint8_t* src_y, int src_stride_y, const uint8_t* src_vu,
- int src_stride_vu, uint8_t* dst_y, int dst_stride_y,
- uint8_t* dst_vu, int dst_stride_vu, int width, int height) {
+int NV21Copy(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_vu,
+ int src_stride_vu,
+ uint8_t* dst_y,
+ int dst_stride_y,
+ uint8_t* dst_vu,
+ int dst_stride_vu,
+ int width,
+ int height) {
return NV12Copy(src_y, src_stride_y, src_vu, src_stride_vu, dst_y,
dst_stride_y, dst_vu, dst_stride_vu, width, height);
}
@@ -536,6 +551,218 @@ void MergeUVPlane(const uint8_t* src_u,
}
}
+// Support function for P010 etc UV channels.
+// Width and height are plane sizes (typically half pixel width).
+LIBYUV_API
+void SplitUVPlane_16(const uint16_t* src_uv,
+ int src_stride_uv,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ void (*SplitUVRow_16)(const uint16_t* src_uv, uint16_t* dst_u,
+ uint16_t* dst_v, int depth, int width) =
+ SplitUVRow_16_C;
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_u = dst_u + (height - 1) * dst_stride_u;
+ dst_v = dst_v + (height - 1) * dst_stride_v;
+ dst_stride_u = -dst_stride_u;
+ dst_stride_v = -dst_stride_v;
+ }
+ // Coalesce rows.
+ if (src_stride_uv == width * 2 && dst_stride_u == width &&
+ dst_stride_v == width) {
+ width *= height;
+ height = 1;
+ src_stride_uv = dst_stride_u = dst_stride_v = 0;
+ }
+#if defined(HAS_SPLITUVROW_16_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ SplitUVRow_16 = SplitUVRow_16_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ SplitUVRow_16 = SplitUVRow_16_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_SPLITUVROW_16_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ SplitUVRow_16 = SplitUVRow_16_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ SplitUVRow_16 = SplitUVRow_16_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ // Copy a row of UV.
+ SplitUVRow_16(src_uv, dst_u, dst_v, depth, width);
+ dst_u += dst_stride_u;
+ dst_v += dst_stride_v;
+ src_uv += src_stride_uv;
+ }
+}
+
+LIBYUV_API
+void MergeUVPlane_16(const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ void (*MergeUVRow_16)(const uint16_t* src_u, const uint16_t* src_v,
+ uint16_t* dst_uv, int depth, int width) =
+ MergeUVRow_16_C;
+ assert(depth >= 8);
+ assert(depth <= 16);
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_uv = dst_uv + (height - 1) * dst_stride_uv;
+ dst_stride_uv = -dst_stride_uv;
+ }
+ // Coalesce rows.
+ if (src_stride_u == width && src_stride_v == width &&
+ dst_stride_uv == width * 2) {
+ width *= height;
+ height = 1;
+ src_stride_u = src_stride_v = dst_stride_uv = 0;
+ }
+#if defined(HAS_MERGEUVROW_16_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeUVRow_16 = MergeUVRow_16_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeUVRow_16 = MergeUVRow_16_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEUVROW_16_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MergeUVRow_16 = MergeUVRow_16_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ MergeUVRow_16 = MergeUVRow_16_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ // Merge a row of U and V into a row of UV.
+ MergeUVRow_16(src_u, src_v, dst_uv, depth, width);
+ src_u += src_stride_u;
+ src_v += src_stride_v;
+ dst_uv += dst_stride_uv;
+ }
+}
+
+// Convert plane from lsb to msb
+LIBYUV_API
+void ConvertToMSBPlane_16(const uint16_t* src_y,
+ int src_stride_y,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ int scale = 1 << (16 - depth);
+ void (*MultiplyRow_16)(const uint16_t* src_y, uint16_t* dst_y, int scale,
+ int width) = MultiplyRow_16_C;
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_y = dst_y + (height - 1) * dst_stride_y;
+ dst_stride_y = -dst_stride_y;
+ }
+ // Coalesce rows.
+ if (src_stride_y == width && dst_stride_y == width) {
+ width *= height;
+ height = 1;
+ src_stride_y = dst_stride_y = 0;
+ }
+
+#if defined(HAS_MULTIPLYROW_16_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MultiplyRow_16 = MultiplyRow_16_Any_AVX2;
+ if (IS_ALIGNED(width, 32)) {
+ MultiplyRow_16 = MultiplyRow_16_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MULTIPLYROW_16_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MultiplyRow_16 = MultiplyRow_16_Any_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ MultiplyRow_16 = MultiplyRow_16_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MultiplyRow_16(src_y, dst_y, scale, width);
+ src_y += src_stride_y;
+ dst_y += dst_stride_y;
+ }
+}
+
+// Convert plane from msb to lsb
+LIBYUV_API
+void ConvertToLSBPlane_16(const uint16_t* src_y,
+ int src_stride_y,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ int scale = 1 << depth;
+ void (*DivideRow)(const uint16_t* src_y, uint16_t* dst_y, int scale,
+ int width) = DivideRow_16_C;
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_y = dst_y + (height - 1) * dst_stride_y;
+ dst_stride_y = -dst_stride_y;
+ }
+ // Coalesce rows.
+ if (src_stride_y == width && dst_stride_y == width) {
+ width *= height;
+ height = 1;
+ src_stride_y = dst_stride_y = 0;
+ }
+
+#if defined(HAS_DIVIDEROW_16_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ DivideRow = DivideRow_16_Any_AVX2;
+ if (IS_ALIGNED(width, 32)) {
+ DivideRow = DivideRow_16_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_DIVIDEROW_16_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ DivideRow = DivideRow_16_Any_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ DivideRow = DivideRow_16_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ DivideRow(src_y, dst_y, scale, width);
+ src_y += src_stride_y;
+ dst_y += dst_stride_y;
+ }
+}
+
// Swap U and V channels in interleaved UV plane.
LIBYUV_API
void SwapUVPlane(const uint8_t* src_uv,
@@ -758,6 +985,665 @@ void MergeRGBPlane(const uint8_t* src_r,
}
}
+LIBYUV_NOINLINE
+void SplitARGBPlaneAlpha(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint8_t* dst_r,
+ int dst_stride_r,
+ uint8_t* dst_g,
+ int dst_stride_g,
+ uint8_t* dst_b,
+ int dst_stride_b,
+ uint8_t* dst_a,
+ int dst_stride_a,
+ int width,
+ int height) {
+ int y;
+ void (*SplitARGBRow)(const uint8_t* src_rgb, uint8_t* dst_r, uint8_t* dst_g,
+ uint8_t* dst_b, uint8_t* dst_a, int width) =
+ SplitARGBRow_C;
+
+ assert(height > 0);
+
+ if (src_stride_argb == width * 4 && dst_stride_r == width &&
+ dst_stride_g == width && dst_stride_b == width && dst_stride_a == width) {
+ width *= height;
+ height = 1;
+ src_stride_argb = dst_stride_r = dst_stride_g = dst_stride_b =
+ dst_stride_a = 0;
+ }
+
+#if defined(HAS_SPLITARGBROW_SSE2)
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ SplitARGBRow = SplitARGBRow_Any_SSE2;
+ if (IS_ALIGNED(width, 8)) {
+ SplitARGBRow = SplitARGBRow_SSE2;
+ }
+ }
+#endif
+#if defined(HAS_SPLITARGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ SplitARGBRow = SplitARGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ SplitARGBRow = SplitARGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_SPLITARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ SplitARGBRow = SplitARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ SplitARGBRow = SplitARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_SPLITARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ SplitARGBRow = SplitARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ SplitARGBRow = SplitARGBRow_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ SplitARGBRow(src_argb, dst_r, dst_g, dst_b, dst_a, width);
+ dst_r += dst_stride_r;
+ dst_g += dst_stride_g;
+ dst_b += dst_stride_b;
+ dst_a += dst_stride_a;
+ src_argb += src_stride_argb;
+ }
+}
+
+LIBYUV_NOINLINE
+void SplitARGBPlaneOpaque(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint8_t* dst_r,
+ int dst_stride_r,
+ uint8_t* dst_g,
+ int dst_stride_g,
+ uint8_t* dst_b,
+ int dst_stride_b,
+ int width,
+ int height) {
+ int y;
+ void (*SplitXRGBRow)(const uint8_t* src_rgb, uint8_t* dst_r, uint8_t* dst_g,
+ uint8_t* dst_b, int width) = SplitXRGBRow_C;
+ assert(height > 0);
+
+ if (src_stride_argb == width * 4 && dst_stride_r == width &&
+ dst_stride_g == width && dst_stride_b == width) {
+ width *= height;
+ height = 1;
+ src_stride_argb = dst_stride_r = dst_stride_g = dst_stride_b = 0;
+ }
+
+#if defined(HAS_SPLITXRGBROW_SSE2)
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ SplitXRGBRow = SplitXRGBRow_Any_SSE2;
+ if (IS_ALIGNED(width, 8)) {
+ SplitXRGBRow = SplitXRGBRow_SSE2;
+ }
+ }
+#endif
+#if defined(HAS_SPLITXRGBROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ SplitXRGBRow = SplitXRGBRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ SplitXRGBRow = SplitXRGBRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_SPLITXRGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ SplitXRGBRow = SplitXRGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ SplitXRGBRow = SplitXRGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_SPLITXRGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ SplitXRGBRow = SplitXRGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ SplitXRGBRow = SplitXRGBRow_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ SplitXRGBRow(src_argb, dst_r, dst_g, dst_b, width);
+ dst_r += dst_stride_r;
+ dst_g += dst_stride_g;
+ dst_b += dst_stride_b;
+ src_argb += src_stride_argb;
+ }
+}
+
+LIBYUV_API
+void SplitARGBPlane(const uint8_t* src_argb,
+ int src_stride_argb,
+ uint8_t* dst_r,
+ int dst_stride_r,
+ uint8_t* dst_g,
+ int dst_stride_g,
+ uint8_t* dst_b,
+ int dst_stride_b,
+ uint8_t* dst_a,
+ int dst_stride_a,
+ int width,
+ int height) {
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_r = dst_r + (height - 1) * dst_stride_r;
+ dst_g = dst_g + (height - 1) * dst_stride_g;
+ dst_b = dst_b + (height - 1) * dst_stride_b;
+ dst_a = dst_a + (height - 1) * dst_stride_a;
+ dst_stride_r = -dst_stride_r;
+ dst_stride_g = -dst_stride_g;
+ dst_stride_b = -dst_stride_b;
+ dst_stride_a = -dst_stride_a;
+ }
+
+ if (dst_a == NULL) {
+ SplitARGBPlaneOpaque(src_argb, src_stride_argb, dst_r, dst_stride_r, dst_g,
+ dst_stride_g, dst_b, dst_stride_b, width, height);
+ } else {
+ SplitARGBPlaneAlpha(src_argb, src_stride_argb, dst_r, dst_stride_r, dst_g,
+ dst_stride_g, dst_b, dst_stride_b, dst_a, dst_stride_a,
+ width, height);
+ }
+}
+
+LIBYUV_NOINLINE
+void MergeARGBPlaneAlpha(const uint8_t* src_r,
+ int src_stride_r,
+ const uint8_t* src_g,
+ int src_stride_g,
+ const uint8_t* src_b,
+ int src_stride_b,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height) {
+ int y;
+ void (*MergeARGBRow)(const uint8_t* src_r, const uint8_t* src_g,
+ const uint8_t* src_b, const uint8_t* src_a,
+ uint8_t* dst_argb, int width) = MergeARGBRow_C;
+
+ assert(height > 0);
+
+ if (src_stride_r == width && src_stride_g == width && src_stride_b == width &&
+ src_stride_a == width && dst_stride_argb == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_r = src_stride_g = src_stride_b = src_stride_a =
+ dst_stride_argb = 0;
+ }
+#if defined(HAS_MERGEARGBROW_SSE2)
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ MergeARGBRow = MergeARGBRow_Any_SSE2;
+ if (IS_ALIGNED(width, 8)) {
+ MergeARGBRow = MergeARGBRow_SSE2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEARGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeARGBRow = MergeARGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeARGBRow = MergeARGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEARGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MergeARGBRow = MergeARGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ MergeARGBRow = MergeARGBRow_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MergeARGBRow(src_r, src_g, src_b, src_a, dst_argb, width);
+ src_r += src_stride_r;
+ src_g += src_stride_g;
+ src_b += src_stride_b;
+ src_a += src_stride_a;
+ dst_argb += dst_stride_argb;
+ }
+}
+
+LIBYUV_NOINLINE
+void MergeARGBPlaneOpaque(const uint8_t* src_r,
+ int src_stride_r,
+ const uint8_t* src_g,
+ int src_stride_g,
+ const uint8_t* src_b,
+ int src_stride_b,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height) {
+ int y;
+ void (*MergeXRGBRow)(const uint8_t* src_r, const uint8_t* src_g,
+ const uint8_t* src_b, uint8_t* dst_argb, int width) =
+ MergeXRGBRow_C;
+
+ assert(height > 0);
+
+ if (src_stride_r == width && src_stride_g == width && src_stride_b == width &&
+ dst_stride_argb == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_r = src_stride_g = src_stride_b = dst_stride_argb = 0;
+ }
+#if defined(HAS_MERGEXRGBROW_SSE2)
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ MergeXRGBRow = MergeXRGBRow_Any_SSE2;
+ if (IS_ALIGNED(width, 8)) {
+ MergeXRGBRow = MergeXRGBRow_SSE2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEXRGBROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeXRGBRow = MergeXRGBRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeXRGBRow = MergeXRGBRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEXRGBROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MergeXRGBRow = MergeXRGBRow_Any_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ MergeXRGBRow = MergeXRGBRow_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MergeXRGBRow(src_r, src_g, src_b, dst_argb, width);
+ src_r += src_stride_r;
+ src_g += src_stride_g;
+ src_b += src_stride_b;
+ dst_argb += dst_stride_argb;
+ }
+}
+
+LIBYUV_API
+void MergeARGBPlane(const uint8_t* src_r,
+ int src_stride_r,
+ const uint8_t* src_g,
+ int src_stride_g,
+ const uint8_t* src_b,
+ int src_stride_b,
+ const uint8_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height) {
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+
+ if (src_a == NULL) {
+ MergeARGBPlaneOpaque(src_r, src_stride_r, src_g, src_stride_g, src_b,
+ src_stride_b, dst_argb, dst_stride_argb, width,
+ height);
+ } else {
+ MergeARGBPlaneAlpha(src_r, src_stride_r, src_g, src_stride_g, src_b,
+ src_stride_b, src_a, src_stride_a, dst_argb,
+ dst_stride_argb, width, height);
+ }
+}
+
+// TODO(yuan): Support 2 bit alpha channel.
+LIBYUV_API
+void MergeXR30Plane(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ uint8_t* dst_ar30,
+ int dst_stride_ar30,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ void (*MergeXR30Row)(const uint16_t* src_r, const uint16_t* src_g,
+ const uint16_t* src_b, uint8_t* dst_ar30, int depth,
+ int width) = MergeXR30Row_C;
+
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30;
+ dst_stride_ar30 = -dst_stride_ar30;
+ }
+ // Coalesce rows.
+ if (src_stride_r == width && src_stride_g == width && src_stride_b == width &&
+ dst_stride_ar30 == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_r = src_stride_g = src_stride_b = dst_stride_ar30 = 0;
+ }
+#if defined(HAS_MERGEXR30ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeXR30Row = MergeXR30Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeXR30Row = MergeXR30Row_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEXR30ROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ if (depth == 10) {
+ MergeXR30Row = MergeXR30Row_10_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ MergeXR30Row = MergeXR30Row_10_NEON;
+ }
+ } else {
+ MergeXR30Row = MergeXR30Row_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ MergeXR30Row = MergeXR30Row_NEON;
+ }
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MergeXR30Row(src_r, src_g, src_b, dst_ar30, depth, width);
+ src_r += src_stride_r;
+ src_g += src_stride_g;
+ src_b += src_stride_b;
+ dst_ar30 += dst_stride_ar30;
+ }
+}
+
+LIBYUV_NOINLINE
+static void MergeAR64PlaneAlpha(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ void (*MergeAR64Row)(const uint16_t* src_r, const uint16_t* src_g,
+ const uint16_t* src_b, const uint16_t* src_a,
+ uint16_t* dst_argb, int depth, int width) =
+ MergeAR64Row_C;
+
+ if (src_stride_r == width && src_stride_g == width && src_stride_b == width &&
+ src_stride_a == width && dst_stride_ar64 == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_r = src_stride_g = src_stride_b = src_stride_a =
+ dst_stride_ar64 = 0;
+ }
+#if defined(HAS_MERGEAR64ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeAR64Row = MergeAR64Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeAR64Row = MergeAR64Row_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEAR64ROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MergeAR64Row = MergeAR64Row_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ MergeAR64Row = MergeAR64Row_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MergeAR64Row(src_r, src_g, src_b, src_a, dst_ar64, depth, width);
+ src_r += src_stride_r;
+ src_g += src_stride_g;
+ src_b += src_stride_b;
+ src_a += src_stride_a;
+ dst_ar64 += dst_stride_ar64;
+ }
+}
+
+LIBYUV_NOINLINE
+static void MergeAR64PlaneOpaque(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ void (*MergeXR64Row)(const uint16_t* src_r, const uint16_t* src_g,
+ const uint16_t* src_b, uint16_t* dst_argb, int depth,
+ int width) = MergeXR64Row_C;
+
+ // Coalesce rows.
+ if (src_stride_r == width && src_stride_g == width && src_stride_b == width &&
+ dst_stride_ar64 == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_r = src_stride_g = src_stride_b = dst_stride_ar64 = 0;
+ }
+#if defined(HAS_MERGEXR64ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeXR64Row = MergeXR64Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeXR64Row = MergeXR64Row_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEXR64ROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MergeXR64Row = MergeXR64Row_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ MergeXR64Row = MergeXR64Row_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MergeXR64Row(src_r, src_g, src_b, dst_ar64, depth, width);
+ src_r += src_stride_r;
+ src_g += src_stride_g;
+ src_b += src_stride_b;
+ dst_ar64 += dst_stride_ar64;
+ }
+}
+
+LIBYUV_API
+void MergeAR64Plane(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ int width,
+ int height,
+ int depth) {
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_ar64 = dst_ar64 + (height - 1) * dst_stride_ar64;
+ dst_stride_ar64 = -dst_stride_ar64;
+ }
+
+ if (src_a == NULL) {
+ MergeAR64PlaneOpaque(src_r, src_stride_r, src_g, src_stride_g, src_b,
+ src_stride_b, dst_ar64, dst_stride_ar64, width, height,
+ depth);
+ } else {
+ MergeAR64PlaneAlpha(src_r, src_stride_r, src_g, src_stride_g, src_b,
+ src_stride_b, src_a, src_stride_a, dst_ar64,
+ dst_stride_ar64, width, height, depth);
+ }
+}
+
+LIBYUV_NOINLINE
+static void MergeARGB16To8PlaneAlpha(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ void (*MergeARGB16To8Row)(const uint16_t* src_r, const uint16_t* src_g,
+ const uint16_t* src_b, const uint16_t* src_a,
+ uint8_t* dst_argb, int depth, int width) =
+ MergeARGB16To8Row_C;
+
+ if (src_stride_r == width && src_stride_g == width && src_stride_b == width &&
+ src_stride_a == width && dst_stride_argb == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_r = src_stride_g = src_stride_b = src_stride_a =
+ dst_stride_argb = 0;
+ }
+#if defined(HAS_MERGEARGB16TO8ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeARGB16To8Row = MergeARGB16To8Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeARGB16To8Row = MergeARGB16To8Row_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEARGB16TO8ROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MergeARGB16To8Row = MergeARGB16To8Row_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ MergeARGB16To8Row = MergeARGB16To8Row_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MergeARGB16To8Row(src_r, src_g, src_b, src_a, dst_argb, depth, width);
+ src_r += src_stride_r;
+ src_g += src_stride_g;
+ src_b += src_stride_b;
+ src_a += src_stride_a;
+ dst_argb += dst_stride_argb;
+ }
+}
+
+LIBYUV_NOINLINE
+static void MergeARGB16To8PlaneOpaque(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int depth) {
+ int y;
+ void (*MergeXRGB16To8Row)(const uint16_t* src_r, const uint16_t* src_g,
+ const uint16_t* src_b, uint8_t* dst_argb, int depth,
+ int width) = MergeXRGB16To8Row_C;
+
+ // Coalesce rows.
+ if (src_stride_r == width && src_stride_g == width && src_stride_b == width &&
+ dst_stride_argb == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_r = src_stride_g = src_stride_b = dst_stride_argb = 0;
+ }
+#if defined(HAS_MERGEXRGB16TO8ROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MergeXRGB16To8Row = MergeXRGB16To8Row_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ MergeXRGB16To8Row = MergeXRGB16To8Row_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_MERGEXRGB16TO8ROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MergeXRGB16To8Row = MergeXRGB16To8Row_Any_NEON;
+ if (IS_ALIGNED(width, 8)) {
+ MergeXRGB16To8Row = MergeXRGB16To8Row_NEON;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ MergeXRGB16To8Row(src_r, src_g, src_b, dst_argb, depth, width);
+ src_r += src_stride_r;
+ src_g += src_stride_g;
+ src_b += src_stride_b;
+ dst_argb += dst_stride_argb;
+ }
+}
+
+LIBYUV_API
+void MergeARGB16To8Plane(const uint16_t* src_r,
+ int src_stride_r,
+ const uint16_t* src_g,
+ int src_stride_g,
+ const uint16_t* src_b,
+ int src_stride_b,
+ const uint16_t* src_a,
+ int src_stride_a,
+ uint8_t* dst_argb,
+ int dst_stride_argb,
+ int width,
+ int height,
+ int depth) {
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ dst_argb = dst_argb + (height - 1) * dst_stride_argb;
+ dst_stride_argb = -dst_stride_argb;
+ }
+
+ if (src_a == NULL) {
+ MergeARGB16To8PlaneOpaque(src_r, src_stride_r, src_g, src_stride_g, src_b,
+ src_stride_b, dst_argb, dst_stride_argb, width,
+ height, depth);
+ } else {
+ MergeARGB16To8PlaneAlpha(src_r, src_stride_r, src_g, src_stride_g, src_b,
+ src_stride_b, src_a, src_stride_a, dst_argb,
+ dst_stride_argb, width, height, depth);
+ }
+}
+
// Convert YUY2 to I422.
LIBYUV_API
int YUY2ToI422(const uint8_t* src_yuy2,
@@ -1756,12 +2642,12 @@ int ARGBAdd(const uint8_t* src_argb0,
height = 1;
src_stride_argb0 = src_stride_argb1 = dst_stride_argb = 0;
}
-#if defined(HAS_ARGBADDROW_SSE2) && (defined(_MSC_VER) && !defined(__clang__))
+#if defined(HAS_ARGBADDROW_SSE2)
if (TestCpuFlag(kCpuHasSSE2)) {
ARGBAddRow = ARGBAddRow_SSE2;
}
#endif
-#if defined(HAS_ARGBADDROW_SSE2) && !(defined(_MSC_VER) && !defined(__clang__))
+#if defined(HAS_ARGBADDROW_SSE2)
if (TestCpuFlag(kCpuHasSSE2)) {
ARGBAddRow = ARGBAddRow_Any_SSE2;
if (IS_ALIGNED(width, 4)) {
@@ -3039,6 +3925,76 @@ int ARGBShuffle(const uint8_t* src_bgra,
return 0;
}
+// Shuffle AR64 channel order. e.g. AR64 to AB64.
+LIBYUV_API
+int AR64Shuffle(const uint16_t* src_ar64,
+ int src_stride_ar64,
+ uint16_t* dst_ar64,
+ int dst_stride_ar64,
+ const uint8_t* shuffler,
+ int width,
+ int height) {
+ int y;
+ void (*AR64ShuffleRow)(const uint8_t* src_ar64, uint8_t* dst_ar64,
+ const uint8_t* shuffler, int width) = AR64ShuffleRow_C;
+ if (!src_ar64 || !dst_ar64 || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ src_ar64 = src_ar64 + (height - 1) * src_stride_ar64;
+ src_stride_ar64 = -src_stride_ar64;
+ }
+ // Coalesce rows.
+ if (src_stride_ar64 == width * 4 && dst_stride_ar64 == width * 4) {
+ width *= height;
+ height = 1;
+ src_stride_ar64 = dst_stride_ar64 = 0;
+ }
+ // Assembly versions can be reused if it's implemented with shuffle.
+#if defined(HAS_ARGBSHUFFLEROW_SSSE3)
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ AR64ShuffleRow = ARGBShuffleRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 8)) {
+ AR64ShuffleRow = ARGBShuffleRow_SSSE3;
+ }
+ }
+#endif
+#if defined(HAS_ARGBSHUFFLEROW_AVX2)
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ AR64ShuffleRow = ARGBShuffleRow_Any_AVX2;
+ if (IS_ALIGNED(width, 16)) {
+ AR64ShuffleRow = ARGBShuffleRow_AVX2;
+ }
+ }
+#endif
+#if defined(HAS_ARGBSHUFFLEROW_NEON)
+ if (TestCpuFlag(kCpuHasNEON)) {
+ AR64ShuffleRow = ARGBShuffleRow_Any_NEON;
+ if (IS_ALIGNED(width, 4)) {
+ AR64ShuffleRow = ARGBShuffleRow_NEON;
+ }
+ }
+#endif
+#if defined(HAS_ARGBSHUFFLEROW_MMI)
+ if (TestCpuFlag(kCpuHasMMI)) {
+ AR64ShuffleRow = ARGBShuffleRow_Any_MMI;
+ if (IS_ALIGNED(width, 2)) {
+ AR64ShuffleRow = ARGBShuffleRow_MMI;
+ }
+ }
+#endif
+
+ for (y = 0; y < height; ++y) {
+ AR64ShuffleRow((uint8_t*)(src_ar64), (uint8_t*)(dst_ar64), shuffler,
+ width * 2);
+ src_ar64 += src_stride_ar64;
+ dst_ar64 += dst_stride_ar64;
+ }
+ return 0;
+}
+
// Gauss blur a float plane using Gaussian 5x5 filter with
// coefficients of 1, 4, 6, 4, 1.
// Each destination pixel is a blur of the 5x5
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate.cc b/third-party/libyuv/third_party/libyuv/source/rotate.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_any.cc b/third-party/libyuv/third_party/libyuv/source/rotate_any.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_any.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_any.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_argb.cc b/third-party/libyuv/third_party/libyuv/source/rotate_argb.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_argb.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_argb.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_common.cc b/third-party/libyuv/third_party/libyuv/source/rotate_common.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_common.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_common.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_gcc.cc b/third-party/libyuv/third_party/libyuv/source/rotate_gcc.cc
similarity index 99%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_gcc.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_gcc.cc
index fd359d4ae6..1a3f8cbbda 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_gcc.cc
+++ b/third-party/libyuv/third_party/libyuv/source/rotate_gcc.cc
@@ -17,8 +17,7 @@ extern "C" {
#endif
// This module is for GCC x86 and x64.
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
// Transpose 8x8. 32 or 64 bit, but not NaCL for 64 bit.
#if defined(HAS_TRANSPOSEWX8_SSSE3)
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_mmi.cc b/third-party/libyuv/third_party/libyuv/source/rotate_mmi.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_mmi.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_mmi.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_msa.cc b/third-party/libyuv/third_party/libyuv/source/rotate_msa.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_msa.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_msa.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_neon.cc b/third-party/libyuv/third_party/libyuv/source/rotate_neon.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_neon.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_neon.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_neon64.cc b/third-party/libyuv/third_party/libyuv/source/rotate_neon64.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_neon64.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_neon64.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_win.cc b/third-party/libyuv/third_party/libyuv/source/rotate_win.cc
similarity index 98%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/rotate_win.cc
rename to third-party/libyuv/third_party/libyuv/source/rotate_win.cc
index e887dd525c..a78873f843 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/rotate_win.cc
+++ b/third-party/libyuv/third_party/libyuv/source/rotate_win.cc
@@ -16,8 +16,9 @@ namespace libyuv {
extern "C" {
#endif
-// This module is for 32 bit Visual C x86 and clangcl
-#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
+// This module is for 32 bit Visual C x86
+#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \
+ !defined(__clang__) && defined(_M_IX86)
__declspec(naked) void TransposeWx8_SSSE3(const uint8_t* src,
int src_stride,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_any.cc b/third-party/libyuv/third_party/libyuv/source/row_any.cc
similarity index 73%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_any.cc
rename to third-party/libyuv/third_party/libyuv/source/row_any.cc
index 7216373bcd..c9a402eda2 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_any.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_any.cc
@@ -30,6 +30,39 @@ extern "C" {
// Subsampled source needs to be increase by 1 of not even.
#define SS(width, shift) (((width) + (1 << (shift)) - 1) >> (shift))
+// Any 4 planes to 1
+#define ANY41(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \
+ void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \
+ const uint8_t* v_buf, const uint8_t* a_buf, uint8_t* dst_ptr, \
+ int width) { \
+ SIMD_ALIGNED(uint8_t temp[64 * 5]); \
+ memset(temp, 0, 64 * 4); /* for msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, n); \
+ } \
+ memcpy(temp, y_buf + n, r); \
+ memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \
+ memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \
+ memcpy(temp + 192, a_buf + n, r); \
+ ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, temp + 256, MASK + 1); \
+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 256, \
+ SS(r, DUVSHIFT) * BPP); \
+ }
+
+#ifdef HAS_MERGEARGBROW_SSE2
+ANY41(MergeARGBRow_Any_SSE2, MergeARGBRow_SSE2, 0, 0, 4, 7)
+#endif
+#ifdef HAS_MERGEARGBROW_AVX2
+ANY41(MergeARGBRow_Any_AVX2, MergeARGBRow_AVX2, 0, 0, 4, 15)
+#endif
+#ifdef HAS_MERGEARGBROW_NEON
+ANY41(MergeARGBRow_Any_NEON, MergeARGBRow_NEON, 0, 0, 4, 15)
+#endif
+
+// Note that odd width replication includes 444 due to implementation
+// on arm that subsamples 444 to 422 internally.
// Any 4 planes to 1 with yuvconstants
#define ANY41C(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \
void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \
@@ -46,29 +79,166 @@ extern "C" {
memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \
memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \
memcpy(temp + 192, a_buf + n, r); \
+ if (width & 1) { \
+ temp[64 + SS(r, UVSHIFT)] = temp[64 + SS(r, UVSHIFT) - 1]; \
+ temp[128 + SS(r, UVSHIFT)] = temp[128 + SS(r, UVSHIFT) - 1]; \
+ } \
ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, temp + 256, \
yuvconstants, MASK + 1); \
memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 256, \
SS(r, DUVSHIFT) * BPP); \
}
+#ifdef HAS_I444ALPHATOARGBROW_SSSE3
+ANY41C(I444AlphaToARGBRow_Any_SSSE3, I444AlphaToARGBRow_SSSE3, 0, 0, 4, 7)
+#endif
+#ifdef HAS_I444ALPHATOARGBROW_AVX2
+ANY41C(I444AlphaToARGBRow_Any_AVX2, I444AlphaToARGBRow_AVX2, 0, 0, 4, 15)
+#endif
#ifdef HAS_I422ALPHATOARGBROW_SSSE3
ANY41C(I422AlphaToARGBRow_Any_SSSE3, I422AlphaToARGBRow_SSSE3, 1, 0, 4, 7)
#endif
#ifdef HAS_I422ALPHATOARGBROW_AVX2
ANY41C(I422AlphaToARGBRow_Any_AVX2, I422AlphaToARGBRow_AVX2, 1, 0, 4, 15)
#endif
+#ifdef HAS_I444ALPHATOARGBROW_NEON
+ANY41C(I444AlphaToARGBRow_Any_NEON, I444AlphaToARGBRow_NEON, 0, 0, 4, 7)
+#endif
#ifdef HAS_I422ALPHATOARGBROW_NEON
ANY41C(I422AlphaToARGBRow_Any_NEON, I422AlphaToARGBRow_NEON, 1, 0, 4, 7)
#endif
+#ifdef HAS_I444ALPHATOARGBROW_MSA
+ANY41C(I444AlphaToARGBRow_Any_MSA, I444AlphaToARGBRow_MSA, 0, 0, 4, 7)
+#endif
#ifdef HAS_I422ALPHATOARGBROW_MSA
ANY41C(I422AlphaToARGBRow_Any_MSA, I422AlphaToARGBRow_MSA, 1, 0, 4, 7)
#endif
+#ifdef HAS_I444ALPHATOARGBROW_MMI
+ANY41C(I444AlphaToARGBRow_Any_MMI, I444AlphaToARGBRow_MMI, 0, 0, 4, 7)
+#endif
#ifdef HAS_I422ALPHATOARGBROW_MMI
ANY41C(I422AlphaToARGBRow_Any_MMI, I422AlphaToARGBRow_MMI, 1, 0, 4, 7)
#endif
#undef ANY41C
+// Any 4 planes to 1 plane of 8 bit with yuvconstants
+#define ANY41CT(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, T, SBPP, BPP, MASK) \
+ void NAMEANY(const T* y_buf, const T* u_buf, const T* v_buf, const T* a_buf, \
+ uint8_t* dst_ptr, const struct YuvConstants* yuvconstants, \
+ int width) { \
+ SIMD_ALIGNED(T temp[16 * 4]); \
+ SIMD_ALIGNED(uint8_t out[64]); \
+ memset(temp, 0, 16 * 4 * SBPP); /* for YUY2 and msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, yuvconstants, n); \
+ } \
+ memcpy(temp, y_buf + n, r * SBPP); \
+ memcpy(temp + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \
+ memcpy(temp + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \
+ memcpy(temp + 48, a_buf + n, r * SBPP); \
+ ANY_SIMD(temp, temp + 16, temp + 32, temp + 48, out, yuvconstants, \
+ MASK + 1); \
+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \
+ }
+
+#ifdef HAS_I210ALPHATOARGBROW_SSSE3
+ANY41CT(I210AlphaToARGBRow_Any_SSSE3,
+ I210AlphaToARGBRow_SSSE3,
+ 1,
+ 0,
+ uint16_t,
+ 2,
+ 4,
+ 7)
+#endif
+
+#ifdef HAS_I210ALPHATOARGBROW_AVX2
+ANY41CT(I210AlphaToARGBRow_Any_AVX2,
+ I210AlphaToARGBRow_AVX2,
+ 1,
+ 0,
+ uint16_t,
+ 2,
+ 4,
+ 15)
+#endif
+
+#ifdef HAS_I410ALPHATOARGBROW_SSSE3
+ANY41CT(I410AlphaToARGBRow_Any_SSSE3,
+ I410AlphaToARGBRow_SSSE3,
+ 0,
+ 0,
+ uint16_t,
+ 2,
+ 4,
+ 7)
+#endif
+
+#ifdef HAS_I410ALPHATOARGBROW_AVX2
+ANY41CT(I410AlphaToARGBRow_Any_AVX2,
+ I410AlphaToARGBRow_AVX2,
+ 0,
+ 0,
+ uint16_t,
+ 2,
+ 4,
+ 15)
+#endif
+
+#undef ANY41CT
+
+// Any 4 planes to 1 plane with parameter
+#define ANY41PT(NAMEANY, ANY_SIMD, STYPE, SBPP, DTYPE, BPP, MASK) \
+ void NAMEANY(const STYPE* r_buf, const STYPE* g_buf, const STYPE* b_buf, \
+ const STYPE* a_buf, DTYPE* dst_ptr, int depth, int width) { \
+ SIMD_ALIGNED(STYPE temp[16 * 4]); \
+ SIMD_ALIGNED(DTYPE out[64]); \
+ memset(temp, 0, 16 * 4 * SBPP); /* for YUY2 and msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(r_buf, g_buf, b_buf, a_buf, dst_ptr, depth, n); \
+ } \
+ memcpy(temp, r_buf + n, r * SBPP); \
+ memcpy(temp + 16, g_buf + n, r * SBPP); \
+ memcpy(temp + 32, b_buf + n, r * SBPP); \
+ memcpy(temp + 48, a_buf + n, r * SBPP); \
+ ANY_SIMD(temp, temp + 16, temp + 32, temp + 48, out, depth, MASK + 1); \
+ memcpy((uint8_t*)dst_ptr + n * BPP, out, r * BPP); \
+ }
+
+#ifdef HAS_MERGEAR64ROW_AVX2
+ANY41PT(MergeAR64Row_Any_AVX2, MergeAR64Row_AVX2, uint16_t, 2, uint16_t, 8, 15)
+#endif
+
+#ifdef HAS_MERGEAR64ROW_NEON
+ANY41PT(MergeAR64Row_Any_NEON, MergeAR64Row_NEON, uint16_t, 2, uint16_t, 8, 7)
+#endif
+
+#ifdef HAS_MERGEARGB16TO8ROW_AVX2
+ANY41PT(MergeARGB16To8Row_Any_AVX2,
+ MergeARGB16To8Row_AVX2,
+ uint16_t,
+ 2,
+ uint8_t,
+ 4,
+ 15)
+#endif
+
+#ifdef HAS_MERGEARGB16TO8ROW_NEON
+ANY41PT(MergeARGB16To8Row_Any_NEON,
+ MergeARGB16To8Row_NEON,
+ uint16_t,
+ 2,
+ uint8_t,
+ 4,
+ 7)
+#endif
+
+#undef ANY41PT
+
// Any 3 planes to 1.
#define ANY31(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \
void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \
@@ -98,6 +268,15 @@ ANY31(MergeRGBRow_Any_NEON, MergeRGBRow_NEON, 0, 0, 3, 15)
#ifdef HAS_MERGERGBROW_MMI
ANY31(MergeRGBRow_Any_MMI, MergeRGBRow_MMI, 0, 0, 3, 7)
#endif
+#ifdef HAS_MERGEXRGBROW_SSE2
+ANY31(MergeXRGBRow_Any_SSE2, MergeXRGBRow_SSE2, 0, 0, 4, 7)
+#endif
+#ifdef HAS_MERGEXRGBROW_AVX2
+ANY31(MergeXRGBRow_Any_AVX2, MergeXRGBRow_AVX2, 0, 0, 4, 15)
+#endif
+#ifdef HAS_MERGEXRGBROW_NEON
+ANY31(MergeXRGBRow_Any_NEON, MergeXRGBRow_NEON, 0, 0, 4, 15)
+#endif
#ifdef HAS_I422TOYUY2ROW_SSE2
ANY31(I422ToYUY2Row_Any_SSE2, I422ToYUY2Row_SSE2, 1, 1, 4, 15)
ANY31(I422ToUYVYRow_Any_SSE2, I422ToUYVYRow_SSE2, 1, 1, 4, 15)
@@ -165,6 +344,21 @@ ANY31(BlendPlaneRow_Any_MMI, BlendPlaneRow_MMI, 0, 0, 1, 7)
#ifdef HAS_I422TOARGBROW_SSSE3
ANY31C(I422ToARGBRow_Any_SSSE3, I422ToARGBRow_SSSE3, 1, 0, 4, 7)
#endif
+#ifdef HAS_I422TORGBAROW_SSSE3
+ANY31C(I422ToRGBARow_Any_SSSE3, I422ToRGBARow_SSSE3, 1, 0, 4, 7)
+#endif
+#ifdef HAS_I422TOARGB4444ROW_SSSE3
+ANY31C(I422ToARGB4444Row_Any_SSSE3, I422ToARGB4444Row_SSSE3, 1, 0, 2, 7)
+#endif
+#ifdef HAS_I422TOARGB1555ROW_SSSE3
+ANY31C(I422ToARGB1555Row_Any_SSSE3, I422ToARGB1555Row_SSSE3, 1, 0, 2, 7)
+#endif
+#ifdef HAS_I422TORGB565ROW_SSSE3
+ANY31C(I422ToRGB565Row_Any_SSSE3, I422ToRGB565Row_SSSE3, 1, 0, 2, 7)
+#endif
+#ifdef HAS_I422TORGB24ROW_SSSE3
+ANY31C(I422ToRGB24Row_Any_SSSE3, I422ToRGB24Row_SSSE3, 1, 0, 3, 15)
+#endif
#ifdef HAS_I422TOAR30ROW_SSSE3
ANY31C(I422ToAR30Row_Any_SSSE3, I422ToAR30Row_SSSE3, 1, 0, 4, 7)
#endif
@@ -173,12 +367,7 @@ ANY31C(I422ToAR30Row_Any_AVX2, I422ToAR30Row_AVX2, 1, 0, 4, 15)
#endif
#ifdef HAS_I444TOARGBROW_SSSE3
ANY31C(I444ToARGBRow_Any_SSSE3, I444ToARGBRow_SSSE3, 0, 0, 4, 7)
-ANY31C(I422ToRGBARow_Any_SSSE3, I422ToRGBARow_SSSE3, 1, 0, 4, 7)
-ANY31C(I422ToARGB4444Row_Any_SSSE3, I422ToARGB4444Row_SSSE3, 1, 0, 2, 7)
-ANY31C(I422ToARGB1555Row_Any_SSSE3, I422ToARGB1555Row_SSSE3, 1, 0, 2, 7)
-ANY31C(I422ToRGB565Row_Any_SSSE3, I422ToRGB565Row_SSSE3, 1, 0, 2, 7)
-ANY31C(I422ToRGB24Row_Any_SSSE3, I422ToRGB24Row_SSSE3, 1, 0, 3, 15)
-#endif // HAS_I444TOARGBROW_SSSE3
+#endif
#ifdef HAS_I422TORGB24ROW_AVX2
ANY31C(I422ToRGB24Row_Any_AVX2, I422ToRGB24Row_AVX2, 1, 0, 3, 31)
#endif
@@ -262,11 +451,99 @@ ANY31CT(I210ToARGBRow_Any_AVX2, I210ToARGBRow_AVX2, 1, 0, uint16_t, 2, 4, 15)
#ifdef HAS_I210TOAR30ROW_AVX2
ANY31CT(I210ToAR30Row_Any_AVX2, I210ToAR30Row_AVX2, 1, 0, uint16_t, 2, 4, 15)
#endif
+#ifdef HAS_I410TOAR30ROW_SSSE3
+ANY31CT(I410ToAR30Row_Any_SSSE3, I410ToAR30Row_SSSE3, 0, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_I410TOARGBROW_SSSE3
+ANY31CT(I410ToARGBRow_Any_SSSE3, I410ToARGBRow_SSSE3, 0, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_I410TOARGBROW_AVX2
+ANY31CT(I410ToARGBRow_Any_AVX2, I410ToARGBRow_AVX2, 0, 0, uint16_t, 2, 4, 15)
+#endif
+#ifdef HAS_I410TOAR30ROW_AVX2
+ANY31CT(I410ToAR30Row_Any_AVX2, I410ToAR30Row_AVX2, 0, 0, uint16_t, 2, 4, 15)
+#endif
#ifdef HAS_I210TOARGBROW_MMI
ANY31CT(I210ToARGBRow_Any_MMI, I210ToARGBRow_MMI, 1, 0, uint16_t, 2, 4, 7)
#endif
+#ifdef HAS_I212TOAR30ROW_SSSE3
+ANY31CT(I212ToAR30Row_Any_SSSE3, I212ToAR30Row_SSSE3, 1, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_I212TOARGBROW_SSSE3
+ANY31CT(I212ToARGBRow_Any_SSSE3, I212ToARGBRow_SSSE3, 1, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_I212TOARGBROW_AVX2
+ANY31CT(I212ToARGBRow_Any_AVX2, I212ToARGBRow_AVX2, 1, 0, uint16_t, 2, 4, 15)
+#endif
+#ifdef HAS_I212TOAR30ROW_AVX2
+ANY31CT(I212ToAR30Row_Any_AVX2, I212ToAR30Row_AVX2, 1, 0, uint16_t, 2, 4, 15)
+#endif
#undef ANY31CT
+// Any 3 planes to 1 plane with parameter
+#define ANY31PT(NAMEANY, ANY_SIMD, STYPE, SBPP, DTYPE, BPP, MASK) \
+ void NAMEANY(const STYPE* r_buf, const STYPE* g_buf, const STYPE* b_buf, \
+ DTYPE* dst_ptr, int depth, int width) { \
+ SIMD_ALIGNED(STYPE temp[16 * 3]); \
+ SIMD_ALIGNED(DTYPE out[64]); \
+ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(r_buf, g_buf, b_buf, dst_ptr, depth, n); \
+ } \
+ memcpy(temp, r_buf + n, r * SBPP); \
+ memcpy(temp + 16, g_buf + n, r * SBPP); \
+ memcpy(temp + 32, b_buf + n, r * SBPP); \
+ ANY_SIMD(temp, temp + 16, temp + 32, out, depth, MASK + 1); \
+ memcpy((uint8_t*)dst_ptr + n * BPP, out, r * BPP); \
+ }
+
+#ifdef HAS_MERGEXR30ROW_AVX2
+ANY31PT(MergeXR30Row_Any_AVX2, MergeXR30Row_AVX2, uint16_t, 2, uint8_t, 4, 15)
+#endif
+
+#ifdef HAS_MERGEXR30ROW_NEON
+ANY31PT(MergeXR30Row_Any_NEON, MergeXR30Row_NEON, uint16_t, 2, uint8_t, 4, 3)
+ANY31PT(MergeXR30Row_10_Any_NEON,
+ MergeXR30Row_10_NEON,
+ uint16_t,
+ 2,
+ uint8_t,
+ 4,
+ 3)
+#endif
+
+#ifdef HAS_MERGEXR64ROW_AVX2
+ANY31PT(MergeXR64Row_Any_AVX2, MergeXR64Row_AVX2, uint16_t, 2, uint16_t, 8, 15)
+#endif
+
+#ifdef HAS_MERGEXR64ROW_NEON
+ANY31PT(MergeXR64Row_Any_NEON, MergeXR64Row_NEON, uint16_t, 2, uint16_t, 8, 7)
+#endif
+
+#ifdef HAS_MERGEXRGB16TO8ROW_AVX2
+ANY31PT(MergeXRGB16To8Row_Any_AVX2,
+ MergeXRGB16To8Row_AVX2,
+ uint16_t,
+ 2,
+ uint8_t,
+ 4,
+ 15)
+#endif
+
+#ifdef HAS_MERGEXRGB16TO8ROW_NEON
+ANY31PT(MergeXRGB16To8Row_Any_NEON,
+ MergeXRGB16To8Row_NEON,
+ uint16_t,
+ 2,
+ uint8_t,
+ 4,
+ 7)
+#endif
+
+#undef ANY31PT
+
// Any 2 planes to 1.
#define ANY21(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, SBPP2, BPP, MASK) \
void NAMEANY(const uint8_t* y_buf, const uint8_t* uv_buf, uint8_t* dst_ptr, \
@@ -481,6 +758,77 @@ ANY21C(NV12ToRGB565Row_Any_MMI, NV12ToRGB565Row_MMI, 1, 1, 2, 2, 7)
#endif
#undef ANY21C
+// Any 2 planes of 16 bit to 1 with yuvconstants
+#define ANY21CT(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, T, SBPP, BPP, MASK) \
+ void NAMEANY(const T* y_buf, const T* uv_buf, uint8_t* dst_ptr, \
+ const struct YuvConstants* yuvconstants, int width) { \
+ SIMD_ALIGNED(T temp[16 * 3]); \
+ SIMD_ALIGNED(uint8_t out[64]); \
+ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(y_buf, uv_buf, dst_ptr, yuvconstants, n); \
+ } \
+ memcpy(temp, y_buf + n, r * SBPP); \
+ memcpy(temp + 16, uv_buf + 2 * (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP * 2); \
+ ANY_SIMD(temp, temp + 16, out, yuvconstants, MASK + 1); \
+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \
+ }
+
+#ifdef HAS_P210TOAR30ROW_SSSE3
+ANY21CT(P210ToAR30Row_Any_SSSE3, P210ToAR30Row_SSSE3, 1, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_P210TOARGBROW_SSSE3
+ANY21CT(P210ToARGBRow_Any_SSSE3, P210ToARGBRow_SSSE3, 1, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_P210TOARGBROW_AVX2
+ANY21CT(P210ToARGBRow_Any_AVX2, P210ToARGBRow_AVX2, 1, 0, uint16_t, 2, 4, 15)
+#endif
+#ifdef HAS_P210TOAR30ROW_AVX2
+ANY21CT(P210ToAR30Row_Any_AVX2, P210ToAR30Row_AVX2, 1, 0, uint16_t, 2, 4, 15)
+#endif
+#ifdef HAS_P410TOAR30ROW_SSSE3
+ANY21CT(P410ToAR30Row_Any_SSSE3, P410ToAR30Row_SSSE3, 0, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_P410TOARGBROW_SSSE3
+ANY21CT(P410ToARGBRow_Any_SSSE3, P410ToARGBRow_SSSE3, 0, 0, uint16_t, 2, 4, 7)
+#endif
+#ifdef HAS_P410TOARGBROW_AVX2
+ANY21CT(P410ToARGBRow_Any_AVX2, P410ToARGBRow_AVX2, 0, 0, uint16_t, 2, 4, 15)
+#endif
+#ifdef HAS_P410TOAR30ROW_AVX2
+ANY21CT(P410ToAR30Row_Any_AVX2, P410ToAR30Row_AVX2, 0, 0, uint16_t, 2, 4, 15)
+#endif
+
+#undef ANY21CT
+
+// Any 2 16 bit planes with parameter to 1
+#define ANY21PT(NAMEANY, ANY_SIMD, T, BPP, MASK) \
+ void NAMEANY(const T* src_u, const T* src_v, T* dst_uv, int depth, \
+ int width) { \
+ SIMD_ALIGNED(T temp[16 * 4]); \
+ memset(temp, 0, 16 * 4 * BPP); /* for msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(src_u, src_v, dst_uv, depth, n); \
+ } \
+ memcpy(temp, src_u + n, r * BPP); \
+ memcpy(temp + 16, src_v + n, r * BPP); \
+ ANY_SIMD(temp, temp + 16, temp + 32, depth, MASK + 1); \
+ memcpy(dst_uv + n * 2, temp + 32, r * BPP * 2); \
+ }
+
+#ifdef HAS_MERGEUVROW_16_AVX2
+ANY21PT(MergeUVRow_16_Any_AVX2, MergeUVRow_16_AVX2, uint16_t, 2, 15)
+#endif
+#ifdef HAS_MERGEUVROW_16_NEON
+ANY21PT(MergeUVRow_16_Any_NEON, MergeUVRow_16_NEON, uint16_t, 2, 7)
+#endif
+
+#undef ANY21CT
+
// Any 1 to 1.
#define ANY11(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \
void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \
@@ -1009,6 +1357,72 @@ ANY11P(ARGBShuffleRow_Any_MMI, ARGBShuffleRow_MMI, const uint8_t*, 4, 4, 1)
#undef ANY11P
#undef ANY11P
+// Any 1 to 1 with type
+#define ANY11T(NAMEANY, ANY_SIMD, SBPP, BPP, STYPE, DTYPE, MASK) \
+ void NAMEANY(const STYPE* src_ptr, DTYPE* dst_ptr, int width) { \
+ SIMD_ALIGNED(uint8_t temp[(MASK + 1) * SBPP]); \
+ SIMD_ALIGNED(uint8_t out[(MASK + 1) * BPP]); \
+ memset(temp, 0, (MASK + 1) * SBPP); /* for msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(src_ptr, dst_ptr, n); \
+ } \
+ memcpy(temp, (uint8_t*)(src_ptr) + n * SBPP, r * SBPP); \
+ ANY_SIMD((STYPE*)temp, (DTYPE*)out, MASK + 1); \
+ memcpy((uint8_t*)(dst_ptr) + n * BPP, out, r * BPP); \
+ }
+
+#ifdef HAS_ARGBTOAR64ROW_SSSE3
+ANY11T(ARGBToAR64Row_Any_SSSE3, ARGBToAR64Row_SSSE3, 4, 8, uint8_t, uint16_t, 3)
+#endif
+
+#ifdef HAS_ARGBTOAB64ROW_SSSE3
+ANY11T(ARGBToAB64Row_Any_SSSE3, ARGBToAB64Row_SSSE3, 4, 8, uint8_t, uint16_t, 3)
+#endif
+
+#ifdef HAS_AR64TOARGBROW_SSSE3
+ANY11T(AR64ToARGBRow_Any_SSSE3, AR64ToARGBRow_SSSE3, 8, 4, uint16_t, uint8_t, 3)
+#endif
+
+#ifdef HAS_ARGBTOAR64ROW_SSSE3
+ANY11T(AB64ToARGBRow_Any_SSSE3, AB64ToARGBRow_SSSE3, 8, 4, uint16_t, uint8_t, 3)
+#endif
+
+#ifdef HAS_ARGBTOAR64ROW_AVX2
+ANY11T(ARGBToAR64Row_Any_AVX2, ARGBToAR64Row_AVX2, 4, 8, uint8_t, uint16_t, 7)
+#endif
+
+#ifdef HAS_ARGBTOAB64ROW_AVX2
+ANY11T(ARGBToAB64Row_Any_AVX2, ARGBToAB64Row_AVX2, 4, 8, uint8_t, uint16_t, 7)
+#endif
+
+#ifdef HAS_AR64TOARGBROW_AVX2
+ANY11T(AR64ToARGBRow_Any_AVX2, AR64ToARGBRow_AVX2, 8, 4, uint16_t, uint8_t, 7)
+#endif
+
+#ifdef HAS_ARGBTOAR64ROW_AVX2
+ANY11T(AB64ToARGBRow_Any_AVX2, AB64ToARGBRow_AVX2, 8, 4, uint16_t, uint8_t, 7)
+#endif
+
+#ifdef HAS_ARGBTOAR64ROW_NEON
+ANY11T(ARGBToAR64Row_Any_NEON, ARGBToAR64Row_NEON, 4, 8, uint8_t, uint16_t, 7)
+#endif
+
+#ifdef HAS_ARGBTOAB64ROW_NEON
+ANY11T(ARGBToAB64Row_Any_NEON, ARGBToAB64Row_NEON, 4, 8, uint8_t, uint16_t, 7)
+#endif
+
+#ifdef HAS_AR64TOARGBROW_NEON
+ANY11T(AR64ToARGBRow_Any_NEON, AR64ToARGBRow_NEON, 8, 4, uint16_t, uint8_t, 7)
+#endif
+
+#ifdef HAS_ARGBTOAR64ROW_NEON
+ANY11T(AB64ToARGBRow_Any_NEON, AB64ToARGBRow_NEON, 8, 4, uint16_t, uint8_t, 7)
+#endif
+
+#undef ANY11T
+
// Any 1 to 1 with parameter and shorts. BPP measures in shorts.
#define ANY11C(NAMEANY, ANY_SIMD, SBPP, BPP, STYPE, DTYPE, MASK) \
void NAMEANY(const STYPE* src_ptr, DTYPE* dst_ptr, int scale, int width) { \
@@ -1061,6 +1475,30 @@ ANY11C(Convert8To16Row_Any_AVX2,
uint16_t,
31)
#endif
+#ifdef HAS_MULTIPLYROW_16_AVX2
+ANY11C(MultiplyRow_16_Any_AVX2,
+ MultiplyRow_16_AVX2,
+ 2,
+ 2,
+ uint16_t,
+ uint16_t,
+ 31)
+#endif
+#ifdef HAS_MULTIPLYROW_16_NEON
+ANY11C(MultiplyRow_16_Any_NEON,
+ MultiplyRow_16_NEON,
+ 2,
+ 2,
+ uint16_t,
+ uint16_t,
+ 15)
+#endif
+#ifdef HAS_DIVIDEROW_16_AVX2
+ANY11C(DivideRow_16_Any_AVX2, DivideRow_16_AVX2, 2, 2, uint16_t, uint16_t, 31)
+#endif
+#ifdef HAS_DIVIDEROW_16_NEON
+ANY11C(DivideRow_16_Any_NEON, DivideRow_16_NEON, 2, 2, uint16_t, uint16_t, 15)
+#endif
#undef ANY11C
// Any 1 to 1 with parameter and shorts to byte. BPP measures in shorts.
@@ -1151,38 +1589,38 @@ ANY11C(UYVYToARGBRow_Any_MMI, UYVYToARGBRow_MMI, 1, 4, 4, 7)
#undef ANY11C
// Any 1 to 1 interpolate. Takes 2 rows of source via stride.
-#define ANY11T(NAMEANY, ANY_SIMD, SBPP, BPP, MASK) \
- void NAMEANY(uint8_t* dst_ptr, const uint8_t* src_ptr, \
- ptrdiff_t src_stride_ptr, int width, int source_y_fraction) { \
- SIMD_ALIGNED(uint8_t temp[64 * 3]); \
- memset(temp, 0, 64 * 2); /* for msan */ \
- int r = width & MASK; \
- int n = width & ~MASK; \
- if (n > 0) { \
- ANY_SIMD(dst_ptr, src_ptr, src_stride_ptr, n, source_y_fraction); \
- } \
- memcpy(temp, src_ptr + n * SBPP, r * SBPP); \
- memcpy(temp + 64, src_ptr + src_stride_ptr + n * SBPP, r * SBPP); \
- ANY_SIMD(temp + 128, temp, 64, MASK + 1, source_y_fraction); \
- memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \
+#define ANY11I(NAMEANY, ANY_SIMD, SBPP, BPP, MASK) \
+ void NAMEANY(uint8_t* dst_ptr, const uint8_t* src_ptr, ptrdiff_t src_stride, \
+ int width, int source_y_fraction) { \
+ SIMD_ALIGNED(uint8_t temp[64 * 3]); \
+ memset(temp, 0, 64 * 2); /* for msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(dst_ptr, src_ptr, src_stride, n, source_y_fraction); \
+ } \
+ memcpy(temp, src_ptr + n * SBPP, r * SBPP); \
+ memcpy(temp + 64, src_ptr + src_stride + n * SBPP, r * SBPP); \
+ ANY_SIMD(temp + 128, temp, 64, MASK + 1, source_y_fraction); \
+ memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \
}
#ifdef HAS_INTERPOLATEROW_AVX2
-ANY11T(InterpolateRow_Any_AVX2, InterpolateRow_AVX2, 1, 1, 31)
+ANY11I(InterpolateRow_Any_AVX2, InterpolateRow_AVX2, 1, 1, 31)
#endif
#ifdef HAS_INTERPOLATEROW_SSSE3
-ANY11T(InterpolateRow_Any_SSSE3, InterpolateRow_SSSE3, 1, 1, 15)
+ANY11I(InterpolateRow_Any_SSSE3, InterpolateRow_SSSE3, 1, 1, 15)
#endif
#ifdef HAS_INTERPOLATEROW_NEON
-ANY11T(InterpolateRow_Any_NEON, InterpolateRow_NEON, 1, 1, 15)
+ANY11I(InterpolateRow_Any_NEON, InterpolateRow_NEON, 1, 1, 15)
#endif
#ifdef HAS_INTERPOLATEROW_MSA
-ANY11T(InterpolateRow_Any_MSA, InterpolateRow_MSA, 1, 1, 31)
+ANY11I(InterpolateRow_Any_MSA, InterpolateRow_MSA, 1, 1, 31)
#endif
#ifdef HAS_INTERPOLATEROW_MMI
-ANY11T(InterpolateRow_Any_MMI, InterpolateRow_MMI, 1, 1, 7)
+ANY11I(InterpolateRow_Any_MMI, InterpolateRow_MMI, 1, 1, 7)
#endif
-#undef ANY11T
+#undef ANY11I
// Any 1 to 1 mirror.
#define ANY11M(NAMEANY, ANY_SIMD, BPP, MASK) \
@@ -1340,6 +1778,32 @@ ANY12(YUY2ToUV422Row_Any_MMI, YUY2ToUV422Row_MMI, 1, 4, 1, 15)
#endif
#undef ANY12
+// Any 2 16 bit planes with parameter to 1
+#define ANY12PT(NAMEANY, ANY_SIMD, T, BPP, MASK) \
+ void NAMEANY(const T* src_uv, T* dst_u, T* dst_v, int depth, int width) { \
+ SIMD_ALIGNED(T temp[16 * 4]); \
+ memset(temp, 0, 16 * 4 * BPP); /* for msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(src_uv, dst_u, dst_v, depth, n); \
+ } \
+ memcpy(temp, src_uv + n * 2, r * BPP * 2); \
+ ANY_SIMD(temp, temp + 32, temp + 48, depth, MASK + 1); \
+ memcpy(dst_u + n, temp + 32, r * BPP); \
+ memcpy(dst_v + n, temp + 48, r * BPP); \
+ }
+
+#ifdef HAS_SPLITUVROW_16_AVX2
+ANY12PT(SplitUVRow_16_Any_AVX2, SplitUVRow_16_AVX2, uint16_t, 2, 15)
+#endif
+
+#ifdef HAS_SPLITUVROW_16_NEON
+ANY12PT(SplitUVRow_16_Any_NEON, SplitUVRow_16_NEON, uint16_t, 2, 7)
+#endif
+
+#undef ANY21CT
+
// Any 1 to 3. Outputs RGB planes.
#define ANY13(NAMEANY, ANY_SIMD, BPP, MASK) \
void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \
@@ -1367,21 +1831,66 @@ ANY13(SplitRGBRow_Any_NEON, SplitRGBRow_NEON, 3, 15)
#ifdef HAS_SPLITRGBROW_MMI
ANY13(SplitRGBRow_Any_MMI, SplitRGBRow_MMI, 3, 3)
#endif
+#ifdef HAS_SPLITXRGBROW_SSE2
+ANY13(SplitXRGBRow_Any_SSE2, SplitXRGBRow_SSE2, 4, 7)
+#endif
+#ifdef HAS_SPLITXRGBROW_SSSE3
+ANY13(SplitXRGBRow_Any_SSSE3, SplitXRGBRow_SSSE3, 4, 7)
+#endif
+#ifdef HAS_SPLITXRGBROW_AVX2
+ANY13(SplitXRGBRow_Any_AVX2, SplitXRGBRow_AVX2, 4, 15)
+#endif
+#ifdef HAS_SPLITXRGBROW_NEON
+ANY13(SplitXRGBRow_Any_NEON, SplitXRGBRow_NEON, 4, 15)
+#endif
+
+// Any 1 to 4. Outputs ARGB planes.
+#define ANY14(NAMEANY, ANY_SIMD, BPP, MASK) \
+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \
+ uint8_t* dst_b, uint8_t* dst_a, int width) { \
+ SIMD_ALIGNED(uint8_t temp[16 * 8]); \
+ memset(temp, 0, 16 * 4); /* for msan */ \
+ int r = width & MASK; \
+ int n = width & ~MASK; \
+ if (n > 0) { \
+ ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, dst_a, n); \
+ } \
+ memcpy(temp, src_ptr + n * BPP, r * BPP); \
+ ANY_SIMD(temp, temp + 16 * 4, temp + 16 * 5, temp + 16 * 6, temp + 16 * 7, \
+ MASK + 1); \
+ memcpy(dst_r + n, temp + 16 * 4, r); \
+ memcpy(dst_g + n, temp + 16 * 5, r); \
+ memcpy(dst_b + n, temp + 16 * 6, r); \
+ memcpy(dst_a + n, temp + 16 * 7, r); \
+ }
+
+#ifdef HAS_SPLITARGBROW_SSE2
+ANY14(SplitARGBRow_Any_SSE2, SplitARGBRow_SSE2, 4, 7)
+#endif
+#ifdef HAS_SPLITARGBROW_SSSE3
+ANY14(SplitARGBRow_Any_SSSE3, SplitARGBRow_SSSE3, 4, 7)
+#endif
+#ifdef HAS_SPLITARGBROW_AVX2
+ANY14(SplitARGBRow_Any_AVX2, SplitARGBRow_AVX2, 4, 15)
+#endif
+#ifdef HAS_SPLITARGBROW_NEON
+ANY14(SplitARGBRow_Any_NEON, SplitARGBRow_NEON, 4, 15)
+#endif
// Any 1 to 2 with source stride (2 rows of source). Outputs UV planes.
// 128 byte row allows for 32 avx ARGB pixels.
#define ANY12S(NAMEANY, ANY_SIMD, UVSHIFT, BPP, MASK) \
- void NAMEANY(const uint8_t* src_ptr, int src_stride_ptr, uint8_t* dst_u, \
+ void NAMEANY(const uint8_t* src_ptr, int src_stride, uint8_t* dst_u, \
uint8_t* dst_v, int width) { \
SIMD_ALIGNED(uint8_t temp[128 * 4]); \
memset(temp, 0, 128 * 2); /* for msan */ \
int r = width & MASK; \
int n = width & ~MASK; \
if (n > 0) { \
- ANY_SIMD(src_ptr, src_stride_ptr, dst_u, dst_v, n); \
+ ANY_SIMD(src_ptr, src_stride, dst_u, dst_v, n); \
} \
memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \
- memcpy(temp + 128, src_ptr + src_stride_ptr + (n >> UVSHIFT) * BPP, \
+ memcpy(temp + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \
SS(r, UVSHIFT) * BPP); \
if ((width & 1) && UVSHIFT == 0) { /* repeat last pixel for subsample */ \
memcpy(temp + SS(r, UVSHIFT) * BPP, temp + SS(r, UVSHIFT) * BPP - BPP, \
@@ -1528,17 +2037,17 @@ ANY12S(UYVYToUVRow_Any_MMI, UYVYToUVRow_MMI, 1, 4, 15)
// Any 1 to 1 with source stride (2 rows of source). Outputs UV plane.
// 128 byte row allows for 32 avx ARGB pixels.
#define ANY11S(NAMEANY, ANY_SIMD, UVSHIFT, BPP, MASK) \
- void NAMEANY(const uint8_t* src_ptr, int src_stride_ptr, uint8_t* dst_vu, \
+ void NAMEANY(const uint8_t* src_ptr, int src_stride, uint8_t* dst_vu, \
int width) { \
SIMD_ALIGNED(uint8_t temp[128 * 3]); \
memset(temp, 0, 128 * 2); /* for msan */ \
int r = width & MASK; \
int n = width & ~MASK; \
if (n > 0) { \
- ANY_SIMD(src_ptr, src_stride_ptr, dst_vu, n); \
+ ANY_SIMD(src_ptr, src_stride, dst_vu, n); \
} \
memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \
- memcpy(temp + 128, src_ptr + src_stride_ptr + (n >> UVSHIFT) * BPP, \
+ memcpy(temp + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \
SS(r, UVSHIFT) * BPP); \
if ((width & 1) && UVSHIFT == 0) { /* repeat last pixel for subsample */ \
memcpy(temp + SS(r, UVSHIFT) * BPP, temp + SS(r, UVSHIFT) * BPP - BPP, \
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_common.cc b/third-party/libyuv/third_party/libyuv/source/row_common.cc
similarity index 75%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_common.cc
rename to third-party/libyuv/third_party/libyuv/source/row_common.cc
index 79aed5c787..517b70562f 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_common.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_common.cc
@@ -10,6 +10,7 @@
#include "libyuv/row.h"
+#include
#include
#include // For memcpy and memset.
@@ -21,10 +22,14 @@ namespace libyuv {
extern "C" {
#endif
-// The following ifdef from row_win makes the C code match the row_win code,
-// which is 7 bit fixed point.
+// This macro control YUV to RGB using unsigned math to extend range of
+// YUV to RGB coefficients to 0 to 4 instead of 0 to 2 for more accuracy on B:
+// LIBYUV_UNLIMITED_DATA
+
+// The following macro from row_win makes the C code match the row_win code,
+// which is 7 bit fixed point for ARGBToI420:
#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \
- (defined(_M_IX86) || (defined(_M_X64) && !defined(__clang__)))
+ !defined(__clang__) && (defined(_M_IX86) || defined(_M_X64))
#define LIBYUV_RGB7 1
#endif
@@ -50,6 +55,11 @@ static __inline int32_t clamp1023(int32_t v) {
return (-(v >= 1023) | v) & 1023;
}
+// clamp to max
+static __inline int32_t ClampMax(int32_t v, int32_t max) {
+ return (-(v >= max) | v) & max;
+}
+
static __inline uint32_t Abs(int32_t v) {
int m = -(v < 0);
return (v + m) ^ m;
@@ -67,6 +77,10 @@ static __inline int32_t clamp1023(int32_t v) {
return (v > 1023) ? 1023 : v;
}
+static __inline int32_t ClampMax(int32_t v, int32_t max) {
+ return (v > max) ? max : v;
+}
+
static __inline uint32_t Abs(int32_t v) {
return (v < 0) ? -v : v;
}
@@ -413,6 +427,82 @@ void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width) {
}
}
+void ARGBToAR64Row_C(const uint8_t* src_argb, uint16_t* dst_ar64, int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_ar64[0] = src_argb[0] * 0x0101;
+ dst_ar64[1] = src_argb[1] * 0x0101;
+ dst_ar64[2] = src_argb[2] * 0x0101;
+ dst_ar64[3] = src_argb[3] * 0x0101;
+ dst_ar64 += 4;
+ src_argb += 4;
+ }
+}
+
+void ARGBToAB64Row_C(const uint8_t* src_argb, uint16_t* dst_ab64, int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_ab64[0] = src_argb[2] * 0x0101;
+ dst_ab64[1] = src_argb[1] * 0x0101;
+ dst_ab64[2] = src_argb[0] * 0x0101;
+ dst_ab64[3] = src_argb[3] * 0x0101;
+ dst_ab64 += 4;
+ src_argb += 4;
+ }
+}
+
+void AR64ToARGBRow_C(const uint16_t* src_ar64, uint8_t* dst_argb, int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_argb[0] = src_ar64[0] >> 8;
+ dst_argb[1] = src_ar64[1] >> 8;
+ dst_argb[2] = src_ar64[2] >> 8;
+ dst_argb[3] = src_ar64[3] >> 8;
+ dst_argb += 4;
+ src_ar64 += 4;
+ }
+}
+
+void AB64ToARGBRow_C(const uint16_t* src_ab64, uint8_t* dst_argb, int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_argb[0] = src_ab64[2] >> 8;
+ dst_argb[1] = src_ab64[1] >> 8;
+ dst_argb[2] = src_ab64[0] >> 8;
+ dst_argb[3] = src_ab64[3] >> 8;
+ dst_argb += 4;
+ src_ab64 += 4;
+ }
+}
+
+// TODO(fbarchard): Make shuffle compatible with SIMD versions
+void AR64ShuffleRow_C(const uint8_t* src_ar64,
+ uint8_t* dst_ar64,
+ const uint8_t* shuffler,
+ int width) {
+ const uint16_t* src_ar64_16 = (const uint16_t*)src_ar64;
+ uint16_t* dst_ar64_16 = (uint16_t*)dst_ar64;
+ int index0 = shuffler[0] / 2;
+ int index1 = shuffler[2] / 2;
+ int index2 = shuffler[4] / 2;
+ int index3 = shuffler[6] / 2;
+ // Shuffle a row of AR64.
+ int x;
+ for (x = 0; x < width / 2; ++x) {
+ // To support in-place conversion.
+ uint16_t b = src_ar64_16[index0];
+ uint16_t g = src_ar64_16[index1];
+ uint16_t r = src_ar64_16[index2];
+ uint16_t a = src_ar64_16[index3];
+ dst_ar64_16[0] = b;
+ dst_ar64_16[1] = g;
+ dst_ar64_16[2] = r;
+ dst_ar64_16[3] = a;
+ src_ar64_16 += 4;
+ dst_ar64_16 += 4;
+ }
+}
+
#ifdef LIBYUV_RGB7
// Old 7 bit math for compatibility on unsupported platforms.
static __inline int RGBToY(uint8_t r, uint8_t g, uint8_t b) {
@@ -462,80 +552,80 @@ static __inline int RGB2xToV(uint16_t r, uint16_t g, uint16_t b) {
// Intel version mimic SSE/AVX which does 2 pavgb
#if LIBYUV_ARGBTOUV_PAVGB
-#define MAKEROWY(NAME, R, G, B, BPP) \
- void NAME##ToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width) { \
- int x; \
- for (x = 0; x < width; ++x) { \
- dst_y[0] = RGBToY(src_argb0[R], src_argb0[G], src_argb0[B]); \
- src_argb0 += BPP; \
- dst_y += 1; \
- } \
- } \
- void NAME##ToUVRow_C(const uint8_t* src_rgb0, int src_stride_rgb, \
- uint8_t* dst_u, uint8_t* dst_v, int width) { \
- const uint8_t* src_rgb1 = src_rgb0 + src_stride_rgb; \
- int x; \
- for (x = 0; x < width - 1; x += 2) { \
- uint8_t ab = AVGB(AVGB(src_rgb0[B], src_rgb1[B]), \
- AVGB(src_rgb0[B + BPP], src_rgb1[B + BPP])); \
- uint8_t ag = AVGB(AVGB(src_rgb0[G], src_rgb1[G]), \
- AVGB(src_rgb0[G + BPP], src_rgb1[G + BPP])); \
- uint8_t ar = AVGB(AVGB(src_rgb0[R], src_rgb1[R]), \
- AVGB(src_rgb0[R + BPP], src_rgb1[R + BPP])); \
- dst_u[0] = RGBToU(ar, ag, ab); \
- dst_v[0] = RGBToV(ar, ag, ab); \
- src_rgb0 += BPP * 2; \
- src_rgb1 += BPP * 2; \
- dst_u += 1; \
- dst_v += 1; \
- } \
- if (width & 1) { \
- uint8_t ab = AVGB(src_rgb0[B], src_rgb1[B]); \
- uint8_t ag = AVGB(src_rgb0[G], src_rgb1[G]); \
- uint8_t ar = AVGB(src_rgb0[R], src_rgb1[R]); \
- dst_u[0] = RGBToU(ar, ag, ab); \
- dst_v[0] = RGBToV(ar, ag, ab); \
- } \
+#define MAKEROWY(NAME, R, G, B, BPP) \
+ void NAME##ToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width) { \
+ int x; \
+ for (x = 0; x < width; ++x) { \
+ dst_y[0] = RGBToY(src_rgb[R], src_rgb[G], src_rgb[B]); \
+ src_rgb += BPP; \
+ dst_y += 1; \
+ } \
+ } \
+ void NAME##ToUVRow_C(const uint8_t* src_rgb, int src_stride_rgb, \
+ uint8_t* dst_u, uint8_t* dst_v, int width) { \
+ const uint8_t* src_rgb1 = src_rgb + src_stride_rgb; \
+ int x; \
+ for (x = 0; x < width - 1; x += 2) { \
+ uint8_t ab = AVGB(AVGB(src_rgb[B], src_rgb1[B]), \
+ AVGB(src_rgb[B + BPP], src_rgb1[B + BPP])); \
+ uint8_t ag = AVGB(AVGB(src_rgb[G], src_rgb1[G]), \
+ AVGB(src_rgb[G + BPP], src_rgb1[G + BPP])); \
+ uint8_t ar = AVGB(AVGB(src_rgb[R], src_rgb1[R]), \
+ AVGB(src_rgb[R + BPP], src_rgb1[R + BPP])); \
+ dst_u[0] = RGBToU(ar, ag, ab); \
+ dst_v[0] = RGBToV(ar, ag, ab); \
+ src_rgb += BPP * 2; \
+ src_rgb1 += BPP * 2; \
+ dst_u += 1; \
+ dst_v += 1; \
+ } \
+ if (width & 1) { \
+ uint8_t ab = AVGB(src_rgb[B], src_rgb1[B]); \
+ uint8_t ag = AVGB(src_rgb[G], src_rgb1[G]); \
+ uint8_t ar = AVGB(src_rgb[R], src_rgb1[R]); \
+ dst_u[0] = RGBToU(ar, ag, ab); \
+ dst_v[0] = RGBToV(ar, ag, ab); \
+ } \
}
#else
// ARM version does sum / 2 then multiply by 2x smaller coefficients
-#define MAKEROWY(NAME, R, G, B, BPP) \
- void NAME##ToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width) { \
- int x; \
- for (x = 0; x < width; ++x) { \
- dst_y[0] = RGBToY(src_argb0[R], src_argb0[G], src_argb0[B]); \
- src_argb0 += BPP; \
- dst_y += 1; \
- } \
- } \
- void NAME##ToUVRow_C(const uint8_t* src_rgb0, int src_stride_rgb, \
- uint8_t* dst_u, uint8_t* dst_v, int width) { \
- const uint8_t* src_rgb1 = src_rgb0 + src_stride_rgb; \
- int x; \
- for (x = 0; x < width - 1; x += 2) { \
- uint16_t ab = (src_rgb0[B] + src_rgb0[B + BPP] + src_rgb1[B] + \
- src_rgb1[B + BPP] + 1) >> \
- 1; \
- uint16_t ag = (src_rgb0[G] + src_rgb0[G + BPP] + src_rgb1[G] + \
- src_rgb1[G + BPP] + 1) >> \
- 1; \
- uint16_t ar = (src_rgb0[R] + src_rgb0[R + BPP] + src_rgb1[R] + \
- src_rgb1[R + BPP] + 1) >> \
- 1; \
- dst_u[0] = RGB2xToU(ar, ag, ab); \
- dst_v[0] = RGB2xToV(ar, ag, ab); \
- src_rgb0 += BPP * 2; \
- src_rgb1 += BPP * 2; \
- dst_u += 1; \
- dst_v += 1; \
- } \
- if (width & 1) { \
- uint16_t ab = src_rgb0[B] + src_rgb1[B]; \
- uint16_t ag = src_rgb0[G] + src_rgb1[G]; \
- uint16_t ar = src_rgb0[R] + src_rgb1[R]; \
- dst_u[0] = RGB2xToU(ar, ag, ab); \
- dst_v[0] = RGB2xToV(ar, ag, ab); \
- } \
+#define MAKEROWY(NAME, R, G, B, BPP) \
+ void NAME##ToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width) { \
+ int x; \
+ for (x = 0; x < width; ++x) { \
+ dst_y[0] = RGBToY(src_rgb[R], src_rgb[G], src_rgb[B]); \
+ src_rgb += BPP; \
+ dst_y += 1; \
+ } \
+ } \
+ void NAME##ToUVRow_C(const uint8_t* src_rgb, int src_stride_rgb, \
+ uint8_t* dst_u, uint8_t* dst_v, int width) { \
+ const uint8_t* src_rgb1 = src_rgb + src_stride_rgb; \
+ int x; \
+ for (x = 0; x < width - 1; x += 2) { \
+ uint16_t ab = (src_rgb[B] + src_rgb[B + BPP] + src_rgb1[B] + \
+ src_rgb1[B + BPP] + 1) >> \
+ 1; \
+ uint16_t ag = (src_rgb[G] + src_rgb[G + BPP] + src_rgb1[G] + \
+ src_rgb1[G + BPP] + 1) >> \
+ 1; \
+ uint16_t ar = (src_rgb[R] + src_rgb[R + BPP] + src_rgb1[R] + \
+ src_rgb1[R + BPP] + 1) >> \
+ 1; \
+ dst_u[0] = RGB2xToU(ar, ag, ab); \
+ dst_v[0] = RGB2xToV(ar, ag, ab); \
+ src_rgb += BPP * 2; \
+ src_rgb1 += BPP * 2; \
+ dst_u += 1; \
+ dst_v += 1; \
+ } \
+ if (width & 1) { \
+ uint16_t ab = src_rgb[B] + src_rgb1[B]; \
+ uint16_t ag = src_rgb[G] + src_rgb1[G]; \
+ uint16_t ar = src_rgb[R] + src_rgb1[R]; \
+ dst_u[0] = RGB2xToU(ar, ag, ab); \
+ dst_v[0] = RGB2xToV(ar, ag, ab); \
+ } \
}
#endif
@@ -603,80 +693,80 @@ static __inline int RGB2xToVJ(uint16_t r, uint16_t g, uint16_t b) {
// ARGBToYJ_C and ARGBToUVJ_C
// Intel version mimic SSE/AVX which does 2 pavgb
#if LIBYUV_ARGBTOUV_PAVGB
-#define MAKEROWYJ(NAME, R, G, B, BPP) \
- void NAME##ToYJRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width) { \
- int x; \
- for (x = 0; x < width; ++x) { \
- dst_y[0] = RGBToYJ(src_argb0[R], src_argb0[G], src_argb0[B]); \
- src_argb0 += BPP; \
- dst_y += 1; \
- } \
- } \
- void NAME##ToUVJRow_C(const uint8_t* src_rgb0, int src_stride_rgb, \
- uint8_t* dst_u, uint8_t* dst_v, int width) { \
- const uint8_t* src_rgb1 = src_rgb0 + src_stride_rgb; \
- int x; \
- for (x = 0; x < width - 1; x += 2) { \
- uint8_t ab = AVGB(AVGB(src_rgb0[B], src_rgb1[B]), \
- AVGB(src_rgb0[B + BPP], src_rgb1[B + BPP])); \
- uint8_t ag = AVGB(AVGB(src_rgb0[G], src_rgb1[G]), \
- AVGB(src_rgb0[G + BPP], src_rgb1[G + BPP])); \
- uint8_t ar = AVGB(AVGB(src_rgb0[R], src_rgb1[R]), \
- AVGB(src_rgb0[R + BPP], src_rgb1[R + BPP])); \
- dst_u[0] = RGBToUJ(ar, ag, ab); \
- dst_v[0] = RGBToVJ(ar, ag, ab); \
- src_rgb0 += BPP * 2; \
- src_rgb1 += BPP * 2; \
- dst_u += 1; \
- dst_v += 1; \
- } \
- if (width & 1) { \
- uint8_t ab = AVGB(src_rgb0[B], src_rgb1[B]); \
- uint8_t ag = AVGB(src_rgb0[G], src_rgb1[G]); \
- uint8_t ar = AVGB(src_rgb0[R], src_rgb1[R]); \
- dst_u[0] = RGBToUJ(ar, ag, ab); \
- dst_v[0] = RGBToVJ(ar, ag, ab); \
- } \
+#define MAKEROWYJ(NAME, R, G, B, BPP) \
+ void NAME##ToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width) { \
+ int x; \
+ for (x = 0; x < width; ++x) { \
+ dst_y[0] = RGBToYJ(src_rgb[R], src_rgb[G], src_rgb[B]); \
+ src_rgb += BPP; \
+ dst_y += 1; \
+ } \
+ } \
+ void NAME##ToUVJRow_C(const uint8_t* src_rgb, int src_stride_rgb, \
+ uint8_t* dst_u, uint8_t* dst_v, int width) { \
+ const uint8_t* src_rgb1 = src_rgb + src_stride_rgb; \
+ int x; \
+ for (x = 0; x < width - 1; x += 2) { \
+ uint8_t ab = AVGB(AVGB(src_rgb[B], src_rgb1[B]), \
+ AVGB(src_rgb[B + BPP], src_rgb1[B + BPP])); \
+ uint8_t ag = AVGB(AVGB(src_rgb[G], src_rgb1[G]), \
+ AVGB(src_rgb[G + BPP], src_rgb1[G + BPP])); \
+ uint8_t ar = AVGB(AVGB(src_rgb[R], src_rgb1[R]), \
+ AVGB(src_rgb[R + BPP], src_rgb1[R + BPP])); \
+ dst_u[0] = RGBToUJ(ar, ag, ab); \
+ dst_v[0] = RGBToVJ(ar, ag, ab); \
+ src_rgb += BPP * 2; \
+ src_rgb1 += BPP * 2; \
+ dst_u += 1; \
+ dst_v += 1; \
+ } \
+ if (width & 1) { \
+ uint8_t ab = AVGB(src_rgb[B], src_rgb1[B]); \
+ uint8_t ag = AVGB(src_rgb[G], src_rgb1[G]); \
+ uint8_t ar = AVGB(src_rgb[R], src_rgb1[R]); \
+ dst_u[0] = RGBToUJ(ar, ag, ab); \
+ dst_v[0] = RGBToVJ(ar, ag, ab); \
+ } \
}
#else
// ARM version does sum / 2 then multiply by 2x smaller coefficients
-#define MAKEROWYJ(NAME, R, G, B, BPP) \
- void NAME##ToYJRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width) { \
- int x; \
- for (x = 0; x < width; ++x) { \
- dst_y[0] = RGBToYJ(src_argb0[R], src_argb0[G], src_argb0[B]); \
- src_argb0 += BPP; \
- dst_y += 1; \
- } \
- } \
- void NAME##ToUVJRow_C(const uint8_t* src_rgb0, int src_stride_rgb, \
- uint8_t* dst_u, uint8_t* dst_v, int width) { \
- const uint8_t* src_rgb1 = src_rgb0 + src_stride_rgb; \
- int x; \
- for (x = 0; x < width - 1; x += 2) { \
- uint16_t ab = (src_rgb0[B] + src_rgb0[B + BPP] + src_rgb1[B] + \
- src_rgb1[B + BPP] + 1) >> \
- 1; \
- uint16_t ag = (src_rgb0[G] + src_rgb0[G + BPP] + src_rgb1[G] + \
- src_rgb1[G + BPP] + 1) >> \
- 1; \
- uint16_t ar = (src_rgb0[R] + src_rgb0[R + BPP] + src_rgb1[R] + \
- src_rgb1[R + BPP] + 1) >> \
- 1; \
- dst_u[0] = RGB2xToUJ(ar, ag, ab); \
- dst_v[0] = RGB2xToVJ(ar, ag, ab); \
- src_rgb0 += BPP * 2; \
- src_rgb1 += BPP * 2; \
- dst_u += 1; \
- dst_v += 1; \
- } \
- if (width & 1) { \
- uint16_t ab = (src_rgb0[B] + src_rgb1[B]); \
- uint16_t ag = (src_rgb0[G] + src_rgb1[G]); \
- uint16_t ar = (src_rgb0[R] + src_rgb1[R]); \
- dst_u[0] = RGB2xToUJ(ar, ag, ab); \
- dst_v[0] = RGB2xToVJ(ar, ag, ab); \
- } \
+#define MAKEROWYJ(NAME, R, G, B, BPP) \
+ void NAME##ToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width) { \
+ int x; \
+ for (x = 0; x < width; ++x) { \
+ dst_y[0] = RGBToYJ(src_rgb[R], src_rgb[G], src_rgb[B]); \
+ src_rgb += BPP; \
+ dst_y += 1; \
+ } \
+ } \
+ void NAME##ToUVJRow_C(const uint8_t* src_rgb, int src_stride_rgb, \
+ uint8_t* dst_u, uint8_t* dst_v, int width) { \
+ const uint8_t* src_rgb1 = src_rgb + src_stride_rgb; \
+ int x; \
+ for (x = 0; x < width - 1; x += 2) { \
+ uint16_t ab = (src_rgb[B] + src_rgb[B + BPP] + src_rgb1[B] + \
+ src_rgb1[B + BPP] + 1) >> \
+ 1; \
+ uint16_t ag = (src_rgb[G] + src_rgb[G + BPP] + src_rgb1[G] + \
+ src_rgb1[G + BPP] + 1) >> \
+ 1; \
+ uint16_t ar = (src_rgb[R] + src_rgb[R + BPP] + src_rgb1[R] + \
+ src_rgb1[R + BPP] + 1) >> \
+ 1; \
+ dst_u[0] = RGB2xToUJ(ar, ag, ab); \
+ dst_v[0] = RGB2xToVJ(ar, ag, ab); \
+ src_rgb += BPP * 2; \
+ src_rgb1 += BPP * 2; \
+ dst_u += 1; \
+ dst_v += 1; \
+ } \
+ if (width & 1) { \
+ uint16_t ab = (src_rgb[B] + src_rgb1[B]); \
+ uint16_t ag = (src_rgb[G] + src_rgb1[G]); \
+ uint16_t ar = (src_rgb[R] + src_rgb1[R]); \
+ dst_u[0] = RGB2xToUJ(ar, ag, ab); \
+ dst_v[0] = RGB2xToVJ(ar, ag, ab); \
+ } \
}
#endif
@@ -875,7 +965,7 @@ void ARGB1555ToUVRow_C(const uint8_t* src_argb1555,
uint8_t r0 = (src_argb1555[1] & 0x7c) >> 2;
uint8_t b2 = next_argb1555[0] & 0x1f;
uint8_t g2 = (next_argb1555[0] >> 5) | ((next_argb1555[1] & 0x03) << 3);
- uint8_t r2 = next_argb1555[1] >> 3;
+ uint8_t r2 = (next_argb1555[1] & 0x7c) >> 2;
b0 = (b0 << 3) | (b0 >> 2);
g0 = (g0 << 3) | (g0 >> 2);
@@ -1146,16 +1236,16 @@ void ARGBShadeRow_C(const uint8_t* src_argb,
#define REPEAT8(v) (v) | ((v) << 8)
#define SHADE(f, v) v* f >> 16
-void ARGBMultiplyRow_C(const uint8_t* src_argb0,
+void ARGBMultiplyRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
int i;
for (i = 0; i < width; ++i) {
- const uint32_t b = REPEAT8(src_argb0[0]);
- const uint32_t g = REPEAT8(src_argb0[1]);
- const uint32_t r = REPEAT8(src_argb0[2]);
- const uint32_t a = REPEAT8(src_argb0[3]);
+ const uint32_t b = REPEAT8(src_argb[0]);
+ const uint32_t g = REPEAT8(src_argb[1]);
+ const uint32_t r = REPEAT8(src_argb[2]);
+ const uint32_t a = REPEAT8(src_argb[3]);
const uint32_t b_scale = src_argb1[0];
const uint32_t g_scale = src_argb1[1];
const uint32_t r_scale = src_argb1[2];
@@ -1164,7 +1254,7 @@ void ARGBMultiplyRow_C(const uint8_t* src_argb0,
dst_argb[1] = SHADE(g, g_scale);
dst_argb[2] = SHADE(r, r_scale);
dst_argb[3] = SHADE(a, a_scale);
- src_argb0 += 4;
+ src_argb += 4;
src_argb1 += 4;
dst_argb += 4;
}
@@ -1174,16 +1264,16 @@ void ARGBMultiplyRow_C(const uint8_t* src_argb0,
#define SHADE(f, v) clamp255(v + f)
-void ARGBAddRow_C(const uint8_t* src_argb0,
+void ARGBAddRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
int i;
for (i = 0; i < width; ++i) {
- const int b = src_argb0[0];
- const int g = src_argb0[1];
- const int r = src_argb0[2];
- const int a = src_argb0[3];
+ const int b = src_argb[0];
+ const int g = src_argb[1];
+ const int r = src_argb[2];
+ const int a = src_argb[3];
const int b_add = src_argb1[0];
const int g_add = src_argb1[1];
const int r_add = src_argb1[2];
@@ -1192,7 +1282,7 @@ void ARGBAddRow_C(const uint8_t* src_argb0,
dst_argb[1] = SHADE(g, g_add);
dst_argb[2] = SHADE(r, r_add);
dst_argb[3] = SHADE(a, a_add);
- src_argb0 += 4;
+ src_argb += 4;
src_argb1 += 4;
dst_argb += 4;
}
@@ -1201,16 +1291,16 @@ void ARGBAddRow_C(const uint8_t* src_argb0,
#define SHADE(f, v) clamp0(f - v)
-void ARGBSubtractRow_C(const uint8_t* src_argb0,
+void ARGBSubtractRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
int i;
for (i = 0; i < width; ++i) {
- const int b = src_argb0[0];
- const int g = src_argb0[1];
- const int r = src_argb0[2];
- const int a = src_argb0[3];
+ const int b = src_argb[0];
+ const int g = src_argb[1];
+ const int r = src_argb[2];
+ const int a = src_argb[3];
const int b_sub = src_argb1[0];
const int g_sub = src_argb1[1];
const int r_sub = src_argb1[2];
@@ -1219,7 +1309,7 @@ void ARGBSubtractRow_C(const uint8_t* src_argb0,
dst_argb[1] = SHADE(g, g_sub);
dst_argb[2] = SHADE(r, r_sub);
dst_argb[3] = SHADE(a, a_sub);
- src_argb0 += 4;
+ src_argb += 4;
src_argb1 += 4;
dst_argb += 4;
}
@@ -1327,351 +1417,241 @@ void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width) {
}
}
-// TODO(fbarchard): Unify these structures to be platform independent.
-// TODO(fbarchard): Generate SIMD structures from float matrix.
+// Macros to create SIMD specific yuv to rgb conversion constants.
-// BT.601 YUV to RGB reference
-// R = (Y - 16) * 1.164 - V * -1.596
-// G = (Y - 16) * 1.164 - U * 0.391 - V * 0.813
-// B = (Y - 16) * 1.164 - U * -2.018
+// clang-format off
-// Y contribution to R,G,B. Scale and bias.
-#define YG 18997 /* round(1.164 * 64 * 256 * 256 / 257) */
-#define YGB -1160 /* 1.164 * 64 * -16 + 64 / 2 */
-
-// U and V contributions to R,G,B.
-#define UB -128 /* max(-128, round(-2.018 * 64)) */
-#define UG 25 /* round(0.391 * 64) */
-#define VG 52 /* round(0.813 * 64) */
-#define VR -102 /* round(-1.596 * 64) */
-
-// Bias values to subtract 16 from Y and 128 from U and V.
-#define BB (UB * 128 + YGB)
-#define BG (UG * 128 + VG * 128 + YGB)
-#define BR (VR * 128 + YGB)
-
-#if defined(__aarch64__) // 64 bit arm
-const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants) = {
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants) = {
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-#elif defined(__arm__) // 32 bit arm
-const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants) = {
- {-UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0},
- {UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants) = {
- {-VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0},
- {VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
+#if defined(__aarch64__) || defined(__arm__)
+// Bias values include subtract 128 from U and V, bias from Y and rounding.
+// For B and R bias is negative. For G bias is positive.
+#define YUVCONSTANTSBODY(YG, YB, UB, UG, VG, VR) \
+ {{UB, VR, UG, VG, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \
+ {YG, (UB * 128 - YB), (UG * 128 + VG * 128 + YB), (VR * 128 - YB), YB, 0, \
+ 0, 0}}
#else
-const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants) = {
- {UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0,
- UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0},
- {UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG,
- UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG},
- {0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR,
- 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
-const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants) = {
- {VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0,
- VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0},
- {VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG,
- VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG},
- {0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB,
- 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
+#define YUVCONSTANTSBODY(YG, YB, UB, UG, VG, VR) \
+ {{UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, \
+ UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0}, \
+ {UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, \
+ UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG}, \
+ {0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, \
+ 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR}, \
+ {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG}, \
+ {YB, YB, YB, YB, YB, YB, YB, YB, YB, YB, YB, YB, YB, YB, YB, YB}}
#endif
-#undef BB
-#undef BG
-#undef BR
-#undef YGB
+// clang-format on
+
+#define MAKEYUVCONSTANTS(name, YG, YB, UB, UG, VG, VR) \
+ const struct YuvConstants SIMD_ALIGNED(kYuv##name##Constants) = \
+ YUVCONSTANTSBODY(YG, YB, UB, UG, VG, VR); \
+ const struct YuvConstants SIMD_ALIGNED(kYvu##name##Constants) = \
+ YUVCONSTANTSBODY(YG, YB, VR, VG, UG, UB);
+
+// TODO(fbarchard): Generate SIMD structures from float matrix.
+
+// BT.601 limited range YUV to RGB reference
+// R = (Y - 16) * 1.164 + V * 1.596
+// G = (Y - 16) * 1.164 - U * 0.391 - V * 0.813
+// B = (Y - 16) * 1.164 + U * 2.018
+// KR = 0.299; KB = 0.114
+
+// U and V contributions to R,G,B.
+#ifdef LIBYUV_UNLIMITED_DATA
+#define UB 129 /* round(2.018 * 64) */
+#else
+#define UB 128 /* max(128, round(2.018 * 64)) */
+#endif
+#define UG 25 /* round(0.391 * 64) */
+#define VG 52 /* round(0.813 * 64) */
+#define VR 102 /* round(1.596 * 64) */
+
+// Y contribution to R,G,B. Scale and bias.
+#define YG 18997 /* round(1.164 * 64 * 256 * 256 / 257) */
+#define YB -1160 /* 1.164 * 64 * -16 + 64 / 2 */
+
+MAKEYUVCONSTANTS(I601, YG, YB, UB, UG, VG, VR)
+
+#undef YG
+#undef YB
#undef UB
#undef UG
#undef VG
#undef VR
-#undef YG
-// JPEG YUV to RGB reference
-// * R = Y - V * -1.40200
-// * G = Y - U * 0.34414 - V * 0.71414
-// * B = Y - U * -1.77200
+// BT.601 full range YUV to RGB reference (aka JPEG)
+// * R = Y + V * 1.40200
+// * G = Y - U * 0.34414 - V * 0.71414
+// * B = Y + U * 1.77200
+// KR = 0.299; KB = 0.114
+
+// U and V contributions to R,G,B.
+#define UB 113 /* round(1.77200 * 64) */
+#define UG 22 /* round(0.34414 * 64) */
+#define VG 46 /* round(0.71414 * 64) */
+#define VR 90 /* round(1.40200 * 64) */
// Y contribution to R,G,B. Scale and bias.
#define YG 16320 /* round(1.000 * 64 * 256 * 256 / 257) */
-#define YGB 32 /* 64 / 2 */
+#define YB 32 /* 64 / 2 */
-// U and V contributions to R,G,B.
-#define UB -113 /* round(-1.77200 * 64) */
-#define UG 22 /* round(0.34414 * 64) */
-#define VG 46 /* round(0.71414 * 64) */
-#define VR -90 /* round(-1.40200 * 64) */
+MAKEYUVCONSTANTS(JPEG, YG, YB, UB, UG, VG, VR)
-// Bias values to round, and subtract 128 from U and V.
-#define BB (UB * 128 + YGB)
-#define BG (UG * 128 + VG * 128 + YGB)
-#define BR (VR * 128 + YGB)
-
-#if defined(__aarch64__)
-const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants) = {
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants) = {
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-#elif defined(__arm__)
-const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants) = {
- {-UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0},
- {UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants) = {
- {-VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0},
- {VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-#else
-const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants) = {
- {UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0,
- UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0},
- {UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG,
- UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG},
- {0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR,
- 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
-const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants) = {
- {VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0,
- VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0},
- {VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG,
- VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG},
- {0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB,
- 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
-#endif
-
-#undef BB
-#undef BG
-#undef BR
-#undef YGB
+#undef YG
+#undef YB
#undef UB
#undef UG
#undef VG
#undef VR
-#undef YG
-// BT.709 YUV to RGB reference
-// R = (Y - 16) * 1.164 - V * -1.793
-// G = (Y - 16) * 1.164 - U * 0.213 - V * 0.533
-// B = (Y - 16) * 1.164 - U * -2.112
-// See also http://www.equasys.de/colorconversion.html
+// BT.709 limited range YUV to RGB reference
+// R = (Y - 16) * 1.164 + V * 1.793
+// G = (Y - 16) * 1.164 - U * 0.213 - V * 0.533
+// B = (Y - 16) * 1.164 + U * 2.112
+// KR = 0.2126, KB = 0.0722
+
+// U and V contributions to R,G,B.
+#ifdef LIBYUV_UNLIMITED_DATA
+#define UB 135 /* round(2.112 * 64) */
+#else
+#define UB 128 /* max(128, round(2.112 * 64)) */
+#endif
+#define UG 14 /* round(0.213 * 64) */
+#define VG 34 /* round(0.533 * 64) */
+#define VR 115 /* round(1.793 * 64) */
// Y contribution to R,G,B. Scale and bias.
-#define YG 18997 /* round(1.164 * 64 * 256 * 256 / 257) */
-#define YGB -1160 /* 1.164 * 64 * -16 + 64 / 2 */
+#define YG 18997 /* round(1.164 * 64 * 256 * 256 / 257) */
+#define YB -1160 /* 1.164 * 64 * -16 + 64 / 2 */
-// TODO(fbarchard): Find way to express 2.112 instead of 2.0.
-// U and V contributions to R,G,B.
-#define UB -128 /* max(-128, round(-2.112 * 64)) */
-#define UG 14 /* round(0.213 * 64) */
-#define VG 34 /* round(0.533 * 64) */
-#define VR -115 /* round(-1.793 * 64) */
+MAKEYUVCONSTANTS(H709, YG, YB, UB, UG, VG, VR)
-// Bias values to round, and subtract 128 from U and V.
-#define BB (UB * 128 + YGB)
-#define BG (UG * 128 + VG * 128 + YGB)
-#define BR (VR * 128 + YGB)
-
-#if defined(__aarch64__)
-const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants) = {
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants) = {
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-#elif defined(__arm__)
-const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants) = {
- {-UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0},
- {UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants) = {
- {-VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0},
- {VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-#else
-const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants) = {
- {UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0,
- UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0},
- {UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG,
- UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG},
- {0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR,
- 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
-const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants) = {
- {VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0,
- VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0},
- {VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG,
- VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG},
- {0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB,
- 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
-#endif
-
-#undef BB
-#undef BG
-#undef BR
-#undef YGB
+#undef YG
+#undef YB
#undef UB
#undef UG
#undef VG
#undef VR
-#undef YG
-// BT.2020 YUV to RGB reference
-// R = (Y - 16) * 1.164384 - V * -1.67867
-// G = (Y - 16) * 1.164384 - U * 0.187326 - V * 0.65042
-// B = (Y - 16) * 1.164384 - U * -2.14177
+// BT.709 full range YUV to RGB reference
+// R = Y + V * 1.5748
+// G = Y - U * 0.18732 - V * 0.46812
+// B = Y + U * 1.8556
+// KR = 0.2126, KB = 0.0722
+
+// U and V contributions to R,G,B.
+#define UB 119 /* round(1.8556 * 64) */
+#define UG 12 /* round(0.18732 * 64) */
+#define VG 30 /* round(0.46812 * 64) */
+#define VR 101 /* round(1.5748 * 64) */
+
+// Y contribution to R,G,B. Scale and bias. (same as jpeg)
+#define YG 16320 /* round(1 * 64 * 256 * 256 / 257) */
+#define YB 32 /* 64 / 2 */
+
+MAKEYUVCONSTANTS(F709, YG, YB, UB, UG, VG, VR)
+
+#undef YG
+#undef YB
+#undef UB
+#undef UG
+#undef VG
+#undef VR
+
+// BT.2020 limited range YUV to RGB reference
+// R = (Y - 16) * 1.164384 + V * 1.67867
+// G = (Y - 16) * 1.164384 - U * 0.187326 - V * 0.65042
+// B = (Y - 16) * 1.164384 + U * 2.14177
+// KR = 0.2627; KB = 0.0593
+
+// U and V contributions to R,G,B.
+#ifdef LIBYUV_UNLIMITED_DATA
+#define UB 137 /* round(2.142 * 64) */
+#else
+#define UB 128 /* max(128, round(2.142 * 64)) */
+#endif
+#define UG 12 /* round(0.187326 * 64) */
+#define VG 42 /* round(0.65042 * 64) */
+#define VR 107 /* round(1.67867 * 64) */
// Y contribution to R,G,B. Scale and bias.
-#define YG 19003 /* round(1.164384 * 64 * 256 * 256 / 257) */
-#define YGB -1160 /* 1.164384 * 64 * -16 + 64 / 2 */
+#define YG 19003 /* round(1.164384 * 64 * 256 * 256 / 257) */
+#define YB -1160 /* 1.164384 * 64 * -16 + 64 / 2 */
-// TODO(fbarchard): Improve accuracy; the B channel is off by 7%.
-// U and V contributions to R,G,B.
-#define UB -128 /* max(-128, round(-2.142 * 64)) */
-#define UG 12 /* round(0.187326 * 64) */
-#define VG 42 /* round(0.65042 * 64) */
-#define VR -107 /* round(-1.67867 * 64) */
+MAKEYUVCONSTANTS(2020, YG, YB, UB, UG, VG, VR)
-// Bias values to round, and subtract 128 from U and V.
-#define BB (UB * 128 + YGB)
-#define BG (UG * 128 + VG * 128 + YGB)
-#define BR (VR * 128 + YGB)
-
-#if defined(__aarch64__)
-const struct YuvConstants SIMD_ALIGNED(kYuv2020Constants) = {
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {-UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {UG, VG, UG, VG, UG, VG, UG, VG},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvu2020Constants) = {
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {-VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {VG, UG, VG, UG, VG, UG, VG, UG},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-#elif defined(__arm__)
-const struct YuvConstants SIMD_ALIGNED(kYuv2020Constants) = {
- {-UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0},
- {UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BB, BG, BR, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-const struct YuvConstants SIMD_ALIGNED(kYvu2020Constants) = {
- {-VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0},
- {VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0},
- {BR, BG, BB, YGB, 0, 0, 0, 0},
- {0x0101 * YG, YG, 0, 0}};
-#else
-const struct YuvConstants SIMD_ALIGNED(kYuv2020Constants) = {
- {UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0,
- UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0},
- {UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG,
- UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG},
- {0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR,
- 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
-const struct YuvConstants SIMD_ALIGNED(kYvu2020Constants) = {
- {VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0,
- VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0},
- {VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG,
- VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG},
- {0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB,
- 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB},
- {BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR},
- {BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG},
- {BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB},
- {YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG},
- {YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB, YGB,
- YGB}};
-#endif
-
-#undef BB
-#undef BG
-#undef BR
-#undef YGB
+#undef YG
+#undef YB
#undef UB
#undef UG
#undef VG
#undef VR
+
+// BT.2020 full range YUV to RGB reference
+// R = Y + V * 1.474600
+// G = Y - U * 0.164553 - V * 0.571353
+// B = Y + U * 1.881400
+// KR = 0.2627; KB = 0.0593
+
+#define UB 120 /* round(1.881400 * 64) */
+#define UG 11 /* round(0.164553 * 64) */
+#define VG 37 /* round(0.571353 * 64) */
+#define VR 94 /* round(1.474600 * 64) */
+
+// Y contribution to R,G,B. Scale and bias. (same as jpeg)
+#define YG 16320 /* round(1 * 64 * 256 * 256 / 257) */
+#define YB 32 /* 64 / 2 */
+
+MAKEYUVCONSTANTS(V2020, YG, YB, UB, UG, VG, VR)
+
#undef YG
+#undef YB
+#undef UB
+#undef UG
+#undef VG
+#undef VR
+
+#undef BB
+#undef BG
+#undef BR
+
+#undef MAKEYUVCONSTANTS
+
+#if defined(__aarch64__) || defined(__arm__)
+#define LOAD_YUV_CONSTANTS \
+ int ub = yuvconstants->kUVCoeff[0]; \
+ int vr = yuvconstants->kUVCoeff[1]; \
+ int ug = yuvconstants->kUVCoeff[2]; \
+ int vg = yuvconstants->kUVCoeff[3]; \
+ int yg = yuvconstants->kRGBCoeffBias[0]; \
+ int bb = yuvconstants->kRGBCoeffBias[1]; \
+ int bg = yuvconstants->kRGBCoeffBias[2]; \
+ int br = yuvconstants->kRGBCoeffBias[3]
+
+#define CALC_RGB16 \
+ int32_t y1 = (uint32_t)(y32 * yg) >> 16; \
+ int b16 = y1 + (u * ub) - bb; \
+ int g16 = y1 + bg - (u * ug + v * vg); \
+ int r16 = y1 + (v * vr) - br
+#else
+#define LOAD_YUV_CONSTANTS \
+ int ub = yuvconstants->kUVToB[0]; \
+ int ug = yuvconstants->kUVToG[0]; \
+ int vg = yuvconstants->kUVToG[1]; \
+ int vr = yuvconstants->kUVToR[1]; \
+ int yg = yuvconstants->kYToRgb[0]; \
+ int yb = yuvconstants->kYBiasToRgb[0]
+
+#define CALC_RGB16 \
+ int32_t y1 = ((uint32_t)(y32 * yg) >> 16) + yb; \
+ int8_t ui = u; \
+ int8_t vi = v; \
+ ui -= 0x80; \
+ vi -= 0x80; \
+ int b16 = y1 + (ui * ub); \
+ int g16 = y1 - (ui * ug + vi * vg); \
+ int r16 = y1 + (vi * vr)
+#endif
// C reference code that mimics the YUV assembly.
// Reads 8 bit YUV and leaves result as 16 bit.
@@ -1682,39 +1662,12 @@ static __inline void YuvPixel(uint8_t y,
uint8_t* g,
uint8_t* r,
const struct YuvConstants* yuvconstants) {
-#if defined(__aarch64__)
- int ub = -yuvconstants->kUVToRB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[1];
- int vr = -yuvconstants->kUVToRB[1];
- int bb = yuvconstants->kUVBiasBGR[0];
- int bg = yuvconstants->kUVBiasBGR[1];
- int br = yuvconstants->kUVBiasBGR[2];
- int yg = yuvconstants->kYToRgb[1];
-#elif defined(__arm__)
- int ub = -yuvconstants->kUVToRB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[4];
- int vr = -yuvconstants->kUVToRB[4];
- int bb = yuvconstants->kUVBiasBGR[0];
- int bg = yuvconstants->kUVBiasBGR[1];
- int br = yuvconstants->kUVBiasBGR[2];
- int yg = yuvconstants->kYToRgb[1];
-#else
- int ub = yuvconstants->kUVToB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[1];
- int vr = yuvconstants->kUVToR[1];
- int bb = yuvconstants->kUVBiasB[0];
- int bg = yuvconstants->kUVBiasG[0];
- int br = yuvconstants->kUVBiasR[0];
- int yg = yuvconstants->kYToRgb[0];
-#endif
-
- uint32_t y1 = (uint32_t)(y * 0x0101 * yg) >> 16;
- *b = Clamp((int32_t)(-(u * ub) + y1 + bb) >> 6);
- *g = Clamp((int32_t)(-(u * ug + v * vg) + y1 + bg) >> 6);
- *r = Clamp((int32_t)(-(v * vr) + y1 + br) >> 6);
+ LOAD_YUV_CONSTANTS;
+ uint32_t y32 = y * 0x0101;
+ CALC_RGB16;
+ *b = Clamp((int32_t)(b16) >> 6);
+ *g = Clamp((int32_t)(g16) >> 6);
+ *r = Clamp((int32_t)(r16) >> 6);
}
// Reads 8 bit YUV and leaves result as 16 bit.
@@ -1725,85 +1678,50 @@ static __inline void YuvPixel8_16(uint8_t y,
int* g,
int* r,
const struct YuvConstants* yuvconstants) {
-#if defined(__aarch64__)
- int ub = -yuvconstants->kUVToRB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[1];
- int vr = -yuvconstants->kUVToRB[1];
- int bb = yuvconstants->kUVBiasBGR[0];
- int bg = yuvconstants->kUVBiasBGR[1];
- int br = yuvconstants->kUVBiasBGR[2];
- int yg = yuvconstants->kYToRgb[1];
-#elif defined(__arm__)
- int ub = -yuvconstants->kUVToRB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[4];
- int vr = -yuvconstants->kUVToRB[4];
- int bb = yuvconstants->kUVBiasBGR[0];
- int bg = yuvconstants->kUVBiasBGR[1];
- int br = yuvconstants->kUVBiasBGR[2];
- int yg = yuvconstants->kYToRgb[1];
-#else
- int ub = yuvconstants->kUVToB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[1];
- int vr = yuvconstants->kUVToR[1];
- int bb = yuvconstants->kUVBiasB[0];
- int bg = yuvconstants->kUVBiasG[0];
- int br = yuvconstants->kUVBiasR[0];
- int yg = yuvconstants->kYToRgb[0];
-#endif
-
- uint32_t y1 = (uint32_t)(y * 0x0101 * yg) >> 16;
- *b = (int)(-(u * ub) + y1 + bb);
- *g = (int)(-(u * ug + v * vg) + y1 + bg);
- *r = (int)(-(v * vr) + y1 + br);
+ LOAD_YUV_CONSTANTS;
+ uint32_t y32 = y * 0x0101;
+ CALC_RGB16;
+ *b = b16;
+ *g = g16;
+ *r = r16;
}
// C reference code that mimics the YUV 16 bit assembly.
// Reads 10 bit YUV and leaves result as 16 bit.
-static __inline void YuvPixel16(int16_t y,
- int16_t u,
- int16_t v,
- int* b,
- int* g,
- int* r,
- const struct YuvConstants* yuvconstants) {
-#if defined(__aarch64__)
- int ub = -yuvconstants->kUVToRB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[1];
- int vr = -yuvconstants->kUVToRB[1];
- int bb = yuvconstants->kUVBiasBGR[0];
- int bg = yuvconstants->kUVBiasBGR[1];
- int br = yuvconstants->kUVBiasBGR[2];
- int yg = yuvconstants->kYToRgb[1];
-#elif defined(__arm__)
- int ub = -yuvconstants->kUVToRB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[4];
- int vr = -yuvconstants->kUVToRB[4];
- int bb = yuvconstants->kUVBiasBGR[0];
- int bg = yuvconstants->kUVBiasBGR[1];
- int br = yuvconstants->kUVBiasBGR[2];
- int yg = yuvconstants->kYToRgb[1];
-#else
- int ub = yuvconstants->kUVToB[0];
- int ug = yuvconstants->kUVToG[0];
- int vg = yuvconstants->kUVToG[1];
- int vr = yuvconstants->kUVToR[1];
- int bb = yuvconstants->kUVBiasB[0];
- int bg = yuvconstants->kUVBiasG[0];
- int br = yuvconstants->kUVBiasR[0];
- int yg = yuvconstants->kYToRgb[0];
-#endif
-
- uint32_t y1 = (uint32_t)((y << 6) * yg) >> 16;
+static __inline void YuvPixel10_16(uint16_t y,
+ uint16_t u,
+ uint16_t v,
+ int* b,
+ int* g,
+ int* r,
+ const struct YuvConstants* yuvconstants) {
+ LOAD_YUV_CONSTANTS;
+ uint32_t y32 = y << 6;
u = clamp255(u >> 2);
v = clamp255(v >> 2);
- *b = (int)(-(u * ub) + y1 + bb);
- *g = (int)(-(u * ug + v * vg) + y1 + bg);
- *r = (int)(-(v * vr) + y1 + br);
+ CALC_RGB16;
+ *b = b16;
+ *g = g16;
+ *r = r16;
+}
+
+// C reference code that mimics the YUV 16 bit assembly.
+// Reads 12 bit YUV and leaves result as 16 bit.
+static __inline void YuvPixel12_16(int16_t y,
+ int16_t u,
+ int16_t v,
+ int* b,
+ int* g,
+ int* r,
+ const struct YuvConstants* yuvconstants) {
+ LOAD_YUV_CONSTANTS;
+ uint32_t y32 = y << 4;
+ u = clamp255(u >> 4);
+ v = clamp255(v >> 4);
+ CALC_RGB16;
+ *b = b16;
+ *g = g16;
+ *r = r16;
}
// C reference code that mimics the YUV 10 bit assembly.
@@ -1818,22 +1736,78 @@ static __inline void YuvPixel10(uint16_t y,
int b16;
int g16;
int r16;
- YuvPixel16(y, u, v, &b16, &g16, &r16, yuvconstants);
+ YuvPixel10_16(y, u, v, &b16, &g16, &r16, yuvconstants);
*b = Clamp(b16 >> 6);
*g = Clamp(g16 >> 6);
*r = Clamp(r16 >> 6);
}
+// C reference code that mimics the YUV 12 bit assembly.
+// Reads 12 bit YUV and clamps down to 8 bit RGB.
+static __inline void YuvPixel12(uint16_t y,
+ uint16_t u,
+ uint16_t v,
+ uint8_t* b,
+ uint8_t* g,
+ uint8_t* r,
+ const struct YuvConstants* yuvconstants) {
+ int b16;
+ int g16;
+ int r16;
+ YuvPixel12_16(y, u, v, &b16, &g16, &r16, yuvconstants);
+ *b = Clamp(b16 >> 6);
+ *g = Clamp(g16 >> 6);
+ *r = Clamp(r16 >> 6);
+}
+
+// C reference code that mimics the YUV 16 bit assembly.
+// Reads 16 bit YUV and leaves result as 8 bit.
+static __inline void YuvPixel16_8(uint16_t y,
+ uint16_t u,
+ uint16_t v,
+ uint8_t* b,
+ uint8_t* g,
+ uint8_t* r,
+ const struct YuvConstants* yuvconstants) {
+ LOAD_YUV_CONSTANTS;
+ uint32_t y32 = y;
+ u = clamp255(u >> 8);
+ v = clamp255(v >> 8);
+ CALC_RGB16;
+ *b = Clamp((int32_t)(b16) >> 6);
+ *g = Clamp((int32_t)(g16) >> 6);
+ *r = Clamp((int32_t)(r16) >> 6);
+}
+
+// C reference code that mimics the YUV 16 bit assembly.
+// Reads 16 bit YUV and leaves result as 16 bit.
+static __inline void YuvPixel16_16(uint16_t y,
+ uint16_t u,
+ uint16_t v,
+ int* b,
+ int* g,
+ int* r,
+ const struct YuvConstants* yuvconstants) {
+ LOAD_YUV_CONSTANTS;
+ uint32_t y32 = y;
+ u = clamp255(u >> 8);
+ v = clamp255(v >> 8);
+ CALC_RGB16;
+ *b = b16;
+ *g = g16;
+ *r = r16;
+}
+
// C reference code that mimics the YUV assembly.
-// Reads 8 bit YUV and leaves result as 16 bit.
+// Reads 8 bit YUV and leaves result as 8 bit.
static __inline void YPixel(uint8_t y,
uint8_t* b,
uint8_t* g,
uint8_t* r,
const struct YuvConstants* yuvconstants) {
#if defined(__aarch64__) || defined(__arm__)
- int ygb = yuvconstants->kUVBiasBGR[3];
- int yg = yuvconstants->kYToRgb[1];
+ int yg = yuvconstants->kRGBCoeffBias[0];
+ int ygb = yuvconstants->kRGBCoeffBias[4];
#else
int ygb = yuvconstants->kYBiasToRgb[0];
int yg = yuvconstants->kYToRgb[0];
@@ -1844,38 +1818,6 @@ static __inline void YPixel(uint8_t y,
*r = Clamp(((int32_t)(y1) + ygb) >> 6);
}
-#if !defined(LIBYUV_DISABLE_NEON) && \
- (defined(__ARM_NEON__) || defined(__aarch64__) || defined(LIBYUV_NEON))
-// C mimic assembly.
-// TODO(fbarchard): Remove subsampling from Neon.
-void I444ToARGBRow_C(const uint8_t* src_y,
- const uint8_t* src_u,
- const uint8_t* src_v,
- uint8_t* rgb_buf,
- const struct YuvConstants* yuvconstants,
- int width) {
- int x;
- for (x = 0; x < width - 1; x += 2) {
- uint8_t u = (src_u[0] + src_u[1] + 1) >> 1;
- uint8_t v = (src_v[0] + src_v[1] + 1) >> 1;
- YuvPixel(src_y[0], u, v, rgb_buf + 0, rgb_buf + 1, rgb_buf + 2,
- yuvconstants);
- rgb_buf[3] = 255;
- YuvPixel(src_y[1], u, v, rgb_buf + 4, rgb_buf + 5, rgb_buf + 6,
- yuvconstants);
- rgb_buf[7] = 255;
- src_y += 2;
- src_u += 2;
- src_v += 2;
- rgb_buf += 8; // Advance 2 pixels.
- }
- if (width & 1) {
- YuvPixel(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
- rgb_buf + 2, yuvconstants);
- rgb_buf[3] = 255;
- }
-}
-#else
void I444ToARGBRow_C(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
@@ -1893,7 +1835,6 @@ void I444ToARGBRow_C(const uint8_t* src_y,
rgb_buf += 4; // Advance 1 pixel.
}
}
-#endif
// Also used for 420
void I422ToARGBRow_C(const uint8_t* src_y,
@@ -1949,9 +1890,102 @@ void I210ToARGBRow_C(const uint16_t* src_y,
}
}
+void I410ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ YuvPixel10(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
+ rgb_buf + 2, yuvconstants);
+ rgb_buf[3] = 255;
+ src_y += 1;
+ src_u += 1;
+ src_v += 1;
+ rgb_buf += 4; // Advance 1 pixels.
+ }
+}
+
+void I210AlphaToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ const uint16_t* src_a,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ for (x = 0; x < width - 1; x += 2) {
+ YuvPixel10(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
+ rgb_buf + 2, yuvconstants);
+ rgb_buf[3] = clamp255(src_a[0] >> 2);
+ YuvPixel10(src_y[1], src_u[0], src_v[0], rgb_buf + 4, rgb_buf + 5,
+ rgb_buf + 6, yuvconstants);
+ rgb_buf[7] = clamp255(src_a[1] >> 2);
+ src_y += 2;
+ src_u += 1;
+ src_v += 1;
+ src_a += 2;
+ rgb_buf += 8; // Advance 2 pixels.
+ }
+ if (width & 1) {
+ YuvPixel10(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
+ rgb_buf + 2, yuvconstants);
+ rgb_buf[3] = clamp255(src_a[0] >> 2);
+ }
+}
+
+void I410AlphaToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ const uint16_t* src_a,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ YuvPixel10(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
+ rgb_buf + 2, yuvconstants);
+ rgb_buf[3] = clamp255(src_a[0] >> 2);
+ src_y += 1;
+ src_u += 1;
+ src_v += 1;
+ src_a += 1;
+ rgb_buf += 4; // Advance 1 pixels.
+ }
+}
+
+// 12 bit YUV to ARGB
+void I212ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ for (x = 0; x < width - 1; x += 2) {
+ YuvPixel12(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
+ rgb_buf + 2, yuvconstants);
+ rgb_buf[3] = 255;
+ YuvPixel12(src_y[1], src_u[0], src_v[0], rgb_buf + 4, rgb_buf + 5,
+ rgb_buf + 6, yuvconstants);
+ rgb_buf[7] = 255;
+ src_y += 2;
+ src_u += 1;
+ src_v += 1;
+ rgb_buf += 8; // Advance 2 pixels.
+ }
+ if (width & 1) {
+ YuvPixel12(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
+ rgb_buf + 2, yuvconstants);
+ rgb_buf[3] = 255;
+ }
+}
+
static void StoreAR30(uint8_t* rgb_buf, int b, int g, int r) {
uint32_t ar30;
- b = b >> 4; // convert 10.6 to 10 bit.
+ b = b >> 4; // convert 8 bit 10.6 to 10 bit.
g = g >> 4;
r = r >> 4;
b = Clamp10(b);
@@ -1973,9 +2007,9 @@ void I210ToAR30Row_C(const uint16_t* src_y,
int g;
int r;
for (x = 0; x < width - 1; x += 2) {
- YuvPixel16(src_y[0], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
+ YuvPixel10_16(src_y[0], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
StoreAR30(rgb_buf, b, g, r);
- YuvPixel16(src_y[1], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
+ YuvPixel10_16(src_y[1], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
StoreAR30(rgb_buf + 4, b, g, r);
src_y += 2;
src_u += 1;
@@ -1983,11 +2017,141 @@ void I210ToAR30Row_C(const uint16_t* src_y,
rgb_buf += 8; // Advance 2 pixels.
}
if (width & 1) {
- YuvPixel16(src_y[0], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
+ YuvPixel10_16(src_y[0], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
StoreAR30(rgb_buf, b, g, r);
}
}
+// 12 bit YUV to 10 bit AR30
+void I212ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ int b;
+ int g;
+ int r;
+ for (x = 0; x < width - 1; x += 2) {
+ YuvPixel12_16(src_y[0], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
+ StoreAR30(rgb_buf, b, g, r);
+ YuvPixel12_16(src_y[1], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
+ StoreAR30(rgb_buf + 4, b, g, r);
+ src_y += 2;
+ src_u += 1;
+ src_v += 1;
+ rgb_buf += 8; // Advance 2 pixels.
+ }
+ if (width & 1) {
+ YuvPixel12_16(src_y[0], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
+ StoreAR30(rgb_buf, b, g, r);
+ }
+}
+
+void I410ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ int b;
+ int g;
+ int r;
+ for (x = 0; x < width; ++x) {
+ YuvPixel10_16(src_y[0], src_u[0], src_v[0], &b, &g, &r, yuvconstants);
+ StoreAR30(rgb_buf, b, g, r);
+ src_y += 1;
+ src_u += 1;
+ src_v += 1;
+ rgb_buf += 4; // Advance 1 pixel.
+ }
+}
+
+// P210 has 10 bits in msb of 16 bit NV12 style layout.
+void P210ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ for (x = 0; x < width - 1; x += 2) {
+ YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], dst_argb + 0, dst_argb + 1,
+ dst_argb + 2, yuvconstants);
+ dst_argb[3] = 255;
+ YuvPixel16_8(src_y[1], src_uv[0], src_uv[1], dst_argb + 4, dst_argb + 5,
+ dst_argb + 6, yuvconstants);
+ dst_argb[7] = 255;
+ src_y += 2;
+ src_uv += 2;
+ dst_argb += 8; // Advance 2 pixels.
+ }
+ if (width & 1) {
+ YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], dst_argb + 0, dst_argb + 1,
+ dst_argb + 2, yuvconstants);
+ dst_argb[3] = 255;
+ }
+}
+
+void P410ToARGBRow_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], dst_argb + 0, dst_argb + 1,
+ dst_argb + 2, yuvconstants);
+ dst_argb[3] = 255;
+ src_y += 1;
+ src_uv += 2;
+ dst_argb += 4; // Advance 1 pixels.
+ }
+}
+
+void P210ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ int b;
+ int g;
+ int r;
+ for (x = 0; x < width - 1; x += 2) {
+ YuvPixel16_16(src_y[0], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
+ StoreAR30(dst_ar30, b, g, r);
+ YuvPixel16_16(src_y[1], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
+ StoreAR30(dst_ar30 + 4, b, g, r);
+ src_y += 2;
+ src_uv += 2;
+ dst_ar30 += 8; // Advance 2 pixels.
+ }
+ if (width & 1) {
+ YuvPixel16_16(src_y[0], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
+ StoreAR30(dst_ar30, b, g, r);
+ }
+}
+
+void P410ToAR30Row_C(const uint16_t* src_y,
+ const uint16_t* src_uv,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ int b;
+ int g;
+ int r;
+ for (x = 0; x < width; ++x) {
+ YuvPixel16_16(src_y[0], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
+ StoreAR30(dst_ar30, b, g, r);
+ src_y += 1;
+ src_uv += 2;
+ dst_ar30 += 4; // Advance 1 pixel.
+ }
+}
+
// 8 bit YUV to 10 bit AR30
// Uses same code as 10 bit YUV bit shifts the 8 bit values up to 10 bits.
void I422ToAR30Row_C(const uint8_t* src_y,
@@ -2016,6 +2180,26 @@ void I422ToAR30Row_C(const uint8_t* src_y,
}
}
+void I444AlphaToARGBRow_C(const uint8_t* src_y,
+ const uint8_t* src_u,
+ const uint8_t* src_v,
+ const uint8_t* src_a,
+ uint8_t* rgb_buf,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ YuvPixel(src_y[0], src_u[0], src_v[0], rgb_buf + 0, rgb_buf + 1,
+ rgb_buf + 2, yuvconstants);
+ rgb_buf[3] = src_a[0];
+ src_y += 1;
+ src_u += 1;
+ src_v += 1;
+ src_a += 1;
+ rgb_buf += 4; // Advance 1 pixel.
+ }
+}
+
void I422AlphaToARGBRow_C(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
@@ -2533,27 +2717,197 @@ void MergeRGBRow_C(const uint8_t* src_r,
}
}
-// Use scale to convert lsb formats to msb, depending how many bits there are:
-// 128 = 9 bits
-// 64 = 10 bits
-// 16 = 12 bits
-// 1 = 16 bits
+void SplitARGBRow_C(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_b[x] = src_argb[0];
+ dst_g[x] = src_argb[1];
+ dst_r[x] = src_argb[2];
+ dst_a[x] = src_argb[3];
+ src_argb += 4;
+ }
+}
+
+void MergeARGBRow_C(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_argb[0] = src_b[x];
+ dst_argb[1] = src_g[x];
+ dst_argb[2] = src_r[x];
+ dst_argb[3] = src_a[x];
+ dst_argb += 4;
+ }
+}
+
+void MergeXR30Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int depth,
+ int width) {
+ assert(depth >= 10);
+ assert(depth <= 16);
+ int x;
+ int shift = depth - 10;
+ uint32_t* dst_ar30_32 = (uint32_t*)dst_ar30;
+ for (x = 0; x < width; ++x) {
+ uint32_t r = clamp1023(src_r[x] >> shift);
+ uint32_t g = clamp1023(src_g[x] >> shift);
+ uint32_t b = clamp1023(src_b[x] >> shift);
+ dst_ar30_32[x] = b | (g << 10) | (r << 20) | 0xc0000000;
+ }
+}
+
+void MergeAR64Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ assert(depth >= 1);
+ assert(depth <= 16);
+ int x;
+ int shift = 16 - depth;
+ int max = (1 << depth) - 1;
+ for (x = 0; x < width; ++x) {
+ dst_ar64[0] = ClampMax(src_b[x], max) << shift;
+ dst_ar64[1] = ClampMax(src_g[x], max) << shift;
+ dst_ar64[2] = ClampMax(src_r[x], max) << shift;
+ dst_ar64[3] = ClampMax(src_a[x], max) << shift;
+ dst_ar64 += 4;
+ }
+}
+
+void MergeARGB16To8Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ assert(depth >= 8);
+ assert(depth <= 16);
+ int x;
+ int shift = depth - 8;
+ for (x = 0; x < width; ++x) {
+ dst_argb[0] = clamp255(src_b[x] >> shift);
+ dst_argb[1] = clamp255(src_g[x] >> shift);
+ dst_argb[2] = clamp255(src_r[x] >> shift);
+ dst_argb[3] = clamp255(src_a[x] >> shift);
+ dst_argb += 4;
+ }
+}
+
+void MergeXR64Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ assert(depth >= 1);
+ assert(depth <= 16);
+ int x;
+ int shift = 16 - depth;
+ int max = (1 << depth) - 1;
+ for (x = 0; x < width; ++x) {
+ dst_ar64[0] = ClampMax(src_b[x], max) << shift;
+ dst_ar64[1] = ClampMax(src_g[x], max) << shift;
+ dst_ar64[2] = ClampMax(src_r[x], max) << shift;
+ dst_ar64[3] = 0xffff;
+ dst_ar64 += 4;
+ }
+}
+
+void MergeXRGB16To8Row_C(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ assert(depth >= 8);
+ assert(depth <= 16);
+ int x;
+ int shift = depth - 8;
+ for (x = 0; x < width; ++x) {
+ dst_argb[0] = clamp255(src_b[x] >> shift);
+ dst_argb[1] = clamp255(src_g[x] >> shift);
+ dst_argb[2] = clamp255(src_r[x] >> shift);
+ dst_argb[3] = 0xff;
+ dst_argb += 4;
+ }
+}
+
+void SplitXRGBRow_C(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_b[x] = src_argb[0];
+ dst_g[x] = src_argb[1];
+ dst_r[x] = src_argb[2];
+ src_argb += 4;
+ }
+}
+
+void MergeXRGBRow_C(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_argb[0] = src_b[x];
+ dst_argb[1] = src_g[x];
+ dst_argb[2] = src_r[x];
+ dst_argb[3] = 255;
+ dst_argb += 4;
+ }
+}
+
+// Convert lsb formats to msb, depending on sample depth.
void MergeUVRow_16_C(const uint16_t* src_u,
const uint16_t* src_v,
uint16_t* dst_uv,
- int scale,
+ int depth,
int width) {
+ int shift = 16 - depth;
+ assert(depth >= 8);
+ assert(depth <= 16);
int x;
- for (x = 0; x < width - 1; x += 2) {
- dst_uv[0] = src_u[x] * scale;
- dst_uv[1] = src_v[x] * scale;
- dst_uv[2] = src_u[x + 1] * scale;
- dst_uv[3] = src_v[x + 1] * scale;
- dst_uv += 4;
+ for (x = 0; x < width; ++x) {
+ dst_uv[0] = src_u[x] << shift;
+ dst_uv[1] = src_v[x] << shift;
+ dst_uv += 2;
}
- if (width & 1) {
- dst_uv[0] = src_u[width - 1] * scale;
- dst_uv[1] = src_v[width - 1] * scale;
+}
+
+// Convert msb formats to lsb, depending on sample depth.
+void SplitUVRow_16_C(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ int x;
+ assert(depth >= 8);
+ assert(depth <= 16);
+ for (x = 0; x < width; ++x) {
+ dst_u[x] = src_uv[0] >> shift;
+ dst_v[x] = src_uv[1] >> shift;
+ src_uv += 2;
}
}
@@ -2567,6 +2921,16 @@ void MultiplyRow_16_C(const uint16_t* src_y,
}
}
+void DivideRow_16_C(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ dst_y[x] = (src_y[x] * scale) >> 16;
+ }
+}
+
// Use scale to convert lsb formats to msb, depending how many bits there are:
// 32768 = 9 bits
// 16384 = 10 bits
@@ -2577,6 +2941,9 @@ void Convert16To8Row_C(const uint16_t* src_y,
int scale,
int width) {
int x;
+ assert(scale >= 256);
+ assert(scale <= 32768);
+
for (x = 0; x < width; ++x) {
dst_y[x] = clamp255((src_y[x] * scale) >> 16);
}
@@ -2710,19 +3077,19 @@ void UYVYToYRow_C(const uint8_t* src_uyvy, uint8_t* dst_y, int width) {
#define BLEND(f, b, a) clamp255((((256 - a) * b) >> 8) + f)
-// Blend src_argb0 over src_argb1 and store to dst_argb.
-// dst_argb may be src_argb0 or src_argb1.
+// Blend src_argb over src_argb1 and store to dst_argb.
+// dst_argb may be src_argb or src_argb1.
// This code mimics the SSSE3 version for better testability.
-void ARGBBlendRow_C(const uint8_t* src_argb0,
+void ARGBBlendRow_C(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
int x;
for (x = 0; x < width - 1; x += 2) {
- uint32_t fb = src_argb0[0];
- uint32_t fg = src_argb0[1];
- uint32_t fr = src_argb0[2];
- uint32_t a = src_argb0[3];
+ uint32_t fb = src_argb[0];
+ uint32_t fg = src_argb[1];
+ uint32_t fr = src_argb[2];
+ uint32_t a = src_argb[3];
uint32_t bb = src_argb1[0];
uint32_t bg = src_argb1[1];
uint32_t br = src_argb1[2];
@@ -2731,10 +3098,10 @@ void ARGBBlendRow_C(const uint8_t* src_argb0,
dst_argb[2] = BLEND(fr, br, a);
dst_argb[3] = 255u;
- fb = src_argb0[4 + 0];
- fg = src_argb0[4 + 1];
- fr = src_argb0[4 + 2];
- a = src_argb0[4 + 3];
+ fb = src_argb[4 + 0];
+ fg = src_argb[4 + 1];
+ fr = src_argb[4 + 2];
+ a = src_argb[4 + 3];
bb = src_argb1[4 + 0];
bg = src_argb1[4 + 1];
br = src_argb1[4 + 2];
@@ -2742,16 +3109,16 @@ void ARGBBlendRow_C(const uint8_t* src_argb0,
dst_argb[4 + 1] = BLEND(fg, bg, a);
dst_argb[4 + 2] = BLEND(fr, br, a);
dst_argb[4 + 3] = 255u;
- src_argb0 += 8;
+ src_argb += 8;
src_argb1 += 8;
dst_argb += 8;
}
if (width & 1) {
- uint32_t fb = src_argb0[0];
- uint32_t fg = src_argb0[1];
- uint32_t fr = src_argb0[2];
- uint32_t a = src_argb0[3];
+ uint32_t fb = src_argb[0];
+ uint32_t fg = src_argb[1];
+ uint32_t fr = src_argb[2];
+ uint32_t a = src_argb[3];
uint32_t bb = src_argb1[0];
uint32_t bg = src_argb1[1];
uint32_t br = src_argb1[2];
@@ -3276,7 +3643,7 @@ void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width) {
// Maximum temporary width for wrappers to process at a time, in pixels.
#define MAXTWIDTH 2048
-#if !(defined(_MSC_VER) && defined(_M_IX86)) && \
+#if !(defined(_MSC_VER) && !defined(__clang__) && defined(_M_IX86)) && \
defined(HAS_I422TORGB565ROW_SSSE3)
// row_win.cc has asm version, but GCC uses 2 step wrapper.
void I422ToRGB565Row_SSSE3(const uint8_t* src_y,
@@ -3743,13 +4110,14 @@ void NV21ToYUV24Row_C(const uint8_t* src_y,
}
// Filter 2 rows of AYUV UV's (444) into UV (420).
+// AYUV is VUYA in memory. UV for NV12 is UV order in memory.
void AYUVToUVRow_C(const uint8_t* src_ayuv,
int src_stride_ayuv,
uint8_t* dst_uv,
int width) {
// Output a row of UV values, filtering 2x2 rows of AYUV.
int x;
- for (x = 0; x < width; x += 2) {
+ for (x = 0; x < width - 1; x += 2) {
dst_uv[0] = (src_ayuv[1] + src_ayuv[5] + src_ayuv[src_stride_ayuv + 1] +
src_ayuv[src_stride_ayuv + 5] + 2) >>
2;
@@ -3760,12 +4128,8 @@ void AYUVToUVRow_C(const uint8_t* src_ayuv,
dst_uv += 2;
}
if (width & 1) {
- dst_uv[0] = (src_ayuv[0] + src_ayuv[0] + src_ayuv[src_stride_ayuv + 0] +
- src_ayuv[src_stride_ayuv + 0] + 2) >>
- 2;
- dst_uv[1] = (src_ayuv[1] + src_ayuv[1] + src_ayuv[src_stride_ayuv + 1] +
- src_ayuv[src_stride_ayuv + 1] + 2) >>
- 2;
+ dst_uv[0] = (src_ayuv[1] + src_ayuv[src_stride_ayuv + 1] + 1) >> 1;
+ dst_uv[1] = (src_ayuv[0] + src_ayuv[src_stride_ayuv + 0] + 1) >> 1;
}
}
@@ -3776,7 +4140,7 @@ void AYUVToVURow_C(const uint8_t* src_ayuv,
int width) {
// Output a row of VU values, filtering 2x2 rows of AYUV.
int x;
- for (x = 0; x < width; x += 2) {
+ for (x = 0; x < width - 1; x += 2) {
dst_vu[0] = (src_ayuv[0] + src_ayuv[4] + src_ayuv[src_stride_ayuv + 0] +
src_ayuv[src_stride_ayuv + 4] + 2) >>
2;
@@ -3787,12 +4151,8 @@ void AYUVToVURow_C(const uint8_t* src_ayuv,
dst_vu += 2;
}
if (width & 1) {
- dst_vu[0] = (src_ayuv[0] + src_ayuv[0] + src_ayuv[src_stride_ayuv + 0] +
- src_ayuv[src_stride_ayuv + 0] + 2) >>
- 2;
- dst_vu[1] = (src_ayuv[1] + src_ayuv[1] + src_ayuv[src_stride_ayuv + 1] +
- src_ayuv[src_stride_ayuv + 1] + 2) >>
- 2;
+ dst_vu[0] = (src_ayuv[0] + src_ayuv[src_stride_ayuv + 0] + 1) >> 1;
+ dst_vu[1] = (src_ayuv[1] + src_ayuv[src_stride_ayuv + 1] + 1) >> 1;
}
}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_gcc.cc b/third-party/libyuv/third_party/libyuv/source/row_gcc.cc
similarity index 76%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_gcc.cc
rename to third-party/libyuv/third_party/libyuv/source/row_gcc.cc
index a107c30e76..001c353dbe 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_gcc.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_gcc.cc
@@ -16,8 +16,7 @@ extern "C" {
#endif
// This module is for GCC x86 and x64.
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#if defined(HAS_ARGBTOYROW_SSSE3) || defined(HAS_ARGBGRAYROW_SSSE3)
@@ -1078,6 +1077,222 @@ void ABGRToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width) {
}
#endif
+static const uvec8 kShuffleARGBToABGR = {2, 1, 0, 3, 6, 5, 4, 7,
+ 10, 9, 8, 11, 14, 13, 12, 15};
+
+static const uvec8 kShuffleARGBToAB64Lo = {2, 2, 1, 1, 0, 0, 3, 3,
+ 6, 6, 5, 5, 4, 4, 7, 7};
+static const uvec8 kShuffleARGBToAB64Hi = {10, 10, 9, 9, 8, 8, 11, 11,
+ 14, 14, 13, 13, 12, 12, 15, 15};
+
+void ARGBToAR64Row_SSSE3(const uint8_t* src_argb,
+ uint16_t* dst_ar64,
+ int width) {
+ asm volatile(
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqa %%xmm0,%%xmm1 \n"
+ "punpcklbw %%xmm0,%%xmm0 \n"
+ "punpckhbw %%xmm1,%%xmm1 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "movdqu %%xmm1,0x10(%1) \n"
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ar64), // %1
+ "+r"(width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1");
+}
+
+void ARGBToAB64Row_SSSE3(const uint8_t* src_argb,
+ uint16_t* dst_ab64,
+ int width) {
+ asm volatile(
+
+ "movdqa %3,%%xmm2 \n"
+ "movdqa %4,%%xmm3 \n" LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqa %%xmm0,%%xmm1 \n"
+ "pshufb %%xmm2,%%xmm0 \n"
+ "pshufb %%xmm3,%%xmm1 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "movdqu %%xmm1,0x10(%1) \n"
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ab64), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleARGBToAB64Lo), // %3
+ "m"(kShuffleARGBToAB64Hi) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+
+void AR64ToARGBRow_SSSE3(const uint16_t* src_ar64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "psrlw $8,%%xmm0 \n"
+ "psrlw $8,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ar64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1");
+}
+
+void AB64ToARGBRow_SSSE3(const uint16_t* src_ab64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ "movdqa %3,%%xmm2 \n" LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "psrlw $8,%%xmm0 \n"
+ "psrlw $8,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm0 \n"
+ "pshufb %%xmm2,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ab64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleARGBToABGR) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+
+#ifdef HAS_ARGBTOAR64ROW_AVX2
+void ARGBToAR64Row_AVX2(const uint8_t* src_argb,
+ uint16_t* dst_ar64,
+ int width) {
+ asm volatile(
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpunpckhbw %%ymm0,%%ymm0,%%ymm1 \n"
+ "vpunpcklbw %%ymm0,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "vmovdqu %%ymm1,0x20(%1) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x40(%1),%1 \n"
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ar64), // %1
+ "+r"(width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1");
+}
+#endif
+
+#ifdef HAS_ARGBTOAB64ROW_AVX2
+void ARGBToAB64Row_AVX2(const uint8_t* src_argb,
+ uint16_t* dst_ab64,
+ int width) {
+ asm volatile(
+
+ "vbroadcastf128 %3,%%ymm2 \n"
+ "vbroadcastf128 %4,%%ymm3 \n" LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpshufb %%ymm3,%%ymm0,%%ymm1 \n"
+ "vpshufb %%ymm2,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "vmovdqu %%ymm1,0x20(%1) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x40(%1),%1 \n"
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ab64), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleARGBToAB64Lo), // %3
+ "m"(kShuffleARGBToAB64Hi) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif
+
+#ifdef HAS_AR64TOARGBROW_AVX2
+void AR64ToARGBRow_AVX2(const uint16_t* src_ar64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "vpsrlw $8,%%ymm0,%%ymm0 \n"
+ "vpsrlw $8,%%ymm1,%%ymm1 \n"
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "lea 0x40(%0),%0 \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ar64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1");
+}
+#endif
+
+#ifdef HAS_AB64TOARGBROW_AVX2
+void AB64ToARGBRow_AVX2(const uint16_t* src_ab64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ "vbroadcastf128 %3,%%ymm2 \n" LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "vpsrlw $8,%%ymm0,%%ymm0 \n"
+ "vpsrlw $8,%%ymm1,%%ymm1 \n"
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpshufb %%ymm2,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "lea 0x40(%0),%0 \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ab64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleARGBToABGR) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif
+
// clang-format off
// TODO(mraptis): Consider passing R, G, B multipliers as parameter.
@@ -1278,7 +1493,7 @@ void RGBAToYJRow_AVX2(const uint8_t* src_rgba, uint8_t* dst_y, int width) {
"vmovdqu %5,%%ymm6 \n"
LABELALIGN RGBTOY_AVX2(
- ymm5) "vzeroupper \n"
+ ymm5) "vzeroupper \n"
: "+r"(src_rgba), // %0
"+r"(dst_y), // %1
"+r"(width) // %2
@@ -1290,7 +1505,7 @@ void RGBAToYJRow_AVX2(const uint8_t* src_rgba, uint8_t* dst_y, int width) {
#endif // HAS_RGBATOYJROW_AVX2
#ifdef HAS_ARGBTOUVROW_SSSE3
-void ARGBToUVRow_SSSE3(const uint8_t* src_argb0,
+void ARGBToUVRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1342,7 +1557,7 @@ void ARGBToUVRow_SSSE3(const uint8_t* src_argb0,
"lea 0x8(%1),%1 \n"
"sub $0x10,%3 \n"
"jg 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1359,7 +1574,7 @@ void ARGBToUVRow_SSSE3(const uint8_t* src_argb0,
static const lvec8 kShufARGBToUV_AVX = {
0, 1, 8, 9, 2, 3, 10, 11, 4, 5, 12, 13, 6, 7, 14, 15,
0, 1, 8, 9, 2, 3, 10, 11, 4, 5, 12, 13, 6, 7, 14, 15};
-void ARGBToUVRow_AVX2(const uint8_t* src_argb0,
+void ARGBToUVRow_AVX2(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1407,7 +1622,7 @@ void ARGBToUVRow_AVX2(const uint8_t* src_argb0,
"sub $0x20,%3 \n"
"jg 1b \n"
"vzeroupper \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1422,7 +1637,7 @@ void ARGBToUVRow_AVX2(const uint8_t* src_argb0,
#endif // HAS_ARGBTOUVROW_AVX2
#ifdef HAS_ABGRTOUVROW_AVX2
-void ABGRToUVRow_AVX2(const uint8_t* src_abgr0,
+void ABGRToUVRow_AVX2(const uint8_t* src_abgr,
int src_stride_abgr,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1470,7 +1685,7 @@ void ABGRToUVRow_AVX2(const uint8_t* src_abgr0,
"sub $0x20,%3 \n"
"jg 1b \n"
"vzeroupper \n"
- : "+r"(src_abgr0), // %0
+ : "+r"(src_abgr), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1485,7 +1700,7 @@ void ABGRToUVRow_AVX2(const uint8_t* src_abgr0,
#endif // HAS_ABGRTOUVROW_AVX2
#ifdef HAS_ARGBTOUVJROW_AVX2
-void ARGBToUVJRow_AVX2(const uint8_t* src_argb0,
+void ARGBToUVJRow_AVX2(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1534,7 +1749,7 @@ void ARGBToUVJRow_AVX2(const uint8_t* src_argb0,
"sub $0x20,%3 \n"
"jg 1b \n"
"vzeroupper \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1549,7 +1764,7 @@ void ARGBToUVJRow_AVX2(const uint8_t* src_argb0,
#endif // HAS_ARGBTOUVJROW_AVX2
#ifdef HAS_ARGBTOUVJROW_SSSE3
-void ARGBToUVJRow_SSSE3(const uint8_t* src_argb0,
+void ARGBToUVJRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1602,7 +1817,7 @@ void ARGBToUVJRow_SSSE3(const uint8_t* src_argb0,
"lea 0x8(%1),%1 \n"
"sub $0x10,%3 \n"
"jg 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1689,7 +1904,7 @@ void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width) {
"xmm7");
}
-void BGRAToUVRow_SSSE3(const uint8_t* src_bgra0,
+void BGRAToUVRow_SSSE3(const uint8_t* src_bgra,
int src_stride_bgra,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1741,7 +1956,7 @@ void BGRAToUVRow_SSSE3(const uint8_t* src_bgra0,
"lea 0x8(%1),%1 \n"
"sub $0x10,%3 \n"
"jg 1b \n"
- : "+r"(src_bgra0), // %0
+ : "+r"(src_bgra), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1786,7 +2001,7 @@ void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width) {
"xmm7");
}
-void ABGRToUVRow_SSSE3(const uint8_t* src_abgr0,
+void ABGRToUVRow_SSSE3(const uint8_t* src_abgr,
int src_stride_abgr,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1838,7 +2053,7 @@ void ABGRToUVRow_SSSE3(const uint8_t* src_abgr0,
"lea 0x8(%1),%1 \n"
"sub $0x10,%3 \n"
"jg 1b \n"
- : "+r"(src_abgr0), // %0
+ : "+r"(src_abgr), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1849,7 +2064,7 @@ void ABGRToUVRow_SSSE3(const uint8_t* src_abgr0,
: "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm6", "xmm7");
}
-void RGBAToUVRow_SSSE3(const uint8_t* src_rgba0,
+void RGBAToUVRow_SSSE3(const uint8_t* src_rgba,
int src_stride_rgba,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1901,7 +2116,7 @@ void RGBAToUVRow_SSSE3(const uint8_t* src_rgba0,
"lea 0x8(%1),%1 \n"
"sub $0x10,%3 \n"
"jg 1b \n"
- : "+r"(src_rgba0), // %0
+ : "+r"(src_rgba), // %0
"+r"(dst_u), // %1
"+r"(dst_v), // %2
"+rm"(width) // %3
@@ -1916,21 +2131,21 @@ void RGBAToUVRow_SSSE3(const uint8_t* src_rgba0,
// Read 8 UV from 444
#define READYUV444 \
- "movq (%[u_buf]),%%xmm0 \n" \
+ "movq (%[u_buf]),%%xmm3 \n" \
"movq 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x8(%[u_buf]),%[u_buf] \n" \
- "punpcklbw %%xmm1,%%xmm0 \n" \
+ "punpcklbw %%xmm1,%%xmm3 \n" \
"movq (%[y_buf]),%%xmm4 \n" \
"punpcklbw %%xmm4,%%xmm4 \n" \
"lea 0x8(%[y_buf]),%[y_buf] \n"
// Read 4 UV from 422, upsample to 8 UV
#define READYUV422 \
- "movd (%[u_buf]),%%xmm0 \n" \
+ "movd (%[u_buf]),%%xmm3 \n" \
"movd 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x4(%[u_buf]),%[u_buf] \n" \
- "punpcklbw %%xmm1,%%xmm0 \n" \
- "punpcklwd %%xmm0,%%xmm0 \n" \
+ "punpcklbw %%xmm1,%%xmm3 \n" \
+ "punpcklwd %%xmm3,%%xmm3 \n" \
"movq (%[y_buf]),%%xmm4 \n" \
"punpcklbw %%xmm4,%%xmm4 \n" \
"lea 0x8(%[y_buf]),%[y_buf] \n"
@@ -1940,24 +2155,99 @@ void RGBAToUVRow_SSSE3(const uint8_t* src_rgba0,
// TODO(fbarchard): Consider pmulhuw to replace psraw
// TODO(fbarchard): Consider pmullw to replace psllw and allow different bits.
#define READYUV210 \
- "movq (%[u_buf]),%%xmm0 \n" \
+ "movq (%[u_buf]),%%xmm3 \n" \
"movq 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x8(%[u_buf]),%[u_buf] \n" \
- "punpcklwd %%xmm1,%%xmm0 \n" \
- "psraw $0x2,%%xmm0 \n" \
- "packuswb %%xmm0,%%xmm0 \n" \
- "punpcklwd %%xmm0,%%xmm0 \n" \
+ "punpcklwd %%xmm1,%%xmm3 \n" \
+ "psraw $2,%%xmm3 \n" \
+ "packuswb %%xmm3,%%xmm3 \n" \
+ "punpcklwd %%xmm3,%%xmm3 \n" \
+ "movdqu (%[y_buf]),%%xmm4 \n" \
+ "psllw $6,%%xmm4 \n" \
+ "lea 0x10(%[y_buf]),%[y_buf] \n"
+
+#define READYUVA210 \
+ "movq (%[u_buf]),%%xmm3 \n" \
+ "movq 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
+ "lea 0x8(%[u_buf]),%[u_buf] \n" \
+ "punpcklwd %%xmm1,%%xmm3 \n" \
+ "psraw $2,%%xmm3 \n" \
+ "packuswb %%xmm3,%%xmm3 \n" \
+ "punpcklwd %%xmm3,%%xmm3 \n" \
+ "movdqu (%[y_buf]),%%xmm4 \n" \
+ "psllw $6,%%xmm4 \n" \
+ "lea 0x10(%[y_buf]),%[y_buf] \n" \
+ "movdqu (%[a_buf]),%%xmm5 \n" \
+ "psraw $2,%%xmm5 \n" \
+ "packuswb %%xmm5,%%xmm5 \n" \
+ "lea 0x10(%[a_buf]),%[a_buf] \n"
+
+// Read 8 UV from 444 10 bit
+#define READYUV410 \
+ "movdqu (%[u_buf]),%%xmm3 \n" \
+ "movdqu 0x00(%[u_buf],%[v_buf],1),%%xmm2 \n" \
+ "lea 0x10(%[u_buf]),%[u_buf] \n" \
+ "psraw $2,%%xmm3 \n" \
+ "psraw $2,%%xmm2 \n" \
+ "movdqa %%xmm3,%%xmm1 \n" \
+ "punpcklwd %%xmm2,%%xmm3 \n" \
+ "punpckhwd %%xmm2,%%xmm1 \n" \
+ "packuswb %%xmm1,%%xmm3 \n" \
+ "movdqu (%[y_buf]),%%xmm4 \n" \
+ "psllw $6,%%xmm4 \n" \
+ "lea 0x10(%[y_buf]),%[y_buf] \n"
+
+// Read 8 UV from 444 10 bit. With 8 Alpha.
+#define READYUVA410 \
+ "movdqu (%[u_buf]),%%xmm3 \n" \
+ "movdqu 0x00(%[u_buf],%[v_buf],1),%%xmm2 \n" \
+ "lea 0x10(%[u_buf]),%[u_buf] \n" \
+ "psraw $2,%%xmm3 \n" \
+ "psraw $2,%%xmm2 \n" \
+ "movdqa %%xmm3,%%xmm1 \n" \
+ "punpcklwd %%xmm2,%%xmm3 \n" \
+ "punpckhwd %%xmm2,%%xmm1 \n" \
+ "packuswb %%xmm1,%%xmm3 \n" \
"movdqu (%[y_buf]),%%xmm4 \n" \
"psllw $0x6,%%xmm4 \n" \
+ "lea 0x10(%[y_buf]),%[y_buf] \n" \
+ "movdqu (%[a_buf]),%%xmm5 \n" \
+ "psraw $2,%%xmm5 \n" \
+ "packuswb %%xmm5,%%xmm5 \n" \
+ "lea 0x10(%[a_buf]),%[a_buf] \n"
+
+// Read 4 UV from 422 12 bit, upsample to 8 UV
+#define READYUV212 \
+ "movq (%[u_buf]),%%xmm3 \n" \
+ "movq 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
+ "lea 0x8(%[u_buf]),%[u_buf] \n" \
+ "punpcklwd %%xmm1,%%xmm3 \n" \
+ "psraw $0x4,%%xmm3 \n" \
+ "packuswb %%xmm3,%%xmm3 \n" \
+ "punpcklwd %%xmm3,%%xmm3 \n" \
+ "movdqu (%[y_buf]),%%xmm4 \n" \
+ "psllw $0x4,%%xmm4 \n" \
"lea 0x10(%[y_buf]),%[y_buf] \n"
// Read 4 UV from 422, upsample to 8 UV. With 8 Alpha.
#define READYUVA422 \
- "movd (%[u_buf]),%%xmm0 \n" \
+ "movd (%[u_buf]),%%xmm3 \n" \
"movd 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x4(%[u_buf]),%[u_buf] \n" \
- "punpcklbw %%xmm1,%%xmm0 \n" \
- "punpcklwd %%xmm0,%%xmm0 \n" \
+ "punpcklbw %%xmm1,%%xmm3 \n" \
+ "punpcklwd %%xmm3,%%xmm3 \n" \
+ "movq (%[y_buf]),%%xmm4 \n" \
+ "punpcklbw %%xmm4,%%xmm4 \n" \
+ "lea 0x8(%[y_buf]),%[y_buf] \n" \
+ "movq (%[a_buf]),%%xmm5 \n" \
+ "lea 0x8(%[a_buf]),%[a_buf] \n"
+
+// Read 8 UV from 444. With 8 Alpha.
+#define READYUVA444 \
+ "movq (%[u_buf]),%%xmm3 \n" \
+ "movq 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
+ "lea 0x8(%[u_buf]),%[u_buf] \n" \
+ "punpcklbw %%xmm1,%%xmm3 \n" \
"movq (%[y_buf]),%%xmm4 \n" \
"punpcklbw %%xmm4,%%xmm4 \n" \
"lea 0x8(%[y_buf]),%[y_buf] \n" \
@@ -1966,18 +2256,18 @@ void RGBAToUVRow_SSSE3(const uint8_t* src_rgba0,
// Read 4 UV from NV12, upsample to 8 UV
#define READNV12 \
- "movq (%[uv_buf]),%%xmm0 \n" \
+ "movq (%[uv_buf]),%%xmm3 \n" \
"lea 0x8(%[uv_buf]),%[uv_buf] \n" \
- "punpcklwd %%xmm0,%%xmm0 \n" \
+ "punpcklwd %%xmm3,%%xmm3 \n" \
"movq (%[y_buf]),%%xmm4 \n" \
"punpcklbw %%xmm4,%%xmm4 \n" \
"lea 0x8(%[y_buf]),%[y_buf] \n"
// Read 4 VU from NV21, upsample to 8 UV
#define READNV21 \
- "movq (%[vu_buf]),%%xmm0 \n" \
+ "movq (%[vu_buf]),%%xmm3 \n" \
"lea 0x8(%[vu_buf]),%[vu_buf] \n" \
- "pshufb %[kShuffleNV21], %%xmm0 \n" \
+ "pshufb %[kShuffleNV21], %%xmm3 \n" \
"movq (%[y_buf]),%%xmm4 \n" \
"punpcklbw %%xmm4,%%xmm4 \n" \
"lea 0x8(%[y_buf]),%[y_buf] \n"
@@ -1986,68 +2276,92 @@ void RGBAToUVRow_SSSE3(const uint8_t* src_rgba0,
#define READYUY2 \
"movdqu (%[yuy2_buf]),%%xmm4 \n" \
"pshufb %[kShuffleYUY2Y], %%xmm4 \n" \
- "movdqu (%[yuy2_buf]),%%xmm0 \n" \
- "pshufb %[kShuffleYUY2UV], %%xmm0 \n" \
+ "movdqu (%[yuy2_buf]),%%xmm3 \n" \
+ "pshufb %[kShuffleYUY2UV], %%xmm3 \n" \
"lea 0x10(%[yuy2_buf]),%[yuy2_buf] \n"
// Read 4 UYVY with 8 Y and update 4 UV to 8 UV.
#define READUYVY \
"movdqu (%[uyvy_buf]),%%xmm4 \n" \
"pshufb %[kShuffleUYVYY], %%xmm4 \n" \
- "movdqu (%[uyvy_buf]),%%xmm0 \n" \
- "pshufb %[kShuffleUYVYUV], %%xmm0 \n" \
+ "movdqu (%[uyvy_buf]),%%xmm3 \n" \
+ "pshufb %[kShuffleUYVYUV], %%xmm3 \n" \
"lea 0x10(%[uyvy_buf]),%[uyvy_buf] \n"
+// Read 4 UV from P210, upsample to 8 UV
+#define READP210 \
+ "movdqu (%[uv_buf]),%%xmm3 \n" \
+ "lea 0x10(%[uv_buf]),%[uv_buf] \n" \
+ "psrlw $0x8,%%xmm3 \n" \
+ "packuswb %%xmm3,%%xmm3 \n" \
+ "punpcklwd %%xmm3,%%xmm3 \n" \
+ "movdqu (%[y_buf]),%%xmm4 \n" \
+ "lea 0x10(%[y_buf]),%[y_buf] \n"
+
+// Read 8 UV from P410
+#define READP410 \
+ "movdqu (%[uv_buf]),%%xmm3 \n" \
+ "movdqu 0x10(%[uv_buf]),%%xmm1 \n" \
+ "lea 0x20(%[uv_buf]),%[uv_buf] \n" \
+ "psrlw $0x8,%%xmm3 \n" \
+ "psrlw $0x8,%%xmm1 \n" \
+ "packuswb %%xmm1,%%xmm3 \n" \
+ "movdqu (%[y_buf]),%%xmm4 \n" \
+ "lea 0x10(%[y_buf]),%[y_buf] \n"
+
#if defined(__x86_64__)
#define YUVTORGB_SETUP(yuvconstants) \
+ "pcmpeqb %%xmm13,%%xmm13 \n" \
"movdqa (%[yuvconstants]),%%xmm8 \n" \
+ "pxor %%xmm12,%%xmm12 \n" \
"movdqa 32(%[yuvconstants]),%%xmm9 \n" \
+ "psllw $7,%%xmm13 \n" \
"movdqa 64(%[yuvconstants]),%%xmm10 \n" \
+ "pshufb %%xmm12,%%xmm13 \n" \
"movdqa 96(%[yuvconstants]),%%xmm11 \n" \
- "movdqa 128(%[yuvconstants]),%%xmm12 \n" \
- "movdqa 160(%[yuvconstants]),%%xmm13 \n" \
- "movdqa 192(%[yuvconstants]),%%xmm14 \n"
+ "movdqa 128(%[yuvconstants]),%%xmm12 \n"
+
// Convert 8 pixels: 8 UV and 8 Y
#define YUVTORGB16(yuvconstants) \
- "movdqa %%xmm0,%%xmm1 \n" \
- "movdqa %%xmm0,%%xmm2 \n" \
- "movdqa %%xmm0,%%xmm3 \n" \
- "movdqa %%xmm11,%%xmm0 \n" \
- "pmaddubsw %%xmm8,%%xmm1 \n" \
- "psubw %%xmm1,%%xmm0 \n" \
- "movdqa %%xmm12,%%xmm1 \n" \
- "pmaddubsw %%xmm9,%%xmm2 \n" \
- "psubw %%xmm2,%%xmm1 \n" \
- "movdqa %%xmm13,%%xmm2 \n" \
- "pmaddubsw %%xmm10,%%xmm3 \n" \
- "psubw %%xmm3,%%xmm2 \n" \
- "pmulhuw %%xmm14,%%xmm4 \n" \
+ "psubb %%xmm13,%%xmm3 \n" \
+ "pmulhuw %%xmm11,%%xmm4 \n" \
+ "movdqa %%xmm8,%%xmm0 \n" \
+ "movdqa %%xmm9,%%xmm1 \n" \
+ "movdqa %%xmm10,%%xmm2 \n" \
+ "paddw %%xmm12,%%xmm4 \n" \
+ "pmaddubsw %%xmm3,%%xmm0 \n" \
+ "pmaddubsw %%xmm3,%%xmm1 \n" \
+ "pmaddubsw %%xmm3,%%xmm2 \n" \
"paddsw %%xmm4,%%xmm0 \n" \
- "paddsw %%xmm4,%%xmm1 \n" \
- "paddsw %%xmm4,%%xmm2 \n"
-#define YUVTORGB_REGS \
- "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14",
+ "paddsw %%xmm4,%%xmm2 \n" \
+ "psubsw %%xmm1,%%xmm4 \n" \
+ "movdqa %%xmm4,%%xmm1 \n"
+
+#define YUVTORGB_REGS "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13",
#else
#define YUVTORGB_SETUP(yuvconstants)
// Convert 8 pixels: 8 UV and 8 Y
#define YUVTORGB16(yuvconstants) \
- "movdqa %%xmm0,%%xmm1 \n" \
- "movdqa %%xmm0,%%xmm2 \n" \
- "movdqa %%xmm0,%%xmm3 \n" \
- "movdqa 96(%[yuvconstants]),%%xmm0 \n" \
- "pmaddubsw (%[yuvconstants]),%%xmm1 \n" \
- "psubw %%xmm1,%%xmm0 \n" \
- "movdqa 128(%[yuvconstants]),%%xmm1 \n" \
- "pmaddubsw 32(%[yuvconstants]),%%xmm2 \n" \
- "psubw %%xmm2,%%xmm1 \n" \
- "movdqa 160(%[yuvconstants]),%%xmm2 \n" \
- "pmaddubsw 64(%[yuvconstants]),%%xmm3 \n" \
- "psubw %%xmm3,%%xmm2 \n" \
- "pmulhuw 192(%[yuvconstants]),%%xmm4 \n" \
+ "pcmpeqb %%xmm0,%%xmm0 \n" \
+ "pxor %%xmm1,%%xmm1 \n" \
+ "psllw $7,%%xmm0 \n" \
+ "pshufb %%xmm1,%%xmm0 \n" \
+ "psubb %%xmm0,%%xmm3 \n" \
+ "pmulhuw 96(%[yuvconstants]),%%xmm4 \n" \
+ "movdqa (%[yuvconstants]),%%xmm0 \n" \
+ "movdqa 32(%[yuvconstants]),%%xmm1 \n" \
+ "movdqa 64(%[yuvconstants]),%%xmm2 \n" \
+ "pmaddubsw %%xmm3,%%xmm0 \n" \
+ "pmaddubsw %%xmm3,%%xmm1 \n" \
+ "pmaddubsw %%xmm3,%%xmm2 \n" \
+ "movdqa 128(%[yuvconstants]),%%xmm3 \n" \
+ "paddw %%xmm3,%%xmm4 \n" \
"paddsw %%xmm4,%%xmm0 \n" \
- "paddsw %%xmm4,%%xmm1 \n" \
- "paddsw %%xmm4,%%xmm2 \n"
+ "paddsw %%xmm4,%%xmm2 \n" \
+ "psubsw %%xmm1,%%xmm4 \n" \
+ "movdqa %%xmm4,%%xmm1 \n"
+
#define YUVTORGB_REGS
#endif
@@ -2138,6 +2452,44 @@ void OMITFP I444ToARGBRow_SSSE3(const uint8_t* y_buf,
);
}
+#ifdef HAS_I444ALPHATOARGBROW_SSSE3
+void OMITFP I444AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ // clang-format off
+ asm volatile (
+ YUVTORGB_SETUP(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUVA444
+ YUVTORGB(yuvconstants)
+ STOREARGB
+ "subl $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [a_buf]"+r"(a_buf), // %[a_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+#if defined(__i386__)
+ [width]"+m"(width) // %[width]
+#else
+ [width]"+rm"(width) // %[width]
+#endif
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+ // clang-format on
+}
+#endif // HAS_I444ALPHATOARGBROW_SSSE3
+
void OMITFP I422ToRGB24Row_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2225,8 +2577,8 @@ void OMITFP I422ToAR30Row_SSSE3(const uint8_t* y_buf,
"pcmpeqb %%xmm5,%%xmm5 \n" // AR30 constants
"psrlw $14,%%xmm5 \n"
"psllw $4,%%xmm5 \n" // 2 alpha bits
- "pxor %%xmm6,%%xmm6 \n"
- "pcmpeqb %%xmm7,%%xmm7 \n" // 0 for min
+ "pxor %%xmm6,%%xmm6 \n" // 0 for min
+ "pcmpeqb %%xmm7,%%xmm7 \n"
"psrlw $6,%%xmm7 \n" // 1023 for max
LABELALIGN
@@ -2277,6 +2629,36 @@ void OMITFP I210ToARGBRow_SSSE3(const uint16_t* y_buf,
);
}
+// 12 bit YUV to ARGB
+void OMITFP I212ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "pcmpeqb %%xmm5,%%xmm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUV212
+ YUVTORGB(yuvconstants)
+ STOREARGB
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+}
+
// 10 bit YUV to AR30
void OMITFP I210ToAR30Row_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
@@ -2290,8 +2672,8 @@ void OMITFP I210ToAR30Row_SSSE3(const uint16_t* y_buf,
"pcmpeqb %%xmm5,%%xmm5 \n"
"psrlw $14,%%xmm5 \n"
"psllw $4,%%xmm5 \n" // 2 alpha bits
- "pxor %%xmm6,%%xmm6 \n"
- "pcmpeqb %%xmm7,%%xmm7 \n" // 0 for min
+ "pxor %%xmm6,%%xmm6 \n" // 0 for min
+ "pcmpeqb %%xmm7,%%xmm7 \n"
"psrlw $6,%%xmm7 \n" // 1023 for max
LABELALIGN
@@ -2312,6 +2694,176 @@ void OMITFP I210ToAR30Row_SSSE3(const uint16_t* y_buf,
);
}
+// 12 bit YUV to AR30
+void OMITFP I212ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "pcmpeqb %%xmm5,%%xmm5 \n"
+ "psrlw $14,%%xmm5 \n"
+ "psllw $4,%%xmm5 \n" // 2 alpha bits
+ "pxor %%xmm6,%%xmm6 \n" // 0 for min
+ "pcmpeqb %%xmm7,%%xmm7 \n"
+ "psrlw $6,%%xmm7 \n" // 1023 for max
+
+ LABELALIGN
+ "1: \n"
+ READYUV212
+ YUVTORGB16(yuvconstants)
+ STOREAR30
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+
+// 10 bit YUV to ARGB
+void OMITFP I410ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "pcmpeqb %%xmm5,%%xmm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUV410
+ YUVTORGB(yuvconstants)
+ STOREARGB
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+}
+
+#ifdef HAS_I210ALPHATOARGBROW_SSSE3
+// 10 bit YUVA to ARGB
+void OMITFP I210AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile(
+ YUVTORGB_SETUP(
+ yuvconstants) "sub %[u_buf],%[v_buf] \n"
+
+ LABELALIGN "1: \n" READYUVA210
+ YUVTORGB(yuvconstants) STOREARGB
+ "subl $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf] "+r"(y_buf), // %[y_buf]
+ [u_buf] "+r"(u_buf), // %[u_buf]
+ [v_buf] "+r"(v_buf), // %[v_buf]
+ [a_buf] "+r"(a_buf),
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+#if defined(__i386__)
+ [width] "+m"(width) // %[width]
+#else
+ [width] "+rm"(width) // %[width]
+#endif
+ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4",
+ "xmm5");
+}
+#endif
+
+#ifdef HAS_I410ALPHATOARGBROW_SSSE3
+// 10 bit YUVA to ARGB
+void OMITFP I410AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ // clang-format off
+ asm volatile(
+ YUVTORGB_SETUP(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUVA410
+ YUVTORGB(yuvconstants)
+ STOREARGB
+ "subl $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf] "+r"(y_buf), // %[y_buf]
+ [u_buf] "+r"(u_buf), // %[u_buf]
+ [v_buf] "+r"(v_buf), // %[v_buf]
+ [a_buf] "+r"(a_buf),
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+#if defined(__i386__)
+ [width] "+m"(width) // %[width]
+#else
+ [width] "+rm"(width) // %[width]
+#endif
+ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4",
+ "xmm5");
+ // clang-format on
+}
+#endif
+
+// 10 bit YUV to AR30
+void OMITFP I410ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "pcmpeqb %%xmm5,%%xmm5 \n"
+ "psrlw $14,%%xmm5 \n"
+ "psllw $4,%%xmm5 \n" // 2 alpha bits
+ "pxor %%xmm6,%%xmm6 \n" // 0 for min
+ "pcmpeqb %%xmm7,%%xmm7 \n"
+ "psrlw $6,%%xmm7 \n" // 1023 for max
+
+ LABELALIGN
+ "1: \n"
+ READYUV410
+ YUVTORGB16(yuvconstants)
+ STOREAR30
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+
#ifdef HAS_I422ALPHATOARGBROW_SSSE3
void OMITFP I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
@@ -2463,6 +3015,112 @@ void OMITFP UYVYToARGBRow_SSSE3(const uint8_t* uyvy_buf,
// clang-format on
}
+void OMITFP P210ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile(
+ YUVTORGB_SETUP(
+ yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n"
+
+ LABELALIGN "1: \n" READP210
+ YUVTORGB(yuvconstants) STOREARGB
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf] "+r"(y_buf), // %[y_buf]
+ [uv_buf] "+r"(uv_buf), // %[u_buf]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+rm"(width) // %[width]
+ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4",
+ "xmm5");
+}
+
+void OMITFP P410ToARGBRow_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile(
+ YUVTORGB_SETUP(
+ yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n"
+
+ LABELALIGN "1: \n" READP410
+ YUVTORGB(yuvconstants) STOREARGB
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf] "+r"(y_buf), // %[y_buf]
+ [uv_buf] "+r"(uv_buf), // %[u_buf]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+rm"(width) // %[width]
+ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4",
+ "xmm5");
+}
+
+void OMITFP P210ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP(yuvconstants)
+ "pcmpeqb %%xmm5,%%xmm5 \n"
+ "psrlw $14,%%xmm5 \n"
+ "psllw $4,%%xmm5 \n" // 2 alpha bits
+ "pxor %%xmm6,%%xmm6 \n" // 0 for min
+ "pcmpeqb %%xmm7,%%xmm7 \n"
+ "psrlw $6,%%xmm7 \n" // 1023 for max
+
+ LABELALIGN
+ "1: \n"
+ READP210
+ YUVTORGB16(yuvconstants)
+ STOREAR30
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [uv_buf]"+r"(uv_buf), // %[uv_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+
+void OMITFP P410ToAR30Row_SSSE3(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP(yuvconstants)
+ "pcmpeqb %%xmm5,%%xmm5 \n"
+ "psrlw $14,%%xmm5 \n"
+ "psllw $4,%%xmm5 \n" // 2 alpha bits
+ "pxor %%xmm6,%%xmm6 \n" // 0 for min
+ "pcmpeqb %%xmm7,%%xmm7 \n"
+ "psrlw $6,%%xmm7 \n" // 1023 for max
+
+ LABELALIGN
+ "1: \n"
+ READP410
+ YUVTORGB16(yuvconstants)
+ STOREAR30
+ "sub $0x8,%[width] \n"
+ "jg 1b \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [uv_buf]"+r"(uv_buf), // %[uv_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+
void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
@@ -2496,12 +3154,12 @@ void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf,
// Read 16 UV from 444
#define READYUV444_AVX2 \
- "vmovdqu (%[u_buf]),%%xmm0 \n" \
+ "vmovdqu (%[u_buf]),%%xmm3 \n" \
"vmovdqu 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x10(%[u_buf]),%[u_buf] \n" \
- "vpermq $0xd8,%%ymm0,%%ymm0 \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
"vpermq $0xd8,%%ymm1,%%ymm1 \n" \
- "vpunpcklbw %%ymm1,%%ymm0,%%ymm0 \n" \
+ "vpunpcklbw %%ymm1,%%ymm3,%%ymm3 \n" \
"vmovdqu (%[y_buf]),%%xmm4 \n" \
"vpermq $0xd8,%%ymm4,%%ymm4 \n" \
"vpunpcklbw %%ymm4,%%ymm4,%%ymm4 \n" \
@@ -2509,42 +3167,124 @@ void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf,
// Read 8 UV from 422, upsample to 16 UV.
#define READYUV422_AVX2 \
- "vmovq (%[u_buf]),%%xmm0 \n" \
+ "vmovq (%[u_buf]),%%xmm3 \n" \
"vmovq 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x8(%[u_buf]),%[u_buf] \n" \
- "vpunpcklbw %%ymm1,%%ymm0,%%ymm0 \n" \
- "vpermq $0xd8,%%ymm0,%%ymm0 \n" \
- "vpunpcklwd %%ymm0,%%ymm0,%%ymm0 \n" \
+ "vpunpcklbw %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n" \
"vmovdqu (%[y_buf]),%%xmm4 \n" \
"vpermq $0xd8,%%ymm4,%%ymm4 \n" \
"vpunpcklbw %%ymm4,%%ymm4,%%ymm4 \n" \
"lea 0x10(%[y_buf]),%[y_buf] \n"
-// Read 8 UV from 210 10 bit, upsample to 16 UV
+// Read 8 UV from 210, upsample to 16 UV
// TODO(fbarchard): Consider vshufb to replace pack/unpack
// TODO(fbarchard): Consider vunpcklpd to combine the 2 registers into 1.
#define READYUV210_AVX2 \
- "vmovdqu (%[u_buf]),%%xmm0 \n" \
+ "vmovdqu (%[u_buf]),%%xmm3 \n" \
"vmovdqu 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x10(%[u_buf]),%[u_buf] \n" \
- "vpermq $0xd8,%%ymm0,%%ymm0 \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
"vpermq $0xd8,%%ymm1,%%ymm1 \n" \
- "vpunpcklwd %%ymm1,%%ymm0,%%ymm0 \n" \
- "vpsraw $0x2,%%ymm0,%%ymm0 \n" \
- "vpackuswb %%ymm0,%%ymm0,%%ymm0 \n" \
- "vpunpcklwd %%ymm0,%%ymm0,%%ymm0 \n" \
+ "vpunpcklwd %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vpsraw $2,%%ymm3,%%ymm3 \n" \
+ "vpackuswb %%ymm3,%%ymm3,%%ymm3 \n" \
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n" \
"vmovdqu (%[y_buf]),%%ymm4 \n" \
- "vpsllw $0x6,%%ymm4,%%ymm4 \n" \
+ "vpsllw $6,%%ymm4,%%ymm4 \n" \
"lea 0x20(%[y_buf]),%[y_buf] \n"
+// Read 8 UV from 210, upsample to 16 UV. With 16 Alpha.
+#define READYUVA210_AVX2 \
+ "vmovdqu (%[u_buf]),%%xmm3 \n" \
+ "vmovdqu 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
+ "lea 0x10(%[u_buf]),%[u_buf] \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vpermq $0xd8,%%ymm1,%%ymm1 \n" \
+ "vpunpcklwd %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vpsraw $2,%%ymm3,%%ymm3 \n" \
+ "vpackuswb %%ymm3,%%ymm3,%%ymm3 \n" \
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n" \
+ "vmovdqu (%[y_buf]),%%ymm4 \n" \
+ "vpsllw $6,%%ymm4,%%ymm4 \n" \
+ "lea 0x20(%[y_buf]),%[y_buf] \n" \
+ "vmovdqu (%[a_buf]),%%ymm5 \n" \
+ "vpsraw $2,%%ymm5,%%ymm5 \n" \
+ "vpackuswb %%ymm5,%%ymm5,%%ymm5 \n" \
+ "lea 0x20(%[a_buf]),%[a_buf] \n"
+
+// Read 16 UV from 410
+#define READYUV410_AVX2 \
+ "vmovdqu (%[u_buf]),%%ymm3 \n" \
+ "vmovdqu 0x00(%[u_buf],%[v_buf],1),%%ymm2 \n" \
+ "lea 0x20(%[u_buf]),%[u_buf] \n" \
+ "vpsraw $2,%%ymm3,%%ymm3 \n" \
+ "vpsraw $2,%%ymm2,%%ymm2 \n" \
+ "vpunpckhwd %%ymm2,%%ymm3,%%ymm1 \n" \
+ "vpunpcklwd %%ymm2,%%ymm3,%%ymm3 \n" \
+ "vpackuswb %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vmovdqu (%[y_buf]),%%ymm4 \n" \
+ "vpsllw $6,%%ymm4,%%ymm4 \n" \
+ "lea 0x20(%[y_buf]),%[y_buf] \n"
+
+// Read 8 UV from 212 12 bit, upsample to 16 UV
+#define READYUV212_AVX2 \
+ "vmovdqu (%[u_buf]),%%xmm3 \n" \
+ "vmovdqu 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
+ "lea 0x10(%[u_buf]),%[u_buf] \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vpermq $0xd8,%%ymm1,%%ymm1 \n" \
+ "vpunpcklwd %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vpsraw $0x4,%%ymm3,%%ymm3 \n" \
+ "vpackuswb %%ymm3,%%ymm3,%%ymm3 \n" \
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n" \
+ "vmovdqu (%[y_buf]),%%ymm4 \n" \
+ "vpsllw $0x4,%%ymm4,%%ymm4 \n" \
+ "lea 0x20(%[y_buf]),%[y_buf] \n"
+
+// Read 16 UV from 410. With 16 Alpha.
+#define READYUVA410_AVX2 \
+ "vmovdqu (%[u_buf]),%%ymm3 \n" \
+ "vmovdqu 0x00(%[u_buf],%[v_buf],1),%%ymm2 \n" \
+ "lea 0x20(%[u_buf]),%[u_buf] \n" \
+ "vpsraw $2,%%ymm3,%%ymm3 \n" \
+ "vpsraw $2,%%ymm2,%%ymm2 \n" \
+ "vpunpckhwd %%ymm2,%%ymm3,%%ymm1 \n" \
+ "vpunpcklwd %%ymm2,%%ymm3,%%ymm3 \n" \
+ "vpackuswb %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vmovdqu (%[y_buf]),%%ymm4 \n" \
+ "vpsllw $6,%%ymm4,%%ymm4 \n" \
+ "lea 0x20(%[y_buf]),%[y_buf] \n" \
+ "vmovdqu (%[a_buf]),%%ymm5 \n" \
+ "vpsraw $2,%%ymm5,%%ymm5 \n" \
+ "vpackuswb %%ymm5,%%ymm5,%%ymm5 \n" \
+ "lea 0x20(%[a_buf]),%[a_buf] \n"
+
+// Read 16 UV from 444. With 16 Alpha.
+#define READYUVA444_AVX2 \
+ "vmovdqu (%[u_buf]),%%xmm3 \n" \
+ "vmovdqu 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
+ "lea 0x10(%[u_buf]),%[u_buf] \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vpermq $0xd8,%%ymm1,%%ymm1 \n" \
+ "vpunpcklbw %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vmovdqu (%[y_buf]),%%xmm4 \n" \
+ "vpermq $0xd8,%%ymm4,%%ymm4 \n" \
+ "vpunpcklbw %%ymm4,%%ymm4,%%ymm4 \n" \
+ "lea 0x10(%[y_buf]),%[y_buf] \n" \
+ "vmovdqu (%[a_buf]),%%xmm5 \n" \
+ "vpermq $0xd8,%%ymm5,%%ymm5 \n" \
+ "lea 0x10(%[a_buf]),%[a_buf] \n"
+
// Read 8 UV from 422, upsample to 16 UV. With 16 Alpha.
#define READYUVA422_AVX2 \
- "vmovq (%[u_buf]),%%xmm0 \n" \
+ "vmovq (%[u_buf]),%%xmm3 \n" \
"vmovq 0x00(%[u_buf],%[v_buf],1),%%xmm1 \n" \
"lea 0x8(%[u_buf]),%[u_buf] \n" \
- "vpunpcklbw %%ymm1,%%ymm0,%%ymm0 \n" \
- "vpermq $0xd8,%%ymm0,%%ymm0 \n" \
- "vpunpcklwd %%ymm0,%%ymm0,%%ymm0 \n" \
+ "vpunpcklbw %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n" \
"vmovdqu (%[y_buf]),%%xmm4 \n" \
"vpermq $0xd8,%%ymm4,%%ymm4 \n" \
"vpunpcklbw %%ymm4,%%ymm4,%%ymm4 \n" \
@@ -2555,10 +3295,10 @@ void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf,
// Read 8 UV from NV12, upsample to 16 UV.
#define READNV12_AVX2 \
- "vmovdqu (%[uv_buf]),%%xmm0 \n" \
+ "vmovdqu (%[uv_buf]),%%xmm3 \n" \
"lea 0x10(%[uv_buf]),%[uv_buf] \n" \
- "vpermq $0xd8,%%ymm0,%%ymm0 \n" \
- "vpunpcklwd %%ymm0,%%ymm0,%%ymm0 \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n" \
"vmovdqu (%[y_buf]),%%xmm4 \n" \
"vpermq $0xd8,%%ymm4,%%ymm4 \n" \
"vpunpcklbw %%ymm4,%%ymm4,%%ymm4 \n" \
@@ -2566,73 +3306,98 @@ void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf,
// Read 8 VU from NV21, upsample to 16 UV.
#define READNV21_AVX2 \
- "vmovdqu (%[vu_buf]),%%xmm0 \n" \
+ "vmovdqu (%[vu_buf]),%%xmm3 \n" \
"lea 0x10(%[vu_buf]),%[vu_buf] \n" \
- "vpermq $0xd8,%%ymm0,%%ymm0 \n" \
- "vpshufb %[kShuffleNV21], %%ymm0, %%ymm0 \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vpshufb %[kShuffleNV21], %%ymm3, %%ymm3 \n" \
"vmovdqu (%[y_buf]),%%xmm4 \n" \
"vpermq $0xd8,%%ymm4,%%ymm4 \n" \
"vpunpcklbw %%ymm4,%%ymm4,%%ymm4 \n" \
"lea 0x10(%[y_buf]),%[y_buf] \n"
+// Read 4 UV from P210, upsample to 8 UV
+#define READP210_AVX2 \
+ "vmovdqu (%[uv_buf]),%%ymm3 \n" \
+ "lea 0x20(%[uv_buf]),%[uv_buf] \n" \
+ "vpsrlw $0x8,%%ymm3,%%ymm3 \n" \
+ "vpackuswb %%ymm3,%%ymm3,%%ymm3 \n" \
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n" \
+ "vmovdqu (%[y_buf]),%%ymm4 \n" \
+ "lea 0x20(%[y_buf]),%[y_buf] \n"
+
+// Read 8 UV from P410
+#define READP410_AVX2 \
+ "vmovdqu (%[uv_buf]),%%ymm3 \n" \
+ "vmovdqu 0x20(%[uv_buf]),%%ymm1 \n" \
+ "lea 0x40(%[uv_buf]),%[uv_buf] \n" \
+ "vpsrlw $0x8,%%ymm3,%%ymm3 \n" \
+ "vpsrlw $0x8,%%ymm1,%%ymm1 \n" \
+ "vpackuswb %%ymm1,%%ymm3,%%ymm3 \n" \
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n" \
+ "vmovdqu (%[y_buf]),%%ymm4 \n" \
+ "lea 0x20(%[y_buf]),%[y_buf] \n"
+
// Read 8 YUY2 with 16 Y and upsample 8 UV to 16 UV.
#define READYUY2_AVX2 \
"vmovdqu (%[yuy2_buf]),%%ymm4 \n" \
"vpshufb %[kShuffleYUY2Y], %%ymm4, %%ymm4 \n" \
- "vmovdqu (%[yuy2_buf]),%%ymm0 \n" \
- "vpshufb %[kShuffleYUY2UV], %%ymm0, %%ymm0 \n" \
+ "vmovdqu (%[yuy2_buf]),%%ymm3 \n" \
+ "vpshufb %[kShuffleYUY2UV], %%ymm3, %%ymm3 \n" \
"lea 0x20(%[yuy2_buf]),%[yuy2_buf] \n"
// Read 8 UYVY with 16 Y and upsample 8 UV to 16 UV.
#define READUYVY_AVX2 \
"vmovdqu (%[uyvy_buf]),%%ymm4 \n" \
"vpshufb %[kShuffleUYVYY], %%ymm4, %%ymm4 \n" \
- "vmovdqu (%[uyvy_buf]),%%ymm0 \n" \
- "vpshufb %[kShuffleUYVYUV], %%ymm0, %%ymm0 \n" \
+ "vmovdqu (%[uyvy_buf]),%%ymm3 \n" \
+ "vpshufb %[kShuffleUYVYUV], %%ymm3, %%ymm3 \n" \
"lea 0x20(%[uyvy_buf]),%[uyvy_buf] \n"
#if defined(__x86_64__)
-#define YUVTORGB_SETUP_AVX2(yuvconstants) \
- "vmovdqa (%[yuvconstants]),%%ymm8 \n" \
- "vmovdqa 32(%[yuvconstants]),%%ymm9 \n" \
- "vmovdqa 64(%[yuvconstants]),%%ymm10 \n" \
- "vmovdqa 96(%[yuvconstants]),%%ymm11 \n" \
- "vmovdqa 128(%[yuvconstants]),%%ymm12 \n" \
- "vmovdqa 160(%[yuvconstants]),%%ymm13 \n" \
- "vmovdqa 192(%[yuvconstants]),%%ymm14 \n"
+#define YUVTORGB_SETUP_AVX2(yuvconstants) \
+ "vpcmpeqb %%xmm13,%%xmm13,%%xmm13 \n" \
+ "vmovdqa (%[yuvconstants]),%%ymm8 \n" \
+ "vpsllw $7,%%xmm13,%%xmm13 \n" \
+ "vmovdqa 32(%[yuvconstants]),%%ymm9 \n" \
+ "vpbroadcastb %%xmm13,%%ymm13 \n" \
+ "vmovdqa 64(%[yuvconstants]),%%ymm10 \n" \
+ "vmovdqa 96(%[yuvconstants]),%%ymm11 \n" \
+ "vmovdqa 128(%[yuvconstants]),%%ymm12 \n"
#define YUVTORGB16_AVX2(yuvconstants) \
- "vpmaddubsw %%ymm10,%%ymm0,%%ymm2 \n" \
- "vpmaddubsw %%ymm9,%%ymm0,%%ymm1 \n" \
- "vpmaddubsw %%ymm8,%%ymm0,%%ymm0 \n" \
- "vpsubw %%ymm2,%%ymm13,%%ymm2 \n" \
- "vpsubw %%ymm1,%%ymm12,%%ymm1 \n" \
- "vpsubw %%ymm0,%%ymm11,%%ymm0 \n" \
- "vpmulhuw %%ymm14,%%ymm4,%%ymm4 \n" \
+ "vpsubb %%ymm13,%%ymm3,%%ymm3 \n" \
+ "vpmulhuw %%ymm11,%%ymm4,%%ymm4 \n" \
+ "vpmaddubsw %%ymm3,%%ymm8,%%ymm0 \n" \
+ "vpmaddubsw %%ymm3,%%ymm9,%%ymm1 \n" \
+ "vpmaddubsw %%ymm3,%%ymm10,%%ymm2 \n" \
+ "vpaddw %%ymm4,%%ymm12,%%ymm4 \n" \
"vpaddsw %%ymm4,%%ymm0,%%ymm0 \n" \
- "vpaddsw %%ymm4,%%ymm1,%%ymm1 \n" \
+ "vpsubsw %%ymm1,%%ymm4,%%ymm1 \n" \
"vpaddsw %%ymm4,%%ymm2,%%ymm2 \n"
-#define YUVTORGB_REGS_AVX2 \
- "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14",
+#define YUVTORGB_REGS_AVX2 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13",
#else // Convert 16 pixels: 16 UV and 16 Y.
#define YUVTORGB_SETUP_AVX2(yuvconstants)
#define YUVTORGB16_AVX2(yuvconstants) \
- "vpmaddubsw 64(%[yuvconstants]),%%ymm0,%%ymm2 \n" \
- "vpmaddubsw 32(%[yuvconstants]),%%ymm0,%%ymm1 \n" \
- "vpmaddubsw (%[yuvconstants]),%%ymm0,%%ymm0 \n" \
- "vmovdqu 160(%[yuvconstants]),%%ymm3 \n" \
- "vpsubw %%ymm2,%%ymm3,%%ymm2 \n" \
- "vmovdqu 128(%[yuvconstants]),%%ymm3 \n" \
- "vpsubw %%ymm1,%%ymm3,%%ymm1 \n" \
- "vmovdqu 96(%[yuvconstants]),%%ymm3 \n" \
- "vpsubw %%ymm0,%%ymm3,%%ymm0 \n" \
- "vpmulhuw 192(%[yuvconstants]),%%ymm4,%%ymm4 \n" \
+ "vpcmpeqb %%xmm0,%%xmm0,%%xmm0 \n" \
+ "vpsllw $7,%%xmm0,%%xmm0 \n" \
+ "vpbroadcastb %%xmm0,%%ymm0 \n" \
+ "vpsubb %%ymm0,%%ymm3,%%ymm3 \n" \
+ "vpmulhuw 96(%[yuvconstants]),%%ymm4,%%ymm4 \n" \
+ "vmovdqa (%[yuvconstants]),%%ymm0 \n" \
+ "vmovdqa 32(%[yuvconstants]),%%ymm1 \n" \
+ "vmovdqa 64(%[yuvconstants]),%%ymm2 \n" \
+ "vpmaddubsw %%ymm3,%%ymm0,%%ymm0 \n" \
+ "vpmaddubsw %%ymm3,%%ymm1,%%ymm1 \n" \
+ "vpmaddubsw %%ymm3,%%ymm2,%%ymm2 \n" \
+ "vmovdqa 128(%[yuvconstants]),%%ymm3 \n" \
+ "vpaddw %%ymm4,%%ymm3,%%ymm4 \n" \
"vpaddsw %%ymm4,%%ymm0,%%ymm0 \n" \
- "vpaddsw %%ymm4,%%ymm1,%%ymm1 \n" \
+ "vpsubsw %%ymm1,%%ymm4,%%ymm1 \n" \
"vpaddsw %%ymm4,%%ymm2,%%ymm2 \n"
+
#define YUVTORGB_REGS_AVX2
#endif
@@ -2655,7 +3420,7 @@ void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf,
"vpunpckhwd %%ymm2,%%ymm0,%%ymm0 \n" \
"vmovdqu %%ymm1,(%[dst_argb]) \n" \
"vmovdqu %%ymm0,0x20(%[dst_argb]) \n" \
- "lea 0x40(%[dst_argb]), %[dst_argb] \n"
+ "lea 0x40(%[dst_argb]), %[dst_argb] \n"
// Store 16 AR30 values.
#define STOREAR30_AVX2 \
@@ -2828,6 +3593,41 @@ void OMITFP I210ToARGBRow_AVX2(const uint16_t* y_buf,
}
#endif // HAS_I210TOARGBROW_AVX2
+#if defined(HAS_I212TOARGBROW_AVX2)
+// 16 pixels
+// 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 ARGB (64 bytes).
+void OMITFP I212ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUV212_AVX2
+ YUVTORGB_AVX2(yuvconstants)
+ STOREARGB_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+}
+#endif // HAS_I212TOARGBROW_AVX2
+
#if defined(HAS_I210TOAR30ROW_AVX2)
// 16 pixels
// 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 AR30 (64 bytes).
@@ -2863,11 +3663,239 @@ void OMITFP I210ToAR30Row_AVX2(const uint16_t* y_buf,
[width]"+rm"(width) // %[width]
: [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
: "memory", "cc", YUVTORGB_REGS_AVX2
- "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
);
}
#endif // HAS_I210TOAR30ROW_AVX2
+#if defined(HAS_I212TOAR30ROW_AVX2)
+// 16 pixels
+// 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 AR30 (64 bytes).
+void OMITFP I212ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants
+ "vpsrlw $14,%%ymm5,%%ymm5 \n"
+ "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits
+ "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min
+ "vpcmpeqb %%ymm7,%%ymm7,%%ymm7 \n" // 1023 for max
+ "vpsrlw $6,%%ymm7,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUV212_AVX2
+ YUVTORGB16_AVX2(yuvconstants)
+ STOREAR30_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+#endif // HAS_I212TOAR30ROW_AVX2
+
+#if defined(HAS_I410TOARGBROW_AVX2)
+// 16 pixels
+// 16 UV values with 16 Y producing 16 ARGB (64 bytes).
+void OMITFP I410ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUV410_AVX2
+ YUVTORGB_AVX2(yuvconstants)
+ STOREARGB_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+}
+#endif // HAS_I410TOARGBROW_AVX2
+
+#if defined(HAS_I210ALPHATOARGBROW_AVX2)
+// 16 pixels
+// 8 UV, 16 Y and 16 A producing 16 ARGB (64 bytes).
+void OMITFP I210AlphaToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile(
+ YUVTORGB_SETUP_AVX2(
+ yuvconstants) "sub %[u_buf],%[v_buf] \n"
+
+ LABELALIGN "1: \n" READYUVA210_AVX2
+ YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2
+ "subl $0x10,%[width] \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+
+ : [y_buf] "+r"(y_buf), // %[y_buf]
+ [u_buf] "+r"(u_buf), // %[u_buf]
+ [v_buf] "+r"(v_buf), // %[v_buf]
+ [a_buf] "+r"(a_buf), // %[a_buf]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+#if defined(__i386__)
+ [width] "+m"(width) // %[width]
+#else
+ [width] "+rm"(width) // %[width]
+#endif
+ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3",
+ "xmm4", "xmm5");
+}
+#endif // HAS_I210TOARGBROW_AVX2
+
+#if defined(HAS_I410ALPHATOARGBROW_AVX2)
+// 16 pixels
+// 16 UV, 16 Y and 16 A producing 16 ARGB (64 bytes).
+void OMITFP I410AlphaToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ const uint16_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile(
+ YUVTORGB_SETUP_AVX2(
+ yuvconstants) "sub %[u_buf],%[v_buf] \n"
+
+ LABELALIGN "1: \n" READYUVA410_AVX2
+ YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2
+ "subl $0x10,%[width] \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+
+ : [y_buf] "+r"(y_buf), // %[y_buf]
+ [u_buf] "+r"(u_buf), // %[u_buf]
+ [v_buf] "+r"(v_buf), // %[v_buf]
+ [a_buf] "+r"(a_buf), // %[a_buf]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+#if defined(__i386__)
+ [width] "+m"(width) // %[width]
+#else
+ [width] "+rm"(width) // %[width]
+#endif
+ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3",
+ "xmm4", "xmm5");
+}
+#endif // HAS_I410TOARGBROW_AVX2
+
+#if defined(HAS_I410TOAR30ROW_AVX2)
+// 16 pixels
+// 16 UV values with 16 Y producing 16 AR30 (64 bytes).
+void OMITFP I410ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* u_buf,
+ const uint16_t* v_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants
+ "vpsrlw $14,%%ymm5,%%ymm5 \n"
+ "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits
+ "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min
+ "vpcmpeqb %%ymm7,%%ymm7,%%ymm7 \n" // 1023 for max
+ "vpsrlw $6,%%ymm7,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUV410_AVX2
+ YUVTORGB16_AVX2(yuvconstants)
+ STOREAR30_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+#endif // HAS_I410TOAR30ROW_AVX2
+
+#if defined(HAS_I444ALPHATOARGBROW_AVX2)
+// 16 pixels
+// 16 UV values with 16 Y and 16 A producing 16 ARGB.
+void OMITFP I444AlphaToARGBRow_AVX2(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ // clang-format off
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "sub %[u_buf],%[v_buf] \n"
+
+ LABELALIGN
+ "1: \n"
+ READYUVA444_AVX2
+ YUVTORGB_AVX2(yuvconstants)
+ STOREARGB_AVX2
+ "subl $0x10,%[width] \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [u_buf]"+r"(u_buf), // %[u_buf]
+ [v_buf]"+r"(v_buf), // %[v_buf]
+ [a_buf]"+r"(a_buf), // %[a_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+#if defined(__i386__)
+ [width]"+m"(width) // %[width]
+#else
+ [width]"+rm"(width) // %[width]
+#endif
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+ // clang-format on
+}
+#endif // HAS_I444ALPHATOARGBROW_AVX2
+
#if defined(HAS_I422ALPHATOARGBROW_AVX2)
// 16 pixels
// 8 UV values upsampled to 16 UV, mixed with 16 Y and 16 A producing 16 ARGB.
@@ -3086,14 +4114,154 @@ void OMITFP UYVYToARGBRow_AVX2(const uint8_t* uyvy_buf,
}
#endif // HAS_UYVYTOARGBROW_AVX2
+#if defined(HAS_P210TOARGBROW_AVX2)
+// 16 pixels.
+// 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 ARGB (64 bytes).
+void OMITFP P210ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ // clang-format off
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ READP210_AVX2
+ YUVTORGB_AVX2(yuvconstants)
+ STOREARGB_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [uv_buf]"+r"(uv_buf), // %[uv_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+ // clang-format on
+}
+#endif // HAS_P210TOARGBROW_AVX2
+
+#if defined(HAS_P410TOARGBROW_AVX2)
+// 16 pixels.
+// 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 ARGB (64 bytes).
+void OMITFP P410ToARGBRow_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ // clang-format off
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ READP410_AVX2
+ YUVTORGB_AVX2(yuvconstants)
+ STOREARGB_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [uv_buf]"+r"(uv_buf), // %[uv_buf]
+ [dst_argb]"+r"(dst_argb), // %[dst_argb]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
+ );
+ // clang-format on
+}
+#endif // HAS_P410TOARGBROW_AVX2
+
+#if defined(HAS_P210TOAR30ROW_AVX2)
+// 16 pixels
+// 16 UV values with 16 Y producing 16 AR30 (64 bytes).
+void OMITFP P210ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants
+ "vpsrlw $14,%%ymm5,%%ymm5 \n"
+ "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits
+ "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min
+ "vpcmpeqb %%ymm7,%%ymm7,%%ymm7 \n" // 1023 for max
+ "vpsrlw $6,%%ymm7,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ READP210_AVX2
+ YUVTORGB16_AVX2(yuvconstants)
+ STOREAR30_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [uv_buf]"+r"(uv_buf), // %[uv_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+#endif // HAS_P210TOAR30ROW_AVX2
+
+#if defined(HAS_P410TOAR30ROW_AVX2)
+// 16 pixels
+// 16 UV values with 16 Y producing 16 AR30 (64 bytes).
+void OMITFP P410ToAR30Row_AVX2(const uint16_t* y_buf,
+ const uint16_t* uv_buf,
+ uint8_t* dst_ar30,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile (
+ YUVTORGB_SETUP_AVX2(yuvconstants)
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants
+ "vpsrlw $14,%%ymm5,%%ymm5 \n"
+ "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits
+ "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min
+ "vpcmpeqb %%ymm7,%%ymm7,%%ymm7 \n" // 1023 for max
+ "vpsrlw $6,%%ymm7,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ READP410_AVX2
+ YUVTORGB16_AVX2(yuvconstants)
+ STOREAR30_AVX2
+ "sub $0x10,%[width] \n"
+ "jg 1b \n"
+
+ "vzeroupper \n"
+ : [y_buf]"+r"(y_buf), // %[y_buf]
+ [uv_buf]"+r"(uv_buf), // %[uv_buf]
+ [dst_ar30]"+r"(dst_ar30), // %[dst_ar30]
+ [width]"+rm"(width) // %[width]
+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
+ : "memory", "cc", YUVTORGB_REGS_AVX2
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
+ );
+}
+#endif // HAS_P410TOAR30ROW_AVX2
+
#ifdef HAS_I400TOARGBROW_SSE2
void I400ToARGBRow_SSE2(const uint8_t* y_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
asm volatile(
- "movdqa 192(%3),%%xmm2 \n" // yg = 18997 = 1.164
- "movdqa 224(%3),%%xmm3 \n" // ygb = 1160 = 1.164 * 16
+ "movdqa 96(%3),%%xmm2 \n" // yg = 18997 = 1.164
+ "movdqa 128(%3),%%xmm3 \n" // ygb = 1160 = 1.164 * 16
"pcmpeqb %%xmm4,%%xmm4 \n" // 0xff000000
"pslld $0x18,%%xmm4 \n"
@@ -3137,8 +4305,8 @@ void I400ToARGBRow_AVX2(const uint8_t* y_buf,
const struct YuvConstants* yuvconstants,
int width) {
asm volatile(
- "vmovdqa 192(%3),%%ymm2 \n" // yg = 18997 = 1.164
- "vmovdqa 224(%3),%%ymm3 \n" // ygb = -1160 = 1.164*16
+ "vmovdqa 96(%3),%%ymm2 \n" // yg = 18997 = 1.164
+ "vmovdqa 128(%3),%%ymm3 \n" // ygb = -1160 = 1.164*16
"vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 0xff000000
"vpslld $0x18,%%ymm4,%%ymm4 \n"
@@ -3546,22 +4714,16 @@ void MergeUVRow_SSE2(const uint8_t* src_u,
}
#endif // HAS_MERGEUVROW_SSE2
-// Use scale to convert lsb formats to msb, depending how many bits there are:
-// 128 = 9 bits
-// 64 = 10 bits
-// 16 = 12 bits
-// 1 = 16 bits
#ifdef HAS_MERGEUVROW_16_AVX2
void MergeUVRow_16_AVX2(const uint16_t* src_u,
const uint16_t* src_v,
uint16_t* dst_uv,
- int scale,
+ int depth,
int width) {
+ depth = 16 - depth;
// clang-format off
asm volatile (
"vmovd %4,%%xmm3 \n"
- "vpunpcklwd %%xmm3,%%xmm3,%%xmm3 \n"
- "vbroadcastss %%xmm3,%%ymm3 \n"
"sub %0,%1 \n"
// 16 pixels per loop.
@@ -3571,8 +4733,8 @@ void MergeUVRow_16_AVX2(const uint16_t* src_u,
"vmovdqu (%0,%1,1),%%ymm1 \n"
"add $0x20,%0 \n"
- "vpmullw %%ymm3,%%ymm0,%%ymm0 \n"
- "vpmullw %%ymm3,%%ymm1,%%ymm1 \n"
+ "vpsllw %%xmm3,%%ymm0,%%ymm0 \n"
+ "vpsllw %%xmm3,%%ymm1,%%ymm1 \n"
"vpunpcklwd %%ymm1,%%ymm0,%%ymm2 \n" // mutates
"vpunpckhwd %%ymm1,%%ymm0,%%ymm0 \n"
"vextractf128 $0x0,%%ymm2,(%2) \n"
@@ -3587,12 +4749,59 @@ void MergeUVRow_16_AVX2(const uint16_t* src_u,
"+r"(src_v), // %1
"+r"(dst_uv), // %2
"+r"(width) // %3
- : "r"(scale) // %4
+ : "r"(depth) // %4
: "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3");
// clang-format on
}
#endif // HAS_MERGEUVROW_AVX2
+#ifdef HAS_SPLITUVROW_16_AVX2
+const uvec8 kSplitUVShuffle16 = {0, 1, 4, 5, 8, 9, 12, 13,
+ 2, 3, 6, 7, 10, 11, 14, 15};
+void SplitUVRow_16_AVX2(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width) {
+ depth = 16 - depth;
+ // clang-format off
+ asm volatile (
+ "vmovd %4,%%xmm3 \n"
+ "vbroadcastf128 %5,%%ymm4 \n"
+ "sub %1,%2 \n"
+
+ // 16 pixels per loop.
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "add $0x40,%0 \n"
+
+ "vpsrlw %%xmm3,%%ymm0,%%ymm0 \n"
+ "vpsrlw %%xmm3,%%ymm1,%%ymm1 \n"
+ "vpshufb %%ymm4,%%ymm0,%%ymm0 \n"
+ "vpshufb %%ymm4,%%ymm1,%%ymm1 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm1,%%ymm1 \n"
+ "vextractf128 $0x0,%%ymm0,(%1) \n"
+ "vextractf128 $0x0,%%ymm1,0x10(%1) \n"
+ "vextractf128 $0x1,%%ymm0,(%1,%2) \n"
+ "vextractf128 $0x1,%%ymm1,0x10(%1,%2) \n"
+ "add $0x20,%1 \n"
+ "sub $0x10,%3 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_uv), // %0
+ "+r"(dst_u), // %1
+ "+r"(dst_v), // %2
+ "+r"(width) // %3
+ : "r"(depth), // %4
+ "m"(kSplitUVShuffle16) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+ // clang-format on
+}
+#endif // HAS_SPLITUVROW_16_AVX2
+
// Use scale to convert lsb formats to msb, depending how many bits there are:
// 128 = 9 bits
// 64 = 10 bits
@@ -3610,7 +4819,7 @@ void MultiplyRow_16_AVX2(const uint16_t* src_y,
"vbroadcastss %%xmm3,%%ymm3 \n"
"sub %0,%1 \n"
- // 16 pixels per loop.
+ // 32 pixels per loop.
LABELALIGN
"1: \n"
"vmovdqu (%0),%%ymm0 \n"
@@ -3632,6 +4841,46 @@ void MultiplyRow_16_AVX2(const uint16_t* src_y,
}
#endif // HAS_MULTIPLYROW_16_AVX2
+// Use scale to convert msb formats to lsb, depending how many bits there are:
+// 512 = 9 bits
+// 1024 = 10 bits
+// 4096 = 12 bits
+// 65536 = 16 bits
+#ifdef HAS_DIVIDEROW_16_AVX2
+void DivideRow_16_AVX2(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width) {
+ // clang-format off
+ asm volatile (
+ "vmovd %3,%%xmm3 \n"
+ "vpunpcklwd %%xmm3,%%xmm3,%%xmm3 \n"
+ "vbroadcastss %%xmm3,%%ymm3 \n"
+ "sub %0,%1 \n"
+
+ // 32 pixels per loop.
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "vpmulhuw %%ymm3,%%ymm0,%%ymm0 \n"
+ "vpmulhuw %%ymm3,%%ymm1,%%ymm1 \n"
+ "vmovdqu %%ymm0,(%0,%1) \n"
+ "vmovdqu %%ymm1,0x20(%0,%1) \n"
+ "add $0x40,%0 \n"
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_y), // %0
+ "+r"(dst_y), // %1
+ "+r"(width), // %2
+ "+r"(scale) // %3
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm3");
+ // clang-format on
+}
+#endif // HAS_MULTIPLYROW_16_AVX2
+
// Use scale to convert lsb formats to msb, depending how many bits there are:
// 32768 = 9 bits
// 16384 = 10 bits
@@ -3968,6 +5217,780 @@ void MergeRGBRow_SSSE3(const uint8_t* src_r,
}
#endif // HAS_MERGERGBROW_SSSE3
+#ifdef HAS_MERGEARGBROW_SSE2
+void MergeARGBRow_SSE2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ "sub %0,%1 \n"
+ "sub %0,%2 \n"
+ "sub %0,%3 \n"
+
+ LABELALIGN
+ "1: \n"
+
+ "movq (%0,%2),%%xmm0 \n" // B
+ "movq (%0),%%xmm1 \n" // R
+ "movq (%0,%1),%%xmm2 \n" // G
+ "punpcklbw %%xmm1,%%xmm0 \n" // BR
+ "movq (%0,%3),%%xmm1 \n" // A
+ "punpcklbw %%xmm1,%%xmm2 \n" // GA
+ "movdqa %%xmm0,%%xmm1 \n" // BR
+ "punpckhbw %%xmm2,%%xmm1 \n" // BGRA (hi)
+ "punpcklbw %%xmm2,%%xmm0 \n" // BGRA (lo)
+ "movdqu %%xmm0,(%4) \n"
+ "movdqu %%xmm1,16(%4) \n"
+
+ "lea 8(%0),%0 \n"
+ "lea 32(%4),%4 \n"
+ "sub $0x8,%5 \n"
+ "jg 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_argb), // %4
+ "+r"(width) // %5
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif
+
+#ifdef HAS_MERGEXRGBROW_SSE2
+void MergeXRGBRow_SSE2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ LABELALIGN
+ "1: \n"
+
+ "movq (%2),%%xmm0 \n" // B
+ "movq (%0),%%xmm1 \n" // R
+ "movq (%1),%%xmm2 \n" // G
+ "punpcklbw %%xmm1,%%xmm0 \n" // BR
+ "pcmpeqd %%xmm1,%%xmm1 \n" // A(255)
+ "punpcklbw %%xmm1,%%xmm2 \n" // GA
+ "movdqa %%xmm0,%%xmm1 \n" // BR
+ "punpckhbw %%xmm2,%%xmm1 \n" // BGRA (hi)
+ "punpcklbw %%xmm2,%%xmm0 \n" // BGRA (lo)
+ "movdqu %%xmm0,(%3) \n"
+ "movdqu %%xmm1,16(%3) \n"
+
+ "lea 8(%0),%0 \n"
+ "lea 8(%1),%1 \n"
+ "lea 8(%2),%2 \n"
+ "lea 32(%3),%3 \n"
+ "sub $0x8,%4 \n"
+ "jg 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_argb), // %3
+ "+r"(width) // %4
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif // HAS_MERGEARGBROW_SSE2
+
+#ifdef HAS_MERGEARGBROW_AVX2
+void MergeARGBRow_AVX2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ "sub %0,%1 \n"
+ "sub %0,%2 \n"
+ "sub %0,%3 \n"
+
+ LABELALIGN
+ "1: \n"
+
+ "vmovdqu (%0,%2),%%xmm0 \n" // B
+ "vmovdqu (%0,%1),%%xmm1 \n" // R
+ "vinserti128 $1,(%0),%%ymm0,%%ymm0 \n" // G
+ "vinserti128 $1,(%0,%3),%%ymm1,%%ymm1 \n" // A
+ "vpunpckhbw %%ymm1,%%ymm0,%%ymm2 \n"
+ "vpunpcklbw %%ymm1,%%ymm0,%%ymm0 \n"
+ "vperm2i128 $0x31,%%ymm2,%%ymm0,%%ymm1 \n"
+ "vperm2i128 $0x20,%%ymm2,%%ymm0,%%ymm0 \n"
+ "vpunpckhwd %%ymm1,%%ymm0,%%ymm2 \n"
+ "vpunpcklwd %%ymm1,%%ymm0,%%ymm0 \n"
+ "vperm2i128 $0x31,%%ymm2,%%ymm0,%%ymm1 \n"
+ "vperm2i128 $0x20,%%ymm2,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%4) \n" // First 8
+ "vmovdqu %%ymm1,32(%4) \n" // Next 8
+
+ "lea 16(%0),%0 \n"
+ "lea 64(%4),%4 \n"
+ "sub $0x10,%5 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_argb), // %4
+ "+r"(width) // %5
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif
+
+#ifdef HAS_MERGEXRGBROW_AVX2
+void MergeXRGBRow_AVX2(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+
+ LABELALIGN
+ "1: \n"
+
+ "vmovdqu (%2),%%xmm0 \n" // B
+ "vpcmpeqd %%ymm1,%%ymm1,%%ymm1 \n" // A(255)
+ "vinserti128 $0,(%1),%%ymm1,%%ymm1 \n" // R
+ "vinserti128 $1,(%0),%%ymm0,%%ymm0 \n" // G
+ "vpunpckhbw %%ymm1,%%ymm0,%%ymm2 \n"
+ "vpunpcklbw %%ymm1,%%ymm0,%%ymm0 \n"
+ "vperm2i128 $0x31,%%ymm2,%%ymm0,%%ymm1 \n"
+ "vperm2i128 $0x20,%%ymm2,%%ymm0,%%ymm0 \n"
+ "vpunpckhwd %%ymm1,%%ymm0,%%ymm2 \n"
+ "vpunpcklwd %%ymm1,%%ymm0,%%ymm0 \n"
+ "vperm2i128 $0x31,%%ymm2,%%ymm0,%%ymm1 \n"
+ "vperm2i128 $0x20,%%ymm2,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%3) \n" // First 8
+ "vmovdqu %%ymm1,32(%3) \n" // Next 8
+
+ "lea 16(%0),%0 \n"
+ "lea 16(%1),%1 \n"
+ "lea 16(%2),%2 \n"
+ "lea 64(%3),%3 \n"
+ "sub $0x10,%4 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_argb), // %3
+ "+rm"(width) // %4
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif // HAS_MERGEARGBROW_AVX2
+
+#ifdef HAS_SPLITARGBROW_SSE2
+void SplitARGBRow_SSE2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width) {
+ asm volatile(
+
+ "sub %1,%2 \n"
+ "sub %1,%3 \n"
+ "sub %1,%4 \n"
+
+ LABELALIGN
+ "1: \n"
+
+ "movdqu (%0),%%xmm0 \n" // 00-0F
+ "movdqu 16(%0),%%xmm1 \n" // 10-1F
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpcklqdq %%xmm1,%%xmm0 \n" // 00-07 10-17
+ "punpckhqdq %%xmm1,%%xmm2 \n" // 08-0F 18-1F
+ "movdqa %%xmm0,%%xmm1 \n"
+ "punpcklbw %%xmm2,%%xmm0 \n" // 08192A3B4C5D6E7F (lo)
+ "punpckhbw %%xmm2,%%xmm1 \n" // 08192A3B4C5D6E7F (hi)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpcklqdq %%xmm1,%%xmm0 \n" // 08192A3B08192A3B
+ "punpckhqdq %%xmm1,%%xmm2 \n" // 4C5D6E7F4C5D6E7F
+ "movdqa %%xmm0,%%xmm1 \n"
+ "punpcklbw %%xmm2,%%xmm0 \n" // 048C159D26AE37BF (lo)
+ "punpckhbw %%xmm2,%%xmm1 \n" // 048C159D26AE37BF (hi)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckldq %%xmm1,%%xmm0 \n" // 048C048C159D159D (BG)
+ "punpckhdq %%xmm1,%%xmm2 \n" // 26AE26AE37BF37BF (RA)
+ "movlps %%xmm0,(%1,%3) \n" // B
+ "movhps %%xmm0,(%1,%2) \n" // G
+ "movlps %%xmm2,(%1) \n" // R
+ "movhps %%xmm2,(%1,%4) \n" // A
+
+ "lea 32(%0),%0 \n"
+ "lea 8(%1),%1 \n"
+ "sub $0x8,%5 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(dst_a), // %4
+ "+rm"(width) // %5
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif
+
+#ifdef HAS_SPLITXRGBROW_SSE2
+void SplitXRGBRow_SSE2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width) {
+ asm volatile(
+
+ LABELALIGN
+ "1: \n"
+
+ "movdqu (%0),%%xmm0 \n" // 00-0F
+ "movdqu 16(%0),%%xmm1 \n" // 10-1F
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpcklqdq %%xmm1,%%xmm0 \n" // 00-07 10-17
+ "punpckhqdq %%xmm1,%%xmm2 \n" // 08-0F 18-1F
+ "movdqa %%xmm0,%%xmm1 \n"
+ "punpcklbw %%xmm2,%%xmm0 \n" // 08192A3B4C5D6E7F (lo)
+ "punpckhbw %%xmm2,%%xmm1 \n" // 08192A3B4C5D6E7F (hi)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpcklqdq %%xmm1,%%xmm0 \n" // 08192A3B08192A3B
+ "punpckhqdq %%xmm1,%%xmm2 \n" // 4C5D6E7F4C5D6E7F
+ "movdqa %%xmm0,%%xmm1 \n"
+ "punpcklbw %%xmm2,%%xmm0 \n" // 048C159D26AE37BF (lo)
+ "punpckhbw %%xmm2,%%xmm1 \n" // 048C159D26AE37BF (hi)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckldq %%xmm1,%%xmm0 \n" // 048C048C159D159D (BG)
+ "punpckhdq %%xmm1,%%xmm2 \n" // 26AE26AE37BF37BF (RA)
+ "movlps %%xmm0,(%3) \n" // B
+ "movhps %%xmm0,(%2) \n" // G
+ "movlps %%xmm2,(%1) \n" // R
+
+ "lea 32(%0),%0 \n"
+ "lea 8(%1),%1 \n"
+ "lea 8(%2),%2 \n"
+ "lea 8(%3),%3 \n"
+ "sub $0x8,%4 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+rm"(width) // %4
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2");
+}
+#endif
+
+static const uvec8 kShuffleMaskARGBSplit = {0, 4, 8, 12, 1, 5, 9, 13,
+ 2, 6, 10, 14, 3, 7, 11, 15};
+#ifdef HAS_SPLITARGBROW_SSSE3
+void SplitARGBRow_SSSE3(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width) {
+ asm volatile(
+
+ "movdqa %6,%%xmm3 \n"
+ "sub %1,%2 \n"
+ "sub %1,%3 \n"
+ "sub %1,%4 \n"
+
+ LABELALIGN
+ "1: \n"
+
+ "movdqu (%0),%%xmm0 \n" // 00-0F
+ "movdqu 16(%0),%%xmm1 \n" // 10-1F
+ "pshufb %%xmm3,%%xmm0 \n" // 048C159D26AE37BF (lo)
+ "pshufb %%xmm3,%%xmm1 \n" // 048C159D26AE37BF (hi)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckldq %%xmm1,%%xmm0 \n" // 048C048C159D159D (BG)
+ "punpckhdq %%xmm1,%%xmm2 \n" // 26AE26AE37BF37BF (RA)
+ "movlps %%xmm0,(%1,%3) \n" // B
+ "movhps %%xmm0,(%1,%2) \n" // G
+ "movlps %%xmm2,(%1) \n" // R
+ "movhps %%xmm2,(%1,%4) \n" // A
+
+ "lea 32(%0),%0 \n"
+ "lea 8(%1),%1 \n"
+ "subl $0x8,%5 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(dst_a), // %4
+#if defined(__i386__)
+ "+m"(width) // %5
+#else
+ "+rm"(width) // %5
+#endif
+ : "m"(kShuffleMaskARGBSplit) // %6
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3");
+}
+#endif
+
+#ifdef HAS_SPLITXRGBROW_SSSE3
+void SplitXRGBRow_SSSE3(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width) {
+ asm volatile(
+
+ "movdqa %5,%%xmm3 \n"
+
+ LABELALIGN
+ "1: \n"
+
+ "movdqu (%0),%%xmm0 \n" // 00-0F
+ "movdqu 16(%0),%%xmm1 \n" // 10-1F
+ "pshufb %%xmm3,%%xmm0 \n" // 048C159D26AE37BF (lo)
+ "pshufb %%xmm3,%%xmm1 \n" // 048C159D26AE37BF (hi)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckldq %%xmm1,%%xmm0 \n" // 048C048C159D159D (BG)
+ "punpckhdq %%xmm1,%%xmm2 \n" // 26AE26AE37BF37BF (RA)
+ "movlps %%xmm0,(%3) \n" // B
+ "movhps %%xmm0,(%2) \n" // G
+ "movlps %%xmm2,(%1) \n" // R
+
+ "lea 32(%0),%0 \n"
+ "lea 8(%1),%1 \n"
+ "lea 8(%2),%2 \n"
+ "lea 8(%3),%3 \n"
+ "sub $0x8,%4 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(width) // %4
+ : "m"(kShuffleMaskARGBSplit) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3");
+}
+#endif
+
+#ifdef HAS_SPLITARGBROW_AVX2
+static const ulvec32 kShuffleMaskARGBPermute = {0, 4, 1, 5, 2, 6, 3, 7};
+void SplitARGBRow_AVX2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width) {
+ asm volatile(
+
+ "sub %1,%2 \n"
+ "sub %1,%3 \n"
+ "sub %1,%4 \n"
+ "vmovdqa %7,%%ymm3 \n"
+ "vbroadcastf128 %6,%%ymm4 \n"
+
+ LABELALIGN
+ "1: \n"
+
+ "vmovdqu (%0),%%xmm0 \n" // 00-0F
+ "vmovdqu 16(%0),%%xmm1 \n" // 10-1F
+ "vinserti128 $1,32(%0),%%ymm0,%%ymm0 \n" // 00-0F 20-2F
+ "vinserti128 $1,48(%0),%%ymm1,%%ymm1 \n" // 10-1F 30-3F
+ "vpshufb %%ymm4,%%ymm0,%%ymm0 \n"
+ "vpshufb %%ymm4,%%ymm1,%%ymm1 \n"
+ "vpermd %%ymm0,%%ymm3,%%ymm0 \n"
+ "vpermd %%ymm1,%%ymm3,%%ymm1 \n"
+ "vpunpckhdq %%ymm1,%%ymm0,%%ymm2 \n" // GA
+ "vpunpckldq %%ymm1,%%ymm0,%%ymm0 \n" // BR
+ "vmovdqu %%xmm0,(%1,%3) \n" // B
+ "vextracti128 $1,%%ymm0,(%1) \n" // R
+ "vmovdqu %%xmm2,(%1,%2) \n" // G
+ "vextracti128 $1,%%ymm2,(%1,%4) \n" // A
+ "lea 64(%0),%0 \n"
+ "lea 16(%1),%1 \n"
+ "subl $0x10,%5 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(dst_a), // %4
+#if defined(__i386__)
+ "+m"(width) // %5
+#else
+ "+rm"(width) // %5
+#endif
+ : "m"(kShuffleMaskARGBSplit), // %6
+ "m"(kShuffleMaskARGBPermute) // %7
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+}
+#endif
+
+#ifdef HAS_SPLITXRGBROW_AVX2
+void SplitXRGBRow_AVX2(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width) {
+ asm volatile(
+
+ "vmovdqa %6,%%ymm3 \n"
+ "vbroadcastf128 %5,%%ymm4 \n"
+
+ LABELALIGN
+ "1: \n"
+
+ "vmovdqu (%0),%%xmm0 \n" // 00-0F
+ "vmovdqu 16(%0),%%xmm1 \n" // 10-1F
+ "vinserti128 $1,32(%0),%%ymm0,%%ymm0 \n" // 00-0F 20-2F
+ "vinserti128 $1,48(%0),%%ymm1,%%ymm1 \n" // 10-1F 30-3F
+ "vpshufb %%ymm4,%%ymm0,%%ymm0 \n"
+ "vpshufb %%ymm4,%%ymm1,%%ymm1 \n"
+ "vpermd %%ymm0,%%ymm3,%%ymm0 \n"
+ "vpermd %%ymm1,%%ymm3,%%ymm1 \n"
+ "vpunpckhdq %%ymm1,%%ymm0,%%ymm2 \n" // GA
+ "vpunpckldq %%ymm1,%%ymm0,%%ymm0 \n" // BR
+ "vmovdqu %%xmm0,(%3) \n" // B
+ "vextracti128 $1,%%ymm0,(%1) \n" // R
+ "vmovdqu %%xmm2,(%2) \n" // G
+
+ "lea 64(%0),%0 \n"
+ "lea 16(%1),%1 \n"
+ "lea 16(%2),%2 \n"
+ "lea 16(%3),%3 \n"
+ "sub $0x10,%4 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(width) // %4
+ : "m"(kShuffleMaskARGBSplit), // %5
+ "m"(kShuffleMaskARGBPermute) // %6
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+}
+#endif
+
+#ifdef HAS_MERGEXR30ROW_AVX2
+void MergeXR30Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int depth,
+ int width) {
+ int shift = depth - 10;
+ asm volatile(
+
+ "sub %0,%1 \n"
+ "sub %0,%2 \n"
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants
+ "vpsrlw $14,%%ymm5,%%ymm5 \n"
+ "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits
+ "vpcmpeqb %%ymm6,%%ymm6,%%ymm6 \n"
+ "vpsrlw $6,%%ymm6,%%ymm6 \n"
+ "vmovd %5,%%xmm4 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu (%0,%1),%%ymm1 \n"
+ "vmovdqu (%0,%2),%%ymm2 \n"
+ "vpsrlw %%xmm4,%%ymm0,%%ymm0 \n"
+ "vpsrlw %%xmm4,%%ymm1,%%ymm1 \n"
+ "vpsrlw %%xmm4,%%ymm2,%%ymm2 \n"
+ "vpminuw %%ymm0,%%ymm6,%%ymm0 \n"
+ "vpminuw %%ymm1,%%ymm6,%%ymm1 \n"
+ "vpminuw %%ymm2,%%ymm6,%%ymm2 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm1,%%ymm1 \n"
+ "vpermq $0xd8,%%ymm2,%%ymm2 \n"
+ "vpsllw $0x4,%%ymm0,%%ymm0 \n" // Shift R to target bit
+ "vpunpckhwd %%ymm0,%%ymm2,%%ymm3 \n" // RB
+ "vpunpcklwd %%ymm0,%%ymm2,%%ymm0 \n"
+ "vpunpckhwd %%ymm5,%%ymm1,%%ymm2 \n" // AG
+ "vpunpcklwd %%ymm5,%%ymm1,%%ymm1 \n"
+ "vpslld $0xa,%%ymm1,%%ymm1 \n" // Shift AG to target bit
+ "vpslld $0xa,%%ymm2,%%ymm2 \n"
+ "vpor %%ymm1,%%ymm0,%%ymm0 \n" // Combine
+ "vpor %%ymm2,%%ymm3,%%ymm3 \n"
+ "vmovdqu %%ymm0,(%3) \n"
+ "vmovdqu %%ymm3,0x20(%3) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x40(%3),%3 \n"
+ "sub $0x10,%4 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar30), // %3
+ "+r"(width) // %4
+#if defined(__i386__)
+ : "m"(shift) // %5
+#else
+ : "rm"(shift) // %5
+#endif
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif
+
+#ifdef HAS_MERGEAR64ROW_AVX2
+static const lvec32 MergeAR64Permute = {0, 4, 2, 6, 1, 5, 3, 7};
+void MergeAR64Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ int mask = (1 << depth) - 1;
+ mask = (mask << 16) + mask;
+ asm volatile(
+
+ "sub %0,%1 \n"
+ "sub %0,%2 \n"
+ "sub %0,%3 \n"
+ "vmovdqa %8,%%ymm5 \n"
+ "vmovd %6,%%xmm6 \n"
+ "vbroadcastss %7,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n" // R
+ "vmovdqu (%0,%1),%%ymm1 \n" // G
+ "vmovdqu (%0,%2),%%ymm2 \n" // B
+ "vmovdqu (%0,%3),%%ymm3 \n" // A
+ "vpminuw %%ymm0,%%ymm7,%%ymm0 \n"
+ "vpminuw %%ymm1,%%ymm7,%%ymm1 \n"
+ "vpminuw %%ymm2,%%ymm7,%%ymm2 \n"
+ "vpminuw %%ymm3,%%ymm7,%%ymm3 \n"
+ "vpsllw %%xmm6,%%ymm0,%%ymm0 \n"
+ "vpsllw %%xmm6,%%ymm1,%%ymm1 \n"
+ "vpsllw %%xmm6,%%ymm2,%%ymm2 \n"
+ "vpsllw %%xmm6,%%ymm3,%%ymm3 \n"
+ "vpermd %%ymm0,%%ymm5,%%ymm0 \n"
+ "vpermd %%ymm1,%%ymm5,%%ymm1 \n"
+ "vpermd %%ymm2,%%ymm5,%%ymm2 \n"
+ "vpermd %%ymm3,%%ymm5,%%ymm3 \n"
+ "vpunpcklwd %%ymm1,%%ymm2,%%ymm4 \n" // BG(low)
+ "vpunpckhwd %%ymm1,%%ymm2,%%ymm1 \n" // BG(hi)
+ "vpunpcklwd %%ymm3,%%ymm0,%%ymm2 \n" // RA(low)
+ "vpunpckhwd %%ymm3,%%ymm0,%%ymm0 \n" // RA(hi)
+ "vpunpckldq %%ymm2,%%ymm4,%%ymm3 \n" // BGRA(1)
+ "vpunpckhdq %%ymm2,%%ymm4,%%ymm4 \n" // BGRA(3)
+ "vpunpckldq %%ymm0,%%ymm1,%%ymm2 \n" // BGRA(2)
+ "vpunpckhdq %%ymm0,%%ymm1,%%ymm1 \n" // BGRA(4)
+ "vmovdqu %%ymm3,(%4) \n"
+ "vmovdqu %%ymm2,0x20(%4) \n"
+ "vmovdqu %%ymm4,0x40(%4) \n"
+ "vmovdqu %%ymm1,0x60(%4) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x80(%4),%4 \n"
+ "subl $0x10,%5 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_ar64), // %4
+#if defined(__i386__)
+ "+m"(width) // %5
+#else
+ "+rm"(width) // %5
+#endif
+ : "m"(shift), // %6
+ "m"(mask), // %7
+ "m"(MergeAR64Permute) // %8
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_MERGEXR64ROW_AVX2
+void MergeXR64Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ int mask = (1 << depth) - 1;
+ mask = (mask << 16) + mask;
+ asm volatile(
+
+ "sub %0,%1 \n"
+ "sub %0,%2 \n"
+ "vmovdqa %7,%%ymm5 \n"
+ "vmovd %5,%%xmm6 \n"
+ "vbroadcastss %6,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n" // R
+ "vmovdqu (%0,%1),%%ymm1 \n" // G
+ "vmovdqu (%0,%2),%%ymm2 \n" // B
+ "vpminuw %%ymm0,%%ymm7,%%ymm0 \n"
+ "vpminuw %%ymm1,%%ymm7,%%ymm1 \n"
+ "vpminuw %%ymm2,%%ymm7,%%ymm2 \n"
+ "vpsllw %%xmm6,%%ymm0,%%ymm0 \n"
+ "vpsllw %%xmm6,%%ymm1,%%ymm1 \n"
+ "vpsllw %%xmm6,%%ymm2,%%ymm2 \n"
+ "vpermd %%ymm0,%%ymm5,%%ymm0 \n"
+ "vpermd %%ymm1,%%ymm5,%%ymm1 \n"
+ "vpermd %%ymm2,%%ymm5,%%ymm2 \n"
+ "vpcmpeqb %%ymm3,%%ymm3,%%ymm3 \n" // A (0xffff)
+ "vpunpcklwd %%ymm1,%%ymm2,%%ymm4 \n" // BG(low)
+ "vpunpckhwd %%ymm1,%%ymm2,%%ymm1 \n" // BG(hi)
+ "vpunpcklwd %%ymm3,%%ymm0,%%ymm2 \n" // RA(low)
+ "vpunpckhwd %%ymm3,%%ymm0,%%ymm0 \n" // RA(hi)
+ "vpunpckldq %%ymm2,%%ymm4,%%ymm3 \n" // BGRA(1)
+ "vpunpckhdq %%ymm2,%%ymm4,%%ymm4 \n" // BGRA(3)
+ "vpunpckldq %%ymm0,%%ymm1,%%ymm2 \n" // BGRA(2)
+ "vpunpckhdq %%ymm0,%%ymm1,%%ymm1 \n" // BGRA(4)
+ "vmovdqu %%ymm3,(%3) \n"
+ "vmovdqu %%ymm2,0x20(%3) \n"
+ "vmovdqu %%ymm4,0x40(%3) \n"
+ "vmovdqu %%ymm1,0x60(%3) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x80(%3),%3 \n"
+ "subl $0x10,%4 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar64), // %3
+ "+r"(width) // %4
+ : "m"(shift), // %5
+ "m"(mask), // %6
+ "m"(MergeAR64Permute) // %7
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_MERGEARGB16TO8ROW_AVX2
+static const uvec8 MergeARGB16To8Shuffle = {0, 8, 1, 9, 2, 10, 3, 11,
+ 4, 12, 5, 13, 6, 14, 7, 15};
+void MergeARGB16To8Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ int shift = depth - 8;
+ asm volatile(
+
+ "sub %0,%1 \n"
+ "sub %0,%2 \n"
+ "sub %0,%3 \n"
+ "vbroadcastf128 %7,%%ymm5 \n"
+ "vmovd %6,%%xmm6 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n" // R
+ "vmovdqu (%0,%1),%%ymm1 \n" // G
+ "vmovdqu (%0,%2),%%ymm2 \n" // B
+ "vmovdqu (%0,%3),%%ymm3 \n" // A
+ "vpsrlw %%xmm6,%%ymm0,%%ymm0 \n"
+ "vpsrlw %%xmm6,%%ymm1,%%ymm1 \n"
+ "vpsrlw %%xmm6,%%ymm2,%%ymm2 \n"
+ "vpsrlw %%xmm6,%%ymm3,%%ymm3 \n"
+ "vpackuswb %%ymm1,%%ymm2,%%ymm1 \n" // BG (planar)
+ "vpackuswb %%ymm3,%%ymm0,%%ymm0 \n" // RA (planar)
+ "vpshufb %%ymm5,%%ymm1,%%ymm1 \n" // BG (interleave)
+ "vpshufb %%ymm5,%%ymm0,%%ymm0 \n" // RA (interleave)
+ "vpermq $0xd8,%%ymm1,%%ymm1 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpunpcklwd %%ymm0,%%ymm1,%%ymm2 \n" // BGRA (low)
+ "vpunpckhwd %%ymm0,%%ymm1,%%ymm0 \n" // BGRA (hi)
+ "vmovdqu %%ymm2,(%4) \n"
+ "vmovdqu %%ymm0,0x20(%4) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x40(%4),%4 \n"
+ "subl $0x10,%5 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_argb), // %4
+#if defined(__i386__)
+ "+m"(width) // %5
+#else
+ "+rm"(width) // %5
+#endif
+ : "m"(shift), // %6
+ "m"(MergeARGB16To8Shuffle) // %7
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+#ifdef HAS_MERGEXRGB16TO8ROW_AVX2
+void MergeXRGB16To8Row_AVX2(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ int shift = depth - 8;
+ asm volatile(
+
+ "sub %0,%1 \n"
+ "sub %0,%2 \n"
+ "vbroadcastf128 %6,%%ymm5 \n"
+ "vmovd %5,%%xmm6 \n"
+ "vpcmpeqb %%ymm3,%%ymm3,%%ymm3 \n"
+ "vpsrlw $8,%%ymm3,%%ymm3 \n" // A (0xff)
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n" // R
+ "vmovdqu (%0,%1),%%ymm1 \n" // G
+ "vmovdqu (%0,%2),%%ymm2 \n" // B
+ "vpsrlw %%xmm6,%%ymm0,%%ymm0 \n"
+ "vpsrlw %%xmm6,%%ymm1,%%ymm1 \n"
+ "vpsrlw %%xmm6,%%ymm2,%%ymm2 \n"
+ "vpackuswb %%ymm1,%%ymm2,%%ymm1 \n" // BG (planar)
+ "vpackuswb %%ymm3,%%ymm0,%%ymm0 \n" // RA (planar)
+ "vpshufb %%ymm5,%%ymm1,%%ymm1 \n" // BG (interleave)
+ "vpshufb %%ymm5,%%ymm0,%%ymm0 \n" // RA (interleave)
+ "vpermq $0xd8,%%ymm1,%%ymm1 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpunpcklwd %%ymm0,%%ymm1,%%ymm2 \n" // BGRA (low)
+ "vpunpckhwd %%ymm0,%%ymm1,%%ymm0 \n" // BGRA (hi)
+ "vmovdqu %%ymm2,(%3) \n"
+ "vmovdqu %%ymm0,0x20(%3) \n"
+ "lea 0x20(%0),%0 \n"
+ "lea 0x40(%3),%3 \n"
+ "subl $0x10,%4 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_argb), // %3
+ "+r"(width) // %4
+ : "m"(shift), // %5
+ "m"(MergeARGB16To8Shuffle) // %6
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
#ifdef HAS_COPYROW_SSE2
void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width) {
asm volatile(
@@ -4693,7 +6716,7 @@ static const uvec8 kShuffleAlpha = {3u, 0x80, 3u, 0x80, 7u, 0x80, 7u, 0x80,
11u, 0x80, 11u, 0x80, 15u, 0x80, 15u, 0x80};
// Blend 8 pixels at a time
-void ARGBBlendRow_SSSE3(const uint8_t* src_argb0,
+void ARGBBlendRow_SSSE3(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -4764,7 +6787,7 @@ void ARGBBlendRow_SSSE3(const uint8_t* src_argb0,
"sub $0x1,%3 \n"
"jge 91b \n"
"99: \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -5366,7 +7389,7 @@ void ARGBShadeRow_SSE2(const uint8_t* src_argb,
#ifdef HAS_ARGBMULTIPLYROW_SSE2
// Multiply 2 rows of ARGB pixels together, 4 pixels at a time.
-void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
+void ARGBMultiplyRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -5394,7 +7417,7 @@ void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
"lea 0x10(%2),%2 \n"
"sub $0x4,%3 \n"
"jg 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -5405,7 +7428,7 @@ void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
#ifdef HAS_ARGBMULTIPLYROW_AVX2
// Multiply 2 rows of ARGB pixels together, 8 pixels at a time.
-void ARGBMultiplyRow_AVX2(const uint8_t* src_argb0,
+void ARGBMultiplyRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -5432,23 +7455,18 @@ void ARGBMultiplyRow_AVX2(const uint8_t* src_argb0,
"sub $0x8,%3 \n"
"jg 1b \n"
"vzeroupper \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
:
- : "memory", "cc"
-#if defined(__AVX2__)
- ,
- "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"
-#endif
- );
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5");
}
#endif // HAS_ARGBMULTIPLYROW_AVX2
#ifdef HAS_ARGBADDROW_SSE2
// Add 2 rows of ARGB pixels together, 4 pixels at a time.
-void ARGBAddRow_SSE2(const uint8_t* src_argb0,
+void ARGBAddRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -5465,7 +7483,7 @@ void ARGBAddRow_SSE2(const uint8_t* src_argb0,
"lea 0x10(%2),%2 \n"
"sub $0x4,%3 \n"
"jg 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -5476,7 +7494,7 @@ void ARGBAddRow_SSE2(const uint8_t* src_argb0,
#ifdef HAS_ARGBADDROW_AVX2
// Add 2 rows of ARGB pixels together, 4 pixels at a time.
-void ARGBAddRow_AVX2(const uint8_t* src_argb0,
+void ARGBAddRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -5493,7 +7511,7 @@ void ARGBAddRow_AVX2(const uint8_t* src_argb0,
"sub $0x8,%3 \n"
"jg 1b \n"
"vzeroupper \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -5504,7 +7522,7 @@ void ARGBAddRow_AVX2(const uint8_t* src_argb0,
#ifdef HAS_ARGBSUBTRACTROW_SSE2
// Subtract 2 rows of ARGB pixels, 4 pixels at a time.
-void ARGBSubtractRow_SSE2(const uint8_t* src_argb0,
+void ARGBSubtractRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -5521,7 +7539,7 @@ void ARGBSubtractRow_SSE2(const uint8_t* src_argb0,
"lea 0x10(%2),%2 \n"
"sub $0x4,%3 \n"
"jg 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -5532,7 +7550,7 @@ void ARGBSubtractRow_SSE2(const uint8_t* src_argb0,
#ifdef HAS_ARGBSUBTRACTROW_AVX2
// Subtract 2 rows of ARGB pixels, 8 pixels at a time.
-void ARGBSubtractRow_AVX2(const uint8_t* src_argb0,
+void ARGBSubtractRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -5549,7 +7567,7 @@ void ARGBSubtractRow_AVX2(const uint8_t* src_argb0,
"sub $0x8,%3 \n"
"jg 1b \n"
"vzeroupper \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -6638,7 +8656,7 @@ void HalfFloatRow_AVX2(const uint16_t* src,
#if defined(__x86_64__)
: "x"(scale) // %3
#else
- : "m"(scale) // %3
+ : "m"(scale) // %3
#endif
: "memory", "cc", "xmm2", "xmm3", "xmm4", "xmm5");
}
@@ -6676,7 +8694,7 @@ void HalfFloatRow_F16C(const uint16_t* src,
#if defined(__x86_64__)
: "x"(scale) // %3
#else
- : "m"(scale) // %3
+ : "m"(scale) // %3
#endif
: "memory", "cc", "xmm2", "xmm3", "xmm4");
}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_mmi.cc b/third-party/libyuv/third_party/libyuv/source/row_mmi.cc
similarity index 96%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_mmi.cc
rename to third-party/libyuv/third_party/libyuv/source/row_mmi.cc
index 9a8e2cb2d1..362fd1cfcc 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_mmi.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_mmi.cc
@@ -605,7 +605,7 @@ void ARGBToARGB4444Row_MMI(const uint8_t* src_argb,
: "memory");
}
-void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void ARGBToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width) {
uint64_t src, src_hi, src_lo;
uint64_t dest0, dest1, dest2, dest3;
const uint64_t value = 0x1080;
@@ -613,8 +613,8 @@ void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
__asm__ volatile(
"1: \n\t"
- "gsldlc1 %[src], 0x07(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x00(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x07(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x00(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -626,8 +626,8 @@ void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest0], %[dest0], %[src] \n\t"
"psrlw %[dest0], %[dest0], %[eight] \n\t"
- "gsldlc1 %[src], 0x0f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x08(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x0f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x08(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -639,8 +639,8 @@ void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest1], %[dest1], %[src] \n\t"
"psrlw %[dest1], %[dest1], %[eight] \n\t"
- "gsldlc1 %[src], 0x17(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x10(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x17(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x10(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -652,8 +652,8 @@ void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest2], %[dest2], %[src] \n\t"
"psrlw %[dest2], %[dest2], %[eight] \n\t"
- "gsldlc1 %[src], 0x1f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x18(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x1f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x18(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -671,20 +671,20 @@ void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"gssdlc1 %[dest0], 0x07(%[dst_y]) \n\t"
"gssdrc1 %[dest0], 0x00(%[dst_y]) \n\t"
- "daddiu %[src_argb0], %[src_argb0], 0x20 \n\t"
+ "daddiu %[src_argb], %[src_argb], 0x20 \n\t"
"daddiu %[dst_y], %[dst_y], 0x08 \n\t"
"daddi %[width], %[width], -0x08 \n\t"
"bnez %[width], 1b \n\t"
: [src] "=&f"(src), [src_hi] "=&f"(src_hi), [src_lo] "=&f"(src_lo),
[dest0] "=&f"(dest0), [dest1] "=&f"(dest1), [dest2] "=&f"(dest2),
[dest3] "=&f"(dest3)
- : [src_argb0] "r"(src_argb0), [dst_y] "r"(dst_y), [width] "r"(width),
+ : [src_argb] "r"(src_argb), [dst_y] "r"(dst_y), [width] "r"(width),
[mask] "f"(mask), [value] "f"(value), [eight] "f"(0x08),
[zero] "f"(0x00)
: "memory");
}
-void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
+void ARGBToUVRow_MMI(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -700,9 +700,9 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"dli %[tmp0], 0x0001000100010001 \n\t"
"dmtc1 %[tmp0], %[ftmp12] \n\t"
"1: \n\t"
- "daddu %[src_rgb1], %[src_rgb0], %[src_stride_rgb] \n\t"
- "gsldrc1 %[src0], 0x00(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x07(%[src_rgb0]) \n\t"
+ "daddu %[src_rgb1], %[src_rgb], %[src_stride_rgb] \n\t"
+ "gsldrc1 %[src0], 0x00(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x07(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x00(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x07(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -720,8 +720,8 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest0_u], %[dest0_u], %[mask_u] \n\t"
"pmaddhw %[dest0_v], %[dest0_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x08(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x0f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x08(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x0f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x08(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x0f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -748,8 +748,8 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest0_v], %[src1], %[src0] \n\t"
"psraw %[dest0_v], %[dest0_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x10(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x17(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x10(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x17(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x10(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x17(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -767,8 +767,8 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest1_u], %[dest1_u], %[mask_u] \n\t"
"pmaddhw %[dest1_v], %[dest1_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x18(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x1f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x18(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x1f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x18(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x1f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -795,8 +795,8 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest1_v], %[src1], %[src0] \n\t"
"psraw %[dest1_v], %[dest1_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x20(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x27(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x20(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x27(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x20(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x27(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -814,8 +814,8 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest2_u], %[dest2_u], %[mask_u] \n\t"
"pmaddhw %[dest2_v], %[dest2_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x28(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x2f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x28(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x2f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x28(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x2f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -842,8 +842,8 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest2_v], %[src1], %[src0] \n\t"
"psraw %[dest2_v], %[dest2_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x30(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x37(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x30(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x37(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x30(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x37(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -861,8 +861,8 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest3_u], %[dest3_u], %[mask_u] \n\t"
"pmaddhw %[dest3_v], %[dest3_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x38(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x3f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x38(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x3f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x38(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x3f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -901,7 +901,7 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
"gssdlc1 %[dest0_v], 0x07(%[dst_v]) \n\t"
"gssdrc1 %[dest0_v], 0x00(%[dst_v]) \n\t"
- "daddiu %[src_rgb0], %[src_rgb0], 0x40 \n\t"
+ "daddiu %[src_rgb], %[src_rgb], 0x40 \n\t"
"daddiu %[dst_u], %[dst_u], 0x08 \n\t"
"daddiu %[dst_v], %[dst_v], 0x08 \n\t"
"daddi %[width], %[width], -0x10 \n\t"
@@ -913,7 +913,7 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
[dest2_u] "=&f"(ftmp[8]), [dest2_v] "=&f"(ftmp[9]),
[dest3_u] "=&f"(ftmp[10]), [dest3_v] "=&f"(ftmp[11]),
[ftmp12] "=&f"(ftmp[12]), [tmp0] "=&r"(tmp[0])
- : [src_rgb0] "r"(src_rgb0), [src_stride_rgb] "r"(src_stride_rgb),
+ : [src_rgb] "r"(src_rgb), [src_stride_rgb] "r"(src_stride_rgb),
[dst_u] "r"(dst_u), [dst_v] "r"(dst_v), [width] "r"(width),
[mask_u] "f"(mask_u), [mask_v] "f"(mask_v), [value] "f"(value),
[zero] "f"(0x00), [eight] "f"(0x08), [one] "f"(0x01),
@@ -921,7 +921,7 @@ void ARGBToUVRow_MMI(const uint8_t* src_rgb0,
: "memory");
}
-void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void BGRAToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width) {
uint64_t src, src_hi, src_lo;
uint64_t dest0, dest1, dest2, dest3;
const uint64_t value = 0x1080;
@@ -929,8 +929,8 @@ void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
__asm__ volatile(
"1: \n\t"
- "gsldlc1 %[src], 0x07(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x00(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x07(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x00(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -942,8 +942,8 @@ void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest0], %[dest0], %[src] \n\t"
"psrlw %[dest0], %[dest0], %[eight] \n\t"
- "gsldlc1 %[src], 0x0f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x08(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x0f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x08(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -955,8 +955,8 @@ void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest1], %[dest1], %[src] \n\t"
"psrlw %[dest1], %[dest1], %[eight] \n\t"
- "gsldlc1 %[src], 0x17(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x10(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x17(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x10(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -968,8 +968,8 @@ void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest2], %[dest2], %[src] \n\t"
"psrlw %[dest2], %[dest2], %[eight] \n\t"
- "gsldlc1 %[src], 0x1f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x18(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x1f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x18(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -987,20 +987,20 @@ void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"gssdlc1 %[dest0], 0x07(%[dst_y]) \n\t"
"gssdrc1 %[dest0], 0x00(%[dst_y]) \n\t"
- "daddiu %[src_argb0], %[src_argb0], 0x20 \n\t"
+ "daddiu %[src_argb], %[src_argb], 0x20 \n\t"
"daddiu %[dst_y], %[dst_y], 0x08 \n\t"
"daddi %[width], %[width], -0x08 \n\t"
"bnez %[width], 1b \n\t"
: [src] "=&f"(src), [src_hi] "=&f"(src_hi), [src_lo] "=&f"(src_lo),
[dest0] "=&f"(dest0), [dest1] "=&f"(dest1), [dest2] "=&f"(dest2),
[dest3] "=&f"(dest3)
- : [src_argb0] "r"(src_argb0), [dst_y] "r"(dst_y), [width] "r"(width),
+ : [src_argb] "r"(src_argb), [dst_y] "r"(dst_y), [width] "r"(width),
[mask] "f"(mask), [value] "f"(value), [eight] "f"(0x08),
[zero] "f"(0x00)
: "memory");
}
-void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
+void BGRAToUVRow_MMI(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1016,9 +1016,9 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"dli %[tmp0], 0x0001000100010001 \n\t"
"dmtc1 %[tmp0], %[ftmp12] \n\t"
"1: \n\t"
- "daddu %[src_rgb1], %[src_rgb0], %[src_stride_rgb] \n\t"
- "gsldrc1 %[src0], 0x00(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x07(%[src_rgb0]) \n\t"
+ "daddu %[src_rgb1], %[src_rgb], %[src_stride_rgb] \n\t"
+ "gsldrc1 %[src0], 0x00(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x07(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x00(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x07(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1036,8 +1036,8 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest0_u], %[dest0_u], %[mask_u] \n\t"
"pmaddhw %[dest0_v], %[dest0_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x08(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x0f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x08(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x0f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x08(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x0f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1064,8 +1064,8 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest0_v], %[src0], %[src1] \n\t"
"psraw %[dest0_v], %[dest0_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x10(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x17(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x10(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x17(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x10(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x17(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1083,8 +1083,8 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest1_u], %[dest1_u], %[mask_u] \n\t"
"pmaddhw %[dest1_v], %[dest1_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x18(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x1f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x18(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x1f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x18(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x1f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1111,8 +1111,8 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest1_v], %[src0], %[src1] \n\t"
"psraw %[dest1_v], %[dest1_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x20(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x27(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x20(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x27(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x20(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x27(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1130,8 +1130,8 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest2_u], %[dest2_u], %[mask_u] \n\t"
"pmaddhw %[dest2_v], %[dest2_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x28(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x2f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x28(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x2f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x28(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x2f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1158,8 +1158,8 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest2_v], %[src0], %[src1] \n\t"
"psraw %[dest2_v], %[dest2_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x30(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x37(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x30(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x37(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x30(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x37(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1177,8 +1177,8 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest3_u], %[dest3_u], %[mask_u] \n\t"
"pmaddhw %[dest3_v], %[dest3_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x38(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x3f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x38(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x3f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x38(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x3f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1217,7 +1217,7 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
"gssdlc1 %[dest0_v], 0x07(%[dst_v]) \n\t"
"gssdrc1 %[dest0_v], 0x00(%[dst_v]) \n\t"
- "daddiu %[src_rgb0], %[src_rgb0], 0x40 \n\t"
+ "daddiu %[src_rgb], %[src_rgb], 0x40 \n\t"
"daddiu %[dst_u], %[dst_u], 0x08 \n\t"
"daddiu %[dst_v], %[dst_v], 0x08 \n\t"
"daddi %[width], %[width], -0x10 \n\t"
@@ -1229,7 +1229,7 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
[dest2_u] "=&f"(ftmp[8]), [dest2_v] "=&f"(ftmp[9]),
[dest3_u] "=&f"(ftmp[10]), [dest3_v] "=&f"(ftmp[11]),
[ftmp12] "=&f"(ftmp[12]), [tmp0] "=&r"(tmp[0])
- : [src_rgb0] "r"(src_rgb0), [src_stride_rgb] "r"(src_stride_rgb),
+ : [src_rgb] "r"(src_rgb), [src_stride_rgb] "r"(src_stride_rgb),
[dst_u] "r"(dst_u), [dst_v] "r"(dst_v), [width] "r"(width),
[mask_u] "f"(mask_u), [mask_v] "f"(mask_v), [value] "f"(value),
[zero] "f"(0x00), [eight] "f"(0x08), [one] "f"(0x01),
@@ -1237,7 +1237,7 @@ void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
: "memory");
}
-void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void ABGRToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width) {
uint64_t src, src_hi, src_lo;
uint64_t dest0, dest1, dest2, dest3;
const uint64_t value = 0x1080;
@@ -1245,8 +1245,8 @@ void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
__asm__ volatile(
"1: \n\t"
- "gsldlc1 %[src], 0x07(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x00(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x07(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x00(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1258,8 +1258,8 @@ void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest0], %[dest0], %[src] \n\t"
"psrlw %[dest0], %[dest0], %[eight] \n\t"
- "gsldlc1 %[src], 0x0f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x08(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x0f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x08(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1271,8 +1271,8 @@ void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest1], %[dest1], %[src] \n\t"
"psrlw %[dest1], %[dest1], %[eight] \n\t"
- "gsldlc1 %[src], 0x17(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x10(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x17(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x10(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1284,8 +1284,8 @@ void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest2], %[dest2], %[src] \n\t"
"psrlw %[dest2], %[dest2], %[eight] \n\t"
- "gsldlc1 %[src], 0x1f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x18(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x1f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x18(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1303,20 +1303,20 @@ void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"gssdlc1 %[dest0], 0x07(%[dst_y]) \n\t"
"gssdrc1 %[dest0], 0x00(%[dst_y]) \n\t"
- "daddiu %[src_argb0], %[src_argb0], 0x20 \n\t"
+ "daddiu %[src_argb], %[src_argb], 0x20 \n\t"
"daddiu %[dst_y], %[dst_y], 0x08 \n\t"
"daddi %[width], %[width], -0x08 \n\t"
"bnez %[width], 1b \n\t"
: [src] "=&f"(src), [src_hi] "=&f"(src_hi), [src_lo] "=&f"(src_lo),
[dest0] "=&f"(dest0), [dest1] "=&f"(dest1), [dest2] "=&f"(dest2),
[dest3] "=&f"(dest3)
- : [src_argb0] "r"(src_argb0), [dst_y] "r"(dst_y), [width] "r"(width),
+ : [src_argb] "r"(src_argb), [dst_y] "r"(dst_y), [width] "r"(width),
[mask] "f"(mask), [value] "f"(value), [eight] "f"(0x08),
[zero] "f"(0x00)
: "memory");
}
-void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
+void ABGRToUVRow_MMI(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1332,9 +1332,9 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"dli %[tmp0], 0x0001000100010001 \n\t"
"dmtc1 %[tmp0], %[ftmp12] \n\t"
"1: \n\t"
- "daddu %[src_rgb1], %[src_rgb0], %[src_stride_rgb] \n\t"
- "gsldrc1 %[src0], 0x00(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x07(%[src_rgb0]) \n\t"
+ "daddu %[src_rgb1], %[src_rgb], %[src_stride_rgb] \n\t"
+ "gsldrc1 %[src0], 0x00(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x07(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x00(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x07(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1352,8 +1352,8 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest0_u], %[dest0_u], %[mask_u] \n\t"
"pmaddhw %[dest0_v], %[dest0_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x08(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x0f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x08(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x0f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x08(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x0f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1380,8 +1380,8 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest0_v], %[src0], %[src1] \n\t"
"psraw %[dest0_v], %[dest0_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x10(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x17(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x10(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x17(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x10(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x17(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1399,8 +1399,8 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest1_u], %[dest1_u], %[mask_u] \n\t"
"pmaddhw %[dest1_v], %[dest1_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x18(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x1f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x18(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x1f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x18(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x1f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1427,8 +1427,8 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest1_v], %[src0], %[src1] \n\t"
"psraw %[dest1_v], %[dest1_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x20(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x27(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x20(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x27(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x20(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x27(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1446,8 +1446,8 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest2_u], %[dest2_u], %[mask_u] \n\t"
"pmaddhw %[dest2_v], %[dest2_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x28(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x2f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x28(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x2f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x28(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x2f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1474,8 +1474,8 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest2_v], %[src0], %[src1] \n\t"
"psraw %[dest2_v], %[dest2_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x30(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x37(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x30(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x37(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x30(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x37(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1493,8 +1493,8 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest3_u], %[dest3_u], %[mask_u] \n\t"
"pmaddhw %[dest3_v], %[dest3_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x38(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x3f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x38(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x3f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x38(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x3f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1533,7 +1533,7 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
"gssdlc1 %[dest0_v], 0x07(%[dst_v]) \n\t"
"gssdrc1 %[dest0_v], 0x00(%[dst_v]) \n\t"
- "daddiu %[src_rgb0], %[src_rgb0], 0x40 \n\t"
+ "daddiu %[src_rgb], %[src_rgb], 0x40 \n\t"
"daddiu %[dst_u], %[dst_u], 0x08 \n\t"
"daddiu %[dst_v], %[dst_v], 0x08 \n\t"
"daddi %[width], %[width], -0x10 \n\t"
@@ -1545,7 +1545,7 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
[dest2_u] "=&f"(ftmp[8]), [dest2_v] "=&f"(ftmp[9]),
[dest3_u] "=&f"(ftmp[10]), [dest3_v] "=&f"(ftmp[11]),
[ftmp12] "=&f"(ftmp[12]), [tmp0] "=&r"(tmp[0])
- : [src_rgb0] "r"(src_rgb0), [src_stride_rgb] "r"(src_stride_rgb),
+ : [src_rgb] "r"(src_rgb), [src_stride_rgb] "r"(src_stride_rgb),
[dst_u] "r"(dst_u), [dst_v] "r"(dst_v), [width] "r"(width),
[mask_u] "f"(mask_u), [mask_v] "f"(mask_v), [value] "f"(value),
[zero] "f"(0x00), [eight] "f"(0x08), [one] "f"(0x01),
@@ -1553,7 +1553,7 @@ void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
: "memory");
}
-void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void RGBAToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width) {
uint64_t src, src_hi, src_lo;
uint64_t dest0, dest1, dest2, dest3;
const uint64_t value = 0x1080;
@@ -1561,8 +1561,8 @@ void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
__asm__ volatile(
"1: \n\t"
- "gsldlc1 %[src], 0x07(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x00(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x07(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x00(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1574,8 +1574,8 @@ void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest0], %[dest0], %[src] \n\t"
"psrlw %[dest0], %[dest0], %[eight] \n\t"
- "gsldlc1 %[src], 0x0f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x08(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x0f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x08(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1587,8 +1587,8 @@ void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest1], %[dest1], %[src] \n\t"
"psrlw %[dest1], %[dest1], %[eight] \n\t"
- "gsldlc1 %[src], 0x17(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x10(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x17(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x10(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1600,8 +1600,8 @@ void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest2], %[dest2], %[src] \n\t"
"psrlw %[dest2], %[dest2], %[eight] \n\t"
- "gsldlc1 %[src], 0x1f(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x18(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x1f(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x18(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_0 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1619,20 +1619,20 @@ void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"gssdlc1 %[dest0], 0x07(%[dst_y]) \n\t"
"gssdrc1 %[dest0], 0x00(%[dst_y]) \n\t"
- "daddiu %[src_argb0], %[src_argb0], 0x20 \n\t"
+ "daddiu %[src_argb], %[src_argb], 0x20 \n\t"
"daddiu %[dst_y], %[dst_y], 0x08 \n\t"
"daddi %[width], %[width], -0x08 \n\t"
"bnez %[width], 1b \n\t"
: [src] "=&f"(src), [src_hi] "=&f"(src_hi), [src_lo] "=&f"(src_lo),
[dest0] "=&f"(dest0), [dest1] "=&f"(dest1), [dest2] "=&f"(dest2),
[dest3] "=&f"(dest3)
- : [src_argb0] "r"(src_argb0), [dst_y] "r"(dst_y), [width] "r"(width),
+ : [src_argb] "r"(src_argb), [dst_y] "r"(dst_y), [width] "r"(width),
[mask] "f"(mask), [value] "f"(value), [eight] "f"(0x08),
[zero] "f"(0x00)
: "memory");
}
-void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
+void RGBAToUVRow_MMI(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1648,9 +1648,9 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"dli %[tmp0], 0x0001000100010001 \n\t"
"dmtc1 %[tmp0], %[ftmp12] \n\t"
"1: \n\t"
- "daddu %[src_rgb1], %[src_rgb0], %[src_stride_rgb] \n\t"
- "gsldrc1 %[src0], 0x00(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x07(%[src_rgb0]) \n\t"
+ "daddu %[src_rgb1], %[src_rgb], %[src_stride_rgb] \n\t"
+ "gsldrc1 %[src0], 0x00(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x07(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x00(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x07(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1668,8 +1668,8 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest0_u], %[dest0_u], %[mask_u] \n\t"
"pmaddhw %[dest0_v], %[dest0_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x08(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x0f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x08(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x0f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x08(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x0f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1696,8 +1696,8 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest0_v], %[src1], %[src0] \n\t"
"psraw %[dest0_v], %[dest0_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x10(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x17(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x10(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x17(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x10(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x17(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1715,8 +1715,8 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest1_u], %[dest1_u], %[mask_u] \n\t"
"pmaddhw %[dest1_v], %[dest1_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x18(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x1f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x18(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x1f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x18(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x1f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1743,8 +1743,8 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest1_v], %[src1], %[src0] \n\t"
"psraw %[dest1_v], %[dest1_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x20(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x27(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x20(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x27(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x20(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x27(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1762,8 +1762,8 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest2_u], %[dest2_u], %[mask_u] \n\t"
"pmaddhw %[dest2_v], %[dest2_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x28(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x2f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x28(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x2f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x28(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x2f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1790,8 +1790,8 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest2_v], %[src1], %[src0] \n\t"
"psraw %[dest2_v], %[dest2_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x30(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x37(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x30(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x37(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x30(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x37(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1809,8 +1809,8 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest3_u], %[dest3_u], %[mask_u] \n\t"
"pmaddhw %[dest3_v], %[dest3_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x38(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x3f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x38(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x3f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x38(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x3f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1849,7 +1849,7 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
"gssdlc1 %[dest0_v], 0x07(%[dst_v]) \n\t"
"gssdrc1 %[dest0_v], 0x00(%[dst_v]) \n\t"
- "daddiu %[src_rgb0], %[src_rgb0], 0x40 \n\t"
+ "daddiu %[src_rgb], %[src_rgb], 0x40 \n\t"
"daddiu %[dst_u], %[dst_u], 0x08 \n\t"
"daddiu %[dst_v], %[dst_v], 0x08 \n\t"
"daddi %[width], %[width], -0x10 \n\t"
@@ -1861,7 +1861,7 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
[dest2_u] "=&f"(ftmp[8]), [dest2_v] "=&f"(ftmp[9]),
[dest3_u] "=&f"(ftmp[10]), [dest3_v] "=&f"(ftmp[11]),
[ftmp12] "=&f"(ftmp[12]), [tmp0] "=&r"(tmp[0])
- : [src_rgb0] "r"(src_rgb0), [src_stride_rgb] "r"(src_stride_rgb),
+ : [src_rgb] "r"(src_rgb), [src_stride_rgb] "r"(src_stride_rgb),
[dst_u] "r"(dst_u), [dst_v] "r"(dst_v), [width] "r"(width),
[mask_u] "f"(mask_u), [mask_v] "f"(mask_v), [value] "f"(value),
[zero] "f"(0x00), [eight] "f"(0x08), [one] "f"(0x01),
@@ -1869,7 +1869,7 @@ void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
: "memory");
}
-void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void RGB24ToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width) {
uint64_t src, src_hi, src_lo;
uint64_t dest0, dest1, dest2, dest3;
const uint64_t value = 0x1080;
@@ -1877,8 +1877,8 @@ void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
__asm__ volatile(
"1: \n\t"
- "gsldlc1 %[src], 0x07(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x00(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x07(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x00(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1891,8 +1891,8 @@ void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest0], %[dest0], %[src] \n\t"
"psrlw %[dest0], %[dest0], %[eight] \n\t"
- "gsldlc1 %[src], 0x0d(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x06(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x0d(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x06(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1905,8 +1905,8 @@ void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest1], %[dest1], %[src] \n\t"
"psrlw %[dest1], %[dest1], %[eight] \n\t"
- "gsldlc1 %[src], 0x13(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x0c(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x13(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x0c(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1919,8 +1919,8 @@ void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest2], %[dest2], %[src] \n\t"
"psrlw %[dest2], %[dest2], %[eight] \n\t"
- "gsldlc1 %[src], 0x19(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x12(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x19(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x12(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -1939,20 +1939,20 @@ void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"gssdlc1 %[dest0], 0x07(%[dst_y]) \n\t"
"gssdrc1 %[dest0], 0x00(%[dst_y]) \n\t"
- "daddiu %[src_argb0], %[src_argb0], 0x18 \n\t"
+ "daddiu %[src_argb], %[src_argb], 0x18 \n\t"
"daddiu %[dst_y], %[dst_y], 0x08 \n\t"
"daddi %[width], %[width], -0x08 \n\t"
"bnez %[width], 1b \n\t"
: [src] "=&f"(src), [src_hi] "=&f"(src_hi), [src_lo] "=&f"(src_lo),
[dest0] "=&f"(dest0), [dest1] "=&f"(dest1), [dest2] "=&f"(dest2),
[dest3] "=&f"(dest3)
- : [src_argb0] "r"(src_argb0), [dst_y] "r"(dst_y), [width] "r"(width),
+ : [src_argb] "r"(src_argb), [dst_y] "r"(dst_y), [width] "r"(width),
[mask] "f"(mask), [value] "f"(value), [eight] "f"(0x08),
[zero] "f"(0x00)
: "memory");
}
-void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
+void RGB24ToUVRow_MMI(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1968,9 +1968,9 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"dli %[tmp0], 0x0001000100010001 \n\t"
"dmtc1 %[tmp0], %[ftmp12] \n\t"
"1: \n\t"
- "daddu %[src_rgb1], %[src_rgb0], %[src_stride_rgb] \n\t"
- "gsldrc1 %[src0], 0x00(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x07(%[src_rgb0]) \n\t"
+ "daddu %[src_rgb1], %[src_rgb], %[src_stride_rgb] \n\t"
+ "gsldrc1 %[src0], 0x00(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x07(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x00(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x07(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -1990,8 +1990,8 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest0_u], %[dest0_u], %[mask_u] \n\t"
"pmaddhw %[dest0_v], %[dest0_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x06(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x0d(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x06(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x0d(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x06(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x0d(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2020,8 +2020,8 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest0_v], %[src1], %[src0] \n\t"
"psraw %[dest0_v], %[dest0_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x0c(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x13(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x0c(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x13(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x0c(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x13(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2041,8 +2041,8 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest1_u], %[dest1_u], %[mask_u] \n\t"
"pmaddhw %[dest1_v], %[dest1_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x12(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x19(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x12(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x19(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x12(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x19(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2071,8 +2071,8 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest1_v], %[src1], %[src0] \n\t"
"psraw %[dest1_v], %[dest1_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x18(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x1f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x18(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x1f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x18(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x1f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2092,8 +2092,8 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest2_u], %[dest2_u], %[mask_u] \n\t"
"pmaddhw %[dest2_v], %[dest2_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x1e(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x25(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x1e(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x25(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x1e(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x25(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2122,8 +2122,8 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest2_v], %[src1], %[src0] \n\t"
"psraw %[dest2_v], %[dest2_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x24(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x2b(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x24(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x2b(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x24(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x2b(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2143,8 +2143,8 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest3_u], %[dest3_u], %[mask_u] \n\t"
"pmaddhw %[dest3_v], %[dest3_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x2a(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x31(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x2a(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x31(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x2a(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x31(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2185,7 +2185,7 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
"gssdlc1 %[dest0_v], 0x07(%[dst_v]) \n\t"
"gssdrc1 %[dest0_v], 0x00(%[dst_v]) \n\t"
- "daddiu %[src_rgb0], %[src_rgb0], 0x30 \n\t"
+ "daddiu %[src_rgb], %[src_rgb], 0x30 \n\t"
"daddiu %[dst_u], %[dst_u], 0x08 \n\t"
"daddiu %[dst_v], %[dst_v], 0x08 \n\t"
"daddi %[width], %[width], -0x10 \n\t"
@@ -2197,7 +2197,7 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
[dest2_u] "=&f"(ftmp[8]), [dest2_v] "=&f"(ftmp[9]),
[dest3_u] "=&f"(ftmp[10]), [dest3_v] "=&f"(ftmp[11]),
[ftmp12] "=&f"(ftmp[12]), [tmp0] "=&r"(tmp[0])
- : [src_rgb0] "r"(src_rgb0), [src_stride_rgb] "r"(src_stride_rgb),
+ : [src_rgb] "r"(src_rgb), [src_stride_rgb] "r"(src_stride_rgb),
[dst_u] "r"(dst_u), [dst_v] "r"(dst_v), [width] "r"(width),
[mask_u] "f"(mask_u), [mask_v] "f"(mask_v), [value] "f"(value),
[zero] "f"(0x00), [eight] "f"(0x08), [one] "f"(0x01),
@@ -2205,7 +2205,7 @@ void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
: "memory");
}
-void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void RAWToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width) {
uint64_t src, src_hi, src_lo;
uint64_t dest0, dest1, dest2, dest3;
const uint64_t value = 0x1080;
@@ -2213,8 +2213,8 @@ void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
__asm__ volatile(
"1: \n\t"
- "gsldlc1 %[src], 0x07(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x00(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x07(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x00(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -2227,8 +2227,8 @@ void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest0], %[dest0], %[src] \n\t"
"psrlw %[dest0], %[dest0], %[eight] \n\t"
- "gsldlc1 %[src], 0x0d(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x06(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x0d(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x06(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -2241,8 +2241,8 @@ void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest1], %[dest1], %[src] \n\t"
"psrlw %[dest1], %[dest1], %[eight] \n\t"
- "gsldlc1 %[src], 0x13(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x0c(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x13(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x0c(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -2255,8 +2255,8 @@ void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"paddw %[dest2], %[dest2], %[src] \n\t"
"psrlw %[dest2], %[dest2], %[eight] \n\t"
- "gsldlc1 %[src], 0x19(%[src_argb0]) \n\t"
- "gsldrc1 %[src], 0x12(%[src_argb0]) \n\t"
+ "gsldlc1 %[src], 0x19(%[src_argb]) \n\t"
+ "gsldrc1 %[src], 0x12(%[src_argb]) \n\t"
"punpcklbh %[src_lo], %[src], %[zero] \n\t"
"pinsrh_3 %[src_lo], %[src_lo], %[value] \n\t"
"pmaddhw %[src_lo], %[src_lo], %[mask] \n\t"
@@ -2275,20 +2275,20 @@ void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
"gssdlc1 %[dest0], 0x07(%[dst_y]) \n\t"
"gssdrc1 %[dest0], 0x00(%[dst_y]) \n\t"
- "daddiu %[src_argb0], %[src_argb0], 0x18 \n\t"
+ "daddiu %[src_argb], %[src_argb], 0x18 \n\t"
"daddiu %[dst_y], %[dst_y], 0x08 \n\t"
"daddi %[width], %[width], -0x08 \n\t"
"bnez %[width], 1b \n\t"
: [src] "=&f"(src), [src_hi] "=&f"(src_hi), [src_lo] "=&f"(src_lo),
[dest0] "=&f"(dest0), [dest1] "=&f"(dest1), [dest2] "=&f"(dest2),
[dest3] "=&f"(dest3)
- : [src_argb0] "r"(src_argb0), [dst_y] "r"(dst_y), [width] "r"(width),
+ : [src_argb] "r"(src_argb), [dst_y] "r"(dst_y), [width] "r"(width),
[mask] "f"(mask), [value] "f"(value), [eight] "f"(0x08),
[zero] "f"(0x00)
: "memory");
}
-void RAWToUVRow_MMI(const uint8_t* src_rgb0,
+void RAWToUVRow_MMI(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -2304,9 +2304,9 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"dli %[tmp0], 0x0001000100010001 \n\t"
"dmtc1 %[tmp0], %[ftmp12] \n\t"
"1: \n\t"
- "daddu %[src_rgb1], %[src_rgb0], %[src_stride_rgb] \n\t"
- "gsldrc1 %[src0], 0x00(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x07(%[src_rgb0]) \n\t"
+ "daddu %[src_rgb1], %[src_rgb], %[src_stride_rgb] \n\t"
+ "gsldrc1 %[src0], 0x00(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x07(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x00(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x07(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2326,8 +2326,8 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest0_u], %[dest0_u], %[mask_u] \n\t"
"pmaddhw %[dest0_v], %[dest0_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x06(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x0d(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x06(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x0d(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x06(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x0d(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2356,8 +2356,8 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest0_v], %[src0], %[src1] \n\t"
"psraw %[dest0_v], %[dest0_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x0c(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x13(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x0c(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x13(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x0c(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x13(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2377,8 +2377,8 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest1_u], %[dest1_u], %[mask_u] \n\t"
"pmaddhw %[dest1_v], %[dest1_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x12(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x19(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x12(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x19(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x12(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x19(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2407,8 +2407,8 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest1_v], %[src0], %[src1] \n\t"
"psraw %[dest1_v], %[dest1_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x18(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x1f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x18(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x1f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x18(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x1f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2428,8 +2428,8 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest2_u], %[dest2_u], %[mask_u] \n\t"
"pmaddhw %[dest2_v], %[dest2_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x1e(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x25(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x1e(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x25(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x1e(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x25(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2458,8 +2458,8 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest2_v], %[src0], %[src1] \n\t"
"psraw %[dest2_v], %[dest2_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x24(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x2b(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x24(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x2b(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x24(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x2b(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2479,8 +2479,8 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest3_u], %[dest3_u], %[mask_u] \n\t"
"pmaddhw %[dest3_v], %[dest3_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x2a(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x31(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x2a(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x31(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x2a(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x31(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2521,7 +2521,7 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
"gssdlc1 %[dest0_v], 0x07(%[dst_v]) \n\t"
"gssdrc1 %[dest0_v], 0x00(%[dst_v]) \n\t"
- "daddiu %[src_rgb0], %[src_rgb0], 0x30 \n\t"
+ "daddiu %[src_rgb], %[src_rgb], 0x30 \n\t"
"daddiu %[dst_u], %[dst_u], 0x08 \n\t"
"daddiu %[dst_v], %[dst_v], 0x08 \n\t"
"daddi %[width], %[width], -0x10 \n\t"
@@ -2533,7 +2533,7 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
[dest2_u] "=&f"(ftmp[8]), [dest2_v] "=&f"(ftmp[9]),
[dest3_u] "=&f"(ftmp[10]), [dest3_v] "=&f"(ftmp[11]),
[ftmp12] "=&f"(ftmp[12]), [tmp0] "=&r"(tmp[0])
- : [src_rgb0] "r"(src_rgb0), [src_stride_rgb] "r"(src_stride_rgb),
+ : [src_rgb] "r"(src_rgb), [src_stride_rgb] "r"(src_stride_rgb),
[dst_u] "r"(dst_u), [dst_v] "r"(dst_v), [width] "r"(width),
[mask_u] "f"(mask_u), [mask_v] "f"(mask_v), [value] "f"(value),
[zero] "f"(0x00), [eight] "f"(0x08), [one] "f"(0x01),
@@ -2541,7 +2541,7 @@ void RAWToUVRow_MMI(const uint8_t* src_rgb0,
: "memory");
}
-void ARGBToYJRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void ARGBToYJRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width) {
uint64_t src, src_hi, src_lo;
uint64_t dest, dest0, dest1, dest2, dest3;
uint64_t tmp0, tmp1;
@@ -2618,13 +2618,13 @@ void ARGBToYJRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
[src_lo] "=&f"(src_lo), [dest0] "=&f"(dest0), [dest1] "=&f"(dest1),
[dest2] "=&f"(dest2), [dest3] "=&f"(dest3), [tmp0] "=&f"(tmp0),
[tmp1] "=&f"(tmp1)
- : [src_ptr] "r"(src_argb0), [dst_ptr] "r"(dst_y), [mask0] "f"(mask0),
+ : [src_ptr] "r"(src_argb), [dst_ptr] "r"(dst_y), [mask0] "f"(mask0),
[mask1] "f"(mask1), [shift] "f"(shift), [value] "f"(value),
[width] "r"(width)
: "memory");
}
-void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
+void ARGBToUVJRow_MMI(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -2637,9 +2637,9 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
__asm__ volatile(
"1: \n\t"
- "daddu %[src_rgb1], %[src_rgb0], %[src_stride_rgb] \n\t"
- "gsldrc1 %[src0], 0x00(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x07(%[src_rgb0]) \n\t"
+ "daddu %[src_rgb1], %[src_rgb], %[src_stride_rgb] \n\t"
+ "gsldrc1 %[src0], 0x00(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x07(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x00(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x07(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2655,8 +2655,8 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest0_u], %[dest0_u], %[mask_u] \n\t"
"pmaddhw %[dest0_v], %[dest0_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x08(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x0f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x08(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x0f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x08(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x0f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2681,8 +2681,8 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest0_v], %[src1], %[src0] \n\t"
"psraw %[dest0_v], %[dest0_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x10(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x17(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x10(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x17(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x10(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x17(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2698,8 +2698,8 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest1_u], %[dest1_u], %[mask_u] \n\t"
"pmaddhw %[dest1_v], %[dest1_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x18(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x1f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x18(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x1f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x18(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x1f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2724,8 +2724,8 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest1_v], %[src1], %[src0] \n\t"
"psraw %[dest1_v], %[dest1_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x20(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x27(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x20(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x27(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x20(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x27(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2741,8 +2741,8 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest2_u], %[dest2_u], %[mask_u] \n\t"
"pmaddhw %[dest2_v], %[dest2_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x28(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x2f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x28(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x2f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x28(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x2f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2767,8 +2767,8 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"psubw %[dest2_v], %[src1], %[src0] \n\t"
"psraw %[dest2_v], %[dest2_v], %[eight] \n\t"
- "gsldrc1 %[src0], 0x30(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x37(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x30(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x37(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x30(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x37(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2784,8 +2784,8 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"pmaddhw %[dest3_u], %[dest3_u], %[mask_u] \n\t"
"pmaddhw %[dest3_v], %[dest3_v], %[mask_v] \n\t"
- "gsldrc1 %[src0], 0x38(%[src_rgb0]) \n\t"
- "gsldlc1 %[src0], 0x3f(%[src_rgb0]) \n\t"
+ "gsldrc1 %[src0], 0x38(%[src_rgb]) \n\t"
+ "gsldlc1 %[src0], 0x3f(%[src_rgb]) \n\t"
"gsldrc1 %[src1], 0x38(%[src_rgb1]) \n\t"
"gsldlc1 %[src1], 0x3f(%[src_rgb1]) \n\t"
"punpcklbh %[src_lo], %[src0], %[zero] \n\t"
@@ -2822,7 +2822,7 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
"gssdlc1 %[dest0_v], 0x07(%[dst_v]) \n\t"
"gssdrc1 %[dest0_v], 0x00(%[dst_v]) \n\t"
- "daddiu %[src_rgb0], %[src_rgb0], 0x40 \n\t"
+ "daddiu %[src_rgb], %[src_rgb], 0x40 \n\t"
"daddiu %[dst_u], %[dst_u], 0x08 \n\t"
"daddiu %[dst_v], %[dst_v], 0x08 \n\t"
"daddi %[width], %[width], -0x10 \n\t"
@@ -2833,7 +2833,7 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
[dest1_u] "=&f"(ftmp[6]), [dest1_v] "=&f"(ftmp[7]),
[dest2_u] "=&f"(ftmp[8]), [dest2_v] "=&f"(ftmp[9]),
[dest3_u] "=&f"(ftmp[10]), [dest3_v] "=&f"(ftmp[11])
- : [src_rgb0] "r"(src_rgb0), [src_stride_rgb] "r"(src_stride_rgb),
+ : [src_rgb] "r"(src_rgb), [src_stride_rgb] "r"(src_stride_rgb),
[dst_u] "r"(dst_u), [dst_v] "r"(dst_v), [width] "r"(width),
[mask_u] "f"(mask_u), [mask_v] "f"(mask_v), [value] "f"(value),
[zero] "f"(0x00), [eight] "f"(0x08),
@@ -4386,7 +4386,7 @@ void ARGBShadeRow_MMI(const uint8_t* src_argb,
: "memory");
}
-void ARGBMultiplyRow_MMI(const uint8_t* src_argb0,
+void ARGBMultiplyRow_MMI(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -4422,12 +4422,12 @@ void ARGBMultiplyRow_MMI(const uint8_t* src_argb0,
[src1_hi] "=&f"(src1_hi), [src1_lo] "=&f"(src1_lo),
[dest_hi] "=&f"(dest_hi), [dest_lo] "=&f"(dest_lo), [src0] "=&f"(src0),
[src1] "=&f"(src1), [dest] "=&f"(dest)
- : [src0_ptr] "r"(src_argb0), [src1_ptr] "r"(src_argb1),
+ : [src0_ptr] "r"(src_argb), [src1_ptr] "r"(src_argb1),
[dst_ptr] "r"(dst_argb), [width] "r"(width), [mask] "f"(mask)
: "memory");
}
-void ARGBAddRow_MMI(const uint8_t* src_argb0,
+void ARGBAddRow_MMI(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -4449,12 +4449,12 @@ void ARGBAddRow_MMI(const uint8_t* src_argb0,
"daddi %[width], %[width], -0x02 \n\t"
"bnez %[width], 1b \n\t"
: [src0] "=&f"(src0), [src1] "=&f"(src1), [dest] "=&f"(dest)
- : [src0_ptr] "r"(src_argb0), [src1_ptr] "r"(src_argb1),
+ : [src0_ptr] "r"(src_argb), [src1_ptr] "r"(src_argb1),
[dst_ptr] "r"(dst_argb), [width] "r"(width)
: "memory");
}
-void ARGBSubtractRow_MMI(const uint8_t* src_argb0,
+void ARGBSubtractRow_MMI(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -4476,7 +4476,7 @@ void ARGBSubtractRow_MMI(const uint8_t* src_argb0,
"daddi %[width], %[width], -0x02 \n\t"
"bnez %[width], 1b \n\t"
: [src0] "=&f"(src0), [src1] "=&f"(src1), [dest] "=&f"(dest)
- : [src0_ptr] "r"(src_argb0), [src1_ptr] "r"(src_argb1),
+ : [src0_ptr] "r"(src_argb), [src1_ptr] "r"(src_argb1),
[dst_ptr] "r"(dst_argb), [width] "r"(width)
: "memory");
}
@@ -5552,10 +5552,10 @@ void UYVYToYRow_MMI(const uint8_t* src_uyvy, uint8_t* dst_y, int width) {
: "memory");
}
-// Blend src_argb0 over src_argb1 and store to dst_argb.
-// dst_argb may be src_argb0 or src_argb1.
+// Blend src_argb over src_argb1 and store to dst_argb.
+// dst_argb may be src_argb or src_argb1.
// This code mimics the SSSE3 version for better testability.
-void ARGBBlendRow_MMI(const uint8_t* src_argb0,
+void ARGBBlendRow_MMI(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -5608,7 +5608,7 @@ void ARGBBlendRow_MMI(const uint8_t* src_argb0,
[dest] "=&f"(dest), [src0_hi] "=&f"(src0_hi), [src0_lo] "=&f"(src0_lo),
[src1_hi] "=&f"(src1_hi), [src1_lo] "=&f"(src1_lo),
[dest_hi] "=&f"(dest_hi), [dest_lo] "=&f"(dest_lo)
- : [src0_ptr] "r"(src_argb0), [src1_ptr] "r"(src_argb1),
+ : [src0_ptr] "r"(src_argb), [src1_ptr] "r"(src_argb1),
[dst_ptr] "r"(dst_argb), [mask0] "f"(mask0), [mask1] "f"(mask1),
[mask2] "f"(mask2), [mask3] "f"(mask3), [mask4] "f"(mask4),
[shift] "f"(shift), [width] "r"(width)
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_msa.cc b/third-party/libyuv/third_party/libyuv/source/row_msa.cc
similarity index 96%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_msa.cc
rename to third-party/libyuv/third_party/libyuv/source/row_msa.cc
index fe6df93a60..c0b13b0fd0 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_msa.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_msa.cc
@@ -781,7 +781,7 @@ void UYVYToUV422Row_MSA(const uint8_t* src_uyvy,
}
}
-void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void ARGBToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width) {
int x;
v16u8 src0, src1, src2, src3, vec0, vec1, vec2, vec3, dst0;
v8u16 reg0, reg1, reg2, reg3, reg4, reg5;
@@ -792,10 +792,10 @@ void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
v8u16 const_0x1080 = (v8u16)__msa_fill_h(0x1080);
for (x = 0; x < width; x += 16) {
- src0 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 32);
- src3 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 48);
+ src0 = (v16u8)__msa_ld_b((v16u8*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((v16u8*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((v16u8*)src_argb, 32);
+ src3 = (v16u8)__msa_ld_b((v16u8*)src_argb, 48);
vec0 = (v16u8)__msa_pckev_b((v16i8)src1, (v16i8)src0);
vec1 = (v16u8)__msa_pckev_b((v16i8)src3, (v16i8)src2);
vec2 = (v16u8)__msa_pckod_b((v16i8)src1, (v16i8)src0);
@@ -822,18 +822,18 @@ void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
reg1 = (v8u16)__msa_srai_h((v8i16)reg1, 8);
dst0 = (v16u8)__msa_pckev_b((v16i8)reg1, (v16i8)reg0);
ST_UB(dst0, dst_y);
- src_argb0 += 64;
+ src_argb += 64;
dst_y += 16;
}
}
-void ARGBToUVRow_MSA(const uint8_t* src_argb0,
+void ARGBToUVRow_MSA(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
int x;
- const uint8_t* src_argb0_next = src_argb0 + src_stride_argb;
+ const uint8_t* src_argb_next = src_argb + src_stride_argb;
v16u8 src0, src1, src2, src3, src4, src5, src6, src7;
v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7, vec8, vec9;
v8u16 reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7, reg8, reg9;
@@ -847,14 +847,14 @@ void ARGBToUVRow_MSA(const uint8_t* src_argb0,
v8u16 const_0x0001 = (v8u16)__msa_fill_h(0x0001);
for (x = 0; x < width; x += 32) {
- src0 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 32);
- src3 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 48);
- src4 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 64);
- src5 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 80);
- src6 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 96);
- src7 = (v16u8)__msa_ld_b((v16u8*)src_argb0, 112);
+ src0 = (v16u8)__msa_ld_b((v16u8*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((v16u8*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((v16u8*)src_argb, 32);
+ src3 = (v16u8)__msa_ld_b((v16u8*)src_argb, 48);
+ src4 = (v16u8)__msa_ld_b((v16u8*)src_argb, 64);
+ src5 = (v16u8)__msa_ld_b((v16u8*)src_argb, 80);
+ src6 = (v16u8)__msa_ld_b((v16u8*)src_argb, 96);
+ src7 = (v16u8)__msa_ld_b((v16u8*)src_argb, 112);
vec0 = (v16u8)__msa_pckev_b((v16i8)src1, (v16i8)src0);
vec1 = (v16u8)__msa_pckev_b((v16i8)src3, (v16i8)src2);
vec2 = (v16u8)__msa_pckev_b((v16i8)src5, (v16i8)src4);
@@ -875,14 +875,14 @@ void ARGBToUVRow_MSA(const uint8_t* src_argb0,
reg3 = __msa_hadd_u_h(vec5, vec5);
reg4 = __msa_hadd_u_h(vec0, vec0);
reg5 = __msa_hadd_u_h(vec1, vec1);
- src0 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 0);
- src1 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 16);
- src2 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 32);
- src3 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 48);
- src4 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 64);
- src5 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 80);
- src6 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 96);
- src7 = (v16u8)__msa_ld_b((v16u8*)src_argb0_next, 112);
+ src0 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 0);
+ src1 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 16);
+ src2 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 32);
+ src3 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 48);
+ src4 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 64);
+ src5 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 80);
+ src6 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 96);
+ src7 = (v16u8)__msa_ld_b((v16u8*)src_argb_next, 112);
vec0 = (v16u8)__msa_pckev_b((v16i8)src1, (v16i8)src0);
vec1 = (v16u8)__msa_pckev_b((v16i8)src3, (v16i8)src2);
vec2 = (v16u8)__msa_pckev_b((v16i8)src5, (v16i8)src4);
@@ -945,8 +945,8 @@ void ARGBToUVRow_MSA(const uint8_t* src_argb0,
dst1 = (v16u8)__msa_pckev_b((v16i8)reg5, (v16i8)reg4);
ST_UB(dst0, dst_u);
ST_UB(dst1, dst_v);
- src_argb0 += 128;
- src_argb0_next += 128;
+ src_argb += 128;
+ src_argb_next += 128;
dst_u += 16;
dst_v += 16;
}
@@ -1173,7 +1173,7 @@ void ARGBToUV444Row_MSA(const uint8_t* src_argb,
}
}
-void ARGBMultiplyRow_MSA(const uint8_t* src_argb0,
+void ARGBMultiplyRow_MSA(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -1184,7 +1184,7 @@ void ARGBMultiplyRow_MSA(const uint8_t* src_argb0,
v8i16 zero = {0};
for (x = 0; x < width; x += 4) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
src1 = (v16u8)__msa_ld_b((void*)src_argb1, 0);
vec0 = (v8u16)__msa_ilvr_b((v16i8)src0, (v16i8)src0);
vec1 = (v8u16)__msa_ilvl_b((v16i8)src0, (v16i8)src0);
@@ -1206,13 +1206,13 @@ void ARGBMultiplyRow_MSA(const uint8_t* src_argb0,
vec1 = (v8u16)__msa_pckev_h((v8i16)reg3, (v8i16)reg2);
dst0 = (v16u8)__msa_pckev_b((v16i8)vec1, (v16i8)vec0);
ST_UB(dst0, dst_argb);
- src_argb0 += 16;
+ src_argb += 16;
src_argb1 += 16;
dst_argb += 16;
}
}
-void ARGBAddRow_MSA(const uint8_t* src_argb0,
+void ARGBAddRow_MSA(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -1220,20 +1220,20 @@ void ARGBAddRow_MSA(const uint8_t* src_argb0,
v16u8 src0, src1, src2, src3, dst0, dst1;
for (x = 0; x < width; x += 8) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
src2 = (v16u8)__msa_ld_b((void*)src_argb1, 0);
src3 = (v16u8)__msa_ld_b((void*)src_argb1, 16);
dst0 = __msa_adds_u_b(src0, src2);
dst1 = __msa_adds_u_b(src1, src3);
ST_UB2(dst0, dst1, dst_argb, 16);
- src_argb0 += 32;
+ src_argb += 32;
src_argb1 += 32;
dst_argb += 32;
}
}
-void ARGBSubtractRow_MSA(const uint8_t* src_argb0,
+void ARGBSubtractRow_MSA(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -1241,14 +1241,14 @@ void ARGBSubtractRow_MSA(const uint8_t* src_argb0,
v16u8 src0, src1, src2, src3, dst0, dst1;
for (x = 0; x < width; x += 8) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
src2 = (v16u8)__msa_ld_b((void*)src_argb1, 0);
src3 = (v16u8)__msa_ld_b((void*)src_argb1, 16);
dst0 = __msa_subs_u_b(src0, src2);
dst1 = __msa_subs_u_b(src1, src3);
ST_UB2(dst0, dst1, dst_argb, 16);
- src_argb0 += 32;
+ src_argb += 32;
src_argb1 += 32;
dst_argb += 32;
}
@@ -1794,7 +1794,7 @@ void RGB565ToYRow_MSA(const uint8_t* src_rgb565, uint8_t* dst_y, int width) {
}
}
-void RGB24ToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void RGB24ToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width) {
int x;
v16u8 src0, src1, src2, reg0, reg1, reg2, reg3, dst0;
v8u16 vec0, vec1, vec2, vec3;
@@ -1809,9 +1809,9 @@ void RGB24ToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
v16i8 zero = {0};
for (x = 0; x < width; x += 16) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((void*)src_argb, 32);
reg0 = (v16u8)__msa_vshf_b(mask0, zero, (v16i8)src0);
reg1 = (v16u8)__msa_vshf_b(mask1, (v16i8)src1, (v16i8)src0);
reg2 = (v16u8)__msa_vshf_b(mask2, (v16i8)src2, (v16i8)src1);
@@ -1830,12 +1830,12 @@ void RGB24ToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
vec1 = (v8u16)__msa_srai_h((v8i16)vec1, 8);
dst0 = (v16u8)__msa_pckev_b((v16i8)vec1, (v16i8)vec0);
ST_UB(dst0, dst_y);
- src_argb0 += 48;
+ src_argb += 48;
dst_y += 16;
}
}
-void RAWToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void RAWToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width) {
int x;
v16u8 src0, src1, src2, reg0, reg1, reg2, reg3, dst0;
v8u16 vec0, vec1, vec2, vec3;
@@ -1850,9 +1850,9 @@ void RAWToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
v16i8 zero = {0};
for (x = 0; x < width; x += 16) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((void*)src_argb, 32);
reg0 = (v16u8)__msa_vshf_b(mask0, zero, (v16i8)src0);
reg1 = (v16u8)__msa_vshf_b(mask1, (v16i8)src1, (v16i8)src0);
reg2 = (v16u8)__msa_vshf_b(mask2, (v16i8)src2, (v16i8)src1);
@@ -1871,7 +1871,7 @@ void RAWToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
vec1 = (v8u16)__msa_srai_h((v8i16)vec1, 8);
dst0 = (v16u8)__msa_pckev_b((v16i8)vec1, (v16i8)vec0);
ST_UB(dst0, dst_y);
- src_argb0 += 48;
+ src_argb += 48;
dst_y += 16;
}
}
@@ -2037,14 +2037,14 @@ void RGB565ToUVRow_MSA(const uint8_t* src_rgb565,
}
}
-void RGB24ToUVRow_MSA(const uint8_t* src_rgb0,
+void RGB24ToUVRow_MSA(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
int x;
- const uint8_t* s = src_rgb0;
- const uint8_t* t = src_rgb0 + src_stride_rgb;
+ const uint8_t* s = src_rgb;
+ const uint8_t* t = src_rgb + src_stride_rgb;
int64_t res0, res1;
v16u8 src0, src1, src2, src3, src4, src5, src6, src7;
v16u8 inp0, inp1, inp2, inp3, inp4, inp5;
@@ -2147,14 +2147,14 @@ void RGB24ToUVRow_MSA(const uint8_t* src_rgb0,
}
}
-void RAWToUVRow_MSA(const uint8_t* src_rgb0,
+void RAWToUVRow_MSA(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
int x;
- const uint8_t* s = src_rgb0;
- const uint8_t* t = src_rgb0 + src_stride_rgb;
+ const uint8_t* s = src_rgb;
+ const uint8_t* t = src_rgb + src_stride_rgb;
int64_t res0, res1;
v16u8 inp0, inp1, inp2, inp3, inp4, inp5;
v16u8 src0, src1, src2, src3, src4, src5, src6, src7;
@@ -2446,7 +2446,7 @@ void SobelXYRow_MSA(const uint8_t* src_sobelx,
}
}
-void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void ARGBToYJRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width) {
int x;
v16u8 src0, src1, src2, src3, dst0;
v16u8 const_0x961D = (v16u8)__msa_fill_h(0x961D);
@@ -2454,19 +2454,19 @@ void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
v8u16 const_0x80 = (v8u16)__msa_fill_h(0x80);
for (x = 0; x < width; x += 16) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32);
- src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((void*)src_argb, 32);
+ src3 = (v16u8)__msa_ld_b((void*)src_argb, 48);
ARGBTOY(src0, src1, src2, src3, const_0x961D, const_0x4D, const_0x80, 8,
dst0);
ST_UB(dst0, dst_y);
- src_argb0 += 64;
+ src_argb += 64;
dst_y += 16;
}
}
-void BGRAToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void BGRAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width) {
int x;
v16u8 src0, src1, src2, src3, dst0;
v16u8 const_0x4200 = (v16u8)__msa_fill_h(0x4200);
@@ -2474,19 +2474,19 @@ void BGRAToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
v8u16 const_0x1080 = (v8u16)__msa_fill_h(0x1080);
for (x = 0; x < width; x += 16) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32);
- src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((void*)src_argb, 32);
+ src3 = (v16u8)__msa_ld_b((void*)src_argb, 48);
ARGBTOY(src0, src1, src2, src3, const_0x4200, const_0x1981, const_0x1080, 8,
dst0);
ST_UB(dst0, dst_y);
- src_argb0 += 64;
+ src_argb += 64;
dst_y += 16;
}
}
-void ABGRToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void ABGRToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width) {
int x;
v16u8 src0, src1, src2, src3, dst0;
v16u8 const_0x8142 = (v16u8)__msa_fill_h(0x8142);
@@ -2494,19 +2494,19 @@ void ABGRToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
v8u16 const_0x1080 = (v8u16)__msa_fill_h(0x1080);
for (x = 0; x < width; x += 16) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32);
- src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((void*)src_argb, 32);
+ src3 = (v16u8)__msa_ld_b((void*)src_argb, 48);
ARGBTOY(src0, src1, src2, src3, const_0x8142, const_0x19, const_0x1080, 8,
dst0);
ST_UB(dst0, dst_y);
- src_argb0 += 64;
+ src_argb += 64;
dst_y += 16;
}
}
-void RGBAToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
+void RGBAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width) {
int x;
v16u8 src0, src1, src2, src3, dst0;
v16u8 const_0x1900 = (v16u8)__msa_fill_h(0x1900);
@@ -2514,26 +2514,26 @@ void RGBAToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width) {
v8u16 const_0x1080 = (v8u16)__msa_fill_h(0x1080);
for (x = 0; x < width; x += 16) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
- src2 = (v16u8)__msa_ld_b((void*)src_argb0, 32);
- src3 = (v16u8)__msa_ld_b((void*)src_argb0, 48);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
+ src2 = (v16u8)__msa_ld_b((void*)src_argb, 32);
+ src3 = (v16u8)__msa_ld_b((void*)src_argb, 48);
ARGBTOY(src0, src1, src2, src3, const_0x1900, const_0x4281, const_0x1080, 8,
dst0);
ST_UB(dst0, dst_y);
- src_argb0 += 64;
+ src_argb += 64;
dst_y += 16;
}
}
-void ARGBToUVJRow_MSA(const uint8_t* src_rgb0,
+void ARGBToUVJRow_MSA(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
int x;
- const uint8_t* s = src_rgb0;
- const uint8_t* t = src_rgb0 + src_stride_rgb;
+ const uint8_t* s = src_rgb;
+ const uint8_t* t = src_rgb + src_stride_rgb;
v8u16 src0, src1, src2, src3, src4, src5, src6, src7;
v8u16 vec0, vec1, vec2, vec3;
v8u16 dst0, dst1, dst2, dst3;
@@ -2658,14 +2658,14 @@ void ARGBToUVJRow_MSA(const uint8_t* src_rgb0,
}
}
-void BGRAToUVRow_MSA(const uint8_t* src_rgb0,
+void BGRAToUVRow_MSA(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
int x;
- const uint8_t* s = src_rgb0;
- const uint8_t* t = src_rgb0 + src_stride_rgb;
+ const uint8_t* s = src_rgb;
+ const uint8_t* t = src_rgb + src_stride_rgb;
const uint8_t unused = 0xf;
v8u16 src0, src1, src2, src3;
v16u8 dst0, dst1;
@@ -2693,14 +2693,14 @@ void BGRAToUVRow_MSA(const uint8_t* src_rgb0,
}
}
-void ABGRToUVRow_MSA(const uint8_t* src_rgb0,
+void ABGRToUVRow_MSA(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
int x;
- const uint8_t* s = src_rgb0;
- const uint8_t* t = src_rgb0 + src_stride_rgb;
+ const uint8_t* s = src_rgb;
+ const uint8_t* t = src_rgb + src_stride_rgb;
const uint8_t unused = 0xf;
v8u16 src0, src1, src2, src3;
v16u8 dst0, dst1;
@@ -2728,14 +2728,14 @@ void ABGRToUVRow_MSA(const uint8_t* src_rgb0,
}
}
-void RGBAToUVRow_MSA(const uint8_t* src_rgb0,
+void RGBAToUVRow_MSA(const uint8_t* src_rgb,
int src_stride_rgb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
int x;
- const uint8_t* s = src_rgb0;
- const uint8_t* t = src_rgb0 + src_stride_rgb;
+ const uint8_t* s = src_rgb;
+ const uint8_t* t = src_rgb + src_stride_rgb;
const uint8_t unused = 0xf;
v8u16 src0, src1, src2, src3;
v16u8 dst0, dst1;
@@ -3109,7 +3109,7 @@ void ARGBExtractAlphaRow_MSA(const uint8_t* src_argb,
}
}
-void ARGBBlendRow_MSA(const uint8_t* src_argb0,
+void ARGBBlendRow_MSA(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -3123,8 +3123,8 @@ void ARGBBlendRow_MSA(const uint8_t* src_argb0,
v16i8 zero = {0};
for (x = 0; x < width; x += 8) {
- src0 = (v16u8)__msa_ld_b((void*)src_argb0, 0);
- src1 = (v16u8)__msa_ld_b((void*)src_argb0, 16);
+ src0 = (v16u8)__msa_ld_b((void*)src_argb, 0);
+ src1 = (v16u8)__msa_ld_b((void*)src_argb, 16);
src2 = (v16u8)__msa_ld_b((void*)src_argb1, 0);
src3 = (v16u8)__msa_ld_b((void*)src_argb1, 16);
vec0 = (v8u16)__msa_ilvr_b(zero, (v16i8)src0);
@@ -3168,7 +3168,7 @@ void ARGBBlendRow_MSA(const uint8_t* src_argb0,
dst0 = __msa_bmnz_v(dst0, const_255, mask);
dst1 = __msa_bmnz_v(dst1, const_255, mask);
ST_UB2(dst0, dst1, dst_argb, 16);
- src_argb0 += 32;
+ src_argb += 32;
src_argb1 += 32;
dst_argb += 32;
}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_neon.cc b/third-party/libyuv/third_party/libyuv/source/row_neon.cc
similarity index 74%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_neon.cc
rename to third-party/libyuv/third_party/libyuv/source/row_neon.cc
index a5aeaabfbd..6ef6f1c463 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_neon.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_neon.cc
@@ -21,90 +21,115 @@ extern "C" {
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__) && \
!defined(__aarch64__)
+// q0: Y uint16x8_t
+// d2: U uint8x8_t
+// d3: V uint8x8_t
+
// Read 8 Y, 4 U and 4 V from 422
#define READYUV422 \
- "vld1.8 {d0}, [%0]! \n" \
- "vld1.32 {d2[0]}, [%1]! \n" \
- "vld1.32 {d2[1]}, [%2]! \n"
+ "vld1.8 {d0}, [%[src_y]]! \n" \
+ "vld1.32 {d2[0]}, [%[src_u]]! \n" \
+ "vld1.32 {d2[1]}, [%[src_v]]! \n" \
+ "vmov.u8 d1, d0 \n" \
+ "vmovl.u8 q1, d2 \n" \
+ "vzip.u8 d0, d1 \n" \
+ "vsli.u16 q1, q1, #8 \n"
// Read 8 Y, 8 U and 8 V from 444
#define READYUV444 \
- "vld1.8 {d0}, [%0]! \n" \
- "vld1.8 {d2}, [%1]! \n" \
- "vld1.8 {d3}, [%2]! \n" \
- "vpaddl.u8 q1, q1 \n" \
- "vrshrn.u16 d2, q1, #1 \n"
+ "vld1.8 {d0}, [%[src_y]]! \n" \
+ "vld1.8 {d2}, [%[src_u]]! \n" \
+ "vmovl.u8 q0, d0 \n" \
+ "vld1.8 {d3}, [%[src_v]]! \n" \
+ "vsli.u16 q0, q0, #8 \n"
// Read 8 Y, and set 4 U and 4 V to 128
#define READYUV400 \
- "vld1.8 {d0}, [%0]! \n" \
- "vmov.u8 d2, #128 \n"
+ "vld1.8 {d0}, [%[src_y]]! \n" \
+ "vmov.u8 q1, #128 \n" \
+ "vmovl.u8 q0, d0 \n" \
+ "vsli.u16 q0, q0, #8 \n"
// Read 8 Y and 4 UV from NV12
-#define READNV12 \
- "vld1.8 {d0}, [%0]! \n" \
- "vld1.8 {d2}, [%1]! \n" \
- "vmov.u8 d3, d2 \n" /* split odd/even uv apart */ \
- "vuzp.u8 d2, d3 \n" \
- "vtrn.u32 d2, d3 \n"
+#define READNV12 \
+ "vld1.8 {d0}, [%[src_y]]! \n" \
+ "vld1.8 {d2}, [%[src_uv]]! \n" \
+ "vmov.u8 d1, d0 \n" \
+ "vmov.u8 d3, d2 \n" \
+ "vzip.u8 d0, d1 \n" \
+ "vsli.u16 d2, d2, #8 \n" /* Duplicate low byte (U) */ \
+ "vsri.u16 d3, d3, #8 \n" /* Duplicate high byte (V) */
// Read 8 Y and 4 VU from NV21
#define READNV21 \
- "vld1.8 {d0}, [%0]! \n" \
- "vld1.8 {d2}, [%1]! \n" \
- "vmov.u8 d3, d2 \n" /* split odd/even uv apart */ \
- "vuzp.u8 d3, d2 \n" \
- "vtrn.u32 d2, d3 \n"
+ "vld1.8 {d0}, [%[src_y]]! \n" \
+ "vld1.8 {d2}, [%[src_vu]]! \n" \
+ "vmov.u8 d1, d0 \n" \
+ "vmov.u8 d3, d2 \n" \
+ "vzip.u8 d0, d1 \n" \
+ "vsri.u16 d2, d2, #8 \n" /* Duplicate high byte (U) */ \
+ "vsli.u16 d3, d3, #8 \n" /* Duplicate low byte (V) */
// Read 8 YUY2
#define READYUY2 \
- "vld2.8 {d0, d2}, [%0]! \n" \
+ "vld2.8 {d0, d2}, [%[src_yuy2]]! \n" \
+ "vmovl.u8 q0, d0 \n" \
"vmov.u8 d3, d2 \n" \
- "vuzp.u8 d2, d3 \n" \
- "vtrn.u32 d2, d3 \n"
+ "vsli.u16 q0, q0, #8 \n" \
+ "vsli.u16 d2, d2, #8 \n" \
+ "vsri.u16 d3, d3, #8 \n"
// Read 8 UYVY
#define READUYVY \
- "vld2.8 {d2, d3}, [%0]! \n" \
- "vmov.u8 d0, d3 \n" \
+ "vld2.8 {d2, d3}, [%[src_uyvy]]! \n" \
+ "vmovl.u8 q0, d3 \n" \
"vmov.u8 d3, d2 \n" \
- "vuzp.u8 d2, d3 \n" \
- "vtrn.u32 d2, d3 \n"
+ "vsli.u16 q0, q0, #8 \n" \
+ "vsli.u16 d2, d2, #8 \n" \
+ "vsri.u16 d3, d3, #8 \n"
-#define YUVTORGB_SETUP \
- "vld1.8 {d24}, [%[kUVToRB]] \n" \
- "vld1.8 {d25}, [%[kUVToG]] \n" \
- "vld1.16 {d26[], d27[]}, [%[kUVBiasBGR]]! \n" \
- "vld1.16 {d8[], d9[]}, [%[kUVBiasBGR]]! \n" \
- "vld1.16 {d28[], d29[]}, [%[kUVBiasBGR]] \n" \
- "vld1.32 {d30[], d31[]}, [%[kYToRgb]] \n"
+#define YUVTORGB_SETUP \
+ "vld4.8 {d26[], d27[], d28[], d29[]}, [%[kUVCoeff]] \n" \
+ "vld1.16 {d31[]}, [%[kRGBCoeffBias]]! \n" \
+ "vld1.16 {d20[], d21[]}, [%[kRGBCoeffBias]]! \n" \
+ "vld1.16 {d22[], d23[]}, [%[kRGBCoeffBias]]! \n" \
+ "vld1.16 {d24[], d25[]}, [%[kRGBCoeffBias]] \n"
-#define YUVTORGB \
- "vmull.u8 q8, d2, d24 \n" /* u/v B/R component */ \
- "vmull.u8 q9, d2, d25 \n" /* u/v G component */ \
- "vmovl.u8 q0, d0 \n" /* Y */ \
- "vmovl.s16 q10, d1 \n" \
- "vmovl.s16 q0, d0 \n" \
- "vmul.s32 q10, q10, q15 \n" \
- "vmul.s32 q0, q0, q15 \n" \
- "vqshrun.s32 d0, q0, #16 \n" \
- "vqshrun.s32 d1, q10, #16 \n" /* Y */ \
- "vadd.s16 d18, d19 \n" \
- "vshll.u16 q1, d16, #16 \n" /* Replicate u * UB */ \
- "vshll.u16 q10, d17, #16 \n" /* Replicate v * VR */ \
- "vshll.u16 q3, d18, #16 \n" /* Replicate (v*VG + u*UG)*/ \
- "vaddw.u16 q1, q1, d16 \n" \
- "vaddw.u16 q10, q10, d17 \n" \
- "vaddw.u16 q3, q3, d18 \n" \
- "vqadd.s16 q8, q0, q13 \n" /* B */ \
- "vqadd.s16 q9, q0, q14 \n" /* R */ \
- "vqadd.s16 q0, q0, q4 \n" /* G */ \
- "vqadd.s16 q8, q8, q1 \n" /* B */ \
- "vqadd.s16 q9, q9, q10 \n" /* R */ \
- "vqsub.s16 q0, q0, q3 \n" /* G */ \
- "vqshrun.s16 d20, q8, #6 \n" /* B */ \
- "vqshrun.s16 d22, q9, #6 \n" /* R */ \
- "vqshrun.s16 d21, q0, #6 \n" /* G */
+// q0: B uint16x8_t
+// q1: G uint16x8_t
+// q2: R uint16x8_t
+
+// Convert from YUV to 2.14 fixed point RGB
+#define YUVTORGB \
+ "vmull.u16 q2, d1, d31 \n" \
+ "vmull.u8 q8, d3, d29 \n" /* DGV */ \
+ "vmull.u16 q0, d0, d31 \n" \
+ "vmlal.u8 q8, d2, d28 \n" /* DG */ \
+ "vqshrn.u32 d0, q0, #16 \n" \
+ "vqshrn.u32 d1, q2, #16 \n" /* Y */ \
+ "vmull.u8 q9, d2, d26 \n" /* DB */ \
+ "vmull.u8 q2, d3, d27 \n" /* DR */ \
+ "vadd.u16 q4, q0, q11 \n" /* G */ \
+ "vadd.u16 q2, q0, q2 \n" /* R */ \
+ "vadd.u16 q0, q0, q9 \n" /* B */ \
+ "vqsub.u16 q1, q4, q8 \n" /* G */ \
+ "vqsub.u16 q0, q0, q10 \n" /* B */ \
+ "vqsub.u16 q2, q2, q12 \n" /* R */
+
+// Convert from 2.14 fixed point RGB To 8 bit RGB
+#define RGBTORGB8 \
+ "vqshrn.u16 d4, q2, #6 \n" /* R */ \
+ "vqshrn.u16 d2, q1, #6 \n" /* G */ \
+ "vqshrn.u16 d0, q0, #6 \n" /* B */
+
+#define YUVTORGB_REGS \
+ "q0", "q1", "q2", "q4", "q8", "q9", "q10", "q11", "q12", "q13", "q14", "d31"
+
+#define STORERGBA \
+ "vmov.u8 d1, d0 \n" \
+ "vmov.u8 d3, d4 \n" \
+ "vmov.u8 d0, d6 \n" \
+ "vst4.8 {d0, d1, d2, d3}, [%[dst_rgba]]! \n"
void I444ToARGBRow_NEON(const uint8_t* src_y,
const uint8_t* src_u,
@@ -114,22 +139,20 @@ void I444ToARGBRow_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
- "vmov.u8 d23, #255 \n"
+ "vmov.u8 d6, #255 \n"
"1: \n" READYUV444 YUVTORGB
- "subs %4, %4, #8 \n"
- "vst4.8 {d20, d21, d22, d23}, [%3]! \n"
+ RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void I422ToARGBRow_NEON(const uint8_t* src_y,
@@ -140,22 +163,46 @@ void I422ToARGBRow_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
- "vmov.u8 d23, #255 \n"
+ "vmov.u8 d6, #255 \n"
"1: \n" READYUV422 YUVTORGB
- "subs %4, %4, #8 \n"
- "vst4.8 {d20, d21, d22, d23}, [%3]! \n"
+ RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
+}
+
+void I444AlphaToARGBRow_NEON(const uint8_t* src_y,
+ const uint8_t* src_u,
+ const uint8_t* src_v,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile(
+ YUVTORGB_SETUP
+ "1: \n" READYUV444 YUVTORGB
+ RGBTORGB8
+ "vld1.8 {d6}, [%[src_a]]! \n"
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
+ "bgt 1b \n"
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [src_a] "+r"(src_a), // %[src_a]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
@@ -168,22 +215,20 @@ void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
asm volatile(
YUVTORGB_SETUP
"1: \n" READYUV422 YUVTORGB
- "subs %5, %5, #8 \n"
- "vld1.8 {d23}, [%3]! \n"
- "vst4.8 {d20, d21, d22, d23}, [%4]! \n"
+ RGBTORGB8
+ "vld1.8 {d6}, [%[src_a]]! \n"
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(src_a), // %3
- "+r"(dst_argb), // %4
- "+r"(width) // %5
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [src_a] "+r"(src_a), // %[src_a]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void I422ToRGBARow_NEON(const uint8_t* src_y,
@@ -194,22 +239,18 @@ void I422ToRGBARow_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
+ "vmov.u8 d6, #255 \n"
"1: \n" READYUV422 YUVTORGB
- "subs %4, %4, #8 \n"
- "vmov.u8 d19, #255 \n" // YUVTORGB modified d19
- "vst4.8 {d19, d20, d21, d22}, [%3]! \n"
+ RGBTORGB8 "subs %[width], %[width], #8 \n" STORERGBA
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_rgba), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_rgba] "+r"(dst_rgba), // %[dst_rgba]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void I422ToRGB24Row_NEON(const uint8_t* src_y,
@@ -220,29 +261,28 @@ void I422ToRGB24Row_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
+ "vmov.u8 d6, #255 \n"
"1: \n" READYUV422 YUVTORGB
- "subs %4, %4, #8 \n"
- "vst3.8 {d20, d21, d22}, [%3]! \n"
+ RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst3.8 {d0, d2, d4}, [%[dst_rgb24]]! \n"
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_rgb24), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_rgb24] "+r"(dst_rgb24), // %[dst_rgb24]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS);
}
#define ARGBTORGB565 \
- "vshll.u8 q0, d22, #8 \n" /* R */ \
- "vshll.u8 q8, d21, #8 \n" /* G */ \
- "vshll.u8 q9, d20, #8 \n" /* B */ \
- "vsri.16 q0, q8, #5 \n" /* RG */ \
- "vsri.16 q0, q9, #11 \n" /* RGB */
+ "vshll.u8 q2, d4, #8 \n" /* R */ \
+ "vshll.u8 q1, d2, #8 \n" /* G */ \
+ "vshll.u8 q0, d0, #8 \n" /* B */ \
+ "vsri.16 q2, q1, #5 \n" /* RG */ \
+ "vsri.16 q2, q0, #11 \n" /* RGB */
void I422ToRGB565Row_NEON(const uint8_t* src_y,
const uint8_t* src_u,
@@ -252,31 +292,29 @@ void I422ToRGB565Row_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
+ "vmov.u8 d6, #255 \n"
"1: \n" READYUV422 YUVTORGB
- "subs %4, %4, #8 \n" ARGBTORGB565
- "vst1.8 {q0}, [%3]! \n" // store 8 pixels RGB565.
+ RGBTORGB8 "subs %[width], %[width], #8 \n" ARGBTORGB565
+ "vst1.8 {q2}, [%[dst_rgb565]]! \n" // store 8 pixels RGB565.
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_rgb565), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_rgb565] "+r"(dst_rgb565), // %[dst_rgb565]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS);
}
#define ARGBTOARGB1555 \
- "vshll.u8 q0, d23, #8 \n" /* A */ \
- "vshll.u8 q8, d22, #8 \n" /* R */ \
- "vshll.u8 q9, d21, #8 \n" /* G */ \
- "vshll.u8 q10, d20, #8 \n" /* B */ \
- "vsri.16 q0, q8, #1 \n" /* AR */ \
- "vsri.16 q0, q9, #6 \n" /* ARG */ \
- "vsri.16 q0, q10, #11 \n" /* ARGB */
+ "vshll.u8 q3, d6, #8 \n" /* A */ \
+ "vshll.u8 q2, d4, #8 \n" /* R */ \
+ "vshll.u8 q1, d2, #8 \n" /* G */ \
+ "vshll.u8 q0, d0, #8 \n" /* B */ \
+ "vsri.16 q3, q2, #1 \n" /* AR */ \
+ "vsri.16 q3, q1, #6 \n" /* ARG */ \
+ "vsri.16 q3, q0, #11 \n" /* ARGB */
void I422ToARGB1555Row_NEON(const uint8_t* src_y,
const uint8_t* src_u,
@@ -287,30 +325,28 @@ void I422ToARGB1555Row_NEON(const uint8_t* src_y,
asm volatile(
YUVTORGB_SETUP
"1: \n" READYUV422 YUVTORGB
- "subs %4, %4, #8 \n"
- "vmov.u8 d23, #255 \n" ARGBTOARGB1555
- "vst1.8 {q0}, [%3]! \n" // store 8 pixels
+ RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vmov.u8 d6, #0xff \n" ARGBTOARGB1555
+ "vst1.8 {q3}, [%[dst_argb1555]]! \n" // store 8 pixels RGB1555.
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb1555), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb1555] "+r"(dst_argb1555), // %[dst_argb1555]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "q3");
}
#define ARGBTOARGB4444 \
- "vshr.u8 d20, d20, #4 \n" /* B */ \
- "vbic.32 d21, d21, d4 \n" /* G */ \
- "vshr.u8 d22, d22, #4 \n" /* R */ \
- "vbic.32 d23, d23, d4 \n" /* A */ \
- "vorr d0, d20, d21 \n" /* BG */ \
- "vorr d1, d22, d23 \n" /* RA */ \
+ "vshr.u8 d0, d0, #4 \n" /* B */ \
+ "vbic.32 d2, d2, d7 \n" /* G */ \
+ "vshr.u8 d4, d4, #4 \n" /* R */ \
+ "vbic.32 d6, d6, d7 \n" /* A */ \
+ "vorr d0, d0, d2 \n" /* BG */ \
+ "vorr d1, d4, d6 \n" /* RA */ \
"vzip.u8 d0, d1 \n" /* BGRA */
void I422ToARGB4444Row_NEON(const uint8_t* src_y,
@@ -321,25 +357,21 @@ void I422ToARGB4444Row_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
- "vmov.u8 d4, #0x0f \n" // vbic bits to clear
- "1: \n"
-
- READYUV422 YUVTORGB
- "subs %4, %4, #8 \n"
- "vmov.u8 d23, #255 \n" ARGBTOARGB4444
- "vst1.8 {q0}, [%3]! \n" // store 8 pixels
+ "vmov.u8 d6, #255 \n"
+ "vmov.u8 d7, #0x0f \n" // vbic bits to clear
+ "1: \n" READYUV422 YUVTORGB
+ RGBTORGB8
+ "subs %[width], %[width], #8 \n" ARGBTOARGB4444
+ "vst1.8 {q0}, [%[dst_argb4444]]! \n" // store 8 pixels
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb4444), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb4444] "+r"(dst_argb4444), // %[dst_argb4444]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "q3");
}
void I400ToARGBRow_NEON(const uint8_t* src_y,
@@ -348,20 +380,18 @@ void I400ToARGBRow_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
- "vmov.u8 d23, #255 \n"
+ "vmov.u8 d6, #255 \n"
"1: \n" READYUV400 YUVTORGB
- "subs %2, %2, #8 \n"
- "vst4.8 {d20, d21, d22, d23}, [%1]! \n"
+ RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(dst_argb), // %1
- "+r"(width) // %2
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) {
@@ -386,22 +416,20 @@ void NV12ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile(YUVTORGB_SETUP
- "vmov.u8 d23, #255 \n"
- "1: \n" READNV12 YUVTORGB
- "subs %3, %3, #8 \n"
- "vst4.8 {d20, d21, d22, d23}, [%2]! \n"
- "bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_uv), // %1
- "+r"(dst_argb), // %2
- "+r"(width) // %3
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
- "q10", "q11", "q12", "q13", "q14", "q15");
+ asm volatile(
+ YUVTORGB_SETUP
+ "vmov.u8 d6, #255 \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
+ "bgt 1b \n"
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_uv), // %[src_uv]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void NV21ToARGBRow_NEON(const uint8_t* src_y,
@@ -409,22 +437,20 @@ void NV21ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile(YUVTORGB_SETUP
- "vmov.u8 d23, #255 \n"
- "1: \n" READNV21 YUVTORGB
- "subs %3, %3, #8 \n"
- "vst4.8 {d20, d21, d22, d23}, [%2]! \n"
- "bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_vu), // %1
- "+r"(dst_argb), // %2
- "+r"(width) // %3
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
- "q10", "q11", "q12", "q13", "q14", "q15");
+ asm volatile(
+ YUVTORGB_SETUP
+ "vmov.u8 d6, #255 \n"
+ "1: \n" READNV21 YUVTORGB RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
+ "bgt 1b \n"
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_vu] "+r"(src_vu), // %[src_vu]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void NV12ToRGB24Row_NEON(const uint8_t* src_y,
@@ -433,25 +459,19 @@ void NV12ToRGB24Row_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants,
int width) {
asm volatile(
-
YUVTORGB_SETUP
-
- "1: \n"
-
- READNV12 YUVTORGB
- "subs %3, %3, #8 \n"
- "vst3.8 {d20, d21, d22}, [%2]! \n"
+ "vmov.u8 d6, #255 \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst3.8 {d0, d2, d4}, [%[dst_rgb24]]! \n"
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_uv), // %1
- "+r"(dst_rgb24), // %2
- "+r"(width) // %3
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_uv), // %[src_uv]
+ [dst_rgb24] "+r"(dst_rgb24), // %[dst_rgb24]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS);
}
void NV21ToRGB24Row_NEON(const uint8_t* src_y,
@@ -460,25 +480,19 @@ void NV21ToRGB24Row_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants,
int width) {
asm volatile(
-
YUVTORGB_SETUP
-
- "1: \n"
-
- READNV21 YUVTORGB
- "subs %3, %3, #8 \n"
- "vst3.8 {d20, d21, d22}, [%2]! \n"
+ "vmov.u8 d6, #255 \n"
+ "1: \n" READNV21 YUVTORGB RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst3.8 {d0, d2, d4}, [%[dst_rgb24]]! \n"
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_vu), // %1
- "+r"(dst_rgb24), // %2
- "+r"(width) // %3
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_vu] "+r"(src_vu), // %[src_vu]
+ [dst_rgb24] "+r"(dst_rgb24), // %[dst_rgb24]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS);
}
void NV12ToRGB565Row_NEON(const uint8_t* src_y,
@@ -488,62 +502,56 @@ void NV12ToRGB565Row_NEON(const uint8_t* src_y,
int width) {
asm volatile(
YUVTORGB_SETUP
- "1: \n" READNV12 YUVTORGB
- "subs %3, %3, #8 \n" ARGBTORGB565
- "vst1.8 {q0}, [%2]! \n" // store 8 pixels RGB565.
+ "vmov.u8 d6, #255 \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %[width], %[width], #8 \n" ARGBTORGB565
+ "vst1.8 {q2}, [%[dst_rgb565]]! \n" // store 8 pixels RGB565.
"bgt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_uv), // %1
- "+r"(dst_rgb565), // %2
- "+r"(width) // %3
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
- "q12", "q13", "q14", "q15");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_uv), // %[src_uv]
+ [dst_rgb565] "+r"(dst_rgb565), // %[dst_rgb565]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS);
}
void YUY2ToARGBRow_NEON(const uint8_t* src_yuy2,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile(YUVTORGB_SETUP
- "vmov.u8 d23, #255 \n"
- "1: \n" READYUY2 YUVTORGB
- "subs %2, %2, #8 \n"
- "vst4.8 {d20, d21, d22, d23}, [%1]! \n"
- "bgt 1b \n"
- : "+r"(src_yuy2), // %0
- "+r"(dst_argb), // %1
- "+r"(width) // %2
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
- "q10", "q11", "q12", "q13", "q14", "q15");
+ asm volatile(
+ YUVTORGB_SETUP
+ "vmov.u8 d6, #255 \n"
+ "1: \n" READYUY2 YUVTORGB RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
+ "bgt 1b \n"
+ : [src_yuy2] "+r"(src_yuy2), // %[src_yuy2]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
void UYVYToARGBRow_NEON(const uint8_t* src_uyvy,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile(YUVTORGB_SETUP
- "vmov.u8 d23, #255 \n"
- "1: \n" READUYVY YUVTORGB
- "subs %2, %2, #8 \n"
- "vst4.8 {d20, d21, d22, d23}, [%1]! \n"
- "bgt 1b \n"
- : "+r"(src_uyvy), // %0
- "+r"(dst_argb), // %1
- "+r"(width) // %2
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
- "q10", "q11", "q12", "q13", "q14", "q15");
+ asm volatile(
+ YUVTORGB_SETUP
+ "vmov.u8 d6, #255 \n"
+ "1: \n" READUYVY YUVTORGB RGBTORGB8
+ "subs %[width], %[width], #8 \n"
+ "vst4.8 {d0, d2, d4, d6}, [%[dst_argb]]! \n"
+ "bgt 1b \n"
+ : [src_uyvy] "+r"(src_uyvy), // %[src_uyvy]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "d6");
}
// Reads 16 pairs of UV and write even values to dst_u and odd to dst_v.
@@ -638,6 +646,333 @@ void MergeRGBRow_NEON(const uint8_t* src_r,
);
}
+// Reads 16 packed ARGB and write to planar dst_r, dst_g, dst_b, dst_a.
+void SplitARGBRow_NEON(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB
+ "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // next 8 ARGB
+ "subs %5, %5, #16 \n" // 16 processed per loop
+ "vst1.8 {q0}, [%3]! \n" // store B
+ "vst1.8 {q1}, [%2]! \n" // store G
+ "vst1.8 {q2}, [%1]! \n" // store R
+ "vst1.8 {q3}, [%4]! \n" // store A
+ "bgt 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(dst_a), // %4
+ "+r"(width) // %5
+ : // Input registers
+ : "cc", "memory", "q0", "q1", "q2", "q3" // Clobber List
+ );
+}
+
+// Reads 16 planar R's, G's and B's and writes out 16 packed ARGB at a time
+void MergeARGBRow_NEON(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "vld1.8 {q2}, [%0]! \n" // load R
+ "vld1.8 {q1}, [%1]! \n" // load G
+ "vld1.8 {q0}, [%2]! \n" // load B
+ "vld1.8 {q3}, [%3]! \n" // load A
+ "subs %5, %5, #16 \n" // 16 processed per loop
+ "vst4.8 {d0, d2, d4, d6}, [%4]! \n" // store 8 ARGB
+ "vst4.8 {d1, d3, d5, d7}, [%4]! \n" // next 8 ARGB
+ "bgt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_argb), // %4
+ "+r"(width) // %5
+ : // Input registers
+ : "cc", "memory", "q0", "q1", "q2", "q3" // Clobber List
+ );
+}
+
+// Reads 16 packed ARGB and write to planar dst_r, dst_g, dst_b.
+void SplitXRGBRow_NEON(const uint8_t* src_argb,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB
+ "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // next 8 ARGB
+ "subs %4, %4, #16 \n" // 16 processed per loop
+ "vst1.8 {q0}, [%3]! \n" // store B
+ "vst1.8 {q1}, [%2]! \n" // store G
+ "vst1.8 {q2}, [%1]! \n" // store R
+ "bgt 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(width) // %4
+ : // Input registers
+ : "cc", "memory", "q0", "q1", "q2", "q3" // Clobber List
+ );
+}
+
+// Reads 16 planar R's, G's, B's and A's and writes out 16 packed ARGB at a time
+void MergeXRGBRow_NEON(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "vmov.u8 q3, #255 \n" // load A(255)
+ "1: \n"
+ "vld1.8 {q2}, [%0]! \n" // load R
+ "vld1.8 {q1}, [%1]! \n" // load G
+ "vld1.8 {q0}, [%2]! \n" // load B
+ "subs %4, %4, #16 \n" // 16 processed per loop
+ "vst4.8 {d0, d2, d4, d6}, [%3]! \n" // store 8 ARGB
+ "vst4.8 {d1, d3, d5, d7}, [%3]! \n" // next 8 ARGB
+ "bgt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_argb), // %3
+ "+r"(width) // %4
+ : // Input registers
+ : "cc", "memory", "q0", "q1", "q2", "q3" // Clobber List
+ );
+}
+
+void MergeXR30Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int depth,
+ int width) {
+ int shift = 10 - depth;
+ asm volatile(
+ "vmov.u32 q14, #1023 \n"
+ "vdup.32 q15, %5 \n"
+ "1: \n"
+ "vld1.16 {d4}, [%2]! \n" // B
+ "vld1.16 {d2}, [%1]! \n" // G
+ "vld1.16 {d0}, [%0]! \n" // R
+ "vmovl.u16 q2, d4 \n" // B
+ "vmovl.u16 q1, d2 \n" // G
+ "vmovl.u16 q0, d0 \n" // R
+ "vshl.u32 q2, q2, q15 \n" // 000B
+ "vshl.u32 q1, q1, q15 \n"
+ "vshl.u32 q0, q0, q15 \n"
+ "vmin.u32 q2, q2, q14 \n"
+ "vmin.u32 q1, q1, q14 \n"
+ "vmin.u32 q0, q0, q14 \n"
+ "vsli.u32 q2, q1, #10 \n" // 00GB
+ "vsli.u32 q2, q0, #20 \n" // 0RGB
+ "vorr.u32 q2, #0xc0000000 \n" // ARGB (AR30)
+ "subs %4, %4, #4 \n"
+ "vst1.8 {q2}, [%3]! \n"
+ "bgt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar30), // %3
+ "+r"(width) // %4
+ : "r"(shift) // %5
+ : "memory", "cc", "q0", "q1", "q2", "q14", "q15");
+}
+
+void MergeXR30Row_10_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int /* depth */,
+ int width) {
+ asm volatile(
+ "vmov.u32 q14, #1023 \n"
+ "1: \n"
+ "vld1.16 {d4}, [%2]! \n" // B
+ "vld1.16 {d2}, [%1]! \n" // G
+ "vld1.16 {d0}, [%0]! \n" // R
+ "vmovl.u16 q2, d4 \n" // 000B
+ "vmovl.u16 q1, d2 \n" // G
+ "vmovl.u16 q0, d0 \n" // R
+ "vmin.u32 q2, q2, q14 \n"
+ "vmin.u32 q1, q1, q14 \n"
+ "vmin.u32 q0, q0, q14 \n"
+ "vsli.u32 q2, q1, #10 \n" // 00GB
+ "vsli.u32 q2, q0, #20 \n" // 0RGB
+ "vorr.u32 q2, #0xc0000000 \n" // ARGB (AR30)
+ "subs %4, %4, #4 \n"
+ "vst1.8 {q2}, [%3]! \n"
+ "bgt 1b \n"
+ "3: \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar30), // %3
+ "+r"(width) // %4
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q14");
+}
+
+void MergeAR64Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ int mask = (1 << depth) - 1;
+ asm volatile(
+
+ "vdup.u16 q15, %6 \n"
+ "vdup.u16 q14, %7 \n"
+ "1: \n"
+ "vld1.16 {q2}, [%0]! \n" // R
+ "vld1.16 {q1}, [%1]! \n" // G
+ "vld1.16 {q0}, [%2]! \n" // B
+ "vld1.16 {q3}, [%3]! \n" // A
+ "vmin.u16 q2, q2, q14 \n"
+ "vmin.u16 q1, q1, q14 \n"
+ "vmin.u16 q0, q0, q14 \n"
+ "vmin.u16 q3, q3, q14 \n"
+ "vshl.u16 q2, q2, q15 \n"
+ "vshl.u16 q1, q1, q15 \n"
+ "vshl.u16 q0, q0, q15 \n"
+ "vshl.u16 q3, q3, q15 \n"
+ "subs %5, %5, #8 \n"
+ "vst4.16 {d0, d2, d4, d6}, [%4]! \n"
+ "vst4.16 {d1, d3, d5, d7}, [%4]! \n"
+ "bgt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_ar64), // %4
+ "+r"(width) // %5
+ : "r"(shift), // %6
+ "r"(mask) // %7
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q15");
+}
+
+void MergeXR64Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ int mask = (1 << depth) - 1;
+ asm volatile(
+
+ "vmov.u8 q3, #0xff \n" // A (0xffff)
+ "vdup.u16 q15, %5 \n"
+ "vdup.u16 q14, %6 \n"
+ "1: \n"
+ "vld1.16 {q2}, [%0]! \n" // R
+ "vld1.16 {q1}, [%1]! \n" // G
+ "vld1.16 {q0}, [%2]! \n" // B
+ "vmin.u16 q2, q2, q14 \n"
+ "vmin.u16 q1, q1, q14 \n"
+ "vmin.u16 q0, q0, q14 \n"
+ "vshl.u16 q2, q2, q15 \n"
+ "vshl.u16 q1, q1, q15 \n"
+ "vshl.u16 q0, q0, q15 \n"
+ "subs %4, %4, #8 \n"
+ "vst4.16 {d0, d2, d4, d6}, [%3]! \n"
+ "vst4.16 {d1, d3, d5, d7}, [%3]! \n"
+ "bgt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar64), // %3
+ "+r"(width) // %4
+ : "r"(shift), // %5
+ "r"(mask) // %6
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q15");
+}
+
+void MergeARGB16To8Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ int shift = 8 - depth;
+ asm volatile(
+
+ "vdup.16 q15, %6 \n"
+ "1: \n"
+ "vld1.16 {q2}, [%0]! \n" // R
+ "vld1.16 {q1}, [%1]! \n" // G
+ "vld1.16 {q0}, [%2]! \n" // B
+ "vld1.16 {q3}, [%3]! \n" // A
+ "vshl.u16 q2, q2, q15 \n"
+ "vshl.u16 q1, q1, q15 \n"
+ "vshl.u16 q0, q0, q15 \n"
+ "vshl.u16 q3, q3, q15 \n"
+ "vqmovn.u16 d0, q0 \n"
+ "vqmovn.u16 d1, q1 \n"
+ "vqmovn.u16 d2, q2 \n"
+ "vqmovn.u16 d3, q3 \n"
+ "subs %5, %5, #8 \n"
+ "vst4.8 {d0, d1, d2, d3}, [%4]! \n"
+ "bgt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_argb), // %4
+ "+r"(width) // %5
+ : "r"(shift) // %6
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q15");
+}
+
+void MergeXRGB16To8Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ int shift = 8 - depth;
+ asm volatile(
+
+ "vdup.16 q15, %5 \n"
+ "vmov.u8 d6, #0xff \n" // A (0xff)
+ "1: \n"
+ "vld1.16 {q2}, [%0]! \n" // R
+ "vld1.16 {q1}, [%1]! \n" // G
+ "vld1.16 {q0}, [%2]! \n" // B
+ "vshl.u16 q2, q2, q15 \n"
+ "vshl.u16 q1, q1, q15 \n"
+ "vshl.u16 q0, q0, q15 \n"
+ "vqmovn.u16 d5, q2 \n"
+ "vqmovn.u16 d4, q1 \n"
+ "vqmovn.u16 d3, q0 \n"
+ "subs %4, %4, #8 \n"
+ "vst4.u8 {d3, d4, d5, d6}, [%3]! \n"
+ "bgt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_argb), // %3
+ "+r"(width) // %4
+ : "r"(shift) // %5
+ : "memory", "cc", "q0", "q1", "q2", "d6", "q15");
+}
+
// Copy multiple of 32. vld4.8 allow unaligned and is fastest on a15.
void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width) {
asm volatile(
@@ -1193,16 +1528,16 @@ void ARGBToRGB565Row_NEON(const uint8_t* src_argb,
int width) {
asm volatile(
"1: \n"
- "vld4.8 {d20, d21, d22, d23}, [%0]! \n" // load 8 pixels of ARGB.
+ "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 pixels of ARGB.
"subs %2, %2, #8 \n" // 8 processed per loop.
ARGBTORGB565
- "vst1.8 {q0}, [%1]! \n" // store 8 pixels RGB565.
+ "vst1.8 {q2}, [%1]! \n" // store 8 pixels RGB565.
"bgt 1b \n"
: "+r"(src_argb), // %0
"+r"(dst_rgb565), // %1
"+r"(width) // %2
:
- : "cc", "memory", "q0", "q8", "q9", "q10", "q11");
+ : "cc", "memory", "q0", "q1", "q2", "d6");
}
void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb,
@@ -1210,21 +1545,21 @@ void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb,
const uint32_t dither4,
int width) {
asm volatile(
- "vdup.32 d2, %2 \n" // dither4
+ "vdup.32 d7, %2 \n" // dither4
"1: \n"
- "vld4.8 {d20, d21, d22, d23}, [%1]! \n" // load 8 pixels of ARGB.
+ "vld4.8 {d0, d2, d4, d6}, [%1]! \n" // load 8 pixels of ARGB.
"subs %3, %3, #8 \n" // 8 processed per loop.
- "vqadd.u8 d20, d20, d2 \n"
- "vqadd.u8 d21, d21, d2 \n"
- "vqadd.u8 d22, d22, d2 \n" // add for dither
+ "vqadd.u8 d0, d0, d7 \n"
+ "vqadd.u8 d2, d2, d7 \n"
+ "vqadd.u8 d4, d4, d7 \n" // add for dither
ARGBTORGB565
- "vst1.8 {q0}, [%0]! \n" // store 8 RGB565.
+ "vst1.8 {q2}, [%0]! \n" // store 8 RGB565.
"bgt 1b \n"
: "+r"(dst_rgb) // %0
: "r"(src_argb), // %1
"r"(dither4), // %2
"r"(width) // %3
- : "cc", "memory", "q0", "q1", "q8", "q9", "q10", "q11");
+ : "cc", "memory", "q0", "q1", "q2", "q3");
}
void ARGBToARGB1555Row_NEON(const uint8_t* src_argb,
@@ -1232,26 +1567,26 @@ void ARGBToARGB1555Row_NEON(const uint8_t* src_argb,
int width) {
asm volatile(
"1: \n"
- "vld4.8 {d20, d21, d22, d23}, [%0]! \n" // load 8 pixels of ARGB.
+ "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 pixels of ARGB.
"subs %2, %2, #8 \n" // 8 processed per loop.
ARGBTOARGB1555
- "vst1.8 {q0}, [%1]! \n" // store 8 ARGB1555.
+ "vst1.8 {q3}, [%1]! \n" // store 8 ARGB1555.
"bgt 1b \n"
: "+r"(src_argb), // %0
"+r"(dst_argb1555), // %1
"+r"(width) // %2
:
- : "cc", "memory", "q0", "q8", "q9", "q10", "q11");
+ : "cc", "memory", "q0", "q1", "q2", "q3");
}
void ARGBToARGB4444Row_NEON(const uint8_t* src_argb,
uint8_t* dst_argb4444,
int width) {
asm volatile(
- "vmov.u8 d4, #0x0f \n" // bits to clear with
+ "vmov.u8 d7, #0x0f \n" // bits to clear with
// vbic.
"1: \n"
- "vld4.8 {d20, d21, d22, d23}, [%0]! \n" // load 8 pixels of ARGB.
+ "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 pixels of ARGB.
"subs %2, %2, #8 \n" // 8 processed per loop.
ARGBTOARGB4444
"vst1.8 {q0}, [%1]! \n" // store 8 ARGB4444.
@@ -1260,7 +1595,7 @@ void ARGBToARGB4444Row_NEON(const uint8_t* src_argb,
"+r"(dst_argb4444), // %1
"+r"(width) // %2
:
- : "cc", "memory", "q0", "q8", "q9", "q10", "q11");
+ : "cc", "memory", "q0", "q1", "q2", "q3");
}
void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
@@ -1325,7 +1660,7 @@ void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
: "cc", "memory", "q0", "q1", "q2", "q12", "q13");
}
-void RGBAToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
+void RGBAToYJRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width) {
asm volatile(
"vmov.u8 d24, #29 \n" // B * 0.1140 coefficient
"vmov.u8 d25, #150 \n" // G * 0.5870 coefficient
@@ -1339,7 +1674,7 @@ void RGBAToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
"vqrshrn.u16 d0, q2, #8 \n" // 16 bit to 8 bit Y
"vst1.8 {d0}, [%1]! \n" // store 8 pixels Y.
"bgt 1b \n"
- : "+r"(src_argb), // %0
+ : "+r"(src_rgba), // %0
"+r"(dst_y), // %1
"+r"(width) // %2
:
@@ -1984,6 +2319,105 @@ void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444,
: "cc", "memory", "q0", "q1", "q2", "q3", "q12", "q13");
}
+static const uvec8 kShuffleARGBToABGR = {2, 1, 0, 3, 6, 5, 4, 7,
+ 10, 9, 8, 11, 14, 13, 12, 15};
+
+void ARGBToAR64Row_NEON(const uint8_t* src_argb,
+ uint16_t* dst_ar64,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "vld1.8 {q0}, [%0]! \n"
+ "vld1.8 {q2}, [%0]! \n"
+ "vmov.u8 q1, q0 \n"
+ "vmov.u8 q3, q2 \n"
+ "subs %2, %2, #8 \n" // 8 processed per loop.
+ "vst2.8 {q0, q1}, [%1]! \n" // store 4 pixels
+ "vst2.8 {q2, q3}, [%1]! \n" // store 4 pixels
+ "bgt 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ar64), // %1
+ "+r"(width) // %2
+ :
+ : "cc", "memory", "q0", "q1", "q2", "q3");
+}
+
+void ARGBToAB64Row_NEON(const uint8_t* src_argb,
+ uint16_t* dst_ab64,
+ int width) {
+ asm volatile(
+ "vld1.8 q4, %3 \n" // shuffler
+ "1: \n"
+ "vld1.8 {q0}, [%0]! \n"
+ "vld1.8 {q2}, [%0]! \n"
+ "vtbl.8 d2, {d0, d1}, d8 \n"
+ "vtbl.8 d3, {d0, d1}, d9 \n"
+ "vtbl.8 d6, {d4, d5}, d8 \n"
+ "vtbl.8 d7, {d4, d5}, d9 \n"
+ "vmov.u8 q0, q1 \n"
+ "vmov.u8 q2, q3 \n"
+ "subs %2, %2, #8 \n" // 8 processed per loop.
+ "vst2.8 {q0, q1}, [%1]! \n" // store 4 pixels
+ "vst2.8 {q2, q3}, [%1]! \n" // store 4 pixels
+ "bgt 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ab64), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleARGBToABGR) // %3
+ : "cc", "memory", "q0", "q1", "q2", "q3", "q4");
+}
+
+void AR64ToARGBRow_NEON(const uint16_t* src_ar64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "vld1.16 {q0}, [%0]! \n"
+ "vld1.16 {q1}, [%0]! \n"
+ "vld1.16 {q2}, [%0]! \n"
+ "vld1.16 {q3}, [%0]! \n"
+ "vshrn.u16 d0, q0, #8 \n"
+ "vshrn.u16 d1, q1, #8 \n"
+ "vshrn.u16 d4, q2, #8 \n"
+ "vshrn.u16 d5, q3, #8 \n"
+ "subs %2, %2, #8 \n" // 8 processed per loop.
+ "vst1.8 {q0}, [%1]! \n" // store 4 pixels
+ "vst1.8 {q2}, [%1]! \n" // store 4 pixels
+ "bgt 1b \n"
+ : "+r"(src_ar64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ :
+ : "cc", "memory", "q0", "q1", "q2", "q3");
+}
+
+static const uvec8 kShuffleAB64ToARGB = {5, 3, 1, 7, 13, 11, 9, 15};
+
+void AB64ToARGBRow_NEON(const uint16_t* src_ab64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "vld1.8 d8, %3 \n" // shuffler
+ "1: \n"
+ "vld1.16 {q0}, [%0]! \n"
+ "vld1.16 {q1}, [%0]! \n"
+ "vld1.16 {q2}, [%0]! \n"
+ "vld1.16 {q3}, [%0]! \n"
+ "vtbl.8 d0, {d0, d1}, d8 \n"
+ "vtbl.8 d1, {d2, d3}, d8 \n"
+ "vtbl.8 d4, {d4, d5}, d8 \n"
+ "vtbl.8 d5, {d6, d7}, d8 \n"
+ "subs %2, %2, #8 \n" // 8 processed per loop.
+ "vst1.8 {q0}, [%1]! \n" // store 4 pixels
+ "vst1.8 {q2}, [%1]! \n" // store 4 pixels
+ "bgt 1b \n"
+ : "+r"(src_ab64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleAB64ToARGB) // %3
+ : "cc", "memory", "q0", "q1", "q2", "q3", "q4");
+}
+
void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width) {
asm volatile(
"vmov.u8 d6, #25 \n" // B * 0.1016 coefficient
@@ -2128,9 +2562,9 @@ void RAWToYJRow_NEON(const uint8_t* src_raw, uint8_t* dst_yj, int width) {
"1: \n"
"vld3.8 {d0, d1, d2}, [%0]! \n" // load 8 pixels of RAW.
"subs %2, %2, #8 \n" // 8 processed per loop.
- "vmull.u8 q4, d0, d4 \n" // B
+ "vmull.u8 q4, d0, d4 \n" // R
"vmlal.u8 q4, d1, d5 \n" // G
- "vmlal.u8 q4, d2, d6 \n" // R
+ "vmlal.u8 q4, d2, d6 \n" // B
"vqrshrn.u16 d0, q4, #8 \n" // 16 bit to 8 bit Y
"vst1.8 {d0}, [%1]! \n" // store 8 pixels Y.
"bgt 1b \n"
@@ -2201,7 +2635,7 @@ void InterpolateRow_NEON(uint8_t* dst_ptr,
}
// dr * (256 - sa) / 256 + sr = dr - dr * sa / 256 + sr
-void ARGBBlendRow_NEON(const uint8_t* src_argb0,
+void ARGBBlendRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2252,7 +2686,7 @@ void ARGBBlendRow_NEON(const uint8_t* src_argb0,
"99: \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -2490,7 +2924,7 @@ void ARGBColorMatrixRow_NEON(const uint8_t* src_argb,
}
// Multiply 2 rows of ARGB pixels together, 8 pixels at a time.
-void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
+void ARGBMultiplyRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2510,7 +2944,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
"vrshrn.u16 d3, q3, #8 \n" // 16 bit to 8 bit A
"vst4.8 {d0, d1, d2, d3}, [%2]! \n" // store 8 ARGB pixels.
"bgt 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -2519,7 +2953,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
}
// Add 2 rows of ARGB pixels together, 8 pixels at a time.
-void ARGBAddRow_NEON(const uint8_t* src_argb0,
+void ARGBAddRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2533,7 +2967,7 @@ void ARGBAddRow_NEON(const uint8_t* src_argb0,
"vqadd.u8 q1, q1, q3 \n" // add R, A
"vst4.8 {d0, d1, d2, d3}, [%2]! \n" // store 8 ARGB pixels.
"bgt 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -2542,7 +2976,7 @@ void ARGBAddRow_NEON(const uint8_t* src_argb0,
}
// Subtract 2 rows of ARGB pixels, 8 pixels at a time.
-void ARGBSubtractRow_NEON(const uint8_t* src_argb0,
+void ARGBSubtractRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2556,7 +2990,7 @@ void ARGBSubtractRow_NEON(const uint8_t* src_argb0,
"vqsub.u8 q1, q1, q3 \n" // subtract R, A
"vst4.8 {d0, d1, d2, d3}, [%2]! \n" // store 8 ARGB pixels.
"bgt 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -3031,6 +3465,110 @@ void HalfMergeUVRow_NEON(const uint8_t* src_u,
: "cc", "memory", "q0", "q1", "q2", "q3");
}
+void SplitUVRow_16_NEON(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width) {
+ int shift = depth - 16; // Negative for right shift.
+ asm volatile(
+ "vdup.16 q2, %4 \n"
+ "1: \n"
+ "vld2.16 {q0, q1}, [%0]! \n" // load 8 UV
+ "vshl.u16 q0, q0, q2 \n"
+ "vshl.u16 q1, q1, q2 \n"
+ "subs %3, %3, #8 \n" // 8 src pixels per loop
+ "vst1.16 {q0}, [%1]! \n" // store 8 U pixels
+ "vst1.16 {q1}, [%2]! \n" // store 8 V pixels
+ "bgt 1b \n"
+ : "+r"(src_uv), // %0
+ "+r"(dst_u), // %1
+ "+r"(dst_v), // %2
+ "+r"(width) // %3
+ : "r"(shift) // %4
+ : "cc", "memory", "q0", "q1", "q2", "q3", "q4");
+}
+
+void MergeUVRow_16_NEON(const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint16_t* dst_uv,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ asm volatile(
+ "vdup.16 q2, %4 \n"
+ "1: \n"
+ "vld1.16 {q0}, [%0]! \n" // load 8 U
+ "vld1.16 {q1}, [%1]! \n" // load 8 V
+ "vshl.u16 q0, q0, q2 \n"
+ "vshl.u16 q1, q1, q2 \n"
+ "subs %3, %3, #8 \n" // 8 src pixels per loop
+ "vst2.16 {q0, q1}, [%2]! \n" // store 8 UV pixels
+ "bgt 1b \n"
+ : "+r"(src_u), // %0
+ "+r"(src_v), // %1
+ "+r"(dst_uv), // %2
+ "+r"(width) // %3
+ : "r"(shift) // %4
+ : "cc", "memory", "q0", "q1", "q2");
+}
+
+void MultiplyRow_16_NEON(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width) {
+ asm volatile(
+ "vdup.16 q2, %2 \n"
+ "1: \n"
+ "vld1.16 {q0}, [%0]! \n"
+ "vld1.16 {q1}, [%0]! \n"
+ "vmul.u16 q0, q0, q2 \n"
+ "vmul.u16 q1, q1, q2 \n"
+ "vst1.16 {q0}, [%1]! \n"
+ "vst1.16 {q1}, [%1]! \n"
+ "subs %3, %3, #16 \n" // 16 src pixels per loop
+ "bgt 1b \n"
+ : "+r"(src_y), // %0
+ "+r"(dst_y), // %1
+ "+r"(scale), // %2
+ "+r"(width) // %3
+ :
+ : "cc", "memory", "q0", "q1", "q2");
+}
+
+void DivideRow_16_NEON(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width) {
+ asm volatile(
+ "vdup.16 q0, %2 \n"
+ "1: \n"
+ "vld1.16 {q1}, [%0]! \n"
+ "vld1.16 {q2}, [%0]! \n"
+ "vmovl.u16 q3, d2 \n"
+ "vmovl.u16 q1, d3 \n"
+ "vmovl.u16 q4, d4 \n"
+ "vmovl.u16 q2, d5 \n"
+ "vshl.u32 q3, q3, q0 \n"
+ "vshl.u32 q4, q4, q0 \n"
+ "vshl.u32 q1, q1, q0 \n"
+ "vshl.u32 q2, q2, q0 \n"
+ "vmovn.u32 d2, q3 \n"
+ "vmovn.u32 d3, q1 \n"
+ "vmovn.u32 d4, q4 \n"
+ "vmovn.u32 d5, q2 \n"
+ "vst1.16 {q1}, [%1]! \n"
+ "vst1.16 {q2}, [%1]! \n"
+ "subs %3, %3, #16 \n" // 16 src pixels per loop
+ "bgt 1b \n"
+ : "+r"(src_y), // %0
+ "+r"(dst_y), // %1
+ "+r"(scale), // %2
+ "+r"(width) // %3
+ :
+ : "cc", "memory", "q0", "q1", "q2", "q3", "q4");
+}
+
#endif // !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__)..
#ifdef __cplusplus
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_neon64.cc b/third-party/libyuv/third_party/libyuv/source/row_neon64.cc
similarity index 75%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_neon64.cc
rename to third-party/libyuv/third_party/libyuv/source/row_neon64.cc
index d5258a3aef..da7e3c7cd4 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_neon64.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_neon64.cc
@@ -18,93 +18,101 @@ extern "C" {
// This module is for GCC Neon armv8 64 bit.
#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
+// v0.8h: Y
+// v1.16b: 8U, 8V
+
// Read 8 Y, 4 U and 4 V from 422
#define READYUV422 \
- "ld1 {v0.8b}, [%0], #8 \n" \
- "ld1 {v1.s}[0], [%1], #4 \n" \
- "ld1 {v1.s}[1], [%2], #4 \n"
+ "ldr d0, [%[src_y]], #8 \n" \
+ "ld1 {v1.s}[0], [%[src_u]], #4 \n" \
+ "ld1 {v1.s}[1], [%[src_v]], #4 \n" \
+ "zip1 v0.16b, v0.16b, v0.16b \n" \
+ "prfm pldl1keep, [%[src_y], 448] \n" \
+ "zip1 v1.16b, v1.16b, v1.16b \n" \
+ "prfm pldl1keep, [%[src_u], 128] \n" \
+ "prfm pldl1keep, [%[src_v], 128] \n"
// Read 8 Y, 8 U and 8 V from 444
#define READYUV444 \
- "ld1 {v0.8b}, [%0], #8 \n" \
- "ld1 {v1.d}[0], [%1], #8 \n" \
- "ld1 {v1.d}[1], [%2], #8 \n" \
- "uaddlp v1.8h, v1.16b \n" \
- "rshrn v1.8b, v1.8h, #1 \n"
+ "ldr d0, [%[src_y]], #8 \n" \
+ "ld1 {v1.d}[0], [%[src_u]], #8 \n" \
+ "prfm pldl1keep, [%[src_y], 448] \n" \
+ "ld1 {v1.d}[1], [%[src_v]], #8 \n" \
+ "prfm pldl1keep, [%[src_u], 448] \n" \
+ "zip1 v0.16b, v0.16b, v0.16b \n" \
+ "prfm pldl1keep, [%[src_v], 448] \n"
// Read 8 Y, and set 4 U and 4 V to 128
#define READYUV400 \
- "ld1 {v0.8b}, [%0], #8 \n" \
- "movi v1.8b , #128 \n"
+ "ldr d0, [%[src_y]], #8 \n" \
+ "movi v1.16b, #128 \n" \
+ "prfm pldl1keep, [%[src_y], 448] \n" \
+ "zip1 v0.16b, v0.16b, v0.16b \n"
-// Read 8 Y and 4 UV from NV12
+static const uvec8 kNV12Table = {0, 0, 2, 2, 4, 4, 6, 6,
+ 1, 1, 3, 3, 5, 5, 7, 7};
+static const uvec8 kNV21Table = {1, 1, 3, 3, 5, 5, 7, 7,
+ 0, 0, 2, 2, 4, 4, 6, 6};
+
+// Read 8 Y and 4 UV from NV12 or NV21
#define READNV12 \
- "ld1 {v0.8b}, [%0], #8 \n" \
- "ld1 {v2.8b}, [%1], #8 \n" \
- "uzp1 v1.8b, v2.8b, v2.8b \n" \
- "uzp2 v3.8b, v2.8b, v2.8b \n" \
- "ins v1.s[1], v3.s[0] \n"
-
-// Read 8 Y and 4 VU from NV21
-#define READNV21 \
- "ld1 {v0.8b}, [%0], #8 \n" \
- "ld1 {v2.8b}, [%1], #8 \n" \
- "uzp1 v3.8b, v2.8b, v2.8b \n" \
- "uzp2 v1.8b, v2.8b, v2.8b \n" \
- "ins v1.s[1], v3.s[0] \n"
+ "ldr d0, [%[src_y]], #8 \n" \
+ "ldr d1, [%[src_uv]], #8 \n" \
+ "zip1 v0.16b, v0.16b, v0.16b \n" \
+ "prfm pldl1keep, [%[src_y], 448] \n" \
+ "tbl v1.16b, {v1.16b}, v2.16b \n" \
+ "prfm pldl1keep, [%[src_uv], 448] \n"
// Read 8 YUY2
-#define READYUY2 \
- "ld2 {v0.8b, v1.8b}, [%0], #16 \n" \
- "uzp2 v3.8b, v1.8b, v1.8b \n" \
- "uzp1 v1.8b, v1.8b, v1.8b \n" \
- "ins v1.s[1], v3.s[0] \n"
+#define READYUY2 \
+ "ld2 {v0.8b, v1.8b}, [%[src_yuy2]], #16 \n" \
+ "zip1 v0.16b, v0.16b, v0.16b \n" \
+ "prfm pldl1keep, [%[src_yuy2], 448] \n" \
+ "tbl v1.16b, {v1.16b}, v2.16b \n"
// Read 8 UYVY
-#define READUYVY \
- "ld2 {v2.8b, v3.8b}, [%0], #16 \n" \
- "orr v0.8b, v3.8b, v3.8b \n" \
- "uzp1 v1.8b, v2.8b, v2.8b \n" \
- "uzp2 v3.8b, v2.8b, v2.8b \n" \
- "ins v1.s[1], v3.s[0] \n"
+#define READUYVY \
+ "ld2 {v3.8b, v4.8b}, [%[src_uyvy]], #16 \n" \
+ "zip1 v0.16b, v4.16b, v4.16b \n" \
+ "prfm pldl1keep, [%[src_uyvy], 448] \n" \
+ "tbl v1.16b, {v3.16b}, v2.16b \n"
-#define YUVTORGB_SETUP \
- "ld3r {v24.8h, v25.8h, v26.8h}, [%[kUVBiasBGR]] \n" \
- "ld1r {v31.4s}, [%[kYToRgb]] \n" \
- "ld2 {v27.8h, v28.8h}, [%[kUVToRB]] \n" \
- "ld2 {v29.8h, v30.8h}, [%[kUVToG]] \n"
+// UB VR UG VG
+// YG BB BG BR
+#define YUVTORGB_SETUP \
+ "ld4r {v28.16b, v29.16b, v30.16b, v31.16b}, [%[kUVCoeff]] \n" \
+ "ld4r {v24.8h, v25.8h, v26.8h, v27.8h}, [%[kRGBCoeffBias]] \n"
-// clang-format off
+// v16.8h: B
+// v17.8h: G
+// v18.8h: R
-#define YUVTORGB(vR, vG, vB) \
- "uxtl v0.8h, v0.8b \n" /* Extract Y */ \
- "shll v2.8h, v1.8b, #8 \n" /* Replicate UV */ \
- "ushll2 v3.4s, v0.8h, #0 \n" /* Y */ \
- "ushll v0.4s, v0.4h, #0 \n" \
- "mul v3.4s, v3.4s, v31.4s \n" \
- "mul v0.4s, v0.4s, v31.4s \n" \
- "sqshrun v0.4h, v0.4s, #16 \n" \
- "sqshrun2 v0.8h, v3.4s, #16 \n" /* Y */ \
- "uaddw v1.8h, v2.8h, v1.8b \n" /* Replicate UV */ \
- "mov v2.d[0], v1.d[1] \n" /* Extract V */ \
- "uxtl v2.8h, v2.8b \n" \
- "uxtl v1.8h, v1.8b \n" /* Extract U */ \
- "mul v3.8h, v27.8h, v1.8h \n" \
- "mul v5.8h, v29.8h, v1.8h \n" \
- "mul v6.8h, v30.8h, v2.8h \n" \
- "mul v7.8h, v28.8h, v2.8h \n" \
- "sqadd v6.8h, v6.8h, v5.8h \n" \
- "sqadd " #vB ".8h, v24.8h, v0.8h \n" /* B */ \
- "sqadd " #vG ".8h, v25.8h, v0.8h \n" /* G */ \
- "sqadd " #vR ".8h, v26.8h, v0.8h \n" /* R */ \
- "sqadd " #vB ".8h, " #vB ".8h, v3.8h \n" /* B */ \
- "sqsub " #vG ".8h, " #vG ".8h, v6.8h \n" /* G */ \
- "sqadd " #vR ".8h, " #vR ".8h, v7.8h \n" /* R */ \
- "sqshrun " #vB ".8b, " #vB ".8h, #6 \n" /* B */ \
- "sqshrun " #vG ".8b, " #vG ".8h, #6 \n" /* G */ \
- "sqshrun " #vR ".8b, " #vR ".8h, #6 \n" /* R */
+// Convert from YUV to 2.14 fixed point RGB
+#define YUVTORGB \
+ "umull2 v3.4s, v0.8h, v24.8h \n" \
+ "umull v6.8h, v1.8b, v30.8b \n" \
+ "umull v0.4s, v0.4h, v24.4h \n" \
+ "umlal2 v6.8h, v1.16b, v31.16b \n" /* DG */ \
+ "uqshrn v0.4h, v0.4s, #16 \n" \
+ "uqshrn2 v0.8h, v3.4s, #16 \n" /* Y */ \
+ "umull v4.8h, v1.8b, v28.8b \n" /* DB */ \
+ "umull2 v5.8h, v1.16b, v29.16b \n" /* DR */ \
+ "add v17.8h, v0.8h, v26.8h \n" /* G */ \
+ "add v16.8h, v0.8h, v4.8h \n" /* B */ \
+ "add v18.8h, v0.8h, v5.8h \n" /* R */ \
+ "uqsub v17.8h, v17.8h, v6.8h \n" /* G */ \
+ "uqsub v16.8h, v16.8h, v25.8h \n" /* B */ \
+ "uqsub v18.8h, v18.8h, v27.8h \n" /* R */
-// clang-format on
+// Convert from 2.14 fixed point RGB To 8 bit RGB
+#define RGBTORGB8 \
+ "uqshrn v17.8b, v17.8h, #6 \n" \
+ "uqshrn v16.8b, v16.8h, #6 \n" \
+ "uqshrn v18.8b, v18.8h, #6 \n"
+
+#define YUVTORGB_REGS \
+ "v0", "v1", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", "v24", "v25", \
+ "v26", "v27", "v28", "v29", "v30", "v31"
void I444ToARGBRow_NEON(const uint8_t* src_y,
const uint8_t* src_u,
@@ -112,30 +120,22 @@ void I444ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n" /* A */
- "1: \n"
- READYUV444
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%1, 448] \n"
- "prfm pldl1keep, [%2, 448] \n"
- "subs %w4, %w4, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%3], #32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n" /* A */
+ "1: \n" READYUV444 YUVTORGB
+ RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb), // %3
- "+r"(width) // %4
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v19");
}
void I422ToARGBRow_NEON(const uint8_t* src_y,
@@ -144,31 +144,48 @@ void I422ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n" /* A */
-
- "1: \n"
- READYUV422
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%1, 128] \n"
- "prfm pldl1keep, [%2, 128] \n"
- "subs %w4, %w4, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%3], #32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n" /* A */
+ "1: \n" READYUV422 YUVTORGB
+ RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb), // %3
- "+r"(width) // %4
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v19");
+}
+
+void I444AlphaToARGBRow_NEON(const uint8_t* src_y,
+ const uint8_t* src_u,
+ const uint8_t* src_v,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ asm volatile(
+ YUVTORGB_SETUP
+ "1: \n"
+ "ld1 {v19.8b}, [%[src_a]], #8 \n" READYUV444
+ "prfm pldl1keep, [%[src_a], 448] \n" YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
+ "b.gt 1b \n"
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [src_a] "+r"(src_a), // %[src_a]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v19");
}
void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
@@ -178,32 +195,23 @@ void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
+ asm volatile(
+ YUVTORGB_SETUP
"1: \n"
- READYUV422
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "ld1 {v23.8b}, [%3], #8 \n"
- "prfm pldl1keep, [%1, 128] \n"
- "prfm pldl1keep, [%2, 128] \n"
- "prfm pldl1keep, [%3, 448] \n"
- "subs %w5, %w5, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%4], #32 \n"
+ "ld1 {v19.8b}, [%[src_a]], #8 \n" READYUV422
+ "prfm pldl1keep, [%[src_a], 448] \n" YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(src_a), // %3
- "+r"(dst_argb), // %4
- "+r"(width) // %5
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [src_a] "+r"(src_a), // %[src_a]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v19");
}
void I422ToRGBARow_NEON(const uint8_t* src_y,
@@ -212,30 +220,22 @@ void I422ToRGBARow_NEON(const uint8_t* src_y,
uint8_t* dst_rgba,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v20.8b, #255 \n" /* A */
- "1: \n"
- READYUV422
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v23, v22, v21)
- "prfm pldl1keep, [%1, 128] \n"
- "prfm pldl1keep, [%2, 128] \n"
- "subs %w4, %w4, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%3], #32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v15.8b, #255 \n" /* A */
+ "1: \n" READYUV422 YUVTORGB
+ RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v15.8b,v16.8b,v17.8b,v18.8b}, [%[dst_rgba]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_rgba), // %3
- "+r"(width) // %4
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_rgba] "+r"(dst_rgba), // %[dst_rgba]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v15");
}
void I422ToRGB24Row_NEON(const uint8_t* src_y,
@@ -244,39 +244,29 @@ void I422ToRGB24Row_NEON(const uint8_t* src_y,
uint8_t* dst_rgb24,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "1: \n"
- READYUV422
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%1, 128] \n"
- "prfm pldl1keep, [%2, 128] \n"
- "subs %w4, %w4, #8 \n"
- "st3 {v20.8b,v21.8b,v22.8b}, [%3], #24 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "1: \n" READYUV422 YUVTORGB
+ RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_rgb24), // %3
- "+r"(width) // %4
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_rgb24] "+r"(dst_rgb24), // %[dst_rgb24]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS);
}
#define ARGBTORGB565 \
- "shll v0.8h, v22.8b, #8 \n" /* R */ \
- "shll v21.8h, v21.8b, #8 \n" /* G */ \
- "shll v20.8h, v20.8b, #8 \n" /* B */ \
- "sri v0.8h, v21.8h, #5 \n" /* RG */ \
- "sri v0.8h, v20.8h, #11 \n" /* RGB */
-
-// clang-format off
+ "shll v18.8h, v18.8b, #8 \n" /* R */ \
+ "shll v17.8h, v17.8b, #8 \n" /* G */ \
+ "shll v16.8h, v16.8b, #8 \n" /* B */ \
+ "sri v18.8h, v17.8h, #5 \n" /* RG */ \
+ "sri v18.8h, v16.8h, #11 \n" /* RGB */
void I422ToRGB565Row_NEON(const uint8_t* src_y,
const uint8_t* src_u,
@@ -285,38 +275,29 @@ void I422ToRGB565Row_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants,
int width) {
asm volatile(
- YUVTORGB_SETUP
- "1: \n"
- READYUV422
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%0, 448] \n"
- "subs %w4, %w4, #8 \n"
- ARGBTORGB565
- "prfm pldl1keep, [%1, 128] \n"
- "prfm pldl1keep, [%2, 128] \n"
- "st1 {v0.8h}, [%3], #16 \n" // store 8 pixels RGB565.
+ YUVTORGB_SETUP
+ "1: \n" READYUV422 YUVTORGB
+ RGBTORGB8 "subs %w[width], %w[width], #8 \n" ARGBTORGB565
+ "st1 {v18.8h}, [%[dst_rgb565]], #16 \n" // store 8 pixels RGB565.
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_rgb565), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_rgb565] "+r"(dst_rgb565), // %[dst_rgb565]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS);
}
#define ARGBTOARGB1555 \
- "shll v0.8h, v23.8b, #8 \n" /* A */ \
- "shll v22.8h, v22.8b, #8 \n" /* R */ \
- "shll v21.8h, v21.8b, #8 \n" /* G */ \
- "shll v20.8h, v20.8b, #8 \n" /* B */ \
- "sri v0.8h, v22.8h, #1 \n" /* AR */ \
- "sri v0.8h, v21.8h, #6 \n" /* ARG */ \
- "sri v0.8h, v20.8h, #11 \n" /* ARGB */
+ "shll v0.8h, v19.8b, #8 \n" /* A */ \
+ "shll v18.8h, v18.8b, #8 \n" /* R */ \
+ "shll v17.8h, v17.8b, #8 \n" /* G */ \
+ "shll v16.8h, v16.8b, #8 \n" /* B */ \
+ "sri v0.8h, v18.8h, #1 \n" /* AR */ \
+ "sri v0.8h, v17.8h, #6 \n" /* ARG */ \
+ "sri v0.8h, v16.8h, #11 \n" /* ARGB */
void I422ToARGB1555Row_NEON(const uint8_t* src_y,
const uint8_t* src_u,
@@ -325,40 +306,32 @@ void I422ToARGB1555Row_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants,
int width) {
asm volatile(
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n"
- "1: \n"
- READYUV422
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%0, 448] \n"
- "subs %w4, %w4, #8 \n"
- ARGBTOARGB1555
- "prfm pldl1keep, [%1, 128] \n"
- "prfm pldl1keep, [%2, 128] \n"
- "st1 {v0.8h}, [%3], #16 \n" // store 8 pixels RGB565.
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n"
+ "1: \n" READYUV422 YUVTORGB
+ RGBTORGB8
+ "subs %w[width], %w[width], #8 \n" ARGBTOARGB1555
+ "st1 {v0.8h}, [%[dst_argb1555]], #16 \n" // store 8 pixels
+ // RGB565.
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb1555), // %3
- "+r"(width) // %4
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb1555] "+r"(dst_argb1555), // %[dst_argb1555]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v19");
}
-// clang-format on
#define ARGBTOARGB4444 \
- /* Input v20.8b<=B, v21.8b<=G, v22.8b<=R, v23.8b<=A, v4.8b<=0x0f */ \
- "ushr v20.8b, v20.8b, #4 \n" /* B */ \
- "bic v21.8b, v21.8b, v4.8b \n" /* G */ \
- "ushr v22.8b, v22.8b, #4 \n" /* R */ \
- "bic v23.8b, v23.8b, v4.8b \n" /* A */ \
- "orr v0.8b, v20.8b, v21.8b \n" /* BG */ \
- "orr v1.8b, v22.8b, v23.8b \n" /* RA */ \
+ /* Input v16.8b<=B, v17.8b<=G, v18.8b<=R, v19.8b<=A, v23.8b<=0x0f */ \
+ "ushr v16.8b, v16.8b, #4 \n" /* B */ \
+ "bic v17.8b, v17.8b, v23.8b \n" /* G */ \
+ "ushr v18.8b, v18.8b, #4 \n" /* R */ \
+ "bic v19.8b, v19.8b, v23.8b \n" /* A */ \
+ "orr v0.8b, v16.8b, v17.8b \n" /* BG */ \
+ "orr v1.8b, v18.8b, v19.8b \n" /* RA */ \
"zip1 v0.16b, v0.16b, v1.16b \n" /* BGRA */
void I422ToARGB4444Row_NEON(const uint8_t* src_y,
@@ -367,58 +340,46 @@ void I422ToARGB4444Row_NEON(const uint8_t* src_y,
uint8_t* dst_argb4444,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v4.16b, #0x0f \n" // bits to clear with vbic.
- "1: \n"
- READYUV422
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%0, 448] \n"
- "subs %w4, %w4, #8 \n"
- "movi v23.8b, #255 \n"
- ARGBTOARGB4444
- "prfm pldl1keep, [%1, 128] \n"
- "prfm pldl1keep, [%2, 128] \n"
- "st1 {v0.8h}, [%3], #16 \n" // store 8 pixels ARGB4444.
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v23.16b, #0x0f \n" // bits to clear with
+ // vbic.
+ "1: \n" READYUV422 YUVTORGB
+ RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "movi v19.8b, #255 \n" ARGBTOARGB4444
+ "st1 {v0.8h}, [%[dst_argb4444]], #16 \n" // store 8
+ // pixels
+ // ARGB4444.
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_u), // %1
- "+r"(src_v), // %2
- "+r"(dst_argb4444), // %3
- "+r"(width) // %4
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_u] "+r"(src_u), // %[src_u]
+ [src_v] "+r"(src_v), // %[src_v]
+ [dst_argb4444] "+r"(dst_argb4444), // %[dst_argb4444]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v19", "v23");
}
void I400ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n"
- "1: \n"
- READYUV400
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%1], #32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n"
+ "1: \n" READYUV400 YUVTORGB
+ RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(dst_argb), // %1
- "+r"(width) // %2
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias]
+ : "cc", "memory", YUVTORGB_REGS, "v19");
}
void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) {
@@ -444,28 +405,22 @@ void NV12ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n"
- "1: \n"
- READNV12
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%1, 256] \n"
- "subs %w3, %w3, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%2], #32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n"
+ "ldr q2, [%[kNV12Table]] \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_uv), // %1
- "+r"(dst_argb), // %2
- "+r"(width) // %3
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_uv), // %[src_uv]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias]
+ [kNV12Table] "r"(&kNV12Table)
+ : "cc", "memory", YUVTORGB_REGS, "v2", "v19");
}
void NV21ToARGBRow_NEON(const uint8_t* src_y,
@@ -473,28 +428,22 @@ void NV21ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n"
- "1: \n"
- READNV21
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%1, 256] \n"
- "subs %w3, %w3, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%2], #32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n"
+ "ldr q2, [%[kNV12Table]] \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_vu), // %1
- "+r"(dst_argb), // %2
- "+r"(width) // %3
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_vu), // %[src_uv]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias]
+ [kNV12Table] "r"(&kNV21Table)
+ : "cc", "memory", YUVTORGB_REGS, "v2", "v19");
}
void NV12ToRGB24Row_NEON(const uint8_t* src_y,
@@ -502,27 +451,21 @@ void NV12ToRGB24Row_NEON(const uint8_t* src_y,
uint8_t* dst_rgb24,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "1: \n"
- READNV12
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%1, 256] \n"
- "subs %w3, %w3, #8 \n"
- "st3 {v20.8b,v21.8b,v22.8b}, [%2], #24 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "ldr q2, [%[kNV12Table]] \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_uv), // %1
- "+r"(dst_rgb24), // %2
- "+r"(width) // %3
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_uv), // %[src_uv]
+ [dst_rgb24] "+r"(dst_rgb24), // %[dst_rgb24]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias]
+ [kNV12Table] "r"(&kNV12Table)
+ : "cc", "memory", YUVTORGB_REGS, "v2");
}
void NV21ToRGB24Row_NEON(const uint8_t* src_y,
@@ -530,27 +473,21 @@ void NV21ToRGB24Row_NEON(const uint8_t* src_y,
uint8_t* dst_rgb24,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "1: \n"
- READNV21
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%1, 256] \n"
- "subs %w3, %w3, #8 \n"
- "st3 {v20.8b,v21.8b,v22.8b}, [%2], #24 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "ldr q2, [%[kNV12Table]] \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n"
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_vu), // %1
- "+r"(dst_rgb24), // %2
- "+r"(width) // %3
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_vu), // %[src_uv]
+ [dst_rgb24] "+r"(dst_rgb24), // %[dst_rgb24]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias]
+ [kNV12Table] "r"(&kNV21Table)
+ : "cc", "memory", YUVTORGB_REGS, "v2");
}
void NV12ToRGB565Row_NEON(const uint8_t* src_y,
@@ -559,75 +496,64 @@ void NV12ToRGB565Row_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants,
int width) {
asm volatile(
- YUVTORGB_SETUP "1: \n" READNV12
- "prfm pldl1keep, [%0, 448] \n" YUVTORGB(
- v22, v21, v20) ARGBTORGB565
- "prfm pldl1keep, [%1, 256] \n"
- "subs %w3, %w3, #8 \n"
- "st1 {v0.8h}, [%2], 16 \n" // store 8 pixels
+ YUVTORGB_SETUP
+ "ldr q2, [%[kNV12Table]] \n"
+ "1: \n" READNV12 YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n" ARGBTORGB565
+ "st1 {v18.8h}, [%[dst_rgb565]], #16 \n" // store 8
+ // pixels
+ // RGB565.
"b.gt 1b \n"
- : "+r"(src_y), // %0
- "+r"(src_uv), // %1
- "+r"(dst_rgb565), // %2
- "+r"(width) // %3
- : [kUVToRB] "r"(&yuvconstants->kUVToRB),
- [kUVToG] "r"(&yuvconstants->kUVToG),
- [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb] "r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30");
+ : [src_y] "+r"(src_y), // %[src_y]
+ [src_uv] "+r"(src_uv), // %[src_uv]
+ [dst_rgb565] "+r"(dst_rgb565), // %[dst_rgb565]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias]
+ [kNV12Table] "r"(&kNV12Table)
+ : "cc", "memory", YUVTORGB_REGS, "v2");
}
void YUY2ToARGBRow_NEON(const uint8_t* src_yuy2,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n"
- "1: \n"
- READYUY2
- "prfm pldl1keep, [%0, 448] \n"
- YUVTORGB(v22, v21, v20)
- "subs %w2, %w2, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%1], #32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n"
+ "ldr q2, [%[kNV12Table]] \n"
+ "1: \n" READYUY2 YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_yuy2), // %0
- "+r"(dst_argb), // %1
- "+r"(width) // %2
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_yuy2] "+r"(src_yuy2), // %[src_yuy2]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias]
+ [kNV12Table] "r"(&kNV12Table)
+ : "cc", "memory", YUVTORGB_REGS, "v2", "v19");
}
void UYVYToARGBRow_NEON(const uint8_t* src_uyvy,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- asm volatile (
- YUVTORGB_SETUP
- "movi v23.8b, #255 \n"
- "1: \n"
- READUYVY
- YUVTORGB(v22, v21, v20)
- "prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n"
- "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%1], 32 \n"
+ asm volatile(
+ YUVTORGB_SETUP
+ "movi v19.8b, #255 \n"
+ "ldr q2, [%[kNV12Table]] \n"
+ "1: \n" READUYVY YUVTORGB RGBTORGB8
+ "subs %w[width], %w[width], #8 \n"
+ "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n"
"b.gt 1b \n"
- : "+r"(src_uyvy), // %0
- "+r"(dst_argb), // %1
- "+r"(width) // %2
- : [kUVToRB]"r"(&yuvconstants->kUVToRB),
- [kUVToG]"r"(&yuvconstants->kUVToG),
- [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
- [kYToRgb]"r"(&yuvconstants->kYToRgb)
- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
- "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
- );
+ : [src_uyvy] "+r"(src_uyvy), // %[src_yuy2]
+ [dst_argb] "+r"(dst_argb), // %[dst_argb]
+ [width] "+r"(width) // %[width]
+ : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff]
+ [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias]
+ [kNV12Table] "r"(&kNV12Table)
+ : "cc", "memory", YUVTORGB_REGS, "v2", "v19");
}
// Reads 16 pairs of UV and write even values to dst_u and odd to dst_v.
@@ -638,8 +564,8 @@ void SplitUVRow_NEON(const uint8_t* src_uv,
asm volatile(
"1: \n"
"ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pairs of UV
- "prfm pldl1keep, [%0, 448] \n"
"subs %w3, %w3, #16 \n" // 16 processed per loop
+ "prfm pldl1keep, [%0, 448] \n"
"st1 {v0.16b}, [%1], #16 \n" // store U
"st1 {v1.16b}, [%2], #16 \n" // store V
"b.gt 1b \n"
@@ -661,9 +587,9 @@ void MergeUVRow_NEON(const uint8_t* src_u,
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load U
"ld1 {v1.16b}, [%1], #16 \n" // load V
+ "subs %w3, %w3, #16 \n" // 16 processed per loop
"prfm pldl1keep, [%0, 448] \n"
"prfm pldl1keep, [%1, 448] \n"
- "subs %w3, %w3, #16 \n" // 16 processed per loop
"st2 {v0.16b,v1.16b}, [%2], #32 \n" // store 16 pairs of UV
"b.gt 1b \n"
: "+r"(src_u), // %0
@@ -684,8 +610,8 @@ void SplitRGBRow_NEON(const uint8_t* src_rgb,
asm volatile(
"1: \n"
"ld3 {v0.16b,v1.16b,v2.16b}, [%0], #48 \n" // load 16 RGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w4, %w4, #16 \n" // 16 processed per loop
+ "prfm pldl1keep, [%0, 448] \n"
"st1 {v0.16b}, [%1], #16 \n" // store R
"st1 {v1.16b}, [%2], #16 \n" // store G
"st1 {v2.16b}, [%3], #16 \n" // store B
@@ -711,12 +637,11 @@ void MergeRGBRow_NEON(const uint8_t* src_r,
"ld1 {v0.16b}, [%0], #16 \n" // load R
"ld1 {v1.16b}, [%1], #16 \n" // load G
"ld1 {v2.16b}, [%2], #16 \n" // load B
+ "subs %w4, %w4, #16 \n" // 16 processed per loop
"prfm pldl1keep, [%0, 448] \n"
"prfm pldl1keep, [%1, 448] \n"
"prfm pldl1keep, [%2, 448] \n"
- "subs %w4, %w4, #16 \n" // 16 processed per loop
"st3 {v0.16b,v1.16b,v2.16b}, [%3], #48 \n" // store 16 RGB
- "prfm pldl1keep, [%0, 448] \n"
"b.gt 1b \n"
: "+r"(src_r), // %0
"+r"(src_g), // %1
@@ -728,6 +653,352 @@ void MergeRGBRow_NEON(const uint8_t* src_r,
);
}
+// Reads 16 packed ARGB and write to planar dst_r, dst_g, dst_b, dst_a.
+void SplitARGBRow_NEON(const uint8_t* src_rgba,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ uint8_t* dst_a,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB
+ "subs %w5, %w5, #16 \n" // 16 processed per loop
+ "prfm pldl1keep, [%0, 448] \n"
+ "st1 {v0.16b}, [%3], #16 \n" // store B
+ "st1 {v1.16b}, [%2], #16 \n" // store G
+ "st1 {v2.16b}, [%1], #16 \n" // store R
+ "st1 {v3.16b}, [%4], #16 \n" // store A
+ "b.gt 1b \n"
+ : "+r"(src_rgba), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(dst_a), // %4
+ "+r"(width) // %5
+ : // Input registers
+ : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List
+ );
+}
+
+// Reads 16 planar R's, G's, B's and A's and writes out 16 packed ARGB at a time
+void MergeARGBRow_NEON(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ const uint8_t* src_a,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "ld1 {v2.16b}, [%0], #16 \n" // load R
+ "ld1 {v1.16b}, [%1], #16 \n" // load G
+ "ld1 {v0.16b}, [%2], #16 \n" // load B
+ "ld1 {v3.16b}, [%3], #16 \n" // load A
+ "subs %w5, %w5, #16 \n" // 16 processed per loop
+ "prfm pldl1keep, [%0, 448] \n"
+ "prfm pldl1keep, [%1, 448] \n"
+ "prfm pldl1keep, [%2, 448] \n"
+ "prfm pldl1keep, [%3, 448] \n"
+ "st4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%4], #64 \n" // store 16ARGB
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_argb), // %4
+ "+r"(width) // %5
+ : // Input registers
+ : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List
+ );
+}
+
+// Reads 16 packed ARGB and write to planar dst_r, dst_g, dst_b.
+void SplitXRGBRow_NEON(const uint8_t* src_rgba,
+ uint8_t* dst_r,
+ uint8_t* dst_g,
+ uint8_t* dst_b,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB
+ "subs %w4, %w4, #16 \n" // 16 processed per loop
+ "prfm pldl1keep, [%0, 448] \n"
+ "st1 {v0.16b}, [%3], #16 \n" // store B
+ "st1 {v1.16b}, [%2], #16 \n" // store G
+ "st1 {v2.16b}, [%1], #16 \n" // store R
+ "b.gt 1b \n"
+ : "+r"(src_rgba), // %0
+ "+r"(dst_r), // %1
+ "+r"(dst_g), // %2
+ "+r"(dst_b), // %3
+ "+r"(width) // %4
+ : // Input registers
+ : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List
+ );
+}
+
+// Reads 16 planar R's, G's and B's and writes out 16 packed ARGB at a time
+void MergeXRGBRow_NEON(const uint8_t* src_r,
+ const uint8_t* src_g,
+ const uint8_t* src_b,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "movi v3.16b, #255 \n" // load A(255)
+ "1: \n"
+ "ld1 {v2.16b}, [%0], #16 \n" // load R
+ "ld1 {v1.16b}, [%1], #16 \n" // load G
+ "ld1 {v0.16b}, [%2], #16 \n" // load B
+ "subs %w4, %w4, #16 \n" // 16 processed per loop
+ "prfm pldl1keep, [%0, 448] \n"
+ "prfm pldl1keep, [%1, 448] \n"
+ "prfm pldl1keep, [%2, 448] \n"
+ "st4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%3], #64 \n" // store 16ARGB
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_argb), // %3
+ "+r"(width) // %4
+ : // Input registers
+ : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List
+ );
+}
+
+void MergeXR30Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int depth,
+ int width) {
+ int shift = 10 - depth;
+ asm volatile(
+ "movi v30.16b, #255 \n"
+ "ushr v30.4s, v30.4s, #22 \n" // 1023
+ "dup v31.4s, %w5 \n"
+ "1: \n"
+ "ldr d2, [%2], #8 \n" // B
+ "ldr d1, [%1], #8 \n" // G
+ "ldr d0, [%0], #8 \n" // R
+ "ushll v2.4s, v2.4h, #0 \n" // B
+ "ushll v1.4s, v1.4h, #0 \n" // G
+ "ushll v0.4s, v0.4h, #0 \n" // R
+ "ushl v2.4s, v2.4s, v31.4s \n" // 000B
+ "ushl v1.4s, v1.4s, v31.4s \n" // G
+ "ushl v0.4s, v0.4s, v31.4s \n" // R
+ "umin v2.4s, v2.4s, v30.4s \n"
+ "umin v1.4s, v1.4s, v30.4s \n"
+ "umin v0.4s, v0.4s, v30.4s \n"
+ "sli v2.4s, v1.4s, #10 \n" // 00GB
+ "sli v2.4s, v0.4s, #20 \n" // 0RGB
+ "orr v2.4s, #0xc0, lsl #24 \n" // ARGB (AR30)
+ "subs %w4, %w4, #4 \n"
+ "str q2, [%3], #16 \n"
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar30), // %3
+ "+r"(width) // %4
+ : "r"(shift) // %5
+ : "memory", "cc", "v0", "v1", "v2", "v30", "v31");
+}
+
+void MergeXR30Row_10_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_ar30,
+ int /* depth */,
+ int width) {
+ asm volatile(
+ "movi v30.16b, #255 \n"
+ "ushr v30.4s, v30.4s, #22 \n" // 1023
+ "1: \n"
+ "ldr d2, [%2], #8 \n" // B
+ "ldr d1, [%1], #8 \n" // G
+ "ldr d0, [%0], #8 \n" // R
+ "ushll v2.4s, v2.4h, #0 \n" // 000B
+ "ushll v1.4s, v1.4h, #0 \n" // G
+ "ushll v0.4s, v0.4h, #0 \n" // R
+ "umin v2.4s, v2.4s, v30.4s \n"
+ "umin v1.4s, v1.4s, v30.4s \n"
+ "umin v0.4s, v0.4s, v30.4s \n"
+ "sli v2.4s, v1.4s, #10 \n" // 00GB
+ "sli v2.4s, v0.4s, #20 \n" // 0RGB
+ "orr v2.4s, #0xc0, lsl #24 \n" // ARGB (AR30)
+ "subs %w4, %w4, #4 \n"
+ "str q2, [%3], #16 \n"
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar30), // %3
+ "+r"(width) // %4
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v30");
+}
+
+void MergeAR64Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ int mask = (1 << depth) - 1;
+ asm volatile(
+
+ "dup v30.8h, %w7 \n"
+ "dup v31.8h, %w6 \n"
+ "1: \n"
+ "ldr q2, [%0], #16 \n" // R
+ "ldr q1, [%1], #16 \n" // G
+ "ldr q0, [%2], #16 \n" // B
+ "ldr q3, [%3], #16 \n" // A
+ "umin v2.8h, v2.8h, v30.8h \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "umin v1.8h, v1.8h, v30.8h \n"
+ "prfm pldl1keep, [%1, 448] \n"
+ "umin v0.8h, v0.8h, v30.8h \n"
+ "prfm pldl1keep, [%2, 448] \n"
+ "umin v3.8h, v3.8h, v30.8h \n"
+ "prfm pldl1keep, [%3, 448] \n"
+ "ushl v2.8h, v2.8h, v31.8h \n"
+ "ushl v1.8h, v1.8h, v31.8h \n"
+ "ushl v0.8h, v0.8h, v31.8h \n"
+ "ushl v3.8h, v3.8h, v31.8h \n"
+ "subs %w5, %w5, #8 \n"
+ "st4 {v0.8h, v1.8h, v2.8h, v3.8h}, [%4], #64 \n"
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_ar64), // %4
+ "+r"(width) // %5
+ : "r"(shift), // %6
+ "r"(mask) // %7
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v31");
+}
+
+void MergeXR64Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint16_t* dst_ar64,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ int mask = (1 << depth) - 1;
+ asm volatile(
+
+ "movi v3.16b, #0xff \n" // A (0xffff)
+ "dup v30.8h, %w6 \n"
+ "dup v31.8h, %w5 \n"
+
+ "1: \n"
+ "ldr q2, [%0], #16 \n" // R
+ "ldr q1, [%1], #16 \n" // G
+ "ldr q0, [%2], #16 \n" // B
+ "umin v2.8h, v2.8h, v30.8h \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "umin v1.8h, v1.8h, v30.8h \n"
+ "prfm pldl1keep, [%1, 448] \n"
+ "umin v0.8h, v0.8h, v30.8h \n"
+ "prfm pldl1keep, [%2, 448] \n"
+ "ushl v2.8h, v2.8h, v31.8h \n"
+ "ushl v1.8h, v1.8h, v31.8h \n"
+ "ushl v0.8h, v0.8h, v31.8h \n"
+ "subs %w4, %w4, #8 \n"
+ "st4 {v0.8h, v1.8h, v2.8h, v3.8h}, [%3], #64 \n"
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_ar64), // %3
+ "+r"(width) // %4
+ : "r"(shift), // %5
+ "r"(mask) // %6
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v31");
+}
+
+void MergeARGB16To8Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ const uint16_t* src_a,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ int shift = 8 - depth;
+ asm volatile(
+
+ "dup v31.8h, %w6 \n"
+ "1: \n"
+ "ldr q2, [%0], #16 \n" // R
+ "ldr q1, [%1], #16 \n" // G
+ "ldr q0, [%2], #16 \n" // B
+ "ldr q3, [%3], #16 \n" // A
+ "ushl v2.8h, v2.8h, v31.8h \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "ushl v1.8h, v1.8h, v31.8h \n"
+ "prfm pldl1keep, [%1, 448] \n"
+ "ushl v0.8h, v0.8h, v31.8h \n"
+ "prfm pldl1keep, [%2, 448] \n"
+ "ushl v3.8h, v3.8h, v31.8h \n"
+ "prfm pldl1keep, [%3, 448] \n"
+ "uqxtn v2.8b, v2.8h \n"
+ "uqxtn v1.8b, v1.8h \n"
+ "uqxtn v0.8b, v0.8h \n"
+ "uqxtn v3.8b, v3.8h \n"
+ "subs %w5, %w5, #8 \n"
+ "st4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%4], #32 \n"
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(src_a), // %3
+ "+r"(dst_argb), // %4
+ "+r"(width) // %5
+ : "r"(shift) // %6
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v31");
+}
+
+void MergeXRGB16To8Row_NEON(const uint16_t* src_r,
+ const uint16_t* src_g,
+ const uint16_t* src_b,
+ uint8_t* dst_argb,
+ int depth,
+ int width) {
+ int shift = 8 - depth;
+ asm volatile(
+
+ "dup v31.8h, %w5 \n"
+ "movi v3.8b, #0xff \n" // A (0xff)
+ "1: \n"
+ "ldr q2, [%0], #16 \n" // R
+ "ldr q1, [%1], #16 \n" // G
+ "ldr q0, [%2], #16 \n" // B
+ "ushl v2.8h, v2.8h, v31.8h \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "ushl v1.8h, v1.8h, v31.8h \n"
+ "prfm pldl1keep, [%1, 448] \n"
+ "ushl v0.8h, v0.8h, v31.8h \n"
+ "prfm pldl1keep, [%2, 448] \n"
+ "uqxtn v2.8b, v2.8h \n"
+ "uqxtn v1.8b, v1.8h \n"
+ "uqxtn v0.8b, v0.8h \n"
+ "subs %w4, %w4, #8 \n"
+ "st4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%3], #32 \n"
+ "b.gt 1b \n"
+ : "+r"(src_r), // %0
+ "+r"(src_g), // %1
+ "+r"(src_b), // %2
+ "+r"(dst_argb), // %3
+ "+r"(width) // %4
+ : "r"(shift) // %5
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v31");
+}
+
// Copy multiple of 32.
void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width) {
asm volatile(
@@ -925,10 +1196,10 @@ void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width) {
"movi v5.8b, #255 \n" // Alpha
"1: \n"
"ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // read r g b
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "orr v3.8b, v1.8b, v1.8b \n" // move g
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
- "orr v3.8b, v1.8b, v1.8b \n" // move g
- "orr v4.8b, v0.8b, v0.8b \n" // move r
+ "orr v4.8b, v0.8b, v0.8b \n" // move r
"st4 {v2.8b,v3.8b,v4.8b,v5.8b}, [%1], #32 \n" // store b g r a
"b.gt 1b \n"
: "+r"(src_raw), // %0
@@ -944,10 +1215,10 @@ void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width) {
"movi v0.8b, #255 \n" // Alpha
"1: \n"
"ld3 {v3.8b,v4.8b,v5.8b}, [%0], #24 \n" // read r g b
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "orr v2.8b, v4.8b, v4.8b \n" // move g
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
- "orr v2.8b, v4.8b, v4.8b \n" // move g
- "orr v1.8b, v5.8b, v5.8b \n" // move r
+ "orr v1.8b, v5.8b, v5.8b \n" // move r
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store a b g r
"b.gt 1b \n"
: "+r"(src_raw), // %0
@@ -962,9 +1233,9 @@ void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width) {
asm volatile(
"1: \n"
"ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // read r g b
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"orr v3.8b, v1.8b, v1.8b \n" // move g
+ "prfm pldl1keep, [%0, 448] \n"
"orr v4.8b, v0.8b, v0.8b \n" // move r
"st3 {v2.8b,v3.8b,v4.8b}, [%1], #24 \n" // store b g r
"b.gt 1b \n"
@@ -996,9 +1267,8 @@ void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565,
"movi v3.8b, #255 \n" // Alpha
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 RGB565 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
- RGB565TOARGB
+ "prfm pldl1keep, [%0, 448] \n" RGB565TOARGB
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 ARGB
"b.gt 1b \n"
: "+r"(src_rgb565), // %0
@@ -1086,9 +1356,8 @@ void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444,
asm volatile(
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
- ARGB4444TOARGB
+ "prfm pldl1keep, [%0, 448] \n" ARGB4444TOARGB
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 ARGB
"b.gt 1b \n"
: "+r"(src_argb4444), // %0
@@ -1105,8 +1374,8 @@ void ARGBToRGB24Row_NEON(const uint8_t* src_argb,
asm volatile(
"1: \n"
"ld4 {v1.8b,v2.8b,v3.8b,v4.8b}, [%0], #32 \n" // load 8 ARGB
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
"st3 {v1.8b,v2.8b,v3.8b}, [%1], #24 \n" // store 8 pixels of
// RGB24
"b.gt 1b \n"
@@ -1122,9 +1391,9 @@ void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width) {
asm volatile(
"1: \n"
"ld4 {v1.8b,v2.8b,v3.8b,v4.8b}, [%0], #32 \n" // load b g r a
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "orr v4.8b, v2.8b, v2.8b \n" // mov g
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
- "orr v4.8b, v2.8b, v2.8b \n" // mov g
"orr v5.8b, v1.8b, v1.8b \n" // mov b
"st3 {v3.8b,v4.8b,v5.8b}, [%1], #24 \n" // store r g b
"b.gt 1b \n"
@@ -1140,8 +1409,8 @@ void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width) {
asm volatile(
"1: \n"
"ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels of YUY2.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #16 \n" // 16 processed per loop.
+ "prfm pldl1keep, [%0, 448] \n"
"st1 {v0.16b}, [%1], #16 \n" // store 16 pixels of Y.
"b.gt 1b \n"
: "+r"(src_yuy2), // %0
@@ -1156,8 +1425,8 @@ void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width) {
asm volatile(
"1: \n"
"ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels of UYVY.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #16 \n" // 16 processed per loop.
+ "prfm pldl1keep, [%0, 448] \n"
"st1 {v1.16b}, [%1], #16 \n" // store 16 pixels of Y.
"b.gt 1b \n"
: "+r"(src_uyvy), // %0
@@ -1175,8 +1444,8 @@ void YUY2ToUV422Row_NEON(const uint8_t* src_yuy2,
asm volatile(
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 YUY2
- "prfm pldl1keep, [%0, 448] \n"
"subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs.
+ "prfm pldl1keep, [%0, 448] \n"
"st1 {v1.8b}, [%1], #8 \n" // store 8 U.
"st1 {v3.8b}, [%2], #8 \n" // store 8 V.
"b.gt 1b \n"
@@ -1196,8 +1465,8 @@ void UYVYToUV422Row_NEON(const uint8_t* src_uyvy,
asm volatile(
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 UYVY
- "prfm pldl1keep, [%0, 448] \n"
"subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs.
+ "prfm pldl1keep, [%0, 448] \n"
"st1 {v0.8b}, [%1], #8 \n" // store 8 U.
"st1 {v2.8b}, [%2], #8 \n" // store 8 V.
"b.gt 1b \n"
@@ -1219,10 +1488,10 @@ void YUY2ToUVRow_NEON(const uint8_t* src_yuy2,
asm volatile(
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 pixels
- "prfm pldl1keep, [%0, 448] \n"
"subs %w4, %w4, #16 \n" // 16 pixels = 8 UVs.
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load next row
"urhadd v1.8b, v1.8b, v5.8b \n" // average rows of U
+ "prfm pldl1keep, [%0, 448] \n"
"urhadd v3.8b, v3.8b, v7.8b \n" // average rows of V
"st1 {v1.8b}, [%2], #8 \n" // store 8 U.
"st1 {v3.8b}, [%3], #8 \n" // store 8 V.
@@ -1247,10 +1516,10 @@ void UYVYToUVRow_NEON(const uint8_t* src_uyvy,
asm volatile(
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 pixels
- "prfm pldl1keep, [%0, 448] \n"
"subs %w4, %w4, #16 \n" // 16 pixels = 8 UVs.
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load next row
"urhadd v0.8b, v0.8b, v4.8b \n" // average rows of U
+ "prfm pldl1keep, [%0, 448] \n"
"urhadd v2.8b, v2.8b, v6.8b \n" // average rows of V
"st1 {v0.8b}, [%2], #8 \n" // store 8 U.
"st1 {v2.8b}, [%3], #8 \n" // store 8 V.
@@ -1275,8 +1544,8 @@ void ARGBShuffleRow_NEON(const uint8_t* src_argb,
"ld1 {v2.16b}, [%3] \n" // shuffler
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 4 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #4 \n" // 4 processed per loop
+ "prfm pldl1keep, [%0, 448] \n"
"tbl v1.16b, {v0.16b}, v2.16b \n" // look up 4 pixels
"st1 {v1.16b}, [%1], #16 \n" // store 4.
"b.gt 1b \n"
@@ -1296,11 +1565,11 @@ void I422ToYUY2Row_NEON(const uint8_t* src_y,
asm volatile(
"1: \n"
"ld2 {v0.8b, v1.8b}, [%0], #16 \n" // load 16 Ys
- "prfm pldl1keep, [%0, 448] \n"
+ "subs %w4, %w4, #16 \n" // 16 pixels
"orr v2.8b, v1.8b, v1.8b \n"
+ "prfm pldl1keep, [%0, 448] \n"
"ld1 {v1.8b}, [%1], #8 \n" // load 8 Us
"ld1 {v3.8b}, [%2], #8 \n" // load 8 Vs
- "subs %w4, %w4, #16 \n" // 16 pixels
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%3], #32 \n" // Store 16 pixels.
"b.gt 1b \n"
: "+r"(src_y), // %0
@@ -1320,8 +1589,8 @@ void I422ToUYVYRow_NEON(const uint8_t* src_y,
asm volatile(
"1: \n"
"ld2 {v1.8b,v2.8b}, [%0], #16 \n" // load 16 Ys
- "prfm pldl1keep, [%0, 448] \n"
"orr v3.8b, v2.8b, v2.8b \n"
+ "prfm pldl1keep, [%0, 448] \n"
"ld1 {v0.8b}, [%1], #8 \n" // load 8 Us
"ld1 {v2.8b}, [%2], #8 \n" // load 8 Vs
"subs %w4, %w4, #16 \n" // 16 pixels
@@ -1341,18 +1610,17 @@ void ARGBToRGB565Row_NEON(const uint8_t* src_argb,
int width) {
asm volatile(
"1: \n"
- "ld4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%0], #32 \n" // load 8
+ "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8
// pixels
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
- ARGBTORGB565
- "st1 {v0.16b}, [%1], #16 \n" // store 8 pixels RGB565.
+ "prfm pldl1keep, [%0, 448] \n" ARGBTORGB565
+ "st1 {v18.16b}, [%1], #16 \n" // store 8 pixels RGB565.
"b.gt 1b \n"
: "+r"(src_argb), // %0
"+r"(dst_rgb565), // %1
"+r"(width) // %2
:
- : "cc", "memory", "v0", "v20", "v21", "v22", "v23");
+ : "cc", "memory", "v16", "v17", "v18", "v19");
}
void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb,
@@ -1362,20 +1630,20 @@ void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb,
asm volatile(
"dup v1.4s, %w2 \n" // dither4
"1: \n"
- "ld4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%1], #32 \n" // load 8
+ "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%1], #32 \n" // load 8
// pixels
- "prfm pldl1keep, [%0, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
- "uqadd v20.8b, v20.8b, v1.8b \n"
- "uqadd v21.8b, v21.8b, v1.8b \n"
- "uqadd v22.8b, v22.8b, v1.8b \n" ARGBTORGB565
- "st1 {v0.16b}, [%0], #16 \n" // store 8 pixels RGB565.
+ "uqadd v16.8b, v16.8b, v1.8b \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "uqadd v17.8b, v17.8b, v1.8b \n"
+ "uqadd v18.8b, v18.8b, v1.8b \n" ARGBTORGB565
+ "st1 {v18.16b}, [%0], #16 \n" // store 8 pixels RGB565.
"b.gt 1b \n"
: "+r"(dst_rgb) // %0
: "r"(src_argb), // %1
"r"(dither4), // %2
"r"(width) // %3
- : "cc", "memory", "v0", "v1", "v20", "v21", "v22", "v23");
+ : "cc", "memory", "v1", "v16", "v17", "v18", "v19");
}
void ARGBToARGB1555Row_NEON(const uint8_t* src_argb,
@@ -1383,39 +1651,131 @@ void ARGBToARGB1555Row_NEON(const uint8_t* src_argb,
int width) {
asm volatile(
"1: \n"
- "ld4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%0], #32 \n" // load 8
+ "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8
// pixels
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
- ARGBTOARGB1555
+ "prfm pldl1keep, [%0, 448] \n" ARGBTOARGB1555
"st1 {v0.16b}, [%1], #16 \n" // store 8 pixels
"b.gt 1b \n"
: "+r"(src_argb), // %0
"+r"(dst_argb1555), // %1
"+r"(width) // %2
:
- : "cc", "memory", "v0", "v20", "v21", "v22", "v23");
+ : "cc", "memory", "v0", "v16", "v17", "v18", "v19");
}
void ARGBToARGB4444Row_NEON(const uint8_t* src_argb,
uint8_t* dst_argb4444,
int width) {
asm volatile(
- "movi v4.16b, #0x0f \n" // bits to clear with
+ "movi v23.16b, #0x0f \n" // bits to clear with
// vbic.
"1: \n"
- "ld4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%0], #32 \n" // load 8
+ "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8
// pixels
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
- ARGBTOARGB4444
+ "prfm pldl1keep, [%0, 448] \n" ARGBTOARGB4444
"st1 {v0.16b}, [%1], #16 \n" // store 8 pixels
"b.gt 1b \n"
: "+r"(src_argb), // %0
"+r"(dst_argb4444), // %1
"+r"(width) // %2
:
- : "cc", "memory", "v0", "v1", "v4", "v20", "v21", "v22", "v23");
+ : "cc", "memory", "v0", "v1", "v16", "v17", "v18", "v19", "v23");
+}
+
+static const uvec8 kShuffleARGBToABGR = {2, 1, 0, 3, 6, 5, 4, 7,
+ 10, 9, 8, 11, 14, 13, 12, 15};
+
+void ARGBToAR64Row_NEON(const uint8_t* src_argb,
+ uint16_t* dst_ar64,
+ int width) {
+ asm volatile(
+ "1: \n"
+ "ldp q0, q2, [%0], #32 \n" // load 8 pixels
+ "mov v1.16b, v0.16b \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "mov v3.16b, v2.16b \n"
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "st2 {v0.16b, v1.16b}, [%1], #32 \n" // store 4 pixels
+ "st2 {v2.16b, v3.16b}, [%1], #32 \n" // store 4 pixels
+ "b.gt 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ar64), // %1
+ "+r"(width) // %2
+ :
+ : "cc", "memory", "v0", "v1", "v2", "v3");
+}
+
+void ARGBToAB64Row_NEON(const uint8_t* src_argb,
+ uint16_t* dst_ab64,
+ int width) {
+ asm volatile(
+ "ld1 {v4.16b}, %3 \n" // shuffler
+ "1: \n"
+ "ldp q0, q2, [%0], #32 \n" // load 8 pixels
+ "tbl v0.16b, {v0.16b}, v4.16b \n"
+ "tbl v2.16b, {v2.16b}, v4.16b \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "mov v1.16b, v0.16b \n"
+ "mov v3.16b, v2.16b \n"
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "st2 {v0.16b, v1.16b}, [%1], #32 \n" // store 4 pixels
+ "st2 {v2.16b, v3.16b}, [%1], #32 \n" // store 4 pixels
+ "b.gt 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_ab64), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleARGBToABGR) // %3
+ : "cc", "memory", "v0", "v1", "v2", "v3", "v4");
+}
+
+static const uvec8 kShuffleAR64ToARGB = {1, 3, 5, 7, 9, 11, 13, 15,
+ 17, 19, 21, 23, 25, 27, 29, 31};
+
+void AR64ToARGBRow_NEON(const uint16_t* src_ar64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "ld1 {v4.16b}, %3 \n" // shuffler
+ "1: \n"
+ "ldp q0, q1, [%0], #32 \n" // load 4 pixels
+ "ldp q2, q3, [%0], #32 \n" // load 4 pixels
+ "tbl v0.16b, {v0.16b, v1.16b}, v4.16b \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "tbl v2.16b, {v2.16b, v3.16b}, v4.16b \n"
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "stp q0, q2, [%1], #32 \n" // store 8 pixels
+ "b.gt 1b \n"
+ : "+r"(src_ar64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleAR64ToARGB) // %3
+ : "cc", "memory", "v0", "v1", "v2", "v3", "v4");
+}
+
+static const uvec8 kShuffleAB64ToARGB = {5, 3, 1, 7, 13, 11, 9, 15,
+ 21, 19, 17, 23, 29, 27, 25, 31};
+
+void AB64ToARGBRow_NEON(const uint16_t* src_ab64,
+ uint8_t* dst_argb,
+ int width) {
+ asm volatile(
+ "ld1 {v4.16b}, %3 \n" // shuffler
+ "1: \n"
+ "ldp q0, q1, [%0], #32 \n" // load 4 pixels
+ "ldp q2, q3, [%0], #32 \n" // load 4 pixels
+ "tbl v0.16b, {v0.16b, v1.16b}, v4.16b \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "tbl v2.16b, {v2.16b, v3.16b}, v4.16b \n"
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "stp q0, q2, [%1], #32 \n" // store 8 pixels
+ "b.gt 1b \n"
+ : "+r"(src_ab64), // %0
+ "+r"(dst_argb), // %1
+ "+r"(width) // %2
+ : "m"(kShuffleAB64ToARGB) // %3
+ : "cc", "memory", "v0", "v1", "v2", "v3", "v4");
}
void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
@@ -1426,9 +1786,9 @@ void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
"movi v7.8b, #16 \n" // Add 16 constant
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v3.8h, v0.8b, v4.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v3.8h, v1.8b, v5.8b \n" // G
"umlal v3.8h, v2.8b, v6.8b \n" // R
"uqrshrn v0.8b, v3.8h, #8 \n" // 16 bit to 8 bit Y
@@ -1467,9 +1827,9 @@ void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
"movi v6.8b, #77 \n" // R * 0.2990 coefficient
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v3.8h, v0.8b, v4.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v3.8h, v1.8b, v5.8b \n" // G
"umlal v3.8h, v2.8b, v6.8b \n" // R
"uqrshrn v0.8b, v3.8h, #8 \n" // 16 bit to 8 bit Y
@@ -1482,22 +1842,22 @@ void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
: "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6");
}
-void RGBAToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) {
+void RGBAToYJRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width) {
asm volatile(
"movi v4.8b, #29 \n" // B * 0.1140 coefficient
"movi v5.8b, #150 \n" // G * 0.5870 coefficient
"movi v6.8b, #77 \n" // R * 0.2990 coefficient
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 RGBA
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v0.8h, v1.8b, v4.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v0.8h, v2.8b, v5.8b \n" // G
"umlal v0.8h, v3.8b, v6.8b \n" // R
"uqrshrn v3.8b, v0.8h, #8 \n" // 16 bit to 8 bit Y
"st1 {v3.8b}, [%1], #8 \n" // store 8 pixels Y.
"b.gt 1b \n"
- : "+r"(src_argb), // %0
+ : "+r"(src_rgba), // %0
"+r"(dst_y), // %1
"+r"(width) // %2
:
@@ -1519,9 +1879,9 @@ void ARGBToUV444Row_NEON(const uint8_t* src_argb,
"movi v29.16b,#0x80 \n" // 128.5
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
"umull v4.8h, v0.8b, v24.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlsl v4.8h, v1.8b, v25.8b \n" // G
"umlsl v4.8h, v2.8b, v26.8b \n" // R
"add v4.8h, v4.8h, v29.8h \n" // +128 -> unsigned
@@ -1582,14 +1942,14 @@ void ARGBToUVRow_NEON(const uint8_t* src_argb,
RGBTOUV_SETUP_REG
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v0.8h, v0.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v1.8h, v1.16b \n" // G 16 bytes -> 8 shorts.
"uaddlp v2.8h, v2.16b \n" // R 16 bytes -> 8 shorts.
"ld4 {v4.16b,v5.16b,v6.16b,v7.16b}, [%1], #64 \n" // load next 16
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v0.8h, v4.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v1.8h, v5.16b \n" // G 16 bytes -> 8 shorts.
"uadalp v2.8h, v6.16b \n" // R 16 bytes -> 8 shorts.
@@ -1628,13 +1988,13 @@ void ARGBToUVJRow_NEON(const uint8_t* src_argb,
"movi v25.16b, #0x80 \n" // 128.5 (0x8080 in 16-bit)
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v0.8h, v0.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v1.8h, v1.16b \n" // G 16 bytes -> 8 shorts.
"uaddlp v2.8h, v2.16b \n" // R 16 bytes -> 8 shorts.
"ld4 {v4.16b,v5.16b,v6.16b,v7.16b}, [%1], #64 \n" // load next 16
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v0.8h, v4.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v1.8h, v5.16b \n" // G 16 bytes -> 8 shorts.
"uadalp v2.8h, v6.16b \n" // R 16 bytes -> 8 shorts.
@@ -1668,13 +2028,13 @@ void BGRAToUVRow_NEON(const uint8_t* src_bgra,
RGBTOUV_SETUP_REG
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v0.8h, v3.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v3.8h, v2.16b \n" // G 16 bytes -> 8 shorts.
"uaddlp v2.8h, v1.16b \n" // R 16 bytes -> 8 shorts.
"ld4 {v4.16b,v5.16b,v6.16b,v7.16b}, [%1], #64 \n" // load 16 more
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v0.8h, v7.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v3.8h, v6.16b \n" // G 16 bytes -> 8 shorts.
"uadalp v2.8h, v5.16b \n" // R 16 bytes -> 8 shorts.
@@ -1708,13 +2068,13 @@ void ABGRToUVRow_NEON(const uint8_t* src_abgr,
RGBTOUV_SETUP_REG
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v3.8h, v2.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v2.8h, v1.16b \n" // G 16 bytes -> 8 shorts.
"uaddlp v1.8h, v0.16b \n" // R 16 bytes -> 8 shorts.
"ld4 {v4.16b,v5.16b,v6.16b,v7.16b}, [%1], #64 \n" // load 16 more.
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v3.8h, v6.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v2.8h, v5.16b \n" // G 16 bytes -> 8 shorts.
"uadalp v1.8h, v4.16b \n" // R 16 bytes -> 8 shorts.
@@ -1748,13 +2108,13 @@ void RGBAToUVRow_NEON(const uint8_t* src_rgba,
RGBTOUV_SETUP_REG
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v0.8h, v1.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v1.8h, v2.16b \n" // G 16 bytes -> 8 shorts.
"uaddlp v2.8h, v3.16b \n" // R 16 bytes -> 8 shorts.
"ld4 {v4.16b,v5.16b,v6.16b,v7.16b}, [%1], #64 \n" // load 16 more.
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v0.8h, v5.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v1.8h, v6.16b \n" // G 16 bytes -> 8 shorts.
"uadalp v2.8h, v7.16b \n" // R 16 bytes -> 8 shorts.
@@ -1788,13 +2148,13 @@ void RGB24ToUVRow_NEON(const uint8_t* src_rgb24,
RGBTOUV_SETUP_REG
"1: \n"
"ld3 {v0.16b,v1.16b,v2.16b}, [%0], #48 \n" // load 16 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v0.8h, v0.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v1.8h, v1.16b \n" // G 16 bytes -> 8 shorts.
"uaddlp v2.8h, v2.16b \n" // R 16 bytes -> 8 shorts.
"ld3 {v4.16b,v5.16b,v6.16b}, [%1], #48 \n" // load 16 more.
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v0.8h, v4.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v1.8h, v5.16b \n" // G 16 bytes -> 8 shorts.
"uadalp v2.8h, v6.16b \n" // R 16 bytes -> 8 shorts.
@@ -1828,13 +2188,13 @@ void RAWToUVRow_NEON(const uint8_t* src_raw,
RGBTOUV_SETUP_REG
"1: \n"
"ld3 {v0.16b,v1.16b,v2.16b}, [%0], #48 \n" // load 8 RAW pixels.
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v2.8h, v2.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v1.8h, v1.16b \n" // G 16 bytes -> 8 shorts.
"uaddlp v0.8h, v0.16b \n" // R 16 bytes -> 8 shorts.
"ld3 {v4.16b,v5.16b,v6.16b}, [%1], #48 \n" // load 8 more RAW pixels
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v2.8h, v6.16b \n" // B 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v1.8h, v5.16b \n" // G 16 bytes -> 8 shorts.
"uadalp v0.8h, v4.16b \n" // R 16 bytes -> 8 shorts.
@@ -1869,9 +2229,9 @@ void RGB565ToUVRow_NEON(const uint8_t* src_rgb565,
RGBTOUV_SETUP_REG
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 RGB565 pixels.
- "prfm pldl1keep, [%0, 448] \n"
RGB565TOARGB
"uaddlp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts.
"uaddlp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%0], #16 \n" // next 8 RGB565 pixels.
@@ -1881,9 +2241,9 @@ void RGB565ToUVRow_NEON(const uint8_t* src_rgb565,
"uaddlp v28.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%1], #16 \n" // load 8 RGB565 pixels.
- "prfm pldl1keep, [%1, 448] \n"
RGB565TOARGB
"uadalp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts.
"uadalp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%1], #16 \n" // next 8 RGB565 pixels.
@@ -1927,9 +2287,9 @@ void ARGB1555ToUVRow_NEON(const uint8_t* src_argb1555,
RGBTOUV_SETUP_REG
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels.
- "prfm pldl1keep, [%0, 448] \n"
RGB555TOARGB
"uaddlp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts.
"uaddlp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%0], #16 \n" // next 8 ARGB1555 pixels.
@@ -1939,9 +2299,9 @@ void ARGB1555ToUVRow_NEON(const uint8_t* src_argb1555,
"uaddlp v28.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%1], #16 \n" // load 8 ARGB1555 pixels.
- "prfm pldl1keep, [%1, 448] \n"
RGB555TOARGB
"uadalp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts.
"uadalp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%1], #16 \n" // next 8 ARGB1555 pixels.
@@ -1985,9 +2345,9 @@ void ARGB4444ToUVRow_NEON(const uint8_t* src_argb4444,
RGBTOUV_SETUP_REG // sets v20-v25
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels.
- "prfm pldl1keep, [%0, 448] \n"
ARGB4444TOARGB
"uaddlp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts.
"uaddlp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%0], #16 \n" // next 8 ARGB4444 pixels.
@@ -1997,9 +2357,9 @@ void ARGB4444ToUVRow_NEON(const uint8_t* src_argb4444,
"uaddlp v28.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%1], #16 \n" // load 8 ARGB4444 pixels.
- "prfm pldl1keep, [%1, 448] \n"
ARGB4444TOARGB
"uadalp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts.
"uadalp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts.
"ld1 {v0.16b}, [%1], #16 \n" // next 8 ARGB4444 pixels.
@@ -2042,10 +2402,10 @@ void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width) {
"movi v27.8b, #16 \n" // Add 16 constant
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 RGB565 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
RGB565TOARGB
"umull v3.8h, v0.8b, v24.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v3.8h, v1.8b, v25.8b \n" // G
"umlal v3.8h, v2.8b, v26.8b \n" // R
"uqrshrn v0.8b, v3.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2070,10 +2430,10 @@ void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555,
"movi v7.8b, #16 \n" // Add 16 constant
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
ARGB1555TOARGB
"umull v3.8h, v0.8b, v4.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v3.8h, v1.8b, v5.8b \n" // G
"umlal v3.8h, v2.8b, v6.8b \n" // R
"uqrshrn v0.8b, v3.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2097,10 +2457,10 @@ void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444,
"movi v27.8b, #16 \n" // Add 16 constant
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
ARGB4444TOARGB
"umull v3.8h, v0.8b, v24.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v3.8h, v1.8b, v25.8b \n" // G
"umlal v3.8h, v2.8b, v26.8b \n" // R
"uqrshrn v0.8b, v3.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2122,9 +2482,9 @@ void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width) {
"movi v7.8b, #16 \n" // Add 16 constant
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v16.8h, v1.8b, v4.8b \n" // R
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v16.8h, v2.8b, v5.8b \n" // G
"umlal v16.8h, v3.8b, v6.8b \n" // B
"uqrshrn v0.8b, v16.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2146,9 +2506,9 @@ void ABGRToYRow_NEON(const uint8_t* src_abgr, uint8_t* dst_y, int width) {
"movi v7.8b, #16 \n" // Add 16 constant
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v16.8h, v0.8b, v4.8b \n" // R
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v16.8h, v1.8b, v5.8b \n" // G
"umlal v16.8h, v2.8b, v6.8b \n" // B
"uqrshrn v0.8b, v16.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2170,9 +2530,9 @@ void RGBAToYRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width) {
"movi v7.8b, #16 \n" // Add 16 constant
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 pixels.
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v16.8h, v1.8b, v4.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v16.8h, v2.8b, v5.8b \n" // G
"umlal v16.8h, v3.8b, v6.8b \n" // R
"uqrshrn v0.8b, v16.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2194,9 +2554,9 @@ void RGB24ToYRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_y, int width) {
"movi v7.8b, #16 \n" // Add 16 constant
"1: \n"
"ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // load 8 pixels.
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "umull v16.8h, v0.8b, v4.8b \n" // B
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
- "umull v16.8h, v0.8b, v4.8b \n" // B
"umlal v16.8h, v1.8b, v5.8b \n" // G
"umlal v16.8h, v2.8b, v6.8b \n" // R
"uqrshrn v0.8b, v16.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2218,9 +2578,9 @@ void RAWToYRow_NEON(const uint8_t* src_raw, uint8_t* dst_y, int width) {
"movi v7.8b, #16 \n" // Add 16 constant
"1: \n"
"ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // load 8 pixels.
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "umull v16.8h, v0.8b, v4.8b \n" // B
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
- "umull v16.8h, v0.8b, v4.8b \n" // B
"umlal v16.8h, v1.8b, v5.8b \n" // G
"umlal v16.8h, v2.8b, v6.8b \n" // R
"uqrshrn v0.8b, v16.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2241,9 +2601,9 @@ void RGB24ToYJRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_yj, int width) {
"movi v6.8b, #77 \n" // R * 0.2990 coefficient
"1: \n"
"ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // load 8 pixels.
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "umull v0.8h, v0.8b, v4.8b \n" // B
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
- "umull v0.8h, v0.8b, v4.8b \n" // B
"umlal v0.8h, v1.8b, v5.8b \n" // G
"umlal v0.8h, v2.8b, v6.8b \n" // R
"uqrshrn v0.8b, v0.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2263,9 +2623,9 @@ void RAWToYJRow_NEON(const uint8_t* src_raw, uint8_t* dst_yj, int width) {
"movi v4.8b, #77 \n" // R * 0.2990 coefficient
"1: \n"
"ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // load 8 pixels.
+ "subs %w2, %w2, #8 \n" // 8 processed per loop.
+ "umull v0.8h, v0.8b, v4.8b \n" // B
"prfm pldl1keep, [%0, 448] \n"
- "subs %w2, %w2, #8 \n" // 8 processed per loop.
- "umull v0.8h, v0.8b, v4.8b \n" // B
"umlal v0.8h, v1.8b, v5.8b \n" // G
"umlal v0.8h, v2.8b, v6.8b \n" // R
"uqrshrn v0.8b, v0.8h, #8 \n" // 16 bit to 8 bit Y
@@ -2299,11 +2659,11 @@ void InterpolateRow_NEON(uint8_t* dst_ptr,
"1: \n"
"ld1 {v0.16b}, [%1], #16 \n"
"ld1 {v1.16b}, [%2], #16 \n"
- "prfm pldl1keep, [%1, 448] \n"
- "prfm pldl1keep, [%2, 448] \n"
"subs %w3, %w3, #16 \n"
"umull v2.8h, v0.8b, v4.8b \n"
+ "prfm pldl1keep, [%1, 448] \n"
"umull2 v3.8h, v0.16b, v4.16b \n"
+ "prfm pldl1keep, [%2, 448] \n"
"umlal v2.8h, v1.8b, v5.8b \n"
"umlal2 v3.8h, v1.16b, v5.16b \n"
"rshrn v0.8b, v2.8h, #8 \n"
@@ -2316,10 +2676,10 @@ void InterpolateRow_NEON(uint8_t* dst_ptr,
"50: \n"
"ld1 {v0.16b}, [%1], #16 \n"
"ld1 {v1.16b}, [%2], #16 \n"
- "prfm pldl1keep, [%1, 448] \n"
- "prfm pldl1keep, [%2, 448] \n"
"subs %w3, %w3, #16 \n"
+ "prfm pldl1keep, [%1, 448] \n"
"urhadd v0.16b, v0.16b, v1.16b \n"
+ "prfm pldl1keep, [%2, 448] \n"
"st1 {v0.16b}, [%0], #16 \n"
"b.gt 50b \n"
"b 99f \n"
@@ -2327,8 +2687,8 @@ void InterpolateRow_NEON(uint8_t* dst_ptr,
// Blend 100 / 0 - Copy row unchanged.
"100: \n"
"ld1 {v0.16b}, [%1], #16 \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #16 \n"
+ "prfm pldl1keep, [%1, 448] \n"
"st1 {v0.16b}, [%0], #16 \n"
"b.gt 100b \n"
@@ -2344,7 +2704,7 @@ void InterpolateRow_NEON(uint8_t* dst_ptr,
}
// dr * (256 - sa) / 256 + sr = dr - dr * sa / 256 + sr
-void ARGBBlendRow_NEON(const uint8_t* src_argb0,
+void ARGBBlendRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2355,11 +2715,11 @@ void ARGBBlendRow_NEON(const uint8_t* src_argb0,
"8: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB0
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 ARGB1
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
"umull v16.8h, v4.8b, v3.8b \n" // db * a
+ "prfm pldl1keep, [%0, 448] \n"
"umull v17.8h, v5.8b, v3.8b \n" // dg * a
+ "prfm pldl1keep, [%1, 448] \n"
"umull v18.8h, v6.8b, v3.8b \n" // dr * a
"uqrshrn v16.8b, v16.8h, #8 \n" // db >>= 8
"uqrshrn v17.8b, v17.8h, #8 \n" // dg >>= 8
@@ -2385,11 +2745,11 @@ void ARGBBlendRow_NEON(const uint8_t* src_argb0,
// ARGB0.
"ld4 {v4.b,v5.b,v6.b,v7.b}[0], [%1], #4 \n" // load 1 pixel
// ARGB1.
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #1 \n" // 1 processed per loop.
"umull v16.8h, v4.8b, v3.8b \n" // db * a
+ "prfm pldl1keep, [%0, 448] \n"
"umull v17.8h, v5.8b, v3.8b \n" // dg * a
+ "prfm pldl1keep, [%1, 448] \n"
"umull v18.8h, v6.8b, v3.8b \n" // dr * a
"uqrshrn v16.8b, v16.8h, #8 \n" // db >>= 8
"uqrshrn v17.8b, v17.8h, #8 \n" // dg >>= 8
@@ -2406,7 +2766,7 @@ void ARGBBlendRow_NEON(const uint8_t* src_argb0,
"99: \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -2423,14 +2783,14 @@ void ARGBAttenuateRow_NEON(const uint8_t* src_argb,
// Attenuate 8 pixels.
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v4.8h, v0.8b, v3.8b \n" // b * a
- "umull v5.8h, v1.8b, v3.8b \n" // g * a
- "umull v6.8h, v2.8b, v3.8b \n" // r * a
- "uqrshrn v0.8b, v4.8h, #8 \n" // b >>= 8
- "uqrshrn v1.8b, v5.8h, #8 \n" // g >>= 8
- "uqrshrn v2.8b, v6.8h, #8 \n" // r >>= 8
+ "prfm pldl1keep, [%0, 448] \n"
+ "umull v5.8h, v1.8b, v3.8b \n" // g * a
+ "umull v6.8h, v2.8b, v3.8b \n" // r * a
+ "uqrshrn v0.8b, v4.8h, #8 \n" // b >>= 8
+ "uqrshrn v1.8b, v5.8h, #8 \n" // g >>= 8
+ "uqrshrn v2.8b, v6.8h, #8 \n" // r >>= 8
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 ARGB
"b.gt 1b \n"
: "+r"(src_argb), // %0
@@ -2456,9 +2816,9 @@ void ARGBQuantizeRow_NEON(uint8_t* dst_argb,
// 8 pixel loop.
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0] \n" // load 8 ARGB.
+ "subs %w1, %w1, #8 \n" // 8 processed per loop.
+ "uxtl v0.8h, v0.8b \n" // b (0 .. 255)
"prfm pldl1keep, [%0, 448] \n"
- "subs %w1, %w1, #8 \n" // 8 processed per loop.
- "uxtl v0.8h, v0.8b \n" // b (0 .. 255)
"uxtl v1.8h, v1.8b \n"
"uxtl v2.8h, v2.8b \n"
"sqdmulh v0.8h, v0.8h, v4.8h \n" // b * scale
@@ -2498,9 +2858,9 @@ void ARGBShadeRow_NEON(const uint8_t* src_argb,
// 8 pixel loop.
"1: \n"
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%0], #32 \n" // load 8 ARGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"uxtl v4.8h, v4.8b \n" // b (0 .. 255)
+ "prfm pldl1keep, [%0, 448] \n"
"uxtl v5.8h, v5.8b \n"
"uxtl v6.8h, v6.8b \n"
"uxtl v7.8h, v7.8b \n"
@@ -2531,9 +2891,9 @@ void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) {
"movi v26.8b, #77 \n" // R * 0.2990 coefficient
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"umull v4.8h, v0.8b, v24.8b \n" // B
+ "prfm pldl1keep, [%0, 448] \n"
"umlal v4.8h, v1.8b, v25.8b \n" // G
"umlal v4.8h, v2.8b, v26.8b \n" // R
"uqrshrn v0.8b, v4.8h, #8 \n" // 16 bit to 8 bit B
@@ -2566,9 +2926,9 @@ void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width) {
"movi v30.8b, #50 \n" // BR coefficient
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0] \n" // load 8 ARGB pixels.
+ "subs %w1, %w1, #8 \n" // 8 processed per loop.
+ "umull v4.8h, v0.8b, v20.8b \n" // B to Sepia B
"prfm pldl1keep, [%0, 448] \n"
- "subs %w1, %w1, #8 \n" // 8 processed per loop.
- "umull v4.8h, v0.8b, v20.8b \n" // B to Sepia B
"umlal v4.8h, v1.8b, v21.8b \n" // G
"umlal v4.8h, v2.8b, v22.8b \n" // R
"umull v5.8h, v0.8b, v24.8b \n" // B to Sepia G
@@ -2603,9 +2963,9 @@ void ARGBColorMatrixRow_NEON(const uint8_t* src_argb,
"1: \n"
"ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 ARGB
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop.
"uxtl v16.8h, v16.8b \n" // b (0 .. 255) 16 bit
+ "prfm pldl1keep, [%0, 448] \n"
"uxtl v17.8h, v17.8b \n" // g
"uxtl v18.8h, v18.8b \n" // r
"uxtl v19.8h, v19.8b \n" // a
@@ -2653,7 +3013,7 @@ void ARGBColorMatrixRow_NEON(const uint8_t* src_argb,
// TODO(fbarchard): fix vqshrun in ARGBMultiplyRow_NEON and reenable.
// Multiply 2 rows of ARGB pixels together, 8 pixels at a time.
-void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
+void ARGBMultiplyRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2662,11 +3022,11 @@ void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
"umull v0.8h, v0.8b, v4.8b \n" // multiply B
+ "prfm pldl1keep, [%0, 448] \n"
"umull v1.8h, v1.8b, v5.8b \n" // multiply G
+ "prfm pldl1keep, [%1, 448] \n"
"umull v2.8h, v2.8b, v6.8b \n" // multiply R
"umull v3.8h, v3.8b, v7.8b \n" // multiply A
"rshrn v0.8b, v0.8h, #8 \n" // 16 bit to 8 bit B
@@ -2675,7 +3035,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
"rshrn v3.8b, v3.8h, #8 \n" // 16 bit to 8 bit A
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB
"b.gt 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -2684,7 +3044,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
}
// Add 2 rows of ARGB pixels together, 8 pixels at a time.
-void ARGBAddRow_NEON(const uint8_t* src_argb0,
+void ARGBAddRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2693,16 +3053,16 @@ void ARGBAddRow_NEON(const uint8_t* src_argb0,
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
"uqadd v0.8b, v0.8b, v4.8b \n"
+ "prfm pldl1keep, [%0, 448] \n"
"uqadd v1.8b, v1.8b, v5.8b \n"
+ "prfm pldl1keep, [%1, 448] \n"
"uqadd v2.8b, v2.8b, v6.8b \n"
"uqadd v3.8b, v3.8b, v7.8b \n"
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB
"b.gt 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -2711,7 +3071,7 @@ void ARGBAddRow_NEON(const uint8_t* src_argb0,
}
// Subtract 2 rows of ARGB pixels, 8 pixels at a time.
-void ARGBSubtractRow_NEON(const uint8_t* src_argb0,
+void ARGBSubtractRow_NEON(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
@@ -2720,16 +3080,16 @@ void ARGBSubtractRow_NEON(const uint8_t* src_argb0,
"1: \n"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
"uqsub v0.8b, v0.8b, v4.8b \n"
+ "prfm pldl1keep, [%0, 448] \n"
"uqsub v1.8b, v1.8b, v5.8b \n"
+ "prfm pldl1keep, [%1, 448] \n"
"uqsub v2.8b, v2.8b, v6.8b \n"
"uqsub v3.8b, v3.8b, v7.8b \n"
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB
"b.gt 1b \n"
- : "+r"(src_argb0), // %0
+ : "+r"(src_argb), // %0
"+r"(src_argb1), // %1
"+r"(dst_argb), // %2
"+r"(width) // %3
@@ -2752,11 +3112,11 @@ void SobelRow_NEON(const uint8_t* src_sobelx,
"1: \n"
"ld1 {v0.8b}, [%0], #8 \n" // load 8 sobelx.
"ld1 {v1.8b}, [%1], #8 \n" // load 8 sobely.
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
"uqadd v0.8b, v0.8b, v1.8b \n" // add
+ "prfm pldl1keep, [%0, 448] \n"
"orr v1.8b, v0.8b, v0.8b \n"
+ "prfm pldl1keep, [%1, 448] \n"
"orr v2.8b, v0.8b, v0.8b \n"
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB
"b.gt 1b \n"
@@ -2778,10 +3138,10 @@ void SobelToPlaneRow_NEON(const uint8_t* src_sobelx,
"1: \n"
"ld1 {v0.16b}, [%0], #16 \n" // load 16 sobelx.
"ld1 {v1.16b}, [%1], #16 \n" // load 16 sobely.
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #16 \n" // 16 processed per loop.
+ "prfm pldl1keep, [%0, 448] \n"
"uqadd v0.16b, v0.16b, v1.16b \n" // add
+ "prfm pldl1keep, [%1, 448] \n"
"st1 {v0.16b}, [%2], #16 \n" // store 16 pixels.
"b.gt 1b \n"
: "+r"(src_sobelx), // %0
@@ -2807,10 +3167,10 @@ void SobelXYRow_NEON(const uint8_t* src_sobelx,
"1: \n"
"ld1 {v2.8b}, [%0], #8 \n" // load 8 sobelx.
"ld1 {v0.8b}, [%1], #8 \n" // load 8 sobely.
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #8 \n" // 8 processed per loop.
+ "prfm pldl1keep, [%0, 448] \n"
"uqadd v1.8b, v0.8b, v2.8b \n" // add
+ "prfm pldl1keep, [%1, 448] \n"
"st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB
"b.gt 1b \n"
: "+r"(src_sobelx), // %0
@@ -2834,18 +3194,18 @@ void SobelXRow_NEON(const uint8_t* src_y0,
"1: \n"
"ld1 {v0.8b}, [%0],%5 \n" // top
"ld1 {v1.8b}, [%0],%6 \n"
- "prfm pldl1keep, [%0, 448] \n"
"usubl v0.8h, v0.8b, v1.8b \n"
+ "prfm pldl1keep, [%0, 448] \n"
"ld1 {v2.8b}, [%1],%5 \n" // center * 2
"ld1 {v3.8b}, [%1],%6 \n"
- "prfm pldl1keep, [%1, 448] \n"
"usubl v1.8h, v2.8b, v3.8b \n"
+ "prfm pldl1keep, [%1, 448] \n"
"add v0.8h, v0.8h, v1.8h \n"
"add v0.8h, v0.8h, v1.8h \n"
"ld1 {v2.8b}, [%2],%5 \n" // bottom
"ld1 {v3.8b}, [%2],%6 \n"
- "prfm pldl1keep, [%2, 448] \n"
"subs %w4, %w4, #8 \n" // 8 pixels
+ "prfm pldl1keep, [%2, 448] \n"
"usubl v1.8h, v2.8b, v3.8b \n"
"add v0.8h, v0.8h, v1.8h \n"
"abs v0.8h, v0.8h \n"
@@ -2883,11 +3243,11 @@ void SobelYRow_NEON(const uint8_t* src_y0,
"add v0.8h, v0.8h, v1.8h \n"
"ld1 {v2.8b}, [%0],%5 \n" // right
"ld1 {v3.8b}, [%1],%5 \n"
- "prfm pldl1keep, [%0, 448] \n"
- "prfm pldl1keep, [%1, 448] \n"
"subs %w3, %w3, #8 \n" // 8 pixels
"usubl v1.8h, v2.8b, v3.8b \n"
+ "prfm pldl1keep, [%0, 448] \n"
"add v0.8h, v0.8h, v1.8h \n"
+ "prfm pldl1keep, [%1, 448] \n"
"abs v0.8h, v0.8h \n"
"uqxtn v0.8b, v0.8h \n"
"st1 {v0.8b}, [%2], #8 \n" // store 8 sobely
@@ -2910,9 +3270,9 @@ void HalfFloat1Row_NEON(const uint16_t* src,
asm volatile(
"1: \n"
"ld1 {v1.16b}, [%0], #16 \n" // load 8 shorts
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 pixels per loop
"uxtl v2.4s, v1.4h \n" // 8 int's
+ "prfm pldl1keep, [%0, 448] \n"
"uxtl2 v3.4s, v1.8h \n"
"scvtf v2.4s, v2.4s \n" // 8 floats
"scvtf v3.4s, v3.4s \n"
@@ -2934,9 +3294,9 @@ void HalfFloatRow_NEON(const uint16_t* src,
asm volatile(
"1: \n"
"ld1 {v1.16b}, [%0], #16 \n" // load 8 shorts
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 pixels per loop
"uxtl v2.4s, v1.4h \n" // 8 int's
+ "prfm pldl1keep, [%0, 448] \n"
"uxtl2 v3.4s, v1.8h \n"
"scvtf v2.4s, v2.4s \n" // 8 floats
"scvtf v3.4s, v3.4s \n"
@@ -2960,9 +3320,9 @@ void ByteToFloatRow_NEON(const uint8_t* src,
asm volatile(
"1: \n"
"ld1 {v1.8b}, [%0], #8 \n" // load 8 bytes
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 pixels per loop
"uxtl v1.8h, v1.8b \n" // 8 shorts
+ "prfm pldl1keep, [%0, 448] \n"
"uxtl v2.4s, v1.4h \n" // 8 ints
"uxtl2 v3.4s, v1.8h \n"
"scvtf v2.4s, v2.4s \n" // 8 floats
@@ -2989,9 +3349,9 @@ float ScaleMaxSamples_NEON(const float* src,
"1: \n"
"ld1 {v1.4s, v2.4s}, [%0], #32 \n" // load 8 samples
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop
"fmul v3.4s, v1.4s, %4.s[0] \n" // scale
+ "prfm pldl1keep, [%0, 448] \n"
"fmul v4.4s, v2.4s, %4.s[0] \n" // scale
"fmax v5.4s, v5.4s, v1.4s \n" // max
"fmax v6.4s, v6.4s, v2.4s \n"
@@ -3019,9 +3379,9 @@ float ScaleSumSamples_NEON(const float* src,
"1: \n"
"ld1 {v1.4s, v2.4s}, [%0], #32 \n" // load 8 samples
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #8 \n" // 8 processed per loop
"fmul v3.4s, v1.4s, %4.s[0] \n" // scale
+ "prfm pldl1keep, [%0, 448] \n"
"fmul v4.4s, v2.4s, %4.s[0] \n"
"fmla v5.4s, v1.4s, v1.4s \n" // sum of squares
"fmla v6.4s, v2.4s, v2.4s \n"
@@ -3229,10 +3589,10 @@ void NV21ToYUV24Row_NEON(const uint8_t* src_y,
"1: \n"
"ld1 {v2.16b}, [%0], #16 \n" // load 16 Y values
"ld2 {v0.8b, v1.8b}, [%1], #16 \n" // load 8 VU values
+ "zip1 v0.16b, v0.16b, v0.16b \n" // replicate V values
"prfm pldl1keep, [%0, 448] \n"
+ "zip1 v1.16b, v1.16b, v1.16b \n" // replicate U values
"prfm pldl1keep, [%1, 448] \n"
- "zip1 v0.16b, v0.16b, v0.16b \n" // replicate V values
- "zip1 v1.16b, v1.16b, v1.16b \n" // replicate U values
"subs %w3, %w3, #16 \n" // 16 pixels per loop
"st3 {v0.16b,v1.16b,v2.16b}, [%2], #48 \n" // store 16 YUV pixels
"b.gt 1b \n"
@@ -3244,6 +3604,7 @@ void NV21ToYUV24Row_NEON(const uint8_t* src_y,
: "cc", "memory", "v0", "v1", "v2");
}
+// AYUV is YVUA in memory. UV for NV12 is UV order in memory.
void AYUVToUVRow_NEON(const uint8_t* src_ayuv,
int src_stride_ayuv,
uint8_t* dst_uv,
@@ -3253,12 +3614,12 @@ void AYUVToUVRow_NEON(const uint8_t* src_ayuv,
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ayuv
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v0.8h, v0.16b \n" // V 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v1.8h, v1.16b \n" // U 16 bytes -> 8 shorts.
"ld4 {v4.16b,v5.16b,v6.16b,v7.16b}, [%1], #64 \n" // load next 16
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v0.8h, v4.16b \n" // V 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v1.8h, v5.16b \n" // U 16 bytes -> 8 shorts.
"uqrshrn v3.8b, v0.8h, #2 \n" // 2x2 average
"uqrshrn v2.8b, v1.8h, #2 \n"
@@ -3282,12 +3643,12 @@ void AYUVToVURow_NEON(const uint8_t* src_ayuv,
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ayuv
- "prfm pldl1keep, [%0, 448] \n"
"uaddlp v0.8h, v0.16b \n" // V 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%0, 448] \n"
"uaddlp v1.8h, v1.16b \n" // U 16 bytes -> 8 shorts.
"ld4 {v4.16b,v5.16b,v6.16b,v7.16b}, [%1], #64 \n" // load next 16
- "prfm pldl1keep, [%1, 448] \n"
"uadalp v0.8h, v4.16b \n" // V 16 bytes -> 8 shorts.
+ "prfm pldl1keep, [%1, 448] \n"
"uadalp v1.8h, v5.16b \n" // U 16 bytes -> 8 shorts.
"uqrshrn v0.8b, v0.8h, #2 \n" // 2x2 average
"uqrshrn v1.8b, v1.8h, #2 \n"
@@ -3307,8 +3668,8 @@ void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width) {
asm volatile(
"1: \n"
"ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #16 \n" // 16 pixels per loop
+ "prfm pldl1keep, [%0, 448] \n"
"st1 {v2.16b}, [%1], #16 \n" // store 16 Y pixels
"b.gt 1b \n"
: "+r"(src_ayuv), // %0
@@ -3329,9 +3690,9 @@ void SwapUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width) {
"1: \n"
"ld1 {v0.16b}, [%0], 16 \n" // load 16 UV values
"ld1 {v1.16b}, [%0], 16 \n"
- "prfm pldl1keep, [%0, 448] \n"
"subs %w2, %w2, #16 \n" // 16 pixels per loop
"tbl v0.16b, {v0.16b}, v2.16b \n"
+ "prfm pldl1keep, [%0, 448] \n"
"tbl v1.16b, {v1.16b}, v2.16b \n"
"stp q0, q1, [%1], 32 \n" // store 16 VU pixels
"b.gt 1b \n"
@@ -3379,6 +3740,113 @@ void HalfMergeUVRow_NEON(const uint8_t* src_u,
: "cc", "memory", "v0", "v1", "v2", "v3");
}
+void SplitUVRow_16_NEON(const uint16_t* src_uv,
+ uint16_t* dst_u,
+ uint16_t* dst_v,
+ int depth,
+ int width) {
+ int shift = depth - 16; // Negative for right shift.
+ asm volatile(
+ "dup v2.8h, %w4 \n"
+ "1: \n"
+ "ld2 {v0.8h, v1.8h}, [%0], #32 \n" // load 8 UV
+ "subs %w3, %w3, #8 \n" // 8 src pixels per loop
+ "ushl v0.8h, v0.8h, v2.8h \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "ushl v1.8h, v1.8h, v2.8h \n"
+ "st1 {v0.8h}, [%1], #16 \n" // store 8 U pixels
+ "st1 {v1.8h}, [%2], #16 \n" // store 8 V pixels
+ "b.gt 1b \n"
+ : "+r"(src_uv), // %0
+ "+r"(dst_u), // %1
+ "+r"(dst_v), // %2
+ "+r"(width) // %3
+ : "r"(shift) // %4
+ : "cc", "memory", "v0", "v1", "v2");
+}
+
+void MergeUVRow_16_NEON(const uint16_t* src_u,
+ const uint16_t* src_v,
+ uint16_t* dst_uv,
+ int depth,
+ int width) {
+ int shift = 16 - depth;
+ asm volatile(
+ "dup v2.8h, %w4 \n"
+ "1: \n"
+ "ld1 {v0.8h}, [%0], #16 \n" // load 8 U
+ "subs %w3, %w3, #8 \n" // 8 src pixels per loop
+ "ld1 {v1.8h}, [%1], #16 \n" // load 8 V
+ "ushl v0.8h, v0.8h, v2.8h \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "ushl v1.8h, v1.8h, v2.8h \n"
+ "prfm pldl1keep, [%1, 448] \n"
+ "st2 {v0.8h, v1.8h}, [%2], #32 \n" // store 8 UV pixels
+ "b.gt 1b \n"
+ : "+r"(src_u), // %0
+ "+r"(src_v), // %1
+ "+r"(dst_uv), // %2
+ "+r"(width) // %3
+ : "r"(shift) // %4
+ : "cc", "memory", "v0", "v1", "v2");
+}
+
+void MultiplyRow_16_NEON(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width) {
+ asm volatile(
+ "dup v2.8h, %w2 \n"
+ "1: \n"
+ "ldp q0, q1, [%0], #32 \n"
+ "mul v0.8h, v0.8h, v2.8h \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "mul v1.8h, v1.8h, v2.8h \n"
+ "stp q0, q1, [%1] \n" // store 16 pixels
+ "add %1, %1, #32 \n"
+ "subs %w3, %w3, #16 \n" // 16 src pixels per loop
+ "b.gt 1b \n"
+ : "+r"(src_y), // %0
+ "+r"(dst_y), // %1
+ "+r"(scale), // %2
+ "+r"(width) // %3
+ :
+ : "cc", "memory", "v0", "v1", "v2");
+}
+
+void DivideRow_16_NEON(const uint16_t* src_y,
+ uint16_t* dst_y,
+ int scale,
+ int width) {
+ asm volatile(
+ "dup v0.8h, %w2 \n"
+ "1: \n"
+ "ldp q1, q2, [%0], #32 \n"
+ "ushll v3.4s, v1.4h, #0 \n"
+ "ushll v4.4s, v2.4h, #0 \n"
+ "prfm pldl1keep, [%0, 448] \n"
+ "ushll2 v1.4s, v1.8h, #0 \n"
+ "ushll2 v2.4s, v2.8h, #0 \n"
+ "mul v3.4s, v0.4s, v3.4s \n"
+ "mul v4.4s, v0.4s, v4.4s \n"
+ "mul v1.4s, v0.4s, v1.4s \n"
+ "mul v2.4s, v0.4s, v2.4s \n"
+ "shrn v3.4h, v3.4s, #16 \n"
+ "shrn v4.4h, v4.4s, #16 \n"
+ "shrn2 v3.8h, v1.4s, #16 \n"
+ "shrn2 v4.8h, v2.4s, #16 \n"
+ "stp q3, q3, [%1] \n" // store 16 pixels
+ "add %1, %1, #32 \n"
+ "subs %w3, %w3, #16 \n" // 16 src pixels per loop
+ "b.gt 1b \n"
+ : "+r"(src_y), // %0
+ "+r"(dst_y), // %1
+ "+r"(scale), // %2
+ "+r"(width) // %3
+ :
+ : "cc", "memory", "v0", "v1", "v2", "v3", "v4");
+}
+
#endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
#ifdef __cplusplus
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/row_win.cc b/third-party/libyuv/third_party/libyuv/source/row_win.cc
similarity index 91%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/row_win.cc
rename to third-party/libyuv/third_party/libyuv/source/row_win.cc
index 9afcf060a4..7dccacc7fd 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/row_win.cc
+++ b/third-party/libyuv/third_party/libyuv/source/row_win.cc
@@ -10,9 +10,9 @@
#include "libyuv/row.h"
-// This module is for Visual C 32/64 bit and clangcl 32 bit
+// This module is for Visual C 32/64 bit
#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \
- (defined(_M_IX86) || (defined(_M_X64) && !defined(__clang__)))
+ !defined(__clang__) && (defined(_M_IX86) || defined(_M_X64))
#if defined(_M_X64)
#include
@@ -27,12 +27,34 @@ extern "C" {
// 64 bit
#if defined(_M_X64)
+// Read 8 UV from 444
+#define READYUV444 \
+ xmm3 = _mm_loadl_epi64((__m128i*)u_buf); \
+ xmm1 = _mm_loadl_epi64((__m128i*)(u_buf + offset)); \
+ xmm3 = _mm_unpacklo_epi8(xmm3, xmm1); \
+ u_buf += 8; \
+ xmm4 = _mm_loadl_epi64((__m128i*)y_buf); \
+ xmm4 = _mm_unpacklo_epi8(xmm4, xmm4); \
+ y_buf += 8;
+
+// Read 8 UV from 444, With 8 Alpha.
+#define READYUVA444 \
+ xmm3 = _mm_loadl_epi64((__m128i*)u_buf); \
+ xmm1 = _mm_loadl_epi64((__m128i*)(u_buf + offset)); \
+ xmm3 = _mm_unpacklo_epi8(xmm3, xmm1); \
+ u_buf += 8; \
+ xmm4 = _mm_loadl_epi64((__m128i*)y_buf); \
+ xmm4 = _mm_unpacklo_epi8(xmm4, xmm4); \
+ y_buf += 8; \
+ xmm5 = _mm_loadl_epi64((__m128i*)a_buf); \
+ a_buf += 8;
+
// Read 4 UV from 422, upsample to 8 UV.
#define READYUV422 \
- xmm0 = _mm_cvtsi32_si128(*(uint32_t*)u_buf); \
+ xmm3 = _mm_cvtsi32_si128(*(uint32_t*)u_buf); \
xmm1 = _mm_cvtsi32_si128(*(uint32_t*)(u_buf + offset)); \
- xmm0 = _mm_unpacklo_epi8(xmm0, xmm1); \
- xmm0 = _mm_unpacklo_epi16(xmm0, xmm0); \
+ xmm3 = _mm_unpacklo_epi8(xmm3, xmm1); \
+ xmm3 = _mm_unpacklo_epi16(xmm3, xmm3); \
u_buf += 4; \
xmm4 = _mm_loadl_epi64((__m128i*)y_buf); \
xmm4 = _mm_unpacklo_epi8(xmm4, xmm4); \
@@ -40,10 +62,10 @@ extern "C" {
// Read 4 UV from 422, upsample to 8 UV. With 8 Alpha.
#define READYUVA422 \
- xmm0 = _mm_cvtsi32_si128(*(uint32_t*)u_buf); \
+ xmm3 = _mm_cvtsi32_si128(*(uint32_t*)u_buf); \
xmm1 = _mm_cvtsi32_si128(*(uint32_t*)(u_buf + offset)); \
- xmm0 = _mm_unpacklo_epi8(xmm0, xmm1); \
- xmm0 = _mm_unpacklo_epi16(xmm0, xmm0); \
+ xmm3 = _mm_unpacklo_epi8(xmm3, xmm1); \
+ xmm3 = _mm_unpacklo_epi16(xmm3, xmm3); \
u_buf += 4; \
xmm4 = _mm_loadl_epi64((__m128i*)y_buf); \
xmm4 = _mm_unpacklo_epi8(xmm4, xmm4); \
@@ -52,24 +74,21 @@ extern "C" {
a_buf += 8;
// Convert 8 pixels: 8 UV and 8 Y.
-#define YUVTORGB(yuvconstants) \
- xmm1 = _mm_loadu_si128(&xmm0); \
- xmm2 = _mm_loadu_si128(&xmm0); \
- xmm0 = _mm_maddubs_epi16(xmm0, *(__m128i*)yuvconstants->kUVToB); \
- xmm1 = _mm_maddubs_epi16(xmm1, *(__m128i*)yuvconstants->kUVToG); \
- xmm2 = _mm_maddubs_epi16(xmm2, *(__m128i*)yuvconstants->kUVToR); \
- xmm0 = _mm_sub_epi16(*(__m128i*)yuvconstants->kUVBiasB, xmm0); \
- xmm1 = _mm_sub_epi16(*(__m128i*)yuvconstants->kUVBiasG, xmm1); \
- xmm2 = _mm_sub_epi16(*(__m128i*)yuvconstants->kUVBiasR, xmm2); \
- xmm4 = _mm_mulhi_epu16(xmm4, *(__m128i*)yuvconstants->kYToRgb); \
- xmm0 = _mm_adds_epi16(xmm0, xmm4); \
- xmm1 = _mm_adds_epi16(xmm1, xmm4); \
- xmm2 = _mm_adds_epi16(xmm2, xmm4); \
- xmm0 = _mm_srai_epi16(xmm0, 6); \
- xmm1 = _mm_srai_epi16(xmm1, 6); \
- xmm2 = _mm_srai_epi16(xmm2, 6); \
- xmm0 = _mm_packus_epi16(xmm0, xmm0); \
- xmm1 = _mm_packus_epi16(xmm1, xmm1); \
+#define YUVTORGB(yuvconstants) \
+ xmm3 = _mm_sub_epi8(xmm3, _mm_set1_epi8(0x80)); \
+ xmm4 = _mm_mulhi_epu16(xmm4, *(__m128i*)yuvconstants->kYToRgb); \
+ xmm4 = _mm_add_epi16(xmm4, *(__m128i*)yuvconstants->kYBiasToRgb); \
+ xmm0 = _mm_maddubs_epi16(*(__m128i*)yuvconstants->kUVToB, xmm3); \
+ xmm1 = _mm_maddubs_epi16(*(__m128i*)yuvconstants->kUVToG, xmm3); \
+ xmm2 = _mm_maddubs_epi16(*(__m128i*)yuvconstants->kUVToR, xmm3); \
+ xmm0 = _mm_adds_epi16(xmm4, xmm0); \
+ xmm1 = _mm_subs_epi16(xmm4, xmm1); \
+ xmm2 = _mm_adds_epi16(xmm4, xmm2); \
+ xmm0 = _mm_srai_epi16(xmm0, 6); \
+ xmm1 = _mm_srai_epi16(xmm1, 6); \
+ xmm2 = _mm_srai_epi16(xmm2, 6); \
+ xmm0 = _mm_packus_epi16(xmm0, xmm0); \
+ xmm1 = _mm_packus_epi16(xmm1, xmm1); \
xmm2 = _mm_packus_epi16(xmm2, xmm2);
// Store 8 ARGB values.
@@ -90,7 +109,7 @@ void I422ToARGBRow_SSSE3(const uint8_t* y_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- __m128i xmm0, xmm1, xmm2, xmm4;
+ __m128i xmm0, xmm1, xmm2, xmm3, xmm4;
const __m128i xmm5 = _mm_set1_epi8(-1);
const ptrdiff_t offset = (uint8_t*)v_buf - (uint8_t*)u_buf;
while (width > 0) {
@@ -110,7 +129,7 @@ void I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) {
- __m128i xmm0, xmm1, xmm2, xmm4, xmm5;
+ __m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5;
const ptrdiff_t offset = (uint8_t*)v_buf - (uint8_t*)u_buf;
while (width > 0) {
READYUVA422
@@ -121,6 +140,44 @@ void I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
}
#endif
+#if defined(HAS_I444TOARGBROW_SSSE3)
+void I444ToARGBRow_SSSE3(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ __m128i xmm0, xmm1, xmm2, xmm3, xmm4;
+ const __m128i xmm5 = _mm_set1_epi8(-1);
+ const ptrdiff_t offset = (uint8_t*)v_buf - (uint8_t*)u_buf;
+ while (width > 0) {
+ READYUV444
+ YUVTORGB(yuvconstants)
+ STOREARGB
+ width -= 8;
+ }
+}
+#endif
+
+#if defined(HAS_I444ALPHATOARGBROW_SSSE3)
+void I444AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ __m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5;
+ const ptrdiff_t offset = (uint8_t*)v_buf - (uint8_t*)u_buf;
+ while (width > 0) {
+ READYUVA444
+ YUVTORGB(yuvconstants)
+ STOREARGB
+ width -= 8;
+ }
+}
+#endif
+
// 32 bit
#else // defined(_M_X64)
#ifdef HAS_ARGBTOYROW_SSSE3
@@ -187,11 +244,11 @@ static const uvec8 kAddY16 = {16u, 16u, 16u, 16u, 16u, 16u, 16u, 16u,
// 7 bit fixed point 0.5.
static const vec16 kAddYJ64 = {64, 64, 64, 64, 64, 64, 64, 64};
-static const uvec8 kAddUV128 = {128u, 128u, 128u, 128u, 128u, 128u, 128u, 128u,
- 128u, 128u, 128u, 128u, 128u, 128u, 128u, 128u};
-
-static const uvec16 kAddUVJ128 = {0x8080u, 0x8080u, 0x8080u, 0x8080u,
- 0x8080u, 0x8080u, 0x8080u, 0x8080u};
+// 8 bit fixed point 0.5, for bias of UV.
+static const ulvec8 kBiasUV128 = {
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
// Shuffle table for converting RGB24 to ARGB.
static const uvec8 kShuffleMaskRGB24ToARGB = {
@@ -1367,7 +1424,7 @@ __declspec(naked) void RGBAToYRow_SSSE3(const uint8_t* src_argb,
}
}
-__declspec(naked) void ARGBToUVRow_SSSE3(const uint8_t* src_argb0,
+__declspec(naked) void ARGBToUVRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1380,7 +1437,7 @@ __declspec(naked) void ARGBToUVRow_SSSE3(const uint8_t* src_argb0,
mov edx, [esp + 8 + 12] // dst_u
mov edi, [esp + 8 + 16] // dst_v
mov ecx, [esp + 8 + 20] // width
- movdqa xmm5, xmmword ptr kAddUV128
+ movdqa xmm5, xmmword ptr kBiasUV128
movdqa xmm6, xmmword ptr kARGBToV
movdqa xmm7, xmmword ptr kARGBToU
sub edi, edx // stride from u to v
@@ -1439,7 +1496,7 @@ __declspec(naked) void ARGBToUVRow_SSSE3(const uint8_t* src_argb0,
}
}
-__declspec(naked) void ARGBToUVJRow_SSSE3(const uint8_t* src_argb0,
+__declspec(naked) void ARGBToUVJRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1452,7 +1509,7 @@ __declspec(naked) void ARGBToUVJRow_SSSE3(const uint8_t* src_argb0,
mov edx, [esp + 8 + 12] // dst_u
mov edi, [esp + 8 + 16] // dst_v
mov ecx, [esp + 8 + 20] // width
- movdqa xmm5, xmmword ptr kAddUVJ128
+ movdqa xmm5, xmmword ptr kBiasUV128
movdqa xmm6, xmmword ptr kARGBToVJ
movdqa xmm7, xmmword ptr kARGBToUJ
sub edi, edx // stride from u to v
@@ -1513,7 +1570,7 @@ __declspec(naked) void ARGBToUVJRow_SSSE3(const uint8_t* src_argb0,
}
#ifdef HAS_ARGBTOUVROW_AVX2
-__declspec(naked) void ARGBToUVRow_AVX2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBToUVRow_AVX2(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1526,7 +1583,7 @@ __declspec(naked) void ARGBToUVRow_AVX2(const uint8_t* src_argb0,
mov edx, [esp + 8 + 12] // dst_u
mov edi, [esp + 8 + 16] // dst_v
mov ecx, [esp + 8 + 20] // width
- vbroadcastf128 ymm5, xmmword ptr kAddUV128
+ vbroadcastf128 ymm5, xmmword ptr kBiasUV128
vbroadcastf128 ymm6, xmmword ptr kARGBToV
vbroadcastf128 ymm7, xmmword ptr kARGBToU
sub edi, edx // stride from u to v
@@ -1581,7 +1638,7 @@ __declspec(naked) void ARGBToUVRow_AVX2(const uint8_t* src_argb0,
#endif // HAS_ARGBTOUVROW_AVX2
#ifdef HAS_ARGBTOUVJROW_AVX2
-__declspec(naked) void ARGBToUVJRow_AVX2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBToUVJRow_AVX2(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1594,7 +1651,7 @@ __declspec(naked) void ARGBToUVJRow_AVX2(const uint8_t* src_argb0,
mov edx, [esp + 8 + 12] // dst_u
mov edi, [esp + 8 + 16] // dst_v
mov ecx, [esp + 8 + 20] // width
- vbroadcastf128 ymm5, xmmword ptr kAddUVJ128
+ vbroadcastf128 ymm5, xmmword ptr kBiasUV128
vbroadcastf128 ymm6, xmmword ptr kARGBToVJ
vbroadcastf128 ymm7, xmmword ptr kARGBToUJ
sub edi, edx // stride from u to v
@@ -1649,7 +1706,7 @@ __declspec(naked) void ARGBToUVJRow_AVX2(const uint8_t* src_argb0,
}
#endif // HAS_ARGBTOUVJROW_AVX2
-__declspec(naked) void ARGBToUV444Row_SSSE3(const uint8_t* src_argb0,
+__declspec(naked) void ARGBToUV444Row_SSSE3(const uint8_t* src_argb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) {
@@ -1659,7 +1716,7 @@ __declspec(naked) void ARGBToUV444Row_SSSE3(const uint8_t* src_argb0,
mov edx, [esp + 4 + 8] // dst_u
mov edi, [esp + 4 + 12] // dst_v
mov ecx, [esp + 4 + 16] // width
- movdqa xmm5, xmmword ptr kAddUV128
+ movdqa xmm5, xmmword ptr kBiasUV128
movdqa xmm6, xmmword ptr kARGBToV
movdqa xmm7, xmmword ptr kARGBToU
sub edi, edx // stride from u to v
@@ -1707,7 +1764,7 @@ __declspec(naked) void ARGBToUV444Row_SSSE3(const uint8_t* src_argb0,
}
}
-__declspec(naked) void BGRAToUVRow_SSSE3(const uint8_t* src_argb0,
+__declspec(naked) void BGRAToUVRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1720,7 +1777,7 @@ __declspec(naked) void BGRAToUVRow_SSSE3(const uint8_t* src_argb0,
mov edx, [esp + 8 + 12] // dst_u
mov edi, [esp + 8 + 16] // dst_v
mov ecx, [esp + 8 + 20] // width
- movdqa xmm5, xmmword ptr kAddUV128
+ movdqa xmm5, xmmword ptr kBiasUV128
movdqa xmm6, xmmword ptr kBGRAToV
movdqa xmm7, xmmword ptr kBGRAToU
sub edi, edx // stride from u to v
@@ -1779,7 +1836,7 @@ __declspec(naked) void BGRAToUVRow_SSSE3(const uint8_t* src_argb0,
}
}
-__declspec(naked) void ABGRToUVRow_SSSE3(const uint8_t* src_argb0,
+__declspec(naked) void ABGRToUVRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1792,7 +1849,7 @@ __declspec(naked) void ABGRToUVRow_SSSE3(const uint8_t* src_argb0,
mov edx, [esp + 8 + 12] // dst_u
mov edi, [esp + 8 + 16] // dst_v
mov ecx, [esp + 8 + 20] // width
- movdqa xmm5, xmmword ptr kAddUV128
+ movdqa xmm5, xmmword ptr kBiasUV128
movdqa xmm6, xmmword ptr kABGRToV
movdqa xmm7, xmmword ptr kABGRToU
sub edi, edx // stride from u to v
@@ -1851,7 +1908,7 @@ __declspec(naked) void ABGRToUVRow_SSSE3(const uint8_t* src_argb0,
}
}
-__declspec(naked) void RGBAToUVRow_SSSE3(const uint8_t* src_argb0,
+__declspec(naked) void RGBAToUVRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
@@ -1864,7 +1921,7 @@ __declspec(naked) void RGBAToUVRow_SSSE3(const uint8_t* src_argb0,
mov edx, [esp + 8 + 12] // dst_u
mov edi, [esp + 8 + 16] // dst_v
mov ecx, [esp + 8 + 20] // width
- movdqa xmm5, xmmword ptr kAddUV128
+ movdqa xmm5, xmmword ptr kBiasUV128
movdqa xmm6, xmmword ptr kRGBAToV
movdqa xmm7, xmmword ptr kRGBAToU
sub edi, edx // stride from u to v
@@ -1926,137 +1983,153 @@ __declspec(naked) void RGBAToUVRow_SSSE3(const uint8_t* src_argb0,
// Read 16 UV from 444
#define READYUV444_AVX2 \
- __asm { \
- __asm vmovdqu xmm0, [esi] /* U */ \
- __asm vmovdqu xmm1, [esi + edi] /* V */ \
+ __asm { \
+ __asm vmovdqu xmm3, [esi] /* U */ \
+ __asm vmovdqu xmm1, [esi + edi] /* V */ \
__asm lea esi, [esi + 16] \
- __asm vpermq ymm0, ymm0, 0xd8 \
+ __asm vpermq ymm3, ymm3, 0xd8 \
__asm vpermq ymm1, ymm1, 0xd8 \
- __asm vpunpcklbw ymm0, ymm0, ymm1 /* UV */ \
- __asm vmovdqu xmm4, [eax] /* Y */ \
+ __asm vpunpcklbw ymm3, ymm3, ymm1 /* UV */ \
+ __asm vmovdqu xmm4, [eax] /* Y */ \
__asm vpermq ymm4, ymm4, 0xd8 \
__asm vpunpcklbw ymm4, ymm4, ymm4 \
__asm lea eax, [eax + 16]}
+// Read 16 UV from 444. With 16 Alpha.
+#define READYUVA444_AVX2 \
+ __asm { \
+ __asm vmovdqu xmm3, [esi] /* U */ \
+ __asm vmovdqu xmm1, [esi + edi] /* V */ \
+ __asm lea esi, [esi + 16] \
+ __asm vpermq ymm3, ymm3, 0xd8 \
+ __asm vpermq ymm1, ymm1, 0xd8 \
+ __asm vpunpcklbw ymm3, ymm3, ymm1 /* UV */ \
+ __asm vmovdqu xmm4, [eax] /* Y */ \
+ __asm vpermq ymm4, ymm4, 0xd8 \
+ __asm vpunpcklbw ymm4, ymm4, ymm4 \
+ __asm lea eax, [eax + 16] \
+ __asm vmovdqu xmm5, [ebp] /* A */ \
+ __asm vpermq ymm5, ymm5, 0xd8 \
+ __asm lea ebp, [ebp + 16]}
+
// Read 8 UV from 422, upsample to 16 UV.
#define READYUV422_AVX2 \
- __asm { \
- __asm vmovq xmm0, qword ptr [esi] /* U */ \
- __asm vmovq xmm1, qword ptr [esi + edi] /* V */ \
+ __asm { \
+ __asm vmovq xmm3, qword ptr [esi] /* U */ \
+ __asm vmovq xmm1, qword ptr [esi + edi] /* V */ \
__asm lea esi, [esi + 8] \
- __asm vpunpcklbw ymm0, ymm0, ymm1 /* UV */ \
- __asm vpermq ymm0, ymm0, 0xd8 \
- __asm vpunpcklwd ymm0, ymm0, ymm0 /* UVUV (upsample) */ \
- __asm vmovdqu xmm4, [eax] /* Y */ \
+ __asm vpunpcklbw ymm3, ymm3, ymm1 /* UV */ \
+ __asm vpermq ymm3, ymm3, 0xd8 \
+ __asm vpunpcklwd ymm3, ymm3, ymm3 /* UVUV (upsample) */ \
+ __asm vmovdqu xmm4, [eax] /* Y */ \
__asm vpermq ymm4, ymm4, 0xd8 \
__asm vpunpcklbw ymm4, ymm4, ymm4 \
__asm lea eax, [eax + 16]}
// Read 8 UV from 422, upsample to 16 UV. With 16 Alpha.
#define READYUVA422_AVX2 \
- __asm { \
- __asm vmovq xmm0, qword ptr [esi] /* U */ \
- __asm vmovq xmm1, qword ptr [esi + edi] /* V */ \
+ __asm { \
+ __asm vmovq xmm3, qword ptr [esi] /* U */ \
+ __asm vmovq xmm1, qword ptr [esi + edi] /* V */ \
__asm lea esi, [esi + 8] \
- __asm vpunpcklbw ymm0, ymm0, ymm1 /* UV */ \
- __asm vpermq ymm0, ymm0, 0xd8 \
- __asm vpunpcklwd ymm0, ymm0, ymm0 /* UVUV (upsample) */ \
- __asm vmovdqu xmm4, [eax] /* Y */ \
+ __asm vpunpcklbw ymm3, ymm3, ymm1 /* UV */ \
+ __asm vpermq ymm3, ymm3, 0xd8 \
+ __asm vpunpcklwd ymm3, ymm3, ymm3 /* UVUV (upsample) */ \
+ __asm vmovdqu xmm4, [eax] /* Y */ \
__asm vpermq ymm4, ymm4, 0xd8 \
__asm vpunpcklbw ymm4, ymm4, ymm4 \
__asm lea eax, [eax + 16] \
- __asm vmovdqu xmm5, [ebp] /* A */ \
+ __asm vmovdqu xmm5, [ebp] /* A */ \
__asm vpermq ymm5, ymm5, 0xd8 \
__asm lea ebp, [ebp + 16]}
// Read 8 UV from NV12, upsample to 16 UV.
#define READNV12_AVX2 \
- __asm { \
- __asm vmovdqu xmm0, [esi] /* UV */ \
+ __asm { \
+ __asm vmovdqu xmm3, [esi] /* UV */ \
__asm lea esi, [esi + 16] \
- __asm vpermq ymm0, ymm0, 0xd8 \
- __asm vpunpcklwd ymm0, ymm0, ymm0 /* UVUV (upsample) */ \
- __asm vmovdqu xmm4, [eax] /* Y */ \
+ __asm vpermq ymm3, ymm3, 0xd8 \
+ __asm vpunpcklwd ymm3, ymm3, ymm3 /* UVUV (upsample) */ \
+ __asm vmovdqu xmm4, [eax] /* Y */ \
__asm vpermq ymm4, ymm4, 0xd8 \
__asm vpunpcklbw ymm4, ymm4, ymm4 \
__asm lea eax, [eax + 16]}
// Read 8 UV from NV21, upsample to 16 UV.
#define READNV21_AVX2 \
- __asm { \
- __asm vmovdqu xmm0, [esi] /* UV */ \
+ __asm { \
+ __asm vmovdqu xmm3, [esi] /* UV */ \
__asm lea esi, [esi + 16] \
- __asm vpermq ymm0, ymm0, 0xd8 \
- __asm vpshufb ymm0, ymm0, ymmword ptr kShuffleNV21 \
- __asm vmovdqu xmm4, [eax] /* Y */ \
+ __asm vpermq ymm3, ymm3, 0xd8 \
+ __asm vpshufb ymm3, ymm3, ymmword ptr kShuffleNV21 \
+ __asm vmovdqu xmm4, [eax] /* Y */ \
__asm vpermq ymm4, ymm4, 0xd8 \
__asm vpunpcklbw ymm4, ymm4, ymm4 \
__asm lea eax, [eax + 16]}
// Read 8 YUY2 with 16 Y and upsample 8 UV to 16 UV.
#define READYUY2_AVX2 \
- __asm { \
- __asm vmovdqu ymm4, [eax] /* YUY2 */ \
+ __asm { \
+ __asm vmovdqu ymm4, [eax] /* YUY2 */ \
__asm vpshufb ymm4, ymm4, ymmword ptr kShuffleYUY2Y \
- __asm vmovdqu ymm0, [eax] /* UV */ \
- __asm vpshufb ymm0, ymm0, ymmword ptr kShuffleYUY2UV \
+ __asm vmovdqu ymm3, [eax] /* UV */ \
+ __asm vpshufb ymm3, ymm3, ymmword ptr kShuffleYUY2UV \
__asm lea eax, [eax + 32]}
// Read 8 UYVY with 16 Y and upsample 8 UV to 16 UV.
#define READUYVY_AVX2 \
- __asm { \
- __asm vmovdqu ymm4, [eax] /* UYVY */ \
+ __asm { \
+ __asm vmovdqu ymm4, [eax] /* UYVY */ \
__asm vpshufb ymm4, ymm4, ymmword ptr kShuffleUYVYY \
- __asm vmovdqu ymm0, [eax] /* UV */ \
- __asm vpshufb ymm0, ymm0, ymmword ptr kShuffleUYVYUV \
+ __asm vmovdqu ymm3, [eax] /* UV */ \
+ __asm vpshufb ymm3, ymm3, ymmword ptr kShuffleUYVYUV \
__asm lea eax, [eax + 32]}
// Convert 16 pixels: 16 UV and 16 Y.
#define YUVTORGB_AVX2(YuvConstants) \
- __asm { \
- __asm vpmaddubsw ymm2, ymm0, ymmword ptr [YuvConstants + KUVTOR] /* R UV */\
- __asm vpmaddubsw ymm1, ymm0, ymmword ptr [YuvConstants + KUVTOG] /* G UV */\
- __asm vpmaddubsw ymm0, ymm0, ymmword ptr [YuvConstants + KUVTOB] /* B UV */\
- __asm vmovdqu ymm3, ymmword ptr [YuvConstants + KUVBIASR] \
- __asm vpsubw ymm2, ymm3, ymm2 \
- __asm vmovdqu ymm3, ymmword ptr [YuvConstants + KUVBIASG] \
- __asm vpsubw ymm1, ymm3, ymm1 \
- __asm vmovdqu ymm3, ymmword ptr [YuvConstants + KUVBIASB] \
- __asm vpsubw ymm0, ymm3, ymm0 /* Step 2: Find Y contribution to 16 R,G,B values */ \
+ __asm { \
+ __asm vpsubb ymm3, ymm3, ymmword ptr kBiasUV128 \
__asm vpmulhuw ymm4, ymm4, ymmword ptr [YuvConstants + KYTORGB] \
- __asm vpaddsw ymm0, ymm0, ymm4 /* B += Y */ \
- __asm vpaddsw ymm1, ymm1, ymm4 /* G += Y */ \
- __asm vpaddsw ymm2, ymm2, ymm4 /* R += Y */ \
+ __asm vmovdqa ymm0, ymmword ptr [YuvConstants + KUVTOB] \
+ __asm vmovdqa ymm1, ymmword ptr [YuvConstants + KUVTOG] \
+ __asm vmovdqa ymm2, ymmword ptr [YuvConstants + KUVTOR] \
+ __asm vpmaddubsw ymm0, ymm0, ymm3 /* B UV */ \
+ __asm vpmaddubsw ymm1, ymm1, ymm3 /* G UV */ \
+ __asm vpmaddubsw ymm2, ymm2, ymm3 /* B UV */ \
+ __asm vmovdqu ymm3, ymmword ptr [YuvConstants + KYBIASTORGB] \
+ __asm vpaddw ymm4, ymm3, ymm4 \
+ __asm vpaddsw ymm0, ymm0, ymm4 \
+ __asm vpsubsw ymm1, ymm4, ymm1 \
+ __asm vpaddsw ymm2, ymm2, ymm4 \
__asm vpsraw ymm0, ymm0, 6 \
__asm vpsraw ymm1, ymm1, 6 \
__asm vpsraw ymm2, ymm2, 6 \
- __asm vpackuswb ymm0, ymm0, ymm0 /* B */ \
- __asm vpackuswb ymm1, ymm1, ymm1 /* G */ \
- __asm vpackuswb ymm2, ymm2, ymm2 /* R */ \
- }
+ __asm vpackuswb ymm0, ymm0, ymm0 \
+ __asm vpackuswb ymm1, ymm1, ymm1 \
+ __asm vpackuswb ymm2, ymm2, ymm2}
// Store 16 ARGB values.
#define STOREARGB_AVX2 \
- __asm { \
- __asm vpunpcklbw ymm0, ymm0, ymm1 /* BG */ \
+ __asm { \
+ __asm vpunpcklbw ymm0, ymm0, ymm1 /* BG */ \
__asm vpermq ymm0, ymm0, 0xd8 \
- __asm vpunpcklbw ymm2, ymm2, ymm5 /* RA */ \
+ __asm vpunpcklbw ymm2, ymm2, ymm5 /* RA */ \
__asm vpermq ymm2, ymm2, 0xd8 \
- __asm vpunpcklwd ymm1, ymm0, ymm2 /* BGRA first 8 pixels */ \
- __asm vpunpckhwd ymm0, ymm0, ymm2 /* BGRA next 8 pixels */ \
+ __asm vpunpcklwd ymm1, ymm0, ymm2 /* BGRA first 8 pixels */ \
+ __asm vpunpckhwd ymm0, ymm0, ymm2 /* BGRA next 8 pixels */ \
__asm vmovdqu 0[edx], ymm1 \
__asm vmovdqu 32[edx], ymm0 \
__asm lea edx, [edx + 64]}
// Store 16 RGBA values.
#define STORERGBA_AVX2 \
- __asm { \
- __asm vpunpcklbw ymm1, ymm1, ymm2 /* GR */ \
+ __asm { \
+ __asm vpunpcklbw ymm1, ymm1, ymm2 /* GR */ \
__asm vpermq ymm1, ymm1, 0xd8 \
- __asm vpunpcklbw ymm2, ymm5, ymm0 /* AB */ \
+ __asm vpunpcklbw ymm2, ymm5, ymm0 /* AB */ \
__asm vpermq ymm2, ymm2, 0xd8 \
- __asm vpunpcklwd ymm0, ymm2, ymm1 /* ABGR first 8 pixels */ \
- __asm vpunpckhwd ymm1, ymm2, ymm1 /* ABGR next 8 pixels */ \
+ __asm vpunpcklwd ymm0, ymm2, ymm1 /* ABGR first 8 pixels */ \
+ __asm vpunpckhwd ymm1, ymm2, ymm1 /* ABGR next 8 pixels */ \
__asm vmovdqu [edx], ymm0 \
__asm vmovdqu [edx + 32], ymm1 \
__asm lea edx, [edx + 64]}
@@ -2183,6 +2256,48 @@ __declspec(naked) void I444ToARGBRow_AVX2(
}
#endif // HAS_I444TOARGBROW_AVX2
+#ifdef HAS_I444ALPHATOARGBROW_AVX2
+// 16 pixels
+// 16 UV values with 16 Y producing 16 ARGB (64 bytes).
+__declspec(naked) void I444AlphaToARGBRow_AVX2(
+ const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ __asm {
+ push esi
+ push edi
+ push ebx
+ push ebp
+ mov eax, [esp + 16 + 4] // Y
+ mov esi, [esp + 16 + 8] // U
+ mov edi, [esp + 16 + 12] // V
+ mov ebp, [esp + 16 + 16] // A
+ mov edx, [esp + 16 + 20] // argb
+ mov ebx, [esp + 16 + 24] // yuvconstants
+ mov ecx, [esp + 16 + 28] // width
+ sub edi, esi
+ convertloop:
+ READYUVA444_AVX2
+ YUVTORGB_AVX2(ebx)
+ STOREARGB_AVX2
+
+ sub ecx, 16
+ jg convertloop
+
+ pop ebp
+ pop ebx
+ pop edi
+ pop esi
+ vzeroupper
+ ret
+ }
+}
+#endif // HAS_I444AlphaTOARGBROW_AVX2
+
#ifdef HAS_NV12TOARGBROW_AVX2
// 16 pixels.
// 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 ARGB (64 bytes).
@@ -2361,191 +2476,202 @@ __declspec(naked) void I422ToRGBARow_AVX2(
// Read 8 UV from 444.
#define READYUV444 \
- __asm { \
- __asm movq xmm0, qword ptr [esi] /* U */ \
+ __asm { \
+ __asm movq xmm3, qword ptr [esi] /* U */ \
__asm movq xmm1, qword ptr [esi + edi] /* V */ \
__asm lea esi, [esi + 8] \
- __asm punpcklbw xmm0, xmm1 /* UV */ \
+ __asm punpcklbw xmm3, xmm1 /* UV */ \
__asm movq xmm4, qword ptr [eax] \
__asm punpcklbw xmm4, xmm4 \
__asm lea eax, [eax + 8]}
+// Read 4 UV from 444. With 8 Alpha.
+#define READYUVA444 \
+ __asm { \
+ __asm movq xmm3, qword ptr [esi] /* U */ \
+ __asm movq xmm1, qword ptr [esi + edi] /* V */ \
+ __asm lea esi, [esi + 8] \
+ __asm punpcklbw xmm3, xmm1 /* UV */ \
+ __asm movq xmm4, qword ptr [eax] \
+ __asm punpcklbw xmm4, xmm4 \
+ __asm lea eax, [eax + 8] \
+ __asm movq xmm5, qword ptr [ebp] /* A */ \
+ __asm lea ebp, [ebp + 8]}
+
// Read 4 UV from 422, upsample to 8 UV.
#define READYUV422 \
- __asm { \
- __asm movd xmm0, [esi] /* U */ \
- __asm movd xmm1, [esi + edi] /* V */ \
+ __asm { \
+ __asm movd xmm3, [esi] /* U */ \
+ __asm movd xmm1, [esi + edi] /* V */ \
__asm lea esi, [esi + 4] \
- __asm punpcklbw xmm0, xmm1 /* UV */ \
- __asm punpcklwd xmm0, xmm0 /* UVUV (upsample) */ \
+ __asm punpcklbw xmm3, xmm1 /* UV */ \
+ __asm punpcklwd xmm3, xmm3 /* UVUV (upsample) */ \
__asm movq xmm4, qword ptr [eax] \
__asm punpcklbw xmm4, xmm4 \
__asm lea eax, [eax + 8]}
// Read 4 UV from 422, upsample to 8 UV. With 8 Alpha.
#define READYUVA422 \
- __asm { \
- __asm movd xmm0, [esi] /* U */ \
- __asm movd xmm1, [esi + edi] /* V */ \
+ __asm { \
+ __asm movd xmm3, [esi] /* U */ \
+ __asm movd xmm1, [esi + edi] /* V */ \
__asm lea esi, [esi + 4] \
- __asm punpcklbw xmm0, xmm1 /* UV */ \
- __asm punpcklwd xmm0, xmm0 /* UVUV (upsample) */ \
- __asm movq xmm4, qword ptr [eax] /* Y */ \
+ __asm punpcklbw xmm3, xmm1 /* UV */ \
+ __asm punpcklwd xmm3, xmm3 /* UVUV (upsample) */ \
+ __asm movq xmm4, qword ptr [eax] /* Y */ \
__asm punpcklbw xmm4, xmm4 \
__asm lea eax, [eax + 8] \
- __asm movq xmm5, qword ptr [ebp] /* A */ \
+ __asm movq xmm5, qword ptr [ebp] /* A */ \
__asm lea ebp, [ebp + 8]}
// Read 4 UV from NV12, upsample to 8 UV.
#define READNV12 \
- __asm { \
- __asm movq xmm0, qword ptr [esi] /* UV */ \
+ __asm { \
+ __asm movq xmm3, qword ptr [esi] /* UV */ \
__asm lea esi, [esi + 8] \
- __asm punpcklwd xmm0, xmm0 /* UVUV (upsample) */ \
+ __asm punpcklwd xmm3, xmm3 /* UVUV (upsample) */ \
__asm movq xmm4, qword ptr [eax] \
__asm punpcklbw xmm4, xmm4 \
__asm lea eax, [eax + 8]}
// Read 4 VU from NV21, upsample to 8 UV.
#define READNV21 \
- __asm { \
- __asm movq xmm0, qword ptr [esi] /* UV */ \
+ __asm { \
+ __asm movq xmm3, qword ptr [esi] /* UV */ \
__asm lea esi, [esi + 8] \
- __asm pshufb xmm0, xmmword ptr kShuffleNV21 \
+ __asm pshufb xmm3, xmmword ptr kShuffleNV21 \
__asm movq xmm4, qword ptr [eax] \
__asm punpcklbw xmm4, xmm4 \
__asm lea eax, [eax + 8]}
// Read 4 YUY2 with 8 Y and upsample 4 UV to 8 UV.
#define READYUY2 \
- __asm { \
- __asm movdqu xmm4, [eax] /* YUY2 */ \
+ __asm { \
+ __asm movdqu xmm4, [eax] /* YUY2 */ \
__asm pshufb xmm4, xmmword ptr kShuffleYUY2Y \
- __asm movdqu xmm0, [eax] /* UV */ \
- __asm pshufb xmm0, xmmword ptr kShuffleYUY2UV \
+ __asm movdqu xmm3, [eax] /* UV */ \
+ __asm pshufb xmm3, xmmword ptr kShuffleYUY2UV \
__asm lea eax, [eax + 16]}
// Read 4 UYVY with 8 Y and upsample 4 UV to 8 UV.
#define READUYVY \
- __asm { \
- __asm movdqu xmm4, [eax] /* UYVY */ \
+ __asm { \
+ __asm movdqu xmm4, [eax] /* UYVY */ \
__asm pshufb xmm4, xmmword ptr kShuffleUYVYY \
- __asm movdqu xmm0, [eax] /* UV */ \
- __asm pshufb xmm0, xmmword ptr kShuffleUYVYUV \
+ __asm movdqu xmm3, [eax] /* UV */ \
+ __asm pshufb xmm3, xmmword ptr kShuffleUYVYUV \
__asm lea eax, [eax + 16]}
// Convert 8 pixels: 8 UV and 8 Y.
#define YUVTORGB(YuvConstants) \
- __asm { \
- __asm movdqa xmm1, xmm0 \
- __asm movdqa xmm2, xmm0 \
- __asm movdqa xmm3, xmm0 \
- __asm movdqa xmm0, xmmword ptr [YuvConstants + KUVBIASB] \
- __asm pmaddubsw xmm1, xmmword ptr [YuvConstants + KUVTOB] \
- __asm psubw xmm0, xmm1 \
- __asm movdqa xmm1, xmmword ptr [YuvConstants + KUVBIASG] \
- __asm pmaddubsw xmm2, xmmword ptr [YuvConstants + KUVTOG] \
- __asm psubw xmm1, xmm2 \
- __asm movdqa xmm2, xmmword ptr [YuvConstants + KUVBIASR] \
- __asm pmaddubsw xmm3, xmmword ptr [YuvConstants + KUVTOR] \
- __asm psubw xmm2, xmm3 \
+ __asm { \
+ __asm psubb xmm3, xmmword ptr kBiasUV128 \
__asm pmulhuw xmm4, xmmword ptr [YuvConstants + KYTORGB] \
- __asm paddsw xmm0, xmm4 /* B += Y */ \
- __asm paddsw xmm1, xmm4 /* G += Y */ \
- __asm paddsw xmm2, xmm4 /* R += Y */ \
+ __asm movdqa xmm0, xmmword ptr [YuvConstants + KUVTOB] \
+ __asm movdqa xmm1, xmmword ptr [YuvConstants + KUVTOG] \
+ __asm movdqa xmm2, xmmword ptr [YuvConstants + KUVTOR] \
+ __asm pmaddubsw xmm0, xmm3 \
+ __asm pmaddubsw xmm1, xmm3 \
+ __asm pmaddubsw xmm2, xmm3 \
+ __asm movdqa xmm3, xmmword ptr [YuvConstants + KYBIASTORGB] \
+ __asm paddw xmm4, xmm3 \
+ __asm paddsw xmm0, xmm4 \
+ __asm paddsw xmm2, xmm4 \
+ __asm psubsw xmm4, xmm1 \
+ __asm movdqa xmm1, xmm4 \
__asm psraw xmm0, 6 \
__asm psraw xmm1, 6 \
__asm psraw xmm2, 6 \
- __asm packuswb xmm0, xmm0 /* B */ \
- __asm packuswb xmm1, xmm1 /* G */ \
+ __asm packuswb xmm0, xmm0 /* B */ \
+ __asm packuswb xmm1, xmm1 /* G */ \
__asm packuswb xmm2, xmm2 /* R */ \
}
// Store 8 ARGB values.
#define STOREARGB \
- __asm { \
- __asm punpcklbw xmm0, xmm1 /* BG */ \
- __asm punpcklbw xmm2, xmm5 /* RA */ \
+ __asm { \
+ __asm punpcklbw xmm0, xmm1 /* BG */ \
+ __asm punpcklbw xmm2, xmm5 /* RA */ \
__asm movdqa xmm1, xmm0 \
- __asm punpcklwd xmm0, xmm2 /* BGRA first 4 pixels */ \
- __asm punpckhwd xmm1, xmm2 /* BGRA next 4 pixels */ \
+ __asm punpcklwd xmm0, xmm2 /* BGRA first 4 pixels */ \
+ __asm punpckhwd xmm1, xmm2 /* BGRA next 4 pixels */ \
__asm movdqu 0[edx], xmm0 \
__asm movdqu 16[edx], xmm1 \
__asm lea edx, [edx + 32]}
// Store 8 BGRA values.
#define STOREBGRA \
- __asm { \
- __asm pcmpeqb xmm5, xmm5 /* generate 0xffffffff for alpha */ \
- __asm punpcklbw xmm1, xmm0 /* GB */ \
- __asm punpcklbw xmm5, xmm2 /* AR */ \
+ __asm { \
+ __asm pcmpeqb xmm5, xmm5 /* generate 0xffffffff for alpha */ \
+ __asm punpcklbw xmm1, xmm0 /* GB */ \
+ __asm punpcklbw xmm5, xmm2 /* AR */ \
__asm movdqa xmm0, xmm5 \
- __asm punpcklwd xmm5, xmm1 /* BGRA first 4 pixels */ \
- __asm punpckhwd xmm0, xmm1 /* BGRA next 4 pixels */ \
+ __asm punpcklwd xmm5, xmm1 /* BGRA first 4 pixels */ \
+ __asm punpckhwd xmm0, xmm1 /* BGRA next 4 pixels */ \
__asm movdqu 0[edx], xmm5 \
__asm movdqu 16[edx], xmm0 \
__asm lea edx, [edx + 32]}
// Store 8 RGBA values.
#define STORERGBA \
- __asm { \
- __asm pcmpeqb xmm5, xmm5 /* generate 0xffffffff for alpha */ \
- __asm punpcklbw xmm1, xmm2 /* GR */ \
- __asm punpcklbw xmm5, xmm0 /* AB */ \
+ __asm { \
+ __asm pcmpeqb xmm5, xmm5 /* generate 0xffffffff for alpha */ \
+ __asm punpcklbw xmm1, xmm2 /* GR */ \
+ __asm punpcklbw xmm5, xmm0 /* AB */ \
__asm movdqa xmm0, xmm5 \
- __asm punpcklwd xmm5, xmm1 /* RGBA first 4 pixels */ \
- __asm punpckhwd xmm0, xmm1 /* RGBA next 4 pixels */ \
+ __asm punpcklwd xmm5, xmm1 /* RGBA first 4 pixels */ \
+ __asm punpckhwd xmm0, xmm1 /* RGBA next 4 pixels */ \
__asm movdqu 0[edx], xmm5 \
__asm movdqu 16[edx], xmm0 \
__asm lea edx, [edx + 32]}
// Store 8 RGB24 values.
#define STORERGB24 \
- __asm {/* Weave into RRGB */ \
- __asm punpcklbw xmm0, xmm1 /* BG */ \
- __asm punpcklbw xmm2, xmm2 /* RR */ \
+ __asm {/* Weave into RRGB */ \
+ __asm punpcklbw xmm0, xmm1 /* BG */ \
+ __asm punpcklbw xmm2, xmm2 /* RR */ \
__asm movdqa xmm1, xmm0 \
- __asm punpcklwd xmm0, xmm2 /* BGRR first 4 pixels */ \
- __asm punpckhwd xmm1, xmm2 /* BGRR next 4 pixels */ /* RRGB -> RGB24 */ \
- __asm pshufb xmm0, xmm5 /* Pack first 8 and last 4 bytes. */ \
- __asm pshufb xmm1, xmm6 /* Pack first 12 bytes. */ \
- __asm palignr xmm1, xmm0, 12 /* last 4 bytes of xmm0 + 12 xmm1 */ \
- __asm movq qword ptr 0[edx], xmm0 /* First 8 bytes */ \
- __asm movdqu 8[edx], xmm1 /* Last 16 bytes */ \
+ __asm punpcklwd xmm0, xmm2 /* BGRR first 4 pixels */ \
+ __asm punpckhwd xmm1, xmm2 /* BGRR next 4 pixels */ /* RRGB -> RGB24 */ \
+ __asm pshufb xmm0, xmm5 /* Pack first 8 and last 4 bytes. */ \
+ __asm pshufb xmm1, xmm6 /* Pack first 12 bytes. */ \
+ __asm palignr xmm1, xmm0, 12 /* last 4 bytes of xmm0 + 12 xmm1 */ \
+ __asm movq qword ptr 0[edx], xmm0 /* First 8 bytes */ \
+ __asm movdqu 8[edx], xmm1 /* Last 16 bytes */ \
__asm lea edx, [edx + 24]}
// Store 8 RGB565 values.
#define STORERGB565 \
- __asm {/* Weave into RRGB */ \
- __asm punpcklbw xmm0, xmm1 /* BG */ \
- __asm punpcklbw xmm2, xmm2 /* RR */ \
+ __asm {/* Weave into RRGB */ \
+ __asm punpcklbw xmm0, xmm1 /* BG */ \
+ __asm punpcklbw xmm2, xmm2 /* RR */ \
__asm movdqa xmm1, xmm0 \
- __asm punpcklwd xmm0, xmm2 /* BGRR first 4 pixels */ \
- __asm punpckhwd xmm1, xmm2 /* BGRR next 4 pixels */ /* RRGB -> RGB565 */ \
- __asm movdqa xmm3, xmm0 /* B first 4 pixels of argb */ \
- __asm movdqa xmm2, xmm0 /* G */ \
- __asm pslld xmm0, 8 /* R */ \
- __asm psrld xmm3, 3 /* B */ \
- __asm psrld xmm2, 5 /* G */ \
- __asm psrad xmm0, 16 /* R */ \
- __asm pand xmm3, xmm5 /* B */ \
- __asm pand xmm2, xmm6 /* G */ \
- __asm pand xmm0, xmm7 /* R */ \
- __asm por xmm3, xmm2 /* BG */ \
- __asm por xmm0, xmm3 /* BGR */ \
- __asm movdqa xmm3, xmm1 /* B next 4 pixels of argb */ \
- __asm movdqa xmm2, xmm1 /* G */ \
- __asm pslld xmm1, 8 /* R */ \
- __asm psrld xmm3, 3 /* B */ \
- __asm psrld xmm2, 5 /* G */ \
- __asm psrad xmm1, 16 /* R */ \
- __asm pand xmm3, xmm5 /* B */ \
- __asm pand xmm2, xmm6 /* G */ \
- __asm pand xmm1, xmm7 /* R */ \
- __asm por xmm3, xmm2 /* BG */ \
- __asm por xmm1, xmm3 /* BGR */ \
+ __asm punpcklwd xmm0, xmm2 /* BGRR first 4 pixels */ \
+ __asm punpckhwd xmm1, xmm2 /* BGRR next 4 pixels */ /* RRGB -> RGB565 */ \
+ __asm movdqa xmm3, xmm0 /* B first 4 pixels of argb */ \
+ __asm movdqa xmm2, xmm0 /* G */ \
+ __asm pslld xmm0, 8 /* R */ \
+ __asm psrld xmm3, 3 /* B */ \
+ __asm psrld xmm2, 5 /* G */ \
+ __asm psrad xmm0, 16 /* R */ \
+ __asm pand xmm3, xmm5 /* B */ \
+ __asm pand xmm2, xmm6 /* G */ \
+ __asm pand xmm0, xmm7 /* R */ \
+ __asm por xmm3, xmm2 /* BG */ \
+ __asm por xmm0, xmm3 /* BGR */ \
+ __asm movdqa xmm3, xmm1 /* B next 4 pixels of argb */ \
+ __asm movdqa xmm2, xmm1 /* G */ \
+ __asm pslld xmm1, 8 /* R */ \
+ __asm psrld xmm3, 3 /* B */ \
+ __asm psrld xmm2, 5 /* G */ \
+ __asm psrad xmm1, 16 /* R */ \
+ __asm pand xmm3, xmm5 /* B */ \
+ __asm pand xmm2, xmm6 /* G */ \
+ __asm pand xmm1, xmm7 /* R */ \
+ __asm por xmm3, xmm2 /* BG */ \
+ __asm por xmm1, xmm3 /* BGR */ \
__asm packssdw xmm0, xmm1 \
- __asm movdqu 0[edx], xmm0 /* store 8 pixels of RGB565 */ \
+ __asm movdqu 0[edx], xmm0 /* store 8 pixels of RGB565 */ \
__asm lea edx, [edx + 16]}
// 8 pixels.
@@ -2585,6 +2711,46 @@ __declspec(naked) void I444ToARGBRow_SSSE3(
}
}
+// 8 pixels.
+// 8 UV values, mixed with 8 Y and 8A producing 8 ARGB (32 bytes).
+__declspec(naked) void I444AlphaToARGBRow_SSSE3(
+ const uint8_t* y_buf,
+ const uint8_t* u_buf,
+ const uint8_t* v_buf,
+ const uint8_t* a_buf,
+ uint8_t* dst_argb,
+ const struct YuvConstants* yuvconstants,
+ int width) {
+ __asm {
+ push esi
+ push edi
+ push ebx
+ push ebp
+ mov eax, [esp + 16 + 4] // Y
+ mov esi, [esp + 16 + 8] // U
+ mov edi, [esp + 16 + 12] // V
+ mov ebp, [esp + 16 + 16] // A
+ mov edx, [esp + 16 + 20] // argb
+ mov ebx, [esp + 16 + 24] // yuvconstants
+ mov ecx, [esp + 16 + 28] // width
+ sub edi, esi
+
+ convertloop:
+ READYUVA444
+ YUVTORGB(ebx)
+ STOREARGB
+
+ sub ecx, 8
+ jg convertloop
+
+ pop ebp
+ pop ebx
+ pop edi
+ pop esi
+ ret
+ }
+}
+
// 8 pixels.
// 4 UV values upsampled to 8 UV, mixed with 8 Y producing 8 RGB24 (24 bytes).
__declspec(naked) void I422ToRGB24Row_SSSE3(
@@ -4175,13 +4341,13 @@ static const uvec8 kShuffleAlpha = {3u, 0x80, 3u, 0x80, 7u, 0x80, 7u, 0x80,
11u, 0x80, 11u, 0x80, 15u, 0x80, 15u, 0x80};
// Blend 8 pixels at a time.
-__declspec(naked) void ARGBBlendRow_SSSE3(const uint8_t* src_argb0,
+__declspec(naked) void ARGBBlendRow_SSSE3(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
__asm {
push esi
- mov eax, [esp + 4 + 4] // src_argb0
+ mov eax, [esp + 4 + 4] // src_argb
mov esi, [esp + 4 + 8] // src_argb1
mov edx, [esp + 4 + 12] // dst_argb
mov ecx, [esp + 4 + 16] // width
@@ -4270,7 +4436,7 @@ __declspec(naked) void ARGBAttenuateRow_SSSE3(const uint8_t* src_argb,
uint8_t* dst_argb,
int width) {
__asm {
- mov eax, [esp + 4] // src_argb0
+ mov eax, [esp + 4] // src_argb
mov edx, [esp + 8] // dst_argb
mov ecx, [esp + 12] // width
pcmpeqb xmm3, xmm3 // generate mask 0xff000000
@@ -4315,7 +4481,7 @@ __declspec(naked) void ARGBAttenuateRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_argb,
int width) {
__asm {
- mov eax, [esp + 4] // src_argb0
+ mov eax, [esp + 4] // src_argb
mov edx, [esp + 8] // dst_argb
mov ecx, [esp + 12] // width
sub edx, eax
@@ -4409,7 +4575,7 @@ __declspec(naked) void ARGBUnattenuateRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_argb,
int width) {
__asm {
- mov eax, [esp + 4] // src_argb0
+ mov eax, [esp + 4] // src_argb
mov edx, [esp + 8] // dst_argb
mov ecx, [esp + 12] // width
sub edx, eax
@@ -4765,20 +4931,20 @@ __declspec(naked) void ARGBShadeRow_SSE2(const uint8_t* src_argb,
#ifdef HAS_ARGBMULTIPLYROW_SSE2
// Multiply 2 rows of ARGB pixels together, 4 pixels at a time.
-__declspec(naked) void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBMultiplyRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
__asm {
push esi
- mov eax, [esp + 4 + 4] // src_argb0
+ mov eax, [esp + 4 + 4] // src_argb
mov esi, [esp + 4 + 8] // src_argb1
mov edx, [esp + 4 + 12] // dst_argb
mov ecx, [esp + 4 + 16] // width
pxor xmm5, xmm5 // constant 0
convertloop:
- movdqu xmm0, [eax] // read 4 pixels from src_argb0
+ movdqu xmm0, [eax] // read 4 pixels from src_argb
movdqu xmm2, [esi] // read 4 pixels from src_argb1
movdqu xmm1, xmm0
movdqu xmm3, xmm2
@@ -4786,8 +4952,8 @@ __declspec(naked) void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
punpckhbw xmm1, xmm1 // next 2
punpcklbw xmm2, xmm5 // first 2
punpckhbw xmm3, xmm5 // next 2
- pmulhuw xmm0, xmm2 // src_argb0 * src_argb1 first 2
- pmulhuw xmm1, xmm3 // src_argb0 * src_argb1 next 2
+ pmulhuw xmm0, xmm2 // src_argb * src_argb1 first 2
+ pmulhuw xmm1, xmm3 // src_argb * src_argb1 next 2
lea eax, [eax + 16]
lea esi, [esi + 16]
packuswb xmm0, xmm1
@@ -4805,13 +4971,13 @@ __declspec(naked) void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
#ifdef HAS_ARGBADDROW_SSE2
// Add 2 rows of ARGB pixels together, 4 pixels at a time.
// TODO(fbarchard): Port this to posix, neon and other math functions.
-__declspec(naked) void ARGBAddRow_SSE2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBAddRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
__asm {
push esi
- mov eax, [esp + 4 + 4] // src_argb0
+ mov eax, [esp + 4 + 4] // src_argb
mov esi, [esp + 4 + 8] // src_argb1
mov edx, [esp + 4 + 12] // dst_argb
mov ecx, [esp + 4 + 16] // width
@@ -4820,11 +4986,11 @@ __declspec(naked) void ARGBAddRow_SSE2(const uint8_t* src_argb0,
jl convertloop49
convertloop4:
- movdqu xmm0, [eax] // read 4 pixels from src_argb0
+ movdqu xmm0, [eax] // read 4 pixels from src_argb
lea eax, [eax + 16]
movdqu xmm1, [esi] // read 4 pixels from src_argb1
lea esi, [esi + 16]
- paddusb xmm0, xmm1 // src_argb0 + src_argb1
+ paddusb xmm0, xmm1 // src_argb + src_argb1
movdqu [edx], xmm0
lea edx, [edx + 16]
sub ecx, 4
@@ -4835,11 +5001,11 @@ __declspec(naked) void ARGBAddRow_SSE2(const uint8_t* src_argb0,
jl convertloop19
convertloop1:
- movd xmm0, [eax] // read 1 pixels from src_argb0
+ movd xmm0, [eax] // read 1 pixels from src_argb
lea eax, [eax + 4]
movd xmm1, [esi] // read 1 pixels from src_argb1
lea esi, [esi + 4]
- paddusb xmm0, xmm1 // src_argb0 + src_argb1
+ paddusb xmm0, xmm1 // src_argb + src_argb1
movd [edx], xmm0
lea edx, [edx + 4]
sub ecx, 1
@@ -4854,23 +5020,23 @@ __declspec(naked) void ARGBAddRow_SSE2(const uint8_t* src_argb0,
#ifdef HAS_ARGBSUBTRACTROW_SSE2
// Subtract 2 rows of ARGB pixels together, 4 pixels at a time.
-__declspec(naked) void ARGBSubtractRow_SSE2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBSubtractRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
__asm {
push esi
- mov eax, [esp + 4 + 4] // src_argb0
+ mov eax, [esp + 4 + 4] // src_argb
mov esi, [esp + 4 + 8] // src_argb1
mov edx, [esp + 4 + 12] // dst_argb
mov ecx, [esp + 4 + 16] // width
convertloop:
- movdqu xmm0, [eax] // read 4 pixels from src_argb0
+ movdqu xmm0, [eax] // read 4 pixels from src_argb
lea eax, [eax + 16]
movdqu xmm1, [esi] // read 4 pixels from src_argb1
lea esi, [esi + 16]
- psubusb xmm0, xmm1 // src_argb0 - src_argb1
+ psubusb xmm0, xmm1 // src_argb - src_argb1
movdqu [edx], xmm0
lea edx, [edx + 16]
sub ecx, 4
@@ -4884,20 +5050,20 @@ __declspec(naked) void ARGBSubtractRow_SSE2(const uint8_t* src_argb0,
#ifdef HAS_ARGBMULTIPLYROW_AVX2
// Multiply 2 rows of ARGB pixels together, 8 pixels at a time.
-__declspec(naked) void ARGBMultiplyRow_AVX2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBMultiplyRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
__asm {
push esi
- mov eax, [esp + 4 + 4] // src_argb0
+ mov eax, [esp + 4 + 4] // src_argb
mov esi, [esp + 4 + 8] // src_argb1
mov edx, [esp + 4 + 12] // dst_argb
mov ecx, [esp + 4 + 16] // width
vpxor ymm5, ymm5, ymm5 // constant 0
convertloop:
- vmovdqu ymm1, [eax] // read 8 pixels from src_argb0
+ vmovdqu ymm1, [eax] // read 8 pixels from src_argb
lea eax, [eax + 32]
vmovdqu ymm3, [esi] // read 8 pixels from src_argb1
lea esi, [esi + 32]
@@ -4905,8 +5071,8 @@ __declspec(naked) void ARGBMultiplyRow_AVX2(const uint8_t* src_argb0,
vpunpckhbw ymm1, ymm1, ymm1 // high 4
vpunpcklbw ymm2, ymm3, ymm5 // low 4
vpunpckhbw ymm3, ymm3, ymm5 // high 4
- vpmulhuw ymm0, ymm0, ymm2 // src_argb0 * src_argb1 low 4
- vpmulhuw ymm1, ymm1, ymm3 // src_argb0 * src_argb1 high 4
+ vpmulhuw ymm0, ymm0, ymm2 // src_argb * src_argb1 low 4
+ vpmulhuw ymm1, ymm1, ymm3 // src_argb * src_argb1 high 4
vpackuswb ymm0, ymm0, ymm1
vmovdqu [edx], ymm0
lea edx, [edx + 32]
@@ -4922,19 +5088,19 @@ __declspec(naked) void ARGBMultiplyRow_AVX2(const uint8_t* src_argb0,
#ifdef HAS_ARGBADDROW_AVX2
// Add 2 rows of ARGB pixels together, 8 pixels at a time.
-__declspec(naked) void ARGBAddRow_AVX2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBAddRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
__asm {
push esi
- mov eax, [esp + 4 + 4] // src_argb0
+ mov eax, [esp + 4 + 4] // src_argb
mov esi, [esp + 4 + 8] // src_argb1
mov edx, [esp + 4 + 12] // dst_argb
mov ecx, [esp + 4 + 16] // width
convertloop:
- vmovdqu ymm0, [eax] // read 8 pixels from src_argb0
+ vmovdqu ymm0, [eax] // read 8 pixels from src_argb
lea eax, [eax + 32]
vpaddusb ymm0, ymm0, [esi] // add 8 pixels from src_argb1
lea esi, [esi + 32]
@@ -4952,21 +5118,21 @@ __declspec(naked) void ARGBAddRow_AVX2(const uint8_t* src_argb0,
#ifdef HAS_ARGBSUBTRACTROW_AVX2
// Subtract 2 rows of ARGB pixels together, 8 pixels at a time.
-__declspec(naked) void ARGBSubtractRow_AVX2(const uint8_t* src_argb0,
+__declspec(naked) void ARGBSubtractRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) {
__asm {
push esi
- mov eax, [esp + 4 + 4] // src_argb0
+ mov eax, [esp + 4 + 4] // src_argb
mov esi, [esp + 4 + 8] // src_argb1
mov edx, [esp + 4 + 12] // dst_argb
mov ecx, [esp + 4 + 16] // width
convertloop:
- vmovdqu ymm0, [eax] // read 8 pixels from src_argb0
+ vmovdqu ymm0, [eax] // read 8 pixels from src_argb
lea eax, [eax + 32]
- vpsubusb ymm0, ymm0, [esi] // src_argb0 - src_argb1
+ vpsubusb ymm0, ymm0, [esi] // src_argb - src_argb1
lea esi, [esi + 32]
vmovdqu [edx], ymm0
lea edx, [edx + 32]
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale.cc b/third-party/libyuv/third_party/libyuv/source/scale.cc
similarity index 80%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale.cc
rename to third-party/libyuv/third_party/libyuv/source/scale.cc
index cf3c033257..03b0486f76 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/scale.cc
+++ b/third-party/libyuv/third_party/libyuv/source/scale.cc
@@ -1336,6 +1336,327 @@ void ScalePlaneBilinearUp(int src_width,
}
}
+// Scale plane, horizontally up by 2 times.
+// Uses linear filter horizontally, nearest vertically.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original width, using linear interpolation.
+// This is used to scale U and V planes of I422 to I444.
+void ScalePlaneUp2_Linear(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint8_t* src_ptr,
+ uint8_t* dst_ptr) {
+ void (*ScaleRowUp)(const uint8_t* src_ptr, uint8_t* dst_ptr, int dst_width) =
+ ScaleRowUp2_Linear_Any_C;
+ int i;
+ int y;
+ int dy;
+
+ // This function can only scale up by 2 times horizontally.
+ assert(src_width == ((dst_width + 1) / 2));
+
+#ifdef HAS_SCALEROWUP2LINEAR_SSE2
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ ScaleRowUp = ScaleRowUp2_Linear_Any_SSE2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_SSSE3
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ScaleRowUp = ScaleRowUp2_Linear_Any_SSSE3;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ScaleRowUp = ScaleRowUp2_Linear_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ScaleRowUp = ScaleRowUp2_Linear_Any_NEON;
+ }
+#endif
+
+ if (dst_height == 1) {
+ ScaleRowUp(src_ptr + ((src_height - 1) / 2) * src_stride, dst_ptr,
+ dst_width);
+ } else {
+ dy = FixedDiv(src_height - 1, dst_height - 1);
+ y = (1 << 15) - 1;
+ for (i = 0; i < dst_height; ++i) {
+ ScaleRowUp(src_ptr + (y >> 16) * src_stride, dst_ptr, dst_width);
+ dst_ptr += dst_stride;
+ y += dy;
+ }
+ }
+}
+
+// Scale plane, up by 2 times.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original size, using bilinear interpolation.
+// This is used to scale U and V planes of I420 to I444.
+void ScalePlaneUp2_Bilinear(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint8_t* src_ptr,
+ uint8_t* dst_ptr) {
+ void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride,
+ uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
+ ScaleRowUp2_Bilinear_Any_C;
+ int x;
+
+ // This function can only scale up by 2 times.
+ assert(src_width == ((dst_width + 1) / 2));
+ assert(src_height == ((dst_height + 1) / 2));
+
+#ifdef HAS_SCALEROWUP2BILINEAR_SSE2
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_Any_SSE2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_SSSE3
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_Any_SSSE3;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_Any_NEON;
+ }
+#endif
+
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ dst_ptr += dst_stride;
+ for (x = 0; x < src_height - 1; ++x) {
+ Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
+ src_ptr += src_stride;
+ // TODO(fbarchard): Test performance of writing one row of destination at a
+ // time.
+ dst_ptr += 2 * dst_stride;
+ }
+ if (!(dst_height & 1)) {
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ }
+}
+
+// Scale at most 14 bit plane, horizontally up by 2 times.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original width, using linear interpolation.
+// stride is in count of uint16_t.
+// This is used to scale U and V planes of I210 to I410 and I212 to I412.
+void ScalePlaneUp2_12_Linear(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint16_t* src_ptr,
+ uint16_t* dst_ptr) {
+ void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr,
+ int dst_width) = ScaleRowUp2_Linear_16_Any_C;
+ int i;
+ int y;
+ int dy;
+
+ // This function can only scale up by 2 times horizontally.
+ assert(src_width == ((dst_width + 1) / 2));
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_SSSE3
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ScaleRowUp = ScaleRowUp2_Linear_12_Any_SSSE3;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ScaleRowUp = ScaleRowUp2_Linear_12_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ScaleRowUp = ScaleRowUp2_Linear_12_Any_NEON;
+ }
+#endif
+
+ if (dst_height == 1) {
+ ScaleRowUp(src_ptr + ((src_height - 1) / 2) * src_stride, dst_ptr,
+ dst_width);
+ } else {
+ dy = FixedDiv(src_height - 1, dst_height - 1);
+ y = (1 << 15) - 1;
+ for (i = 0; i < dst_height; ++i) {
+ ScaleRowUp(src_ptr + (y >> 16) * src_stride, dst_ptr, dst_width);
+ dst_ptr += dst_stride;
+ y += dy;
+ }
+ }
+}
+
+// Scale at most 12 bit plane, up by 2 times.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original size, using bilinear interpolation.
+// stride is in count of uint16_t.
+// This is used to scale U and V planes of I010 to I410 and I012 to I412.
+void ScalePlaneUp2_12_Bilinear(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint16_t* src_ptr,
+ uint16_t* dst_ptr) {
+ void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride,
+ uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
+ ScaleRowUp2_Bilinear_16_Any_C;
+ int x;
+
+ // This function can only scale up by 2 times.
+ assert(src_width == ((dst_width + 1) / 2));
+ assert(src_height == ((dst_height + 1) / 2));
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_SSSE3
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_SSSE3;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_NEON;
+ }
+#endif
+
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ dst_ptr += dst_stride;
+ for (x = 0; x < src_height - 1; ++x) {
+ Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
+ src_ptr += src_stride;
+ dst_ptr += 2 * dst_stride;
+ }
+ if (!(dst_height & 1)) {
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ }
+}
+
+void ScalePlaneUp2_16_Linear(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint16_t* src_ptr,
+ uint16_t* dst_ptr) {
+ void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr,
+ int dst_width) = ScaleRowUp2_Linear_16_Any_C;
+ int i;
+ int y;
+ int dy;
+
+ // This function can only scale up by 2 times horizontally.
+ assert(src_width == ((dst_width + 1) / 2));
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_SSE2
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ ScaleRowUp = ScaleRowUp2_Linear_16_Any_SSE2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ScaleRowUp = ScaleRowUp2_Linear_16_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ScaleRowUp = ScaleRowUp2_Linear_16_Any_NEON;
+ }
+#endif
+
+ if (dst_height == 1) {
+ ScaleRowUp(src_ptr + ((src_height - 1) / 2) * src_stride, dst_ptr,
+ dst_width);
+ } else {
+ dy = FixedDiv(src_height - 1, dst_height - 1);
+ y = (1 << 15) - 1;
+ for (i = 0; i < dst_height; ++i) {
+ ScaleRowUp(src_ptr + (y >> 16) * src_stride, dst_ptr, dst_width);
+ dst_ptr += dst_stride;
+ y += dy;
+ }
+ }
+}
+
+void ScalePlaneUp2_16_Bilinear(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint16_t* src_ptr,
+ uint16_t* dst_ptr) {
+ void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride,
+ uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
+ ScaleRowUp2_Bilinear_16_Any_C;
+ int x;
+
+ // This function can only scale up by 2 times.
+ assert(src_width == ((dst_width + 1) / 2));
+ assert(src_height == ((dst_height + 1) / 2));
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_SSE2
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_16_Any_SSSE3;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_16_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ Scale2RowUp = ScaleRowUp2_Bilinear_16_Any_NEON;
+ }
+#endif
+
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ dst_ptr += dst_stride;
+ for (x = 0; x < src_height - 1; ++x) {
+ Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
+ src_ptr += src_stride;
+ dst_ptr += 2 * dst_stride;
+ }
+ if (!(dst_height & 1)) {
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ }
+}
+
void ScalePlaneBilinearUp_16(int src_width,
int src_height,
int dst_width,
@@ -1627,6 +1948,17 @@ void ScalePlane(const uint8_t* src,
dst_stride, src, dst);
return;
}
+ if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
+ ScalePlaneUp2_Linear(src_width, src_height, dst_width, dst_height,
+ src_stride, dst_stride, src, dst);
+ return;
+ }
+ if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
+ (filtering == kFilterBilinear || filtering == kFilterBox)) {
+ ScalePlaneUp2_Bilinear(src_width, src_height, dst_width, dst_height,
+ src_stride, dst_stride, src, dst);
+ return;
+ }
if (filtering && dst_height > src_height) {
ScalePlaneBilinearUp(src_width, src_height, dst_width, dst_height,
src_stride, dst_stride, src, dst, filtering);
@@ -1710,6 +2042,17 @@ void ScalePlane_16(const uint16_t* src,
dst_stride, src, dst);
return;
}
+ if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
+ ScalePlaneUp2_16_Linear(src_width, src_height, dst_width, dst_height,
+ src_stride, dst_stride, src, dst);
+ return;
+ }
+ if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
+ (filtering == kFilterBilinear || filtering == kFilterBox)) {
+ ScalePlaneUp2_16_Bilinear(src_width, src_height, dst_width, dst_height,
+ src_stride, dst_stride, src, dst);
+ return;
+ }
if (filtering && dst_height > src_height) {
ScalePlaneBilinearUp_16(src_width, src_height, dst_width, dst_height,
src_stride, dst_stride, src, dst, filtering);
@@ -1724,6 +2067,43 @@ void ScalePlane_16(const uint16_t* src,
dst_stride, src, dst);
}
+LIBYUV_API
+void ScalePlane_12(const uint16_t* src,
+ int src_stride,
+ int src_width,
+ int src_height,
+ uint16_t* dst,
+ int dst_stride,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering) {
+ // Simplify filtering when possible.
+ filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
+ filtering);
+
+ // Negative height means invert the image.
+ if (src_height < 0) {
+ src_height = -src_height;
+ src = src + (src_height - 1) * src_stride;
+ src_stride = -src_stride;
+ }
+
+ if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
+ ScalePlaneUp2_12_Linear(src_width, src_height, dst_width, dst_height,
+ src_stride, dst_stride, src, dst);
+ return;
+ }
+ if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
+ (filtering == kFilterBilinear || filtering == kFilterBox)) {
+ ScalePlaneUp2_12_Bilinear(src_width, src_height, dst_width, dst_height,
+ src_stride, dst_stride, src, dst);
+ return;
+ }
+
+ ScalePlane_16(src, src_stride, src_width, src_height, dst, dst_stride,
+ dst_width, dst_height, filtering);
+}
+
// Scale an I420 image.
// This function in turn calls a scaling function for each plane.
@@ -1749,7 +2129,7 @@ int I420Scale(const uint8_t* src_y,
int src_halfheight = SUBSAMPLE(src_height, 1, 1);
int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1);
int dst_halfheight = SUBSAMPLE(dst_height, 1, 1);
- if (!src_y || !src_u || !src_v || src_width == 0 || src_height == 0 ||
+ if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 ||
src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v ||
dst_width <= 0 || dst_height <= 0) {
return -1;
@@ -1786,7 +2166,7 @@ int I420Scale_16(const uint16_t* src_y,
int src_halfheight = SUBSAMPLE(src_height, 1, 1);
int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1);
int dst_halfheight = SUBSAMPLE(dst_height, 1, 1);
- if (!src_y || !src_u || !src_v || src_width == 0 || src_height == 0 ||
+ if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 ||
src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v ||
dst_width <= 0 || dst_height <= 0) {
return -1;
@@ -1801,6 +2181,43 @@ int I420Scale_16(const uint16_t* src_y,
return 0;
}
+LIBYUV_API
+int I420Scale_12(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ int src_width,
+ int src_height,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering) {
+ int src_halfwidth = SUBSAMPLE(src_width, 1, 1);
+ int src_halfheight = SUBSAMPLE(src_height, 1, 1);
+ int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1);
+ int dst_halfheight = SUBSAMPLE(dst_height, 1, 1);
+ if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 ||
+ src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v ||
+ dst_width <= 0 || dst_height <= 0) {
+ return -1;
+ }
+
+ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y,
+ dst_width, dst_height, filtering);
+ ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u,
+ dst_stride_u, dst_halfwidth, dst_halfheight, filtering);
+ ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v,
+ dst_stride_v, dst_halfwidth, dst_halfheight, filtering);
+ return 0;
+}
+
// Scale an I444 image.
// This function in turn calls a scaling function for each plane.
@@ -1822,7 +2239,7 @@ int I444Scale(const uint8_t* src_y,
int dst_width,
int dst_height,
enum FilterMode filtering) {
- if (!src_y || !src_u || !src_v || src_width == 0 || src_height == 0 ||
+ if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 ||
src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v ||
dst_width <= 0 || dst_height <= 0) {
return -1;
@@ -1855,7 +2272,7 @@ int I444Scale_16(const uint16_t* src_y,
int dst_width,
int dst_height,
enum FilterMode filtering) {
- if (!src_y || !src_u || !src_v || src_width == 0 || src_height == 0 ||
+ if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 ||
src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v ||
dst_width <= 0 || dst_height <= 0) {
return -1;
@@ -1870,6 +2287,39 @@ int I444Scale_16(const uint16_t* src_y,
return 0;
}
+LIBYUV_API
+int I444Scale_12(const uint16_t* src_y,
+ int src_stride_y,
+ const uint16_t* src_u,
+ int src_stride_u,
+ const uint16_t* src_v,
+ int src_stride_v,
+ int src_width,
+ int src_height,
+ uint16_t* dst_y,
+ int dst_stride_y,
+ uint16_t* dst_u,
+ int dst_stride_u,
+ uint16_t* dst_v,
+ int dst_stride_v,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering) {
+ if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 ||
+ src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v ||
+ dst_width <= 0 || dst_height <= 0) {
+ return -1;
+ }
+
+ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y,
+ dst_width, dst_height, filtering);
+ ScalePlane_12(src_u, src_stride_u, src_width, src_height, dst_u, dst_stride_u,
+ dst_width, dst_height, filtering);
+ ScalePlane_12(src_v, src_stride_v, src_width, src_height, dst_v, dst_stride_v,
+ dst_width, dst_height, filtering);
+ return 0;
+}
+
// Scale an NV12 image.
// This function in turn calls a scaling function for each plane.
@@ -1891,7 +2341,7 @@ int NV12Scale(const uint8_t* src_y,
int src_halfheight = SUBSAMPLE(src_height, 1, 1);
int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1);
int dst_halfheight = SUBSAMPLE(dst_height, 1, 1);
- if (!src_y || !src_uv || src_width == 0 || src_height == 0 ||
+ if (!src_y || !src_uv || src_width <= 0 || src_height == 0 ||
src_width > 32768 || src_height > 32768 || !dst_y || !dst_uv ||
dst_width <= 0 || dst_height <= 0) {
return -1;
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_any.cc b/third-party/libyuv/third_party/libyuv/source/scale_any.cc
similarity index 55%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_any.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_any.cc
index c93d70c5fc..965749c415 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_any.cc
+++ b/third-party/libyuv/third_party/libyuv/source/scale_any.cc
@@ -609,6 +609,417 @@ CANY(ScaleARGBFilterCols_Any_MSA,
#endif
#undef CANY
+// Scale up horizontally 2 times using linear filter.
+#define SUH2LANY(NAME, SIMD, C, MASK, PTYPE) \
+ void NAME(const PTYPE* src_ptr, PTYPE* dst_ptr, int dst_width) { \
+ int work_width = (dst_width - 1) & ~1; \
+ int r = work_width & MASK; \
+ int n = work_width & ~MASK; \
+ dst_ptr[0] = src_ptr[0]; \
+ if (work_width > 0) { \
+ if (n != 0) { \
+ SIMD(src_ptr, dst_ptr + 1, n); \
+ } \
+ C(src_ptr + (n / 2), dst_ptr + n + 1, r); \
+ } \
+ dst_ptr[dst_width - 1] = src_ptr[(dst_width / 2) - 1]; \
+ }
+
+// Even the C versions need to be wrapped, because boundary pixels have to
+// be handled differently
+
+SUH2LANY(ScaleRowUp2_Linear_Any_C,
+ ScaleRowUp2_Linear_C,
+ ScaleRowUp2_Linear_C,
+ 0,
+ uint8_t)
+
+SUH2LANY(ScaleRowUp2_Linear_16_Any_C,
+ ScaleRowUp2_Linear_16_C,
+ ScaleRowUp2_Linear_16_C,
+ 0,
+ uint16_t)
+
+#ifdef HAS_SCALEROWUP2LINEAR_SSE2
+SUH2LANY(ScaleRowUp2_Linear_Any_SSE2,
+ ScaleRowUp2_Linear_SSE2,
+ ScaleRowUp2_Linear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_SSSE3
+SUH2LANY(ScaleRowUp2_Linear_Any_SSSE3,
+ ScaleRowUp2_Linear_SSSE3,
+ ScaleRowUp2_Linear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_SSSE3
+SUH2LANY(ScaleRowUp2_Linear_12_Any_SSSE3,
+ ScaleRowUp2_Linear_12_SSSE3,
+ ScaleRowUp2_Linear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_SSE2
+SUH2LANY(ScaleRowUp2_Linear_16_Any_SSE2,
+ ScaleRowUp2_Linear_16_SSE2,
+ ScaleRowUp2_Linear_16_C,
+ 7,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_AVX2
+SUH2LANY(ScaleRowUp2_Linear_Any_AVX2,
+ ScaleRowUp2_Linear_AVX2,
+ ScaleRowUp2_Linear_C,
+ 31,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_AVX2
+SUH2LANY(ScaleRowUp2_Linear_12_Any_AVX2,
+ ScaleRowUp2_Linear_12_AVX2,
+ ScaleRowUp2_Linear_16_C,
+ 31,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_AVX2
+SUH2LANY(ScaleRowUp2_Linear_16_Any_AVX2,
+ ScaleRowUp2_Linear_16_AVX2,
+ ScaleRowUp2_Linear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_NEON
+SUH2LANY(ScaleRowUp2_Linear_Any_NEON,
+ ScaleRowUp2_Linear_NEON,
+ ScaleRowUp2_Linear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_NEON
+SUH2LANY(ScaleRowUp2_Linear_12_Any_NEON,
+ ScaleRowUp2_Linear_12_NEON,
+ ScaleRowUp2_Linear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_NEON
+SUH2LANY(ScaleRowUp2_Linear_16_Any_NEON,
+ ScaleRowUp2_Linear_16_NEON,
+ ScaleRowUp2_Linear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#undef SUH2LANY
+
+// Scale up 2 times using bilinear filter.
+// This function produces 2 rows at a time.
+#define SU2BLANY(NAME, SIMD, C, MASK, PTYPE) \
+ void NAME(const PTYPE* src_ptr, ptrdiff_t src_stride, PTYPE* dst_ptr, \
+ ptrdiff_t dst_stride, int dst_width) { \
+ int work_width = (dst_width - 1) & ~1; \
+ int r = work_width & MASK; \
+ int n = work_width & ~MASK; \
+ const PTYPE* sa = src_ptr; \
+ const PTYPE* sb = src_ptr + src_stride; \
+ PTYPE* da = dst_ptr; \
+ PTYPE* db = dst_ptr + dst_stride; \
+ da[0] = (3 * sa[0] + sb[0] + 2) >> 2; \
+ db[0] = (sa[0] + 3 * sb[0] + 2) >> 2; \
+ if (work_width > 0) { \
+ if (n != 0) { \
+ SIMD(sa, sb - sa, da + 1, db - da, n); \
+ } \
+ C(sa + (n / 2), sb - sa, da + n + 1, db - da, r); \
+ } \
+ da[dst_width - 1] = \
+ (3 * sa[(dst_width - 1) / 2] + sb[(dst_width - 1) / 2] + 2) >> 2; \
+ db[dst_width - 1] = \
+ (sa[(dst_width - 1) / 2] + 3 * sb[(dst_width - 1) / 2] + 2) >> 2; \
+ }
+
+SU2BLANY(ScaleRowUp2_Bilinear_Any_C,
+ ScaleRowUp2_Bilinear_C,
+ ScaleRowUp2_Bilinear_C,
+ 0,
+ uint8_t)
+
+SU2BLANY(ScaleRowUp2_Bilinear_16_Any_C,
+ ScaleRowUp2_Bilinear_16_C,
+ ScaleRowUp2_Bilinear_16_C,
+ 0,
+ uint16_t)
+
+#ifdef HAS_SCALEROWUP2BILINEAR_SSE2
+SU2BLANY(ScaleRowUp2_Bilinear_Any_SSE2,
+ ScaleRowUp2_Bilinear_SSE2,
+ ScaleRowUp2_Bilinear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_SSSE3
+SU2BLANY(ScaleRowUp2_Bilinear_12_Any_SSSE3,
+ ScaleRowUp2_Bilinear_12_SSSE3,
+ ScaleRowUp2_Bilinear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_SSE2
+SU2BLANY(ScaleRowUp2_Bilinear_16_Any_SSSE3,
+ ScaleRowUp2_Bilinear_16_SSE2,
+ ScaleRowUp2_Bilinear_16_C,
+ 7,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_SSSE3
+SU2BLANY(ScaleRowUp2_Bilinear_Any_SSSE3,
+ ScaleRowUp2_Bilinear_SSSE3,
+ ScaleRowUp2_Bilinear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_AVX2
+SU2BLANY(ScaleRowUp2_Bilinear_Any_AVX2,
+ ScaleRowUp2_Bilinear_AVX2,
+ ScaleRowUp2_Bilinear_C,
+ 31,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_AVX2
+SU2BLANY(ScaleRowUp2_Bilinear_12_Any_AVX2,
+ ScaleRowUp2_Bilinear_12_AVX2,
+ ScaleRowUp2_Bilinear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_AVX2
+SU2BLANY(ScaleRowUp2_Bilinear_16_Any_AVX2,
+ ScaleRowUp2_Bilinear_16_AVX2,
+ ScaleRowUp2_Bilinear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_NEON
+SU2BLANY(ScaleRowUp2_Bilinear_Any_NEON,
+ ScaleRowUp2_Bilinear_NEON,
+ ScaleRowUp2_Bilinear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_NEON
+SU2BLANY(ScaleRowUp2_Bilinear_12_Any_NEON,
+ ScaleRowUp2_Bilinear_12_NEON,
+ ScaleRowUp2_Bilinear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_NEON
+SU2BLANY(ScaleRowUp2_Bilinear_16_Any_NEON,
+ ScaleRowUp2_Bilinear_16_NEON,
+ ScaleRowUp2_Bilinear_16_C,
+ 7,
+ uint16_t)
+#endif
+
+#undef SU2BLANY
+
+// Scale bi-planar plane up horizontally 2 times using linear filter.
+#define SBUH2LANY(NAME, SIMD, C, MASK, PTYPE) \
+ void NAME(const PTYPE* src_ptr, PTYPE* dst_ptr, int dst_width) { \
+ int work_width = (dst_width - 1) & ~1; \
+ int r = work_width & MASK; \
+ int n = work_width & ~MASK; \
+ dst_ptr[0] = src_ptr[0]; \
+ dst_ptr[1] = src_ptr[1]; \
+ if (work_width > 0) { \
+ if (n != 0) { \
+ SIMD(src_ptr, dst_ptr + 2, n); \
+ } \
+ C(src_ptr + n, dst_ptr + 2 * n + 2, r); \
+ } \
+ dst_ptr[2 * dst_width - 2] = src_ptr[((dst_width + 1) & ~1) - 2]; \
+ dst_ptr[2 * dst_width - 1] = src_ptr[((dst_width + 1) & ~1) - 1]; \
+ }
+
+SBUH2LANY(ScaleUVRowUp2_Linear_Any_C,
+ ScaleUVRowUp2_Linear_C,
+ ScaleUVRowUp2_Linear_C,
+ 0,
+ uint8_t)
+
+SBUH2LANY(ScaleUVRowUp2_Linear_16_Any_C,
+ ScaleUVRowUp2_Linear_16_C,
+ ScaleUVRowUp2_Linear_16_C,
+ 0,
+ uint16_t)
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_SSSE3
+SBUH2LANY(ScaleUVRowUp2_Linear_Any_SSSE3,
+ ScaleUVRowUp2_Linear_SSSE3,
+ ScaleUVRowUp2_Linear_C,
+ 7,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_AVX2
+SBUH2LANY(ScaleUVRowUp2_Linear_Any_AVX2,
+ ScaleUVRowUp2_Linear_AVX2,
+ ScaleUVRowUp2_Linear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_SSE2
+SBUH2LANY(ScaleUVRowUp2_Linear_16_Any_SSE2,
+ ScaleUVRowUp2_Linear_16_SSE2,
+ ScaleUVRowUp2_Linear_16_C,
+ 3,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_AVX2
+SBUH2LANY(ScaleUVRowUp2_Linear_16_Any_AVX2,
+ ScaleUVRowUp2_Linear_16_AVX2,
+ ScaleUVRowUp2_Linear_16_C,
+ 7,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_NEON
+SBUH2LANY(ScaleUVRowUp2_Linear_Any_NEON,
+ ScaleUVRowUp2_Linear_NEON,
+ ScaleUVRowUp2_Linear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_NEON
+SBUH2LANY(ScaleUVRowUp2_Linear_16_Any_NEON,
+ ScaleUVRowUp2_Linear_16_NEON,
+ ScaleUVRowUp2_Linear_16_C,
+ 15,
+ uint16_t)
+#endif
+
+#undef SBUH2LANY
+
+// Scale bi-planar plane up 2 times using bilinear filter.
+// This function produces 2 rows at a time.
+#define SBU2BLANY(NAME, SIMD, C, MASK, PTYPE) \
+ void NAME(const PTYPE* src_ptr, ptrdiff_t src_stride, PTYPE* dst_ptr, \
+ ptrdiff_t dst_stride, int dst_width) { \
+ int work_width = (dst_width - 1) & ~1; \
+ int r = work_width & MASK; \
+ int n = work_width & ~MASK; \
+ const PTYPE* sa = src_ptr; \
+ const PTYPE* sb = src_ptr + src_stride; \
+ PTYPE* da = dst_ptr; \
+ PTYPE* db = dst_ptr + dst_stride; \
+ da[0] = (3 * sa[0] + sb[0] + 2) >> 2; \
+ db[0] = (sa[0] + 3 * sb[0] + 2) >> 2; \
+ da[1] = (3 * sa[1] + sb[1] + 2) >> 2; \
+ db[1] = (sa[1] + 3 * sb[1] + 2) >> 2; \
+ if (work_width > 0) { \
+ if (n != 0) { \
+ SIMD(sa, sb - sa, da + 2, db - da, n); \
+ } \
+ C(sa + n, sb - sa, da + 2 * n + 2, db - da, r); \
+ } \
+ da[2 * dst_width - 2] = (3 * sa[((dst_width + 1) & ~1) - 2] + \
+ sb[((dst_width + 1) & ~1) - 2] + 2) >> \
+ 2; \
+ db[2 * dst_width - 2] = (sa[((dst_width + 1) & ~1) - 2] + \
+ 3 * sb[((dst_width + 1) & ~1) - 2] + 2) >> \
+ 2; \
+ da[2 * dst_width - 1] = (3 * sa[((dst_width + 1) & ~1) - 1] + \
+ sb[((dst_width + 1) & ~1) - 1] + 2) >> \
+ 2; \
+ db[2 * dst_width - 1] = (sa[((dst_width + 1) & ~1) - 1] + \
+ 3 * sb[((dst_width + 1) & ~1) - 1] + 2) >> \
+ 2; \
+ }
+
+SBU2BLANY(ScaleUVRowUp2_Bilinear_Any_C,
+ ScaleUVRowUp2_Bilinear_C,
+ ScaleUVRowUp2_Bilinear_C,
+ 0,
+ uint8_t)
+
+SBU2BLANY(ScaleUVRowUp2_Bilinear_16_Any_C,
+ ScaleUVRowUp2_Bilinear_16_C,
+ ScaleUVRowUp2_Bilinear_16_C,
+ 0,
+ uint16_t)
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_SSSE3
+SBU2BLANY(ScaleUVRowUp2_Bilinear_Any_SSSE3,
+ ScaleUVRowUp2_Bilinear_SSSE3,
+ ScaleUVRowUp2_Bilinear_C,
+ 7,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_AVX2
+SBU2BLANY(ScaleUVRowUp2_Bilinear_Any_AVX2,
+ ScaleUVRowUp2_Bilinear_AVX2,
+ ScaleUVRowUp2_Bilinear_C,
+ 15,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_SSE2
+SBU2BLANY(ScaleUVRowUp2_Bilinear_16_Any_SSE2,
+ ScaleUVRowUp2_Bilinear_16_SSE2,
+ ScaleUVRowUp2_Bilinear_16_C,
+ 7,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_AVX2
+SBU2BLANY(ScaleUVRowUp2_Bilinear_16_Any_AVX2,
+ ScaleUVRowUp2_Bilinear_16_AVX2,
+ ScaleUVRowUp2_Bilinear_16_C,
+ 7,
+ uint16_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_NEON
+SBU2BLANY(ScaleUVRowUp2_Bilinear_Any_NEON,
+ ScaleUVRowUp2_Bilinear_NEON,
+ ScaleUVRowUp2_Bilinear_C,
+ 7,
+ uint8_t)
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_NEON
+SBU2BLANY(ScaleUVRowUp2_Bilinear_16_Any_NEON,
+ ScaleUVRowUp2_Bilinear_16_NEON,
+ ScaleUVRowUp2_Bilinear_16_C,
+ 7,
+ uint16_t)
+#endif
+
+#undef SBU2BLANY
+
#ifdef __cplusplus
} // extern "C"
} // namespace libyuv
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_argb.cc b/third-party/libyuv/third_party/libyuv/source/scale_argb.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_argb.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_argb.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_common.cc b/third-party/libyuv/third_party/libyuv/source/scale_common.cc
similarity index 85%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_common.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_common.cc
index 81959925c8..da96d42865 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_common.cc
+++ b/third-party/libyuv/third_party/libyuv/source/scale_common.cc
@@ -400,6 +400,95 @@ void ScaleRowDown34_1_Box_16_C(const uint16_t* src_ptr,
}
}
+// Sample position: (O is src sample position, X is dst sample position)
+//
+// v dst_ptr at here v stop at here
+// X O X X O X X O X X O X X O X
+// ^ src_ptr at here
+void ScaleRowUp2_Linear_C(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ dst_ptr[2 * x + 0] = (src_ptr[x + 0] * 3 + src_ptr[x + 1] * 1 + 2) >> 2;
+ dst_ptr[2 * x + 1] = (src_ptr[x + 0] * 1 + src_ptr[x + 1] * 3 + 2) >> 2;
+ }
+}
+
+// Sample position: (O is src sample position, X is dst sample position)
+//
+// src_ptr at here
+// X v X X X X X X X X X
+// O O O O O
+// X X X X X X X X X X
+// ^ dst_ptr at here ^ stop at here
+// X X X X X X X X X X
+// O O O O O
+// X X X X X X X X X X
+void ScaleRowUp2_Bilinear_C(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint8_t* s = src_ptr;
+ const uint8_t* t = src_ptr + src_stride;
+ uint8_t* d = dst_ptr;
+ uint8_t* e = dst_ptr + dst_stride;
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ d[2 * x + 0] =
+ (s[x + 0] * 9 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 1 + 8) >> 4;
+ d[2 * x + 1] =
+ (s[x + 0] * 3 + s[x + 1] * 9 + t[x + 0] * 1 + t[x + 1] * 3 + 8) >> 4;
+ e[2 * x + 0] =
+ (s[x + 0] * 3 + s[x + 1] * 1 + t[x + 0] * 9 + t[x + 1] * 3 + 8) >> 4;
+ e[2 * x + 1] =
+ (s[x + 0] * 1 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 9 + 8) >> 4;
+ }
+}
+
+// Only suitable for at most 14 bit range.
+void ScaleRowUp2_Linear_16_C(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ dst_ptr[2 * x + 0] = (src_ptr[x + 0] * 3 + src_ptr[x + 1] * 1 + 2) >> 2;
+ dst_ptr[2 * x + 1] = (src_ptr[x + 0] * 1 + src_ptr[x + 1] * 3 + 2) >> 2;
+ }
+}
+
+// Only suitable for at most 12bit range.
+void ScaleRowUp2_Bilinear_16_C(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* s = src_ptr;
+ const uint16_t* t = src_ptr + src_stride;
+ uint16_t* d = dst_ptr;
+ uint16_t* e = dst_ptr + dst_stride;
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ d[2 * x + 0] =
+ (s[x + 0] * 9 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 1 + 8) >> 4;
+ d[2 * x + 1] =
+ (s[x + 0] * 3 + s[x + 1] * 9 + t[x + 0] * 1 + t[x + 1] * 3 + 8) >> 4;
+ e[2 * x + 0] =
+ (s[x + 0] * 3 + s[x + 1] * 1 + t[x + 0] * 9 + t[x + 1] * 3 + 8) >> 4;
+ e[2 * x + 1] =
+ (s[x + 0] * 1 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 9 + 8) >> 4;
+ }
+}
+
// Scales a single row of pixels using point sampling.
void ScaleCols_C(uint8_t* dst_ptr,
const uint8_t* src_ptr,
@@ -1111,6 +1200,122 @@ void ScaleUVRowDownEvenBox_C(const uint8_t* src_uv,
}
}
+void ScaleUVRowUp2_Linear_C(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ dst_ptr[4 * x + 0] =
+ (src_ptr[2 * x + 0] * 3 + src_ptr[2 * x + 2] * 1 + 2) >> 2;
+ dst_ptr[4 * x + 1] =
+ (src_ptr[2 * x + 1] * 3 + src_ptr[2 * x + 3] * 1 + 2) >> 2;
+ dst_ptr[4 * x + 2] =
+ (src_ptr[2 * x + 0] * 1 + src_ptr[2 * x + 2] * 3 + 2) >> 2;
+ dst_ptr[4 * x + 3] =
+ (src_ptr[2 * x + 1] * 1 + src_ptr[2 * x + 3] * 3 + 2) >> 2;
+ }
+}
+
+void ScaleUVRowUp2_Bilinear_C(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint8_t* s = src_ptr;
+ const uint8_t* t = src_ptr + src_stride;
+ uint8_t* d = dst_ptr;
+ uint8_t* e = dst_ptr + dst_stride;
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ d[4 * x + 0] = (s[2 * x + 0] * 9 + s[2 * x + 2] * 3 + t[2 * x + 0] * 3 +
+ t[2 * x + 2] * 1 + 8) >>
+ 4;
+ d[4 * x + 1] = (s[2 * x + 1] * 9 + s[2 * x + 3] * 3 + t[2 * x + 1] * 3 +
+ t[2 * x + 3] * 1 + 8) >>
+ 4;
+ d[4 * x + 2] = (s[2 * x + 0] * 3 + s[2 * x + 2] * 9 + t[2 * x + 0] * 1 +
+ t[2 * x + 2] * 3 + 8) >>
+ 4;
+ d[4 * x + 3] = (s[2 * x + 1] * 3 + s[2 * x + 3] * 9 + t[2 * x + 1] * 1 +
+ t[2 * x + 3] * 3 + 8) >>
+ 4;
+ e[4 * x + 0] = (s[2 * x + 0] * 3 + s[2 * x + 2] * 1 + t[2 * x + 0] * 9 +
+ t[2 * x + 2] * 3 + 8) >>
+ 4;
+ e[4 * x + 1] = (s[2 * x + 1] * 3 + s[2 * x + 3] * 1 + t[2 * x + 1] * 9 +
+ t[2 * x + 3] * 3 + 8) >>
+ 4;
+ e[4 * x + 2] = (s[2 * x + 0] * 1 + s[2 * x + 2] * 3 + t[2 * x + 0] * 3 +
+ t[2 * x + 2] * 9 + 8) >>
+ 4;
+ e[4 * x + 3] = (s[2 * x + 1] * 1 + s[2 * x + 3] * 3 + t[2 * x + 1] * 3 +
+ t[2 * x + 3] * 9 + 8) >>
+ 4;
+ }
+}
+
+void ScaleUVRowUp2_Linear_16_C(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ dst_ptr[4 * x + 0] =
+ (src_ptr[2 * x + 0] * 3 + src_ptr[2 * x + 2] * 1 + 2) >> 2;
+ dst_ptr[4 * x + 1] =
+ (src_ptr[2 * x + 1] * 3 + src_ptr[2 * x + 3] * 1 + 2) >> 2;
+ dst_ptr[4 * x + 2] =
+ (src_ptr[2 * x + 0] * 1 + src_ptr[2 * x + 2] * 3 + 2) >> 2;
+ dst_ptr[4 * x + 3] =
+ (src_ptr[2 * x + 1] * 1 + src_ptr[2 * x + 3] * 3 + 2) >> 2;
+ }
+}
+
+void ScaleUVRowUp2_Bilinear_16_C(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* s = src_ptr;
+ const uint16_t* t = src_ptr + src_stride;
+ uint16_t* d = dst_ptr;
+ uint16_t* e = dst_ptr + dst_stride;
+ int src_width = dst_width >> 1;
+ int x;
+ assert((dst_width % 2 == 0) && (dst_width >= 0));
+ for (x = 0; x < src_width; ++x) {
+ d[4 * x + 0] = (s[2 * x + 0] * 9 + s[2 * x + 2] * 3 + t[2 * x + 0] * 3 +
+ t[2 * x + 2] * 1 + 8) >>
+ 4;
+ d[4 * x + 1] = (s[2 * x + 1] * 9 + s[2 * x + 3] * 3 + t[2 * x + 1] * 3 +
+ t[2 * x + 3] * 1 + 8) >>
+ 4;
+ d[4 * x + 2] = (s[2 * x + 0] * 3 + s[2 * x + 2] * 9 + t[2 * x + 0] * 1 +
+ t[2 * x + 2] * 3 + 8) >>
+ 4;
+ d[4 * x + 3] = (s[2 * x + 1] * 3 + s[2 * x + 3] * 9 + t[2 * x + 1] * 1 +
+ t[2 * x + 3] * 3 + 8) >>
+ 4;
+ e[4 * x + 0] = (s[2 * x + 0] * 3 + s[2 * x + 2] * 1 + t[2 * x + 0] * 9 +
+ t[2 * x + 2] * 3 + 8) >>
+ 4;
+ e[4 * x + 1] = (s[2 * x + 1] * 3 + s[2 * x + 3] * 1 + t[2 * x + 1] * 9 +
+ t[2 * x + 3] * 3 + 8) >>
+ 4;
+ e[4 * x + 2] = (s[2 * x + 0] * 1 + s[2 * x + 2] * 3 + t[2 * x + 0] * 3 +
+ t[2 * x + 2] * 9 + 8) >>
+ 4;
+ e[4 * x + 3] = (s[2 * x + 1] * 1 + s[2 * x + 3] * 3 + t[2 * x + 1] * 3 +
+ t[2 * x + 3] * 9 + 8) >>
+ 4;
+ }
+}
+
// Scales a single row of pixels using point sampling.
void ScaleUVCols_C(uint8_t* dst_uv,
const uint8_t* src_uv,
diff --git a/third-party/libyuv/third_party/libyuv/source/scale_gcc.cc b/third-party/libyuv/third_party/libyuv/source/scale_gcc.cc
new file mode 100644
index 0000000000..279c5e4020
--- /dev/null
+++ b/third-party/libyuv/third_party/libyuv/source/scale_gcc.cc
@@ -0,0 +1,2947 @@
+/*
+ * Copyright 2013 The LibYuv Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "libyuv/row.h"
+#include "libyuv/scale_row.h"
+
+#ifdef __cplusplus
+namespace libyuv {
+extern "C" {
+#endif
+
+// This module is for GCC x86 and x64.
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
+
+// Offsets for source bytes 0 to 9
+static const uvec8 kShuf0 = {0, 1, 3, 4, 5, 7, 8, 9,
+ 128, 128, 128, 128, 128, 128, 128, 128};
+
+// Offsets for source bytes 11 to 20 with 8 subtracted = 3 to 12.
+static const uvec8 kShuf1 = {3, 4, 5, 7, 8, 9, 11, 12,
+ 128, 128, 128, 128, 128, 128, 128, 128};
+
+// Offsets for source bytes 21 to 31 with 16 subtracted = 5 to 31.
+static const uvec8 kShuf2 = {5, 7, 8, 9, 11, 12, 13, 15,
+ 128, 128, 128, 128, 128, 128, 128, 128};
+
+// Offsets for source bytes 0 to 10
+static const uvec8 kShuf01 = {0, 1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10};
+
+// Offsets for source bytes 10 to 21 with 8 subtracted = 3 to 13.
+static const uvec8 kShuf11 = {2, 3, 4, 5, 5, 6, 6, 7,
+ 8, 9, 9, 10, 10, 11, 12, 13};
+
+// Offsets for source bytes 21 to 31 with 16 subtracted = 5 to 31.
+static const uvec8 kShuf21 = {5, 6, 6, 7, 8, 9, 9, 10,
+ 10, 11, 12, 13, 13, 14, 14, 15};
+
+// Coefficients for source bytes 0 to 10
+static const uvec8 kMadd01 = {3, 1, 2, 2, 1, 3, 3, 1, 2, 2, 1, 3, 3, 1, 2, 2};
+
+// Coefficients for source bytes 10 to 21
+static const uvec8 kMadd11 = {1, 3, 3, 1, 2, 2, 1, 3, 3, 1, 2, 2, 1, 3, 3, 1};
+
+// Coefficients for source bytes 21 to 31
+static const uvec8 kMadd21 = {2, 2, 1, 3, 3, 1, 2, 2, 1, 3, 3, 1, 2, 2, 1, 3};
+
+// Coefficients for source bytes 21 to 31
+static const vec16 kRound34 = {2, 2, 2, 2, 2, 2, 2, 2};
+
+static const uvec8 kShuf38a = {0, 3, 6, 8, 11, 14, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128};
+
+static const uvec8 kShuf38b = {128, 128, 128, 128, 128, 128, 0, 3,
+ 6, 8, 11, 14, 128, 128, 128, 128};
+
+// Arrange words 0,3,6 into 0,1,2
+static const uvec8 kShufAc = {0, 1, 6, 7, 12, 13, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128};
+
+// Arrange words 0,3,6 into 3,4,5
+static const uvec8 kShufAc3 = {128, 128, 128, 128, 128, 128, 0, 1,
+ 6, 7, 12, 13, 128, 128, 128, 128};
+
+// Scaling values for boxes of 3x3 and 2x3
+static const uvec16 kScaleAc33 = {65536 / 9, 65536 / 9, 65536 / 6, 65536 / 9,
+ 65536 / 9, 65536 / 6, 0, 0};
+
+// Arrange first value for pixels 0,1,2,3,4,5
+static const uvec8 kShufAb0 = {0, 128, 3, 128, 6, 128, 8, 128,
+ 11, 128, 14, 128, 128, 128, 128, 128};
+
+// Arrange second value for pixels 0,1,2,3,4,5
+static const uvec8 kShufAb1 = {1, 128, 4, 128, 7, 128, 9, 128,
+ 12, 128, 15, 128, 128, 128, 128, 128};
+
+// Arrange third value for pixels 0,1,2,3,4,5
+static const uvec8 kShufAb2 = {2, 128, 5, 128, 128, 128, 10, 128,
+ 13, 128, 128, 128, 128, 128, 128, 128};
+
+// Scaling values for boxes of 3x2 and 2x2
+static const uvec16 kScaleAb2 = {65536 / 3, 65536 / 3, 65536 / 2, 65536 / 3,
+ 65536 / 3, 65536 / 2, 0, 0};
+
+// GCC versions of row functions are verbatim conversions from Visual C.
+// Generated using gcc disassembly on Visual C object file:
+// objdump -D yuvscaler.obj >yuvscaler.txt
+
+void ScaleRowDown2_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(
+ // 16 pixel loop.
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "lea 0x20(%0),%0 \n"
+ "psrlw $0x8,%%xmm0 \n"
+ "psrlw $0x8,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1");
+}
+
+void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(
+ "pcmpeqb %%xmm4,%%xmm4 \n"
+ "psrlw $0xf,%%xmm4 \n"
+ "packuswb %%xmm4,%%xmm4 \n"
+ "pxor %%xmm5,%%xmm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "lea 0x20(%0),%0 \n"
+ "pmaddubsw %%xmm4,%%xmm0 \n"
+ "pmaddubsw %%xmm4,%%xmm1 \n"
+ "pavgw %%xmm5,%%xmm0 \n"
+ "pavgw %%xmm5,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1", "xmm4", "xmm5");
+}
+
+void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "pcmpeqb %%xmm4,%%xmm4 \n"
+ "psrlw $0xf,%%xmm4 \n"
+ "packuswb %%xmm4,%%xmm4 \n"
+ "pxor %%xmm5,%%xmm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "movdqu 0x00(%0,%3,1),%%xmm2 \n"
+ "movdqu 0x10(%0,%3,1),%%xmm3 \n"
+ "lea 0x20(%0),%0 \n"
+ "pmaddubsw %%xmm4,%%xmm0 \n"
+ "pmaddubsw %%xmm4,%%xmm1 \n"
+ "pmaddubsw %%xmm4,%%xmm2 \n"
+ "pmaddubsw %%xmm4,%%xmm3 \n"
+ "paddw %%xmm2,%%xmm0 \n"
+ "paddw %%xmm3,%%xmm1 \n"
+ "psrlw $0x1,%%xmm0 \n"
+ "psrlw $0x1,%%xmm1 \n"
+ "pavgw %%xmm5,%%xmm0 \n"
+ "pavgw %%xmm5,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5");
+}
+
+#ifdef HAS_SCALEROWDOWN2_AVX2
+void ScaleRowDown2_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "lea 0x40(%0),%0 \n"
+ "vpsrlw $0x8,%%ymm0,%%ymm0 \n"
+ "vpsrlw $0x8,%%ymm1,%%ymm1 \n"
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1");
+}
+
+void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(
+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n"
+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpxor %%ymm5,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "lea 0x40(%0),%0 \n"
+ "vpmaddubsw %%ymm4,%%ymm0,%%ymm0 \n"
+ "vpmaddubsw %%ymm4,%%ymm1,%%ymm1 \n"
+ "vpavgw %%ymm5,%%ymm0,%%ymm0 \n"
+ "vpavgw %%ymm5,%%ymm1,%%ymm1 \n"
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1", "xmm4", "xmm5");
+}
+
+void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n"
+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpxor %%ymm5,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "vmovdqu 0x00(%0,%3,1),%%ymm2 \n"
+ "vmovdqu 0x20(%0,%3,1),%%ymm3 \n"
+ "lea 0x40(%0),%0 \n"
+ "vpmaddubsw %%ymm4,%%ymm0,%%ymm0 \n"
+ "vpmaddubsw %%ymm4,%%ymm1,%%ymm1 \n"
+ "vpmaddubsw %%ymm4,%%ymm2,%%ymm2 \n"
+ "vpmaddubsw %%ymm4,%%ymm3,%%ymm3 \n"
+ "vpaddw %%ymm2,%%ymm0,%%ymm0 \n"
+ "vpaddw %%ymm3,%%ymm1,%%ymm1 \n"
+ "vpsrlw $0x1,%%ymm0,%%ymm0 \n"
+ "vpsrlw $0x1,%%ymm1,%%ymm1 \n"
+ "vpavgw %%ymm5,%%ymm0,%%ymm0 \n"
+ "vpavgw %%ymm5,%%ymm1,%%ymm1 \n"
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5");
+}
+#endif // HAS_SCALEROWDOWN2_AVX2
+
+void ScaleRowDown4_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(
+ "pcmpeqb %%xmm5,%%xmm5 \n"
+ "psrld $0x18,%%xmm5 \n"
+ "pslld $0x10,%%xmm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "lea 0x20(%0),%0 \n"
+ "pand %%xmm5,%%xmm0 \n"
+ "pand %%xmm5,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm0 \n"
+ "psrlw $0x8,%%xmm0 \n"
+ "packuswb %%xmm0,%%xmm0 \n"
+ "movq %%xmm0,(%1) \n"
+ "lea 0x8(%1),%1 \n"
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1", "xmm5");
+}
+
+void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ intptr_t stridex3;
+ asm volatile(
+ "pcmpeqb %%xmm4,%%xmm4 \n"
+ "psrlw $0xf,%%xmm4 \n"
+ "movdqa %%xmm4,%%xmm5 \n"
+ "packuswb %%xmm4,%%xmm4 \n"
+ "psllw $0x3,%%xmm5 \n"
+ "lea 0x00(%4,%4,2),%3 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "movdqu 0x00(%0,%4,1),%%xmm2 \n"
+ "movdqu 0x10(%0,%4,1),%%xmm3 \n"
+ "pmaddubsw %%xmm4,%%xmm0 \n"
+ "pmaddubsw %%xmm4,%%xmm1 \n"
+ "pmaddubsw %%xmm4,%%xmm2 \n"
+ "pmaddubsw %%xmm4,%%xmm3 \n"
+ "paddw %%xmm2,%%xmm0 \n"
+ "paddw %%xmm3,%%xmm1 \n"
+ "movdqu 0x00(%0,%4,2),%%xmm2 \n"
+ "movdqu 0x10(%0,%4,2),%%xmm3 \n"
+ "pmaddubsw %%xmm4,%%xmm2 \n"
+ "pmaddubsw %%xmm4,%%xmm3 \n"
+ "paddw %%xmm2,%%xmm0 \n"
+ "paddw %%xmm3,%%xmm1 \n"
+ "movdqu 0x00(%0,%3,1),%%xmm2 \n"
+ "movdqu 0x10(%0,%3,1),%%xmm3 \n"
+ "lea 0x20(%0),%0 \n"
+ "pmaddubsw %%xmm4,%%xmm2 \n"
+ "pmaddubsw %%xmm4,%%xmm3 \n"
+ "paddw %%xmm2,%%xmm0 \n"
+ "paddw %%xmm3,%%xmm1 \n"
+ "phaddw %%xmm1,%%xmm0 \n"
+ "paddw %%xmm5,%%xmm0 \n"
+ "psrlw $0x4,%%xmm0 \n"
+ "packuswb %%xmm0,%%xmm0 \n"
+ "movq %%xmm0,(%1) \n"
+ "lea 0x8(%1),%1 \n"
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width), // %2
+ "=&r"(stridex3) // %3
+ : "r"((intptr_t)(src_stride)) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+
+#ifdef HAS_SCALEROWDOWN4_AVX2
+void ScaleRowDown4_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(
+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n"
+ "vpsrld $0x18,%%ymm5,%%ymm5 \n"
+ "vpslld $0x10,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "lea 0x40(%0),%0 \n"
+ "vpand %%ymm5,%%ymm0,%%ymm0 \n"
+ "vpand %%ymm5,%%ymm1,%%ymm1 \n"
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpsrlw $0x8,%%ymm0,%%ymm0 \n"
+ "vpackuswb %%ymm0,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1", "xmm5");
+}
+
+void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n"
+ "vpsllw $0x3,%%ymm4,%%ymm5 \n"
+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n"
+ "vmovdqu 0x20(%0),%%ymm1 \n"
+ "vmovdqu 0x00(%0,%3,1),%%ymm2 \n"
+ "vmovdqu 0x20(%0,%3,1),%%ymm3 \n"
+ "vpmaddubsw %%ymm4,%%ymm0,%%ymm0 \n"
+ "vpmaddubsw %%ymm4,%%ymm1,%%ymm1 \n"
+ "vpmaddubsw %%ymm4,%%ymm2,%%ymm2 \n"
+ "vpmaddubsw %%ymm4,%%ymm3,%%ymm3 \n"
+ "vpaddw %%ymm2,%%ymm0,%%ymm0 \n"
+ "vpaddw %%ymm3,%%ymm1,%%ymm1 \n"
+ "vmovdqu 0x00(%0,%3,2),%%ymm2 \n"
+ "vmovdqu 0x20(%0,%3,2),%%ymm3 \n"
+ "vpmaddubsw %%ymm4,%%ymm2,%%ymm2 \n"
+ "vpmaddubsw %%ymm4,%%ymm3,%%ymm3 \n"
+ "vpaddw %%ymm2,%%ymm0,%%ymm0 \n"
+ "vpaddw %%ymm3,%%ymm1,%%ymm1 \n"
+ "vmovdqu 0x00(%0,%4,1),%%ymm2 \n"
+ "vmovdqu 0x20(%0,%4,1),%%ymm3 \n"
+ "lea 0x40(%0),%0 \n"
+ "vpmaddubsw %%ymm4,%%ymm2,%%ymm2 \n"
+ "vpmaddubsw %%ymm4,%%ymm3,%%ymm3 \n"
+ "vpaddw %%ymm2,%%ymm0,%%ymm0 \n"
+ "vpaddw %%ymm3,%%ymm1,%%ymm1 \n"
+ "vphaddw %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vpaddw %%ymm5,%%ymm0,%%ymm0 \n"
+ "vpsrlw $0x4,%%ymm0,%%ymm0 \n"
+ "vpackuswb %%ymm0,%%ymm0,%%ymm0 \n"
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(src_stride * 3)) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif // HAS_SCALEROWDOWN4_AVX2
+
+void ScaleRowDown34_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(
+ "movdqa %0,%%xmm3 \n"
+ "movdqa %1,%%xmm4 \n"
+ "movdqa %2,%%xmm5 \n"
+ :
+ : "m"(kShuf0), // %0
+ "m"(kShuf1), // %1
+ "m"(kShuf2) // %2
+ );
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm2 \n"
+ "lea 0x20(%0),%0 \n"
+ "movdqa %%xmm2,%%xmm1 \n"
+ "palignr $0x8,%%xmm0,%%xmm1 \n"
+ "pshufb %%xmm3,%%xmm0 \n"
+ "pshufb %%xmm4,%%xmm1 \n"
+ "pshufb %%xmm5,%%xmm2 \n"
+ "movq %%xmm0,(%1) \n"
+ "movq %%xmm1,0x8(%1) \n"
+ "movq %%xmm2,0x10(%1) \n"
+ "lea 0x18(%1),%1 \n"
+ "sub $0x18,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+
+void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "movdqa %0,%%xmm2 \n" // kShuf01
+ "movdqa %1,%%xmm3 \n" // kShuf11
+ "movdqa %2,%%xmm4 \n" // kShuf21
+ :
+ : "m"(kShuf01), // %0
+ "m"(kShuf11), // %1
+ "m"(kShuf21) // %2
+ );
+ asm volatile(
+ "movdqa %0,%%xmm5 \n" // kMadd01
+ "movdqa %1,%%xmm0 \n" // kMadd11
+ "movdqa %2,%%xmm1 \n" // kRound34
+ :
+ : "m"(kMadd01), // %0
+ "m"(kMadd11), // %1
+ "m"(kRound34) // %2
+ );
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm6 \n"
+ "movdqu 0x00(%0,%3,1),%%xmm7 \n"
+ "pavgb %%xmm7,%%xmm6 \n"
+ "pshufb %%xmm2,%%xmm6 \n"
+ "pmaddubsw %%xmm5,%%xmm6 \n"
+ "paddsw %%xmm1,%%xmm6 \n"
+ "psrlw $0x2,%%xmm6 \n"
+ "packuswb %%xmm6,%%xmm6 \n"
+ "movq %%xmm6,(%1) \n"
+ "movdqu 0x8(%0),%%xmm6 \n"
+ "movdqu 0x8(%0,%3,1),%%xmm7 \n"
+ "pavgb %%xmm7,%%xmm6 \n"
+ "pshufb %%xmm3,%%xmm6 \n"
+ "pmaddubsw %%xmm0,%%xmm6 \n"
+ "paddsw %%xmm1,%%xmm6 \n"
+ "psrlw $0x2,%%xmm6 \n"
+ "packuswb %%xmm6,%%xmm6 \n"
+ "movq %%xmm6,0x8(%1) \n"
+ "movdqu 0x10(%0),%%xmm6 \n"
+ "movdqu 0x10(%0,%3,1),%%xmm7 \n"
+ "lea 0x20(%0),%0 \n"
+ "pavgb %%xmm7,%%xmm6 \n"
+ "pshufb %%xmm4,%%xmm6 \n"
+ "pmaddubsw %4,%%xmm6 \n"
+ "paddsw %%xmm1,%%xmm6 \n"
+ "psrlw $0x2,%%xmm6 \n"
+ "packuswb %%xmm6,%%xmm6 \n"
+ "movq %%xmm6,0x10(%1) \n"
+ "lea 0x18(%1),%1 \n"
+ "sub $0x18,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "m"(kMadd21) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5",
+ "xmm6", "xmm7");
+}
+
+void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "movdqa %0,%%xmm2 \n" // kShuf01
+ "movdqa %1,%%xmm3 \n" // kShuf11
+ "movdqa %2,%%xmm4 \n" // kShuf21
+ :
+ : "m"(kShuf01), // %0
+ "m"(kShuf11), // %1
+ "m"(kShuf21) // %2
+ );
+ asm volatile(
+ "movdqa %0,%%xmm5 \n" // kMadd01
+ "movdqa %1,%%xmm0 \n" // kMadd11
+ "movdqa %2,%%xmm1 \n" // kRound34
+ :
+ : "m"(kMadd01), // %0
+ "m"(kMadd11), // %1
+ "m"(kRound34) // %2
+ );
+
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm6 \n"
+ "movdqu 0x00(%0,%3,1),%%xmm7 \n"
+ "pavgb %%xmm6,%%xmm7 \n"
+ "pavgb %%xmm7,%%xmm6 \n"
+ "pshufb %%xmm2,%%xmm6 \n"
+ "pmaddubsw %%xmm5,%%xmm6 \n"
+ "paddsw %%xmm1,%%xmm6 \n"
+ "psrlw $0x2,%%xmm6 \n"
+ "packuswb %%xmm6,%%xmm6 \n"
+ "movq %%xmm6,(%1) \n"
+ "movdqu 0x8(%0),%%xmm6 \n"
+ "movdqu 0x8(%0,%3,1),%%xmm7 \n"
+ "pavgb %%xmm6,%%xmm7 \n"
+ "pavgb %%xmm7,%%xmm6 \n"
+ "pshufb %%xmm3,%%xmm6 \n"
+ "pmaddubsw %%xmm0,%%xmm6 \n"
+ "paddsw %%xmm1,%%xmm6 \n"
+ "psrlw $0x2,%%xmm6 \n"
+ "packuswb %%xmm6,%%xmm6 \n"
+ "movq %%xmm6,0x8(%1) \n"
+ "movdqu 0x10(%0),%%xmm6 \n"
+ "movdqu 0x10(%0,%3,1),%%xmm7 \n"
+ "lea 0x20(%0),%0 \n"
+ "pavgb %%xmm6,%%xmm7 \n"
+ "pavgb %%xmm7,%%xmm6 \n"
+ "pshufb %%xmm4,%%xmm6 \n"
+ "pmaddubsw %4,%%xmm6 \n"
+ "paddsw %%xmm1,%%xmm6 \n"
+ "psrlw $0x2,%%xmm6 \n"
+ "packuswb %%xmm6,%%xmm6 \n"
+ "movq %%xmm6,0x10(%1) \n"
+ "lea 0x18(%1),%1 \n"
+ "sub $0x18,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "m"(kMadd21) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5",
+ "xmm6", "xmm7");
+}
+
+void ScaleRowDown38_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(
+ "movdqa %3,%%xmm4 \n"
+ "movdqa %4,%%xmm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "lea 0x20(%0),%0 \n"
+ "pshufb %%xmm4,%%xmm0 \n"
+ "pshufb %%xmm5,%%xmm1 \n"
+ "paddusb %%xmm1,%%xmm0 \n"
+ "movq %%xmm0,(%1) \n"
+ "movhlps %%xmm0,%%xmm1 \n"
+ "movd %%xmm1,0x8(%1) \n"
+ "lea 0xc(%1),%1 \n"
+ "sub $0xc,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "m"(kShuf38a), // %3
+ "m"(kShuf38b) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm4", "xmm5");
+}
+
+void ScaleRowDown38_2_Box_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "movdqa %0,%%xmm2 \n"
+ "movdqa %1,%%xmm3 \n"
+ "movdqa %2,%%xmm4 \n"
+ "movdqa %3,%%xmm5 \n"
+ :
+ : "m"(kShufAb0), // %0
+ "m"(kShufAb1), // %1
+ "m"(kShufAb2), // %2
+ "m"(kScaleAb2) // %3
+ );
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x00(%0,%3,1),%%xmm1 \n"
+ "lea 0x10(%0),%0 \n"
+ "pavgb %%xmm1,%%xmm0 \n"
+ "movdqa %%xmm0,%%xmm1 \n"
+ "pshufb %%xmm2,%%xmm1 \n"
+ "movdqa %%xmm0,%%xmm6 \n"
+ "pshufb %%xmm3,%%xmm6 \n"
+ "paddusw %%xmm6,%%xmm1 \n"
+ "pshufb %%xmm4,%%xmm0 \n"
+ "paddusw %%xmm0,%%xmm1 \n"
+ "pmulhuw %%xmm5,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm1 \n"
+ "movd %%xmm1,(%1) \n"
+ "psrlq $0x10,%%xmm1 \n"
+ "movd %%xmm1,0x2(%1) \n"
+ "lea 0x6(%1),%1 \n"
+ "sub $0x6,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5",
+ "xmm6");
+}
+
+void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "movdqa %0,%%xmm2 \n"
+ "movdqa %1,%%xmm3 \n"
+ "movdqa %2,%%xmm4 \n"
+ "pxor %%xmm5,%%xmm5 \n"
+ :
+ : "m"(kShufAc), // %0
+ "m"(kShufAc3), // %1
+ "m"(kScaleAc33) // %2
+ );
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x00(%0,%3,1),%%xmm6 \n"
+ "movhlps %%xmm0,%%xmm1 \n"
+ "movhlps %%xmm6,%%xmm7 \n"
+ "punpcklbw %%xmm5,%%xmm0 \n"
+ "punpcklbw %%xmm5,%%xmm1 \n"
+ "punpcklbw %%xmm5,%%xmm6 \n"
+ "punpcklbw %%xmm5,%%xmm7 \n"
+ "paddusw %%xmm6,%%xmm0 \n"
+ "paddusw %%xmm7,%%xmm1 \n"
+ "movdqu 0x00(%0,%3,2),%%xmm6 \n"
+ "lea 0x10(%0),%0 \n"
+ "movhlps %%xmm6,%%xmm7 \n"
+ "punpcklbw %%xmm5,%%xmm6 \n"
+ "punpcklbw %%xmm5,%%xmm7 \n"
+ "paddusw %%xmm6,%%xmm0 \n"
+ "paddusw %%xmm7,%%xmm1 \n"
+ "movdqa %%xmm0,%%xmm6 \n"
+ "psrldq $0x2,%%xmm0 \n"
+ "paddusw %%xmm0,%%xmm6 \n"
+ "psrldq $0x2,%%xmm0 \n"
+ "paddusw %%xmm0,%%xmm6 \n"
+ "pshufb %%xmm2,%%xmm6 \n"
+ "movdqa %%xmm1,%%xmm7 \n"
+ "psrldq $0x2,%%xmm1 \n"
+ "paddusw %%xmm1,%%xmm7 \n"
+ "psrldq $0x2,%%xmm1 \n"
+ "paddusw %%xmm1,%%xmm7 \n"
+ "pshufb %%xmm3,%%xmm7 \n"
+ "paddusw %%xmm7,%%xmm6 \n"
+ "pmulhuw %%xmm4,%%xmm6 \n"
+ "packuswb %%xmm6,%%xmm6 \n"
+ "movd %%xmm6,(%1) \n"
+ "psrlq $0x10,%%xmm6 \n"
+ "movd %%xmm6,0x2(%1) \n"
+ "lea 0x6(%1),%1 \n"
+ "sub $0x6,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5",
+ "xmm6", "xmm7");
+}
+
+static const uvec8 kLinearShuffleFar = {2, 3, 0, 1, 6, 7, 4, 5,
+ 10, 11, 8, 9, 14, 15, 12, 13};
+
+static const uvec8 kLinearMadd31 = {3, 1, 1, 3, 3, 1, 1, 3,
+ 3, 1, 1, 3, 3, 1, 1, 3};
+
+#ifdef HAS_SCALEROWUP2LINEAR_SSE2
+void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "pxor %%xmm0,%%xmm0 \n" // 0
+ "pcmpeqw %%xmm6,%%xmm6 \n"
+ "psrlw $15,%%xmm6 \n"
+ "psllw $1,%%xmm6 \n" // all 2
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm1 \n" // 01234567
+ "movq 1(%0),%%xmm2 \n" // 12345678
+ "movdqa %%xmm1,%%xmm3 \n"
+ "punpcklbw %%xmm2,%%xmm3 \n" // 0112233445566778
+ "punpcklbw %%xmm1,%%xmm1 \n" // 0011223344556677
+ "punpcklbw %%xmm2,%%xmm2 \n" // 1122334455667788
+ "movdqa %%xmm1,%%xmm4 \n"
+ "punpcklbw %%xmm0,%%xmm4 \n" // 00112233 (16)
+ "movdqa %%xmm2,%%xmm5 \n"
+ "punpcklbw %%xmm0,%%xmm5 \n" // 11223344 (16)
+ "paddw %%xmm5,%%xmm4 \n"
+ "movdqa %%xmm3,%%xmm5 \n"
+ "paddw %%xmm6,%%xmm4 \n"
+ "punpcklbw %%xmm0,%%xmm5 \n" // 01122334 (16)
+ "paddw %%xmm5,%%xmm5 \n"
+ "paddw %%xmm4,%%xmm5 \n" // 3*near+far+2 (lo)
+ "psrlw $2,%%xmm5 \n" // 3/4*near+1/4*far (lo)
+
+ "punpckhbw %%xmm0,%%xmm1 \n" // 44556677 (16)
+ "punpckhbw %%xmm0,%%xmm2 \n" // 55667788 (16)
+ "paddw %%xmm2,%%xmm1 \n"
+ "punpckhbw %%xmm0,%%xmm3 \n" // 45566778 (16)
+ "paddw %%xmm6,%%xmm1 \n"
+ "paddw %%xmm3,%%xmm3 \n"
+ "paddw %%xmm3,%%xmm1 \n" // 3*near+far+2 (hi)
+ "psrlw $2,%%xmm1 \n" // 3/4*near+1/4*far (hi)
+
+ "packuswb %%xmm1,%%xmm5 \n"
+ "movdqu %%xmm5,(%1) \n"
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 8 sample to 16 sample
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_SSE2
+void ScaleRowUp2_Bilinear_SSE2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ LABELALIGN
+ "1: \n"
+ "pxor %%xmm0,%%xmm0 \n" // 0
+ // above line
+ "movq (%0),%%xmm1 \n" // 01234567
+ "movq 1(%0),%%xmm2 \n" // 12345678
+ "movdqa %%xmm1,%%xmm3 \n"
+ "punpcklbw %%xmm2,%%xmm3 \n" // 0112233445566778
+ "punpcklbw %%xmm1,%%xmm1 \n" // 0011223344556677
+ "punpcklbw %%xmm2,%%xmm2 \n" // 1122334455667788
+
+ "movdqa %%xmm1,%%xmm4 \n"
+ "punpcklbw %%xmm0,%%xmm4 \n" // 00112233 (16)
+ "movdqa %%xmm2,%%xmm5 \n"
+ "punpcklbw %%xmm0,%%xmm5 \n" // 11223344 (16)
+ "paddw %%xmm5,%%xmm4 \n" // near+far
+ "movdqa %%xmm3,%%xmm5 \n"
+ "punpcklbw %%xmm0,%%xmm5 \n" // 01122334 (16)
+ "paddw %%xmm5,%%xmm5 \n" // 2*near
+ "paddw %%xmm5,%%xmm4 \n" // 3*near+far (1, lo)
+
+ "punpckhbw %%xmm0,%%xmm1 \n" // 44556677 (16)
+ "punpckhbw %%xmm0,%%xmm2 \n" // 55667788 (16)
+ "paddw %%xmm2,%%xmm1 \n"
+ "punpckhbw %%xmm0,%%xmm3 \n" // 45566778 (16)
+ "paddw %%xmm3,%%xmm3 \n" // 2*near
+ "paddw %%xmm3,%%xmm1 \n" // 3*near+far (1, hi)
+
+ // below line
+ "movq (%0,%3),%%xmm6 \n" // 01234567
+ "movq 1(%0,%3),%%xmm2 \n" // 12345678
+ "movdqa %%xmm6,%%xmm3 \n"
+ "punpcklbw %%xmm2,%%xmm3 \n" // 0112233445566778
+ "punpcklbw %%xmm6,%%xmm6 \n" // 0011223344556677
+ "punpcklbw %%xmm2,%%xmm2 \n" // 1122334455667788
+
+ "movdqa %%xmm6,%%xmm5 \n"
+ "punpcklbw %%xmm0,%%xmm5 \n" // 00112233 (16)
+ "movdqa %%xmm2,%%xmm7 \n"
+ "punpcklbw %%xmm0,%%xmm7 \n" // 11223344 (16)
+ "paddw %%xmm7,%%xmm5 \n" // near+far
+ "movdqa %%xmm3,%%xmm7 \n"
+ "punpcklbw %%xmm0,%%xmm7 \n" // 01122334 (16)
+ "paddw %%xmm7,%%xmm7 \n" // 2*near
+ "paddw %%xmm7,%%xmm5 \n" // 3*near+far (2, lo)
+
+ "punpckhbw %%xmm0,%%xmm6 \n" // 44556677 (16)
+ "punpckhbw %%xmm0,%%xmm2 \n" // 55667788 (16)
+ "paddw %%xmm6,%%xmm2 \n" // near+far
+ "punpckhbw %%xmm0,%%xmm3 \n" // 45566778 (16)
+ "paddw %%xmm3,%%xmm3 \n" // 2*near
+ "paddw %%xmm3,%%xmm2 \n" // 3*near+far (2, hi)
+
+ // xmm4 xmm1
+ // xmm5 xmm2
+ "pcmpeqw %%xmm0,%%xmm0 \n"
+ "psrlw $15,%%xmm0 \n"
+ "psllw $3,%%xmm0 \n" // all 8
+
+ "movdqa %%xmm4,%%xmm3 \n"
+ "movdqa %%xmm5,%%xmm6 \n"
+ "paddw %%xmm3,%%xmm3 \n" // 6*near+2*far (1, lo)
+ "paddw %%xmm0,%%xmm6 \n" // 3*near+far+8 (2, lo)
+ "paddw %%xmm4,%%xmm3 \n" // 9*near+3*far (1, lo)
+ "paddw %%xmm6,%%xmm3 \n" // 9 3 3 1 + 8 (1, lo)
+ "psrlw $4,%%xmm3 \n" // ^ div by 16
+
+ "movdqa %%xmm1,%%xmm7 \n"
+ "movdqa %%xmm2,%%xmm6 \n"
+ "paddw %%xmm7,%%xmm7 \n" // 6*near+2*far (1, hi)
+ "paddw %%xmm0,%%xmm6 \n" // 3*near+far+8 (2, hi)
+ "paddw %%xmm1,%%xmm7 \n" // 9*near+3*far (1, hi)
+ "paddw %%xmm6,%%xmm7 \n" // 9 3 3 1 + 8 (1, hi)
+ "psrlw $4,%%xmm7 \n" // ^ div by 16
+
+ "packuswb %%xmm7,%%xmm3 \n"
+ "movdqu %%xmm3,(%1) \n" // save above line
+
+ "movdqa %%xmm5,%%xmm3 \n"
+ "paddw %%xmm0,%%xmm4 \n" // 3*near+far+8 (1, lo)
+ "paddw %%xmm3,%%xmm3 \n" // 6*near+2*far (2, lo)
+ "paddw %%xmm3,%%xmm5 \n" // 9*near+3*far (2, lo)
+ "paddw %%xmm4,%%xmm5 \n" // 9 3 3 1 + 8 (lo)
+ "psrlw $4,%%xmm5 \n" // ^ div by 16
+
+ "movdqa %%xmm2,%%xmm3 \n"
+ "paddw %%xmm0,%%xmm1 \n" // 3*near+far+8 (1, hi)
+ "paddw %%xmm3,%%xmm3 \n" // 6*near+2*far (2, hi)
+ "paddw %%xmm3,%%xmm2 \n" // 9*near+3*far (2, hi)
+ "paddw %%xmm1,%%xmm2 \n" // 9 3 3 1 + 8 (hi)
+ "psrlw $4,%%xmm2 \n" // ^ div by 16
+
+ "packuswb %%xmm2,%%xmm5 \n"
+ "movdqu %%xmm5,(%1,%4) \n" // save below line
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 8 sample to 16 sample
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_SSSE3
+void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "movdqa %3,%%xmm5 \n"
+ "pcmpeqw %%xmm4,%%xmm4 \n"
+ "psrlw $15,%%xmm4 \n"
+ "psllw $1,%%xmm4 \n" // all 2
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n" // 01234567 (16)
+ "movdqu 2(%0),%%xmm1 \n" // 12345678 (16)
+
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckhwd %%xmm1,%%xmm2 \n" // 45566778 (16)
+ "punpcklwd %%xmm1,%%xmm0 \n" // 01122334 (16)
+
+ "movdqa %%xmm2,%%xmm3 \n"
+ "movdqa %%xmm0,%%xmm1 \n"
+ "pshufb %%xmm5,%%xmm3 \n" // 54657687 (far)
+ "pshufb %%xmm5,%%xmm1 \n" // 10213243 (far)
+
+ "paddw %%xmm4,%%xmm1 \n" // far+2
+ "paddw %%xmm4,%%xmm3 \n" // far+2
+ "paddw %%xmm0,%%xmm1 \n" // near+far+2
+ "paddw %%xmm2,%%xmm3 \n" // near+far+2
+ "paddw %%xmm0,%%xmm0 \n" // 2*near
+ "paddw %%xmm2,%%xmm2 \n" // 2*near
+ "paddw %%xmm1,%%xmm0 \n" // 3*near+far+2 (lo)
+ "paddw %%xmm3,%%xmm2 \n" // 3*near+far+2 (hi)
+
+ "psrlw $2,%%xmm0 \n" // 3/4*near+1/4*far
+ "psrlw $2,%%xmm2 \n" // 3/4*near+1/4*far
+ "movdqu %%xmm0,(%1) \n"
+ "movdqu %%xmm2,16(%1) \n"
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 8 sample to 16 sample
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "m"(kLinearShuffleFar) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_SSSE3
+void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "pcmpeqw %%xmm7,%%xmm7 \n"
+ "psrlw $15,%%xmm7 \n"
+ "psllw $3,%%xmm7 \n" // all 8
+ "movdqa %5,%%xmm6 \n"
+
+ LABELALIGN
+ "1: \n"
+ // above line
+ "movdqu (%0),%%xmm0 \n" // 01234567 (16)
+ "movdqu 2(%0),%%xmm1 \n" // 12345678 (16)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckhwd %%xmm1,%%xmm2 \n" // 45566778 (16)
+ "punpcklwd %%xmm1,%%xmm0 \n" // 01122334 (16)
+ "movdqa %%xmm2,%%xmm3 \n"
+ "movdqa %%xmm0,%%xmm1 \n"
+ "pshufb %%xmm6,%%xmm3 \n" // 54657687 (far)
+ "pshufb %%xmm6,%%xmm1 \n" // 10213243 (far)
+ "paddw %%xmm0,%%xmm1 \n" // near+far
+ "paddw %%xmm2,%%xmm3 \n" // near+far
+ "paddw %%xmm0,%%xmm0 \n" // 2*near
+ "paddw %%xmm2,%%xmm2 \n" // 2*near
+ "paddw %%xmm1,%%xmm0 \n" // 3*near+far (1, lo)
+ "paddw %%xmm3,%%xmm2 \n" // 3*near+far (1, hi)
+
+ // below line
+ "movdqu (%0,%3,2),%%xmm1 \n" // 01234567 (16)
+ "movdqu 2(%0,%3,2),%%xmm4 \n" // 12345678 (16)
+ "movdqa %%xmm1,%%xmm3 \n"
+ "punpckhwd %%xmm4,%%xmm3 \n" // 45566778 (16)
+ "punpcklwd %%xmm4,%%xmm1 \n" // 01122334 (16)
+ "movdqa %%xmm3,%%xmm5 \n"
+ "movdqa %%xmm1,%%xmm4 \n"
+ "pshufb %%xmm6,%%xmm5 \n" // 54657687 (far)
+ "pshufb %%xmm6,%%xmm4 \n" // 10213243 (far)
+ "paddw %%xmm1,%%xmm4 \n" // near+far
+ "paddw %%xmm3,%%xmm5 \n" // near+far
+ "paddw %%xmm1,%%xmm1 \n" // 2*near
+ "paddw %%xmm3,%%xmm3 \n" // 2*near
+ "paddw %%xmm4,%%xmm1 \n" // 3*near+far (2, lo)
+ "paddw %%xmm5,%%xmm3 \n" // 3*near+far (2, hi)
+
+ // xmm0 xmm2
+ // xmm1 xmm3
+
+ "movdqa %%xmm0,%%xmm4 \n"
+ "movdqa %%xmm1,%%xmm5 \n"
+ "paddw %%xmm4,%%xmm4 \n" // 6*near+2*far (1, lo)
+ "paddw %%xmm7,%%xmm5 \n" // 3*near+far+8 (2, lo)
+ "paddw %%xmm0,%%xmm4 \n" // 9*near+3*far (1, lo)
+ "paddw %%xmm5,%%xmm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "psrlw $4,%%xmm4 \n" // ^ div by 16
+ "movdqu %%xmm4,(%1) \n"
+
+ "movdqa %%xmm2,%%xmm4 \n"
+ "movdqa %%xmm3,%%xmm5 \n"
+ "paddw %%xmm4,%%xmm4 \n" // 6*near+2*far (1, hi)
+ "paddw %%xmm7,%%xmm5 \n" // 3*near+far+8 (2, hi)
+ "paddw %%xmm2,%%xmm4 \n" // 9*near+3*far (1, hi)
+ "paddw %%xmm5,%%xmm4 \n" // 9 3 3 1 + 8 (1, hi)
+ "psrlw $4,%%xmm4 \n" // ^ div by 16
+ "movdqu %%xmm4,0x10(%1) \n"
+
+ "movdqa %%xmm1,%%xmm4 \n"
+ "paddw %%xmm7,%%xmm0 \n" // 3*near+far+8 (1, lo)
+ "paddw %%xmm4,%%xmm4 \n" // 6*near+2*far (2, lo)
+ "paddw %%xmm4,%%xmm1 \n" // 9*near+3*far (2, lo)
+ "paddw %%xmm0,%%xmm1 \n" // 9 3 3 1 + 8 (2, lo)
+ "psrlw $4,%%xmm1 \n" // ^ div by 16
+ "movdqu %%xmm1,(%1,%4,2) \n"
+
+ "movdqa %%xmm3,%%xmm4 \n"
+ "paddw %%xmm7,%%xmm2 \n" // 3*near+far+8 (1, hi)
+ "paddw %%xmm4,%%xmm4 \n" // 6*near+2*far (2, hi)
+ "paddw %%xmm4,%%xmm3 \n" // 9*near+3*far (2, hi)
+ "paddw %%xmm2,%%xmm3 \n" // 9 3 3 1 + 8 (2, hi)
+ "psrlw $4,%%xmm3 \n" // ^ div by 16
+ "movdqu %%xmm3,0x10(%1,%4,2) \n"
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 8 sample to 16 sample
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)), // %4
+ "m"(kLinearShuffleFar) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_SSE2
+void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "pxor %%xmm5,%%xmm5 \n"
+ "pcmpeqd %%xmm4,%%xmm4 \n"
+ "psrld $31,%%xmm4 \n"
+ "pslld $1,%%xmm4 \n" // all 2
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 0123 (16b)
+ "movq 2(%0),%%xmm1 \n" // 1234 (16b)
+
+ "punpcklwd %%xmm5,%%xmm0 \n" // 0123 (32b)
+ "punpcklwd %%xmm5,%%xmm1 \n" // 1234 (32b)
+
+ "movdqa %%xmm0,%%xmm2 \n"
+ "movdqa %%xmm1,%%xmm3 \n"
+
+ "pshufd $0b10110001,%%xmm2,%%xmm2 \n" // 1032 (even, far)
+ "pshufd $0b10110001,%%xmm3,%%xmm3 \n" // 2143 (odd, far)
+
+ "paddd %%xmm4,%%xmm2 \n" // far+2 (lo)
+ "paddd %%xmm4,%%xmm3 \n" // far+2 (hi)
+ "paddd %%xmm0,%%xmm2 \n" // near+far+2 (lo)
+ "paddd %%xmm1,%%xmm3 \n" // near+far+2 (hi)
+ "paddd %%xmm0,%%xmm0 \n" // 2*near (lo)
+ "paddd %%xmm1,%%xmm1 \n" // 2*near (hi)
+ "paddd %%xmm2,%%xmm0 \n" // 3*near+far+2 (lo)
+ "paddd %%xmm3,%%xmm1 \n" // 3*near+far+2 (hi)
+
+ "psrld $2,%%xmm0 \n" // 3/4*near+1/4*far (lo)
+ "psrld $2,%%xmm1 \n" // 3/4*near+1/4*far (hi)
+ "packssdw %%xmm1,%%xmm0 \n"
+ "pshufd $0b11011000,%%xmm0,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 4 pixel to 8 pixel
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_SSE2
+void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "pxor %%xmm7,%%xmm7 \n"
+ "pcmpeqd %%xmm6,%%xmm6 \n"
+ "psrld $31,%%xmm6 \n"
+ "pslld $3,%%xmm6 \n" // all 8
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 0011 (16b, 1u1v)
+ "movq 4(%0),%%xmm1 \n" // 1122 (16b, 1u1v)
+ "punpcklwd %%xmm7,%%xmm0 \n" // 0011 (near) (32b, 1u1v)
+ "punpcklwd %%xmm7,%%xmm1 \n" // 1122 (near) (32b, 1u1v)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "movdqa %%xmm1,%%xmm3 \n"
+ "pshufd $0b01001110,%%xmm2,%%xmm2 \n" // 1100 (far) (1, lo)
+ "pshufd $0b01001110,%%xmm3,%%xmm3 \n" // 2211 (far) (1, hi)
+ "paddd %%xmm0,%%xmm2 \n" // near+far (1, lo)
+ "paddd %%xmm1,%%xmm3 \n" // near+far (1, hi)
+ "paddd %%xmm0,%%xmm0 \n" // 2*near (1, lo)
+ "paddd %%xmm1,%%xmm1 \n" // 2*near (1, hi)
+ "paddd %%xmm2,%%xmm0 \n" // 3*near+far (1, lo)
+ "paddd %%xmm3,%%xmm1 \n" // 3*near+far (1, hi)
+
+ "movq (%0),%%xmm0 \n" // 0123 (16b)
+ "movq 2(%0),%%xmm1 \n" // 1234 (16b)
+ "punpcklwd %%xmm7,%%xmm0 \n" // 0123 (32b)
+ "punpcklwd %%xmm7,%%xmm1 \n" // 1234 (32b)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "movdqa %%xmm1,%%xmm3 \n"
+ "pshufd $0b10110001,%%xmm2,%%xmm2 \n" // 1032 (even, far)
+ "pshufd $0b10110001,%%xmm3,%%xmm3 \n" // 2143 (odd, far)
+ "paddd %%xmm0,%%xmm2 \n" // near+far (lo)
+ "paddd %%xmm1,%%xmm3 \n" // near+far (hi)
+ "paddd %%xmm0,%%xmm0 \n" // 2*near (lo)
+ "paddd %%xmm1,%%xmm1 \n" // 2*near (hi)
+ "paddd %%xmm2,%%xmm0 \n" // 3*near+far (1, lo)
+ "paddd %%xmm3,%%xmm1 \n" // 3*near+far (1, hi)
+
+ "movq (%0,%3,2),%%xmm2 \n"
+ "movq 2(%0,%3,2),%%xmm3 \n"
+ "punpcklwd %%xmm7,%%xmm2 \n" // 0123 (32b)
+ "punpcklwd %%xmm7,%%xmm3 \n" // 1234 (32b)
+ "movdqa %%xmm2,%%xmm4 \n"
+ "movdqa %%xmm3,%%xmm5 \n"
+ "pshufd $0b10110001,%%xmm4,%%xmm4 \n" // 1032 (even, far)
+ "pshufd $0b10110001,%%xmm5,%%xmm5 \n" // 2143 (odd, far)
+ "paddd %%xmm2,%%xmm4 \n" // near+far (lo)
+ "paddd %%xmm3,%%xmm5 \n" // near+far (hi)
+ "paddd %%xmm2,%%xmm2 \n" // 2*near (lo)
+ "paddd %%xmm3,%%xmm3 \n" // 2*near (hi)
+ "paddd %%xmm4,%%xmm2 \n" // 3*near+far (2, lo)
+ "paddd %%xmm5,%%xmm3 \n" // 3*near+far (2, hi)
+
+ "movdqa %%xmm0,%%xmm4 \n"
+ "movdqa %%xmm2,%%xmm5 \n"
+ "paddd %%xmm0,%%xmm4 \n" // 6*near+2*far (1, lo)
+ "paddd %%xmm6,%%xmm5 \n" // 3*near+far+8 (2, lo)
+ "paddd %%xmm0,%%xmm4 \n" // 9*near+3*far (1, lo)
+ "paddd %%xmm5,%%xmm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "psrld $4,%%xmm4 \n" // ^ div by 16 (1, lo)
+
+ "movdqa %%xmm2,%%xmm5 \n"
+ "paddd %%xmm2,%%xmm5 \n" // 6*near+2*far (2, lo)
+ "paddd %%xmm6,%%xmm0 \n" // 3*near+far+8 (1, lo)
+ "paddd %%xmm2,%%xmm5 \n" // 9*near+3*far (2, lo)
+ "paddd %%xmm0,%%xmm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "psrld $4,%%xmm5 \n" // ^ div by 16 (2, lo)
+
+ "movdqa %%xmm1,%%xmm0 \n"
+ "movdqa %%xmm3,%%xmm2 \n"
+ "paddd %%xmm1,%%xmm0 \n" // 6*near+2*far (1, hi)
+ "paddd %%xmm6,%%xmm2 \n" // 3*near+far+8 (2, hi)
+ "paddd %%xmm1,%%xmm0 \n" // 9*near+3*far (1, hi)
+ "paddd %%xmm2,%%xmm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "psrld $4,%%xmm0 \n" // ^ div by 16 (1, hi)
+
+ "movdqa %%xmm3,%%xmm2 \n"
+ "paddd %%xmm3,%%xmm2 \n" // 6*near+2*far (2, hi)
+ "paddd %%xmm6,%%xmm1 \n" // 3*near+far+8 (1, hi)
+ "paddd %%xmm3,%%xmm2 \n" // 9*near+3*far (2, hi)
+ "paddd %%xmm1,%%xmm2 \n" // 9 3 3 1 + 8 (2, hi)
+ "psrld $4,%%xmm2 \n" // ^ div by 16 (2, hi)
+
+ "packssdw %%xmm0,%%xmm4 \n"
+ "pshufd $0b11011000,%%xmm4,%%xmm4 \n"
+ "movdqu %%xmm4,(%1) \n" // store above
+ "packssdw %%xmm2,%%xmm5 \n"
+ "pshufd $0b11011000,%%xmm4,%%xmm4 \n"
+ "movdqu %%xmm5,(%1,%4,2) \n" // store below
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 4 pixel to 8 pixel
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_SSSE3
+void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "pcmpeqw %%xmm4,%%xmm4 \n"
+ "psrlw $15,%%xmm4 \n"
+ "psllw $1,%%xmm4 \n" // all 2
+ "movdqa %3,%%xmm3 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 01234567
+ "movq 1(%0),%%xmm1 \n" // 12345678
+ "punpcklwd %%xmm0,%%xmm0 \n" // 0101232345456767
+ "punpcklwd %%xmm1,%%xmm1 \n" // 1212343456567878
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckhdq %%xmm1,%%xmm2 \n" // 4545565667677878
+ "punpckldq %%xmm1,%%xmm0 \n" // 0101121223233434
+ "pmaddubsw %%xmm3,%%xmm2 \n" // 3*near+far (hi)
+ "pmaddubsw %%xmm3,%%xmm0 \n" // 3*near+far (lo)
+ "paddw %%xmm4,%%xmm0 \n" // 3*near+far+2 (lo)
+ "paddw %%xmm4,%%xmm2 \n" // 3*near+far+2 (hi)
+ "psrlw $2,%%xmm0 \n" // 3/4*near+1/4*far (lo)
+ "psrlw $2,%%xmm2 \n" // 3/4*near+1/4*far (hi)
+ "vpackuswb %%xmm2,%%xmm0,%%xmm0 \n"
+ "vmovdqu %%xmm0,(%1) \n"
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 8 sample to 16 sample
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "m"(kLinearMadd31) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_SSSE3
+void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "pcmpeqw %%xmm6,%%xmm6 \n"
+ "psrlw $15,%%xmm6 \n"
+ "psllw $3,%%xmm6 \n" // all 8
+ "movdqa %5,%%xmm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 01234567
+ "movq 1(%0),%%xmm1 \n" // 12345678
+ "punpcklwd %%xmm0,%%xmm0 \n" // 0101232345456767
+ "punpcklwd %%xmm1,%%xmm1 \n" // 1212343456567878
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckhdq %%xmm1,%%xmm2 \n" // 4545565667677878
+ "punpckldq %%xmm1,%%xmm0 \n" // 0101121223233434
+ "pmaddubsw %%xmm7,%%xmm2 \n" // 3*near+far (1, hi)
+ "pmaddubsw %%xmm7,%%xmm0 \n" // 3*near+far (1, lo)
+
+ "movq (%0,%3),%%xmm1 \n"
+ "movq 1(%0,%3),%%xmm4 \n"
+ "punpcklwd %%xmm1,%%xmm1 \n"
+ "punpcklwd %%xmm4,%%xmm4 \n"
+ "movdqa %%xmm1,%%xmm3 \n"
+ "punpckhdq %%xmm4,%%xmm3 \n"
+ "punpckldq %%xmm4,%%xmm1 \n"
+ "pmaddubsw %%xmm7,%%xmm3 \n" // 3*near+far (2, hi)
+ "pmaddubsw %%xmm7,%%xmm1 \n" // 3*near+far (2, lo)
+
+ // xmm0 xmm2
+ // xmm1 xmm3
+
+ "movdqa %%xmm0,%%xmm4 \n"
+ "movdqa %%xmm1,%%xmm5 \n"
+ "paddw %%xmm0,%%xmm4 \n" // 6*near+2*far (1, lo)
+ "paddw %%xmm6,%%xmm5 \n" // 3*near+far+8 (2, lo)
+ "paddw %%xmm0,%%xmm4 \n" // 9*near+3*far (1, lo)
+ "paddw %%xmm5,%%xmm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "psrlw $4,%%xmm4 \n" // ^ div by 16 (1, lo)
+
+ "movdqa %%xmm1,%%xmm5 \n"
+ "paddw %%xmm1,%%xmm5 \n" // 6*near+2*far (2, lo)
+ "paddw %%xmm6,%%xmm0 \n" // 3*near+far+8 (1, lo)
+ "paddw %%xmm1,%%xmm5 \n" // 9*near+3*far (2, lo)
+ "paddw %%xmm0,%%xmm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "psrlw $4,%%xmm5 \n" // ^ div by 16 (2, lo)
+
+ "movdqa %%xmm2,%%xmm0 \n"
+ "movdqa %%xmm3,%%xmm1 \n"
+ "paddw %%xmm2,%%xmm0 \n" // 6*near+2*far (1, hi)
+ "paddw %%xmm6,%%xmm1 \n" // 3*near+far+8 (2, hi)
+ "paddw %%xmm2,%%xmm0 \n" // 9*near+3*far (1, hi)
+ "paddw %%xmm1,%%xmm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "psrlw $4,%%xmm0 \n" // ^ div by 16 (1, hi)
+
+ "movdqa %%xmm3,%%xmm1 \n"
+ "paddw %%xmm3,%%xmm1 \n" // 6*near+2*far (2, hi)
+ "paddw %%xmm6,%%xmm2 \n" // 3*near+far+8 (1, hi)
+ "paddw %%xmm3,%%xmm1 \n" // 9*near+3*far (2, hi)
+ "paddw %%xmm2,%%xmm1 \n" // 9 3 3 1 + 8 (2, hi)
+ "psrlw $4,%%xmm1 \n" // ^ div by 16 (2, hi)
+
+ "packuswb %%xmm0,%%xmm4 \n"
+ "movdqu %%xmm4,(%1) \n" // store above
+ "packuswb %%xmm1,%%xmm5 \n"
+ "movdqu %%xmm5,(%1,%4) \n" // store below
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 8 sample to 16 sample
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)), // %4
+ "m"(kLinearMadd31) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_AVX2
+void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrlw $15,%%ymm4,%%ymm4 \n"
+ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2
+ "vbroadcastf128 %3,%%ymm3 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%xmm0 \n" // 0123456789ABCDEF
+ "vmovdqu 1(%0),%%xmm1 \n" // 123456789ABCDEF0
+ "vpermq $0b11011000,%%ymm0,%%ymm0 \n"
+ "vpermq $0b11011000,%%ymm1,%%ymm1 \n"
+ "vpunpcklwd %%ymm0,%%ymm0,%%ymm0 \n"
+ "vpunpcklwd %%ymm1,%%ymm1,%%ymm1 \n"
+ "vpunpckhdq %%ymm1,%%ymm0,%%ymm2 \n"
+ "vpunpckldq %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpmaddubsw %%ymm3,%%ymm2,%%ymm1 \n" // 3*near+far (hi)
+ "vpmaddubsw %%ymm3,%%ymm0,%%ymm0 \n" // 3*near+far (lo)
+ "vpaddw %%ymm4,%%ymm0,%%ymm0 \n" // 3*near+far+2 (lo)
+ "vpaddw %%ymm4,%%ymm1,%%ymm1 \n" // 3*near+far+2 (hi)
+ "vpsrlw $2,%%ymm0,%%ymm0 \n" // 3/4*near+1/4*far (lo)
+ "vpsrlw $2,%%ymm1,%%ymm1 \n" // 3/4*near+1/4*far (hi)
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 16 sample to 32 sample
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "m"(kLinearMadd31) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_AVX2
+void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n"
+ "vpsrlw $15,%%ymm6,%%ymm6 \n"
+ "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8
+ "vbroadcastf128 %5,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%xmm0 \n" // 0123456789ABCDEF
+ "vmovdqu 1(%0),%%xmm1 \n" // 123456789ABCDEF0
+ "vpermq $0b11011000,%%ymm0,%%ymm0 \n"
+ "vpermq $0b11011000,%%ymm1,%%ymm1 \n"
+ "vpunpcklwd %%ymm0,%%ymm0,%%ymm0 \n"
+ "vpunpcklwd %%ymm1,%%ymm1,%%ymm1 \n"
+ "vpunpckhdq %%ymm1,%%ymm0,%%ymm2 \n"
+ "vpunpckldq %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpmaddubsw %%ymm7,%%ymm2,%%ymm1 \n" // 3*near+far (1, hi)
+ "vpmaddubsw %%ymm7,%%ymm0,%%ymm0 \n" // 3*near+far (1, lo)
+
+ "vmovdqu (%0,%3),%%xmm2 \n" // 0123456789ABCDEF
+ "vmovdqu 1(%0,%3),%%xmm3 \n" // 123456789ABCDEF0
+ "vpermq $0b11011000,%%ymm2,%%ymm2 \n"
+ "vpermq $0b11011000,%%ymm3,%%ymm3 \n"
+ "vpunpcklwd %%ymm2,%%ymm2,%%ymm2 \n"
+ "vpunpcklwd %%ymm3,%%ymm3,%%ymm3 \n"
+ "vpunpckhdq %%ymm3,%%ymm2,%%ymm4 \n"
+ "vpunpckldq %%ymm3,%%ymm2,%%ymm2 \n"
+ "vpmaddubsw %%ymm7,%%ymm4,%%ymm3 \n" // 3*near+far (2, hi)
+ "vpmaddubsw %%ymm7,%%ymm2,%%ymm2 \n" // 3*near+far (2, lo)
+
+ // ymm0 ymm1
+ // ymm2 ymm3
+
+ "vpaddw %%ymm0,%%ymm0,%%ymm4 \n" // 6*near+2*far (1, lo)
+ "vpaddw %%ymm6,%%ymm2,%%ymm5 \n" // 3*near+far+8 (2, lo)
+ "vpaddw %%ymm4,%%ymm0,%%ymm4 \n" // 9*near+3*far (1, lo)
+ "vpaddw %%ymm4,%%ymm5,%%ymm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "vpsrlw $4,%%ymm4,%%ymm4 \n" // ^ div by 16 (1, lo)
+
+ "vpaddw %%ymm2,%%ymm2,%%ymm5 \n" // 6*near+2*far (2, lo)
+ "vpaddw %%ymm6,%%ymm0,%%ymm0 \n" // 3*near+far+8 (1, lo)
+ "vpaddw %%ymm5,%%ymm2,%%ymm5 \n" // 9*near+3*far (2, lo)
+ "vpaddw %%ymm5,%%ymm0,%%ymm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "vpsrlw $4,%%ymm5,%%ymm5 \n" // ^ div by 16 (2, lo)
+
+ "vpaddw %%ymm1,%%ymm1,%%ymm0 \n" // 6*near+2*far (1, hi)
+ "vpaddw %%ymm6,%%ymm3,%%ymm2 \n" // 3*near+far+8 (2, hi)
+ "vpaddw %%ymm0,%%ymm1,%%ymm0 \n" // 9*near+3*far (1, hi)
+ "vpaddw %%ymm0,%%ymm2,%%ymm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "vpsrlw $4,%%ymm0,%%ymm0 \n" // ^ div by 16 (1, hi)
+
+ "vpaddw %%ymm3,%%ymm3,%%ymm2 \n" // 6*near+2*far (2, hi)
+ "vpaddw %%ymm6,%%ymm1,%%ymm1 \n" // 3*near+far+8 (1, hi)
+ "vpaddw %%ymm2,%%ymm3,%%ymm2 \n" // 9*near+3*far (2, hi)
+ "vpaddw %%ymm2,%%ymm1,%%ymm2 \n" // 9 3 3 1 + 8 (2, hi)
+ "vpsrlw $4,%%ymm2,%%ymm2 \n" // ^ div by 16 (2, hi)
+
+ "vpackuswb %%ymm0,%%ymm4,%%ymm4 \n"
+ "vmovdqu %%ymm4,(%1) \n" // store above
+ "vpackuswb %%ymm2,%%ymm5,%%ymm5 \n"
+ "vmovdqu %%ymm5,(%1,%4) \n" // store below
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 16 sample to 32 sample
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)), // %4
+ "m"(kLinearMadd31) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_12_AVX2
+void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vbroadcastf128 %3,%%ymm5 \n"
+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrlw $15,%%ymm4,%%ymm4 \n"
+ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n" // 0123456789ABCDEF (16b)
+ "vmovdqu 2(%0),%%ymm1 \n" // 123456789ABCDEF0 (16b)
+
+ "vpermq $0b11011000,%%ymm0,%%ymm0 \n" // 012389AB4567CDEF
+ "vpermq $0b11011000,%%ymm1,%%ymm1 \n" // 12349ABC5678DEF0
+
+ "vpunpckhwd %%ymm1,%%ymm0,%%ymm2 \n" // 899AABBCCDDEEFF0 (near)
+ "vpunpcklwd %%ymm1,%%ymm0,%%ymm0 \n" // 0112233445566778 (near)
+ "vpshufb %%ymm5,%%ymm2,%%ymm3 \n" // 98A9BACBDCEDFE0F (far)
+ "vpshufb %%ymm5,%%ymm0,%%ymm1 \n" // 1021324354657687 (far)
+
+ "vpaddw %%ymm4,%%ymm1,%%ymm1 \n" // far+2
+ "vpaddw %%ymm4,%%ymm3,%%ymm3 \n" // far+2
+ "vpaddw %%ymm0,%%ymm1,%%ymm1 \n" // near+far+2
+ "vpaddw %%ymm2,%%ymm3,%%ymm3 \n" // near+far+2
+ "vpaddw %%ymm0,%%ymm0,%%ymm0 \n" // 2*near
+ "vpaddw %%ymm2,%%ymm2,%%ymm2 \n" // 2*near
+ "vpaddw %%ymm0,%%ymm1,%%ymm0 \n" // 3*near+far+2
+ "vpaddw %%ymm2,%%ymm3,%%ymm2 \n" // 3*near+far+2
+
+ "vpsrlw $2,%%ymm0,%%ymm0 \n" // 3/4*near+1/4*far
+ "vpsrlw $2,%%ymm2,%%ymm2 \n" // 3/4*near+1/4*far
+ "vmovdqu %%ymm0,(%1) \n"
+ "vmovdqu %%ymm2,32(%1) \n"
+
+ "lea 0x20(%0),%0 \n"
+ "lea 0x40(%1),%1 \n" // 16 sample to 32 sample
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "m"(kLinearShuffleFar) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_12_AVX2
+void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "vbroadcastf128 %5,%%ymm5 \n"
+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrlw $15,%%ymm4,%%ymm4 \n"
+ "vpsllw $3,%%ymm4,%%ymm4 \n" // all 8
+
+ LABELALIGN
+ "1: \n"
+
+ "vmovdqu (%0),%%xmm0 \n" // 01234567 (16b)
+ "vmovdqu 2(%0),%%xmm1 \n" // 12345678 (16b)
+ "vpermq $0b11011000,%%ymm0,%%ymm0 \n" // 0123000045670000
+ "vpermq $0b11011000,%%ymm1,%%ymm1 \n" // 1234000056780000
+ "vpunpcklwd %%ymm1,%%ymm0,%%ymm0 \n" // 0112233445566778 (near)
+ "vpshufb %%ymm5,%%ymm0,%%ymm1 \n" // 1021324354657687 (far)
+ "vpaddw %%ymm0,%%ymm1,%%ymm1 \n" // near+far
+ "vpaddw %%ymm0,%%ymm0,%%ymm0 \n" // 2*near
+ "vpaddw %%ymm0,%%ymm1,%%ymm2 \n" // 3*near+far (1)
+
+ "vmovdqu (%0,%3,2),%%xmm0 \n" // 01234567 (16b)
+ "vmovdqu 2(%0,%3,2),%%xmm1 \n" // 12345678 (16b)
+ "vpermq $0b11011000,%%ymm0,%%ymm0 \n" // 0123000045670000
+ "vpermq $0b11011000,%%ymm1,%%ymm1 \n" // 1234000056780000
+ "vpunpcklwd %%ymm1,%%ymm0,%%ymm0 \n" // 0112233445566778 (near)
+ "vpshufb %%ymm5,%%ymm0,%%ymm1 \n" // 1021324354657687 (far)
+ "vpaddw %%ymm0,%%ymm1,%%ymm1 \n" // near+far
+ "vpaddw %%ymm0,%%ymm0,%%ymm0 \n" // 2*near
+ "vpaddw %%ymm0,%%ymm1,%%ymm3 \n" // 3*near+far (2)
+
+ "vpaddw %%ymm2,%%ymm2,%%ymm0 \n" // 6*near+2*far (1)
+ "vpaddw %%ymm4,%%ymm3,%%ymm1 \n" // 3*near+far+8 (2)
+ "vpaddw %%ymm0,%%ymm2,%%ymm0 \n" // 9*near+3*far (1)
+ "vpaddw %%ymm0,%%ymm1,%%ymm0 \n" // 9 3 3 1 + 8 (1)
+ "vpsrlw $4,%%ymm0,%%ymm0 \n" // ^ div by 16
+ "vmovdqu %%ymm0,(%1) \n" // store above
+
+ "vpaddw %%ymm3,%%ymm3,%%ymm0 \n" // 6*near+2*far (2)
+ "vpaddw %%ymm4,%%ymm2,%%ymm1 \n" // 3*near+far+8 (1)
+ "vpaddw %%ymm0,%%ymm3,%%ymm0 \n" // 9*near+3*far (2)
+ "vpaddw %%ymm0,%%ymm1,%%ymm0 \n" // 9 3 3 1 + 8 (2)
+ "vpsrlw $4,%%ymm0,%%ymm0 \n" // ^ div by 16
+ "vmovdqu %%ymm0,(%1,%4,2) \n" // store below
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 8 sample to 16 sample
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)), // %4
+ "m"(kLinearShuffleFar) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2LINEAR_16_AVX2
+void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrld $31,%%ymm4,%%ymm4 \n"
+ "vpslld $1,%%ymm4,%%ymm4 \n" // all 2
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%xmm0 \n" // 01234567 (16b, 1u1v)
+ "vmovdqu 2(%0),%%xmm1 \n" // 12345678 (16b, 1u1v)
+
+ "vpmovzxwd %%xmm0,%%ymm0 \n" // 01234567 (32b, 1u1v)
+ "vpmovzxwd %%xmm1,%%ymm1 \n" // 12345678 (32b, 1u1v)
+
+ "vpshufd $0b10110001,%%ymm0,%%ymm2 \n" // 10325476 (lo, far)
+ "vpshufd $0b10110001,%%ymm1,%%ymm3 \n" // 21436587 (hi, far)
+
+ "vpaddd %%ymm4,%%ymm2,%%ymm2 \n" // far+2 (lo)
+ "vpaddd %%ymm4,%%ymm3,%%ymm3 \n" // far+2 (hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm2 \n" // near+far+2 (lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm3 \n" // near+far+2 (hi)
+ "vpaddd %%ymm0,%%ymm0,%%ymm0 \n" // 2*near (lo)
+ "vpaddd %%ymm1,%%ymm1,%%ymm1 \n" // 2*near (hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm0 \n" // 3*near+far+2 (lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm1 \n" // 3*near+far+2 (hi)
+
+ "vpsrld $2,%%ymm0,%%ymm0 \n" // 3/4*near+1/4*far (lo)
+ "vpsrld $2,%%ymm1,%%ymm1 \n" // 3/4*near+1/4*far (hi)
+ "vpackusdw %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpshufd $0b11011000,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 8 pixel to 16 pixel
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+}
+#endif
+
+#ifdef HAS_SCALEROWUP2BILINEAR_16_AVX2
+void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n"
+ "vpsrld $31,%%ymm6,%%ymm6 \n"
+ "vpslld $3,%%ymm6,%%ymm6 \n" // all 8
+
+ LABELALIGN
+ "1: \n"
+
+ "vmovdqu (%0),%%xmm0 \n" // 01234567 (16b, 1u1v)
+ "vmovdqu 2(%0),%%xmm1 \n" // 12345678 (16b, 1u1v)
+ "vpmovzxwd %%xmm0,%%ymm0 \n" // 01234567 (32b, 1u1v)
+ "vpmovzxwd %%xmm1,%%ymm1 \n" // 12345678 (32b, 1u1v)
+ "vpshufd $0b10110001,%%ymm0,%%ymm2 \n" // 10325476 (lo, far)
+ "vpshufd $0b10110001,%%ymm1,%%ymm3 \n" // 21436587 (hi, far)
+ "vpaddd %%ymm0,%%ymm2,%%ymm2 \n" // near+far (lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm3 \n" // near+far (hi)
+ "vpaddd %%ymm0,%%ymm0,%%ymm0 \n" // 2*near (lo)
+ "vpaddd %%ymm1,%%ymm1,%%ymm1 \n" // 2*near (hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm0 \n" // 3*near+far (1, lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm1 \n" // 3*near+far (1, hi)
+
+ "vmovdqu (%0,%3,2),%%xmm2 \n" // 01234567 (16b, 1u1v)
+ "vmovdqu 2(%0,%3,2),%%xmm3 \n" // 12345678 (16b, 1u1v)
+ "vpmovzxwd %%xmm2,%%ymm2 \n" // 01234567 (32b, 1u1v)
+ "vpmovzxwd %%xmm3,%%ymm3 \n" // 12345678 (32b, 1u1v)
+ "vpshufd $0b10110001,%%ymm2,%%ymm4 \n" // 10325476 (lo, far)
+ "vpshufd $0b10110001,%%ymm3,%%ymm5 \n" // 21436587 (hi, far)
+ "vpaddd %%ymm2,%%ymm4,%%ymm4 \n" // near+far (lo)
+ "vpaddd %%ymm3,%%ymm5,%%ymm5 \n" // near+far (hi)
+ "vpaddd %%ymm2,%%ymm2,%%ymm2 \n" // 2*near (lo)
+ "vpaddd %%ymm3,%%ymm3,%%ymm3 \n" // 2*near (hi)
+ "vpaddd %%ymm2,%%ymm4,%%ymm2 \n" // 3*near+far (2, lo)
+ "vpaddd %%ymm3,%%ymm5,%%ymm3 \n" // 3*near+far (2, hi)
+
+ "vpaddd %%ymm0,%%ymm0,%%ymm4 \n" // 6*near+2*far (1, lo)
+ "vpaddd %%ymm6,%%ymm2,%%ymm5 \n" // 3*near+far+8 (2, lo)
+ "vpaddd %%ymm4,%%ymm0,%%ymm4 \n" // 9*near+3*far (1, lo)
+ "vpaddd %%ymm4,%%ymm5,%%ymm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "vpsrld $4,%%ymm4,%%ymm4 \n" // ^ div by 16 (1, lo)
+
+ "vpaddd %%ymm2,%%ymm2,%%ymm5 \n" // 6*near+2*far (2, lo)
+ "vpaddd %%ymm6,%%ymm0,%%ymm0 \n" // 3*near+far+8 (1, lo)
+ "vpaddd %%ymm5,%%ymm2,%%ymm5 \n" // 9*near+3*far (2, lo)
+ "vpaddd %%ymm5,%%ymm0,%%ymm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "vpsrld $4,%%ymm5,%%ymm5 \n" // ^ div by 16 (2, lo)
+
+ "vpaddd %%ymm1,%%ymm1,%%ymm0 \n" // 6*near+2*far (1, hi)
+ "vpaddd %%ymm6,%%ymm3,%%ymm2 \n" // 3*near+far+8 (2, hi)
+ "vpaddd %%ymm0,%%ymm1,%%ymm0 \n" // 9*near+3*far (1, hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "vpsrld $4,%%ymm0,%%ymm0 \n" // ^ div by 16 (1, hi)
+
+ "vpaddd %%ymm3,%%ymm3,%%ymm2 \n" // 6*near+2*far (2, hi)
+ "vpaddd %%ymm6,%%ymm1,%%ymm1 \n" // 3*near+far+8 (1, hi)
+ "vpaddd %%ymm2,%%ymm3,%%ymm2 \n" // 9*near+3*far (2, hi)
+ "vpaddd %%ymm2,%%ymm1,%%ymm2 \n" // 9 3 3 1 + 8 (2, hi)
+ "vpsrld $4,%%ymm2,%%ymm2 \n" // ^ div by 16 (2, hi)
+
+ "vpackusdw %%ymm0,%%ymm4,%%ymm4 \n"
+ "vpshufd $0b11011000,%%ymm4,%%ymm4 \n"
+ "vmovdqu %%ymm4,(%1) \n" // store above
+ "vpackusdw %%ymm2,%%ymm5,%%ymm5 \n"
+ "vpshufd $0b11011000,%%ymm5,%%ymm5 \n"
+ "vmovdqu %%ymm5,(%1,%4,2) \n" // store below
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 8 pixel to 16 pixel
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+// Reads 16xN bytes and produces 16 shorts at a time.
+void ScaleAddRow_SSE2(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int src_width) {
+ asm volatile("pxor %%xmm5,%%xmm5 \n"
+
+ // 16 pixel loop.
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm3 \n"
+ "lea 0x10(%0),%0 \n" // src_ptr += 16
+ "movdqu (%1),%%xmm0 \n"
+ "movdqu 0x10(%1),%%xmm1 \n"
+ "movdqa %%xmm3,%%xmm2 \n"
+ "punpcklbw %%xmm5,%%xmm2 \n"
+ "punpckhbw %%xmm5,%%xmm3 \n"
+ "paddusw %%xmm2,%%xmm0 \n"
+ "paddusw %%xmm3,%%xmm1 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "movdqu %%xmm1,0x10(%1) \n"
+ "lea 0x20(%1),%1 \n"
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(src_width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5");
+}
+
+#ifdef HAS_SCALEADDROW_AVX2
+// Reads 32 bytes and accumulates to 32 shorts at a time.
+void ScaleAddRow_AVX2(const uint8_t* src_ptr,
+ uint16_t* dst_ptr,
+ int src_width) {
+ asm volatile("vpxor %%ymm5,%%ymm5,%%ymm5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm3 \n"
+ "lea 0x20(%0),%0 \n" // src_ptr += 32
+ "vpermq $0xd8,%%ymm3,%%ymm3 \n"
+ "vpunpcklbw %%ymm5,%%ymm3,%%ymm2 \n"
+ "vpunpckhbw %%ymm5,%%ymm3,%%ymm3 \n"
+ "vpaddusw (%1),%%ymm2,%%ymm0 \n"
+ "vpaddusw 0x20(%1),%%ymm3,%%ymm1 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+ "vmovdqu %%ymm1,0x20(%1) \n"
+ "lea 0x40(%1),%1 \n"
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(src_width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5");
+}
+#endif // HAS_SCALEADDROW_AVX2
+
+// Constant for making pixels signed to avoid pmaddubsw
+// saturation.
+static const uvec8 kFsub80 = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
+
+// Constant for making pixels unsigned and adding .5 for rounding.
+static const uvec16 kFadd40 = {0x4040, 0x4040, 0x4040, 0x4040,
+ 0x4040, 0x4040, 0x4040, 0x4040};
+
+// Bilinear column filtering. SSSE3 version.
+void ScaleFilterCols_SSSE3(uint8_t* dst_ptr,
+ const uint8_t* src_ptr,
+ int dst_width,
+ int x,
+ int dx) {
+ intptr_t x0, x1, temp_pixel;
+ asm volatile(
+ "movd %6,%%xmm2 \n"
+ "movd %7,%%xmm3 \n"
+ "movl $0x04040000,%k2 \n"
+ "movd %k2,%%xmm5 \n"
+ "pcmpeqb %%xmm6,%%xmm6 \n"
+ "psrlw $0x9,%%xmm6 \n" // 0x007f007f
+ "pcmpeqb %%xmm7,%%xmm7 \n"
+ "psrlw $15,%%xmm7 \n" // 0x00010001
+
+ "pextrw $0x1,%%xmm2,%k3 \n"
+ "subl $0x2,%5 \n"
+ "jl 29f \n"
+ "movdqa %%xmm2,%%xmm0 \n"
+ "paddd %%xmm3,%%xmm0 \n"
+ "punpckldq %%xmm0,%%xmm2 \n"
+ "punpckldq %%xmm3,%%xmm3 \n"
+ "paddd %%xmm3,%%xmm3 \n"
+ "pextrw $0x3,%%xmm2,%k4 \n"
+
+ LABELALIGN
+ "2: \n"
+ "movdqa %%xmm2,%%xmm1 \n"
+ "paddd %%xmm3,%%xmm2 \n"
+ "movzwl 0x00(%1,%3,1),%k2 \n"
+ "movd %k2,%%xmm0 \n"
+ "psrlw $0x9,%%xmm1 \n"
+ "movzwl 0x00(%1,%4,1),%k2 \n"
+ "movd %k2,%%xmm4 \n"
+ "pshufb %%xmm5,%%xmm1 \n"
+ "punpcklwd %%xmm4,%%xmm0 \n"
+ "psubb %8,%%xmm0 \n" // make pixels signed.
+ "pxor %%xmm6,%%xmm1 \n" // 128 - f = (f ^ 127 ) +
+ // 1
+ "paddusb %%xmm7,%%xmm1 \n"
+ "pmaddubsw %%xmm0,%%xmm1 \n"
+ "pextrw $0x1,%%xmm2,%k3 \n"
+ "pextrw $0x3,%%xmm2,%k4 \n"
+ "paddw %9,%%xmm1 \n" // make pixels unsigned.
+ "psrlw $0x7,%%xmm1 \n"
+ "packuswb %%xmm1,%%xmm1 \n"
+ "movd %%xmm1,%k2 \n"
+ "mov %w2,(%0) \n"
+ "lea 0x2(%0),%0 \n"
+ "subl $0x2,%5 \n"
+ "jge 2b \n"
+
+ LABELALIGN
+ "29: \n"
+ "addl $0x1,%5 \n"
+ "jl 99f \n"
+ "movzwl 0x00(%1,%3,1),%k2 \n"
+ "movd %k2,%%xmm0 \n"
+ "psrlw $0x9,%%xmm2 \n"
+ "pshufb %%xmm5,%%xmm2 \n"
+ "psubb %8,%%xmm0 \n" // make pixels signed.
+ "pxor %%xmm6,%%xmm2 \n"
+ "paddusb %%xmm7,%%xmm2 \n"
+ "pmaddubsw %%xmm0,%%xmm2 \n"
+ "paddw %9,%%xmm2 \n" // make pixels unsigned.
+ "psrlw $0x7,%%xmm2 \n"
+ "packuswb %%xmm2,%%xmm2 \n"
+ "movd %%xmm2,%k2 \n"
+ "mov %b2,(%0) \n"
+ "99: \n"
+ : "+r"(dst_ptr), // %0
+ "+r"(src_ptr), // %1
+ "=&a"(temp_pixel), // %2
+ "=&r"(x0), // %3
+ "=&r"(x1), // %4
+#if defined(__x86_64__)
+ "+rm"(dst_width) // %5
+#else
+ "+m"(dst_width) // %5
+#endif
+ : "rm"(x), // %6
+ "rm"(dx), // %7
+#if defined(__x86_64__)
+ "x"(kFsub80), // %8
+ "x"(kFadd40) // %9
+#else
+ "m"(kFsub80), // %8
+ "m"(kFadd40) // %9
+#endif
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+
+// Reads 4 pixels, duplicates them and writes 8 pixels.
+// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
+void ScaleColsUp2_SSE2(uint8_t* dst_ptr,
+ const uint8_t* src_ptr,
+ int dst_width,
+ int x,
+ int dx) {
+ (void)x;
+ (void)dx;
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%1),%%xmm0 \n"
+ "lea 0x10(%1),%1 \n"
+ "movdqa %%xmm0,%%xmm1 \n"
+ "punpcklbw %%xmm0,%%xmm0 \n"
+ "punpckhbw %%xmm1,%%xmm1 \n"
+ "movdqu %%xmm0,(%0) \n"
+ "movdqu %%xmm1,0x10(%0) \n"
+ "lea 0x20(%0),%0 \n"
+ "sub $0x20,%2 \n"
+ "jg 1b \n"
+
+ : "+r"(dst_ptr), // %0
+ "+r"(src_ptr), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1");
+}
+
+void ScaleARGBRowDown2_SSE2(const uint8_t* src_argb,
+ ptrdiff_t src_stride,
+ uint8_t* dst_argb,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "lea 0x20(%0),%0 \n"
+ "shufps $0xdd,%%xmm1,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_argb), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1");
+}
+
+void ScaleARGBRowDown2Linear_SSE2(const uint8_t* src_argb,
+ ptrdiff_t src_stride,
+ uint8_t* dst_argb,
+ int dst_width) {
+ (void)src_stride;
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "lea 0x20(%0),%0 \n"
+ "movdqa %%xmm0,%%xmm2 \n"
+ "shufps $0x88,%%xmm1,%%xmm0 \n"
+ "shufps $0xdd,%%xmm1,%%xmm2 \n"
+ "pavgb %%xmm2,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_argb), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1");
+}
+
+void ScaleARGBRowDown2Box_SSE2(const uint8_t* src_argb,
+ ptrdiff_t src_stride,
+ uint8_t* dst_argb,
+ int dst_width) {
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n"
+ "movdqu 0x10(%0),%%xmm1 \n"
+ "movdqu 0x00(%0,%3,1),%%xmm2 \n"
+ "movdqu 0x10(%0,%3,1),%%xmm3 \n"
+ "lea 0x20(%0),%0 \n"
+ "pavgb %%xmm2,%%xmm0 \n"
+ "pavgb %%xmm3,%%xmm1 \n"
+ "movdqa %%xmm0,%%xmm2 \n"
+ "shufps $0x88,%%xmm1,%%xmm0 \n"
+ "shufps $0xdd,%%xmm1,%%xmm2 \n"
+ "pavgb %%xmm2,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n"
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(dst_argb), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3");
+}
+
+// Reads 4 pixels at a time.
+// Alignment requirement: dst_argb 16 byte aligned.
+void ScaleARGBRowDownEven_SSE2(const uint8_t* src_argb,
+ ptrdiff_t src_stride,
+ int src_stepx,
+ uint8_t* dst_argb,
+ int dst_width) {
+ intptr_t src_stepx_x4 = (intptr_t)(src_stepx);
+ intptr_t src_stepx_x12;
+ (void)src_stride;
+ asm volatile(
+ "lea 0x00(,%1,4),%1 \n"
+ "lea 0x00(%1,%1,2),%4 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movd (%0),%%xmm0 \n"
+ "movd 0x00(%0,%1,1),%%xmm1 \n"
+ "punpckldq %%xmm1,%%xmm0 \n"
+ "movd 0x00(%0,%1,2),%%xmm2 \n"
+ "movd 0x00(%0,%4,1),%%xmm3 \n"
+ "lea 0x00(%0,%1,4),%0 \n"
+ "punpckldq %%xmm3,%%xmm2 \n"
+ "punpcklqdq %%xmm2,%%xmm0 \n"
+ "movdqu %%xmm0,(%2) \n"
+ "lea 0x10(%2),%2 \n"
+ "sub $0x4,%3 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(src_stepx_x4), // %1
+ "+r"(dst_argb), // %2
+ "+r"(dst_width), // %3
+ "=&r"(src_stepx_x12) // %4
+ ::"memory",
+ "cc", "xmm0", "xmm1", "xmm2", "xmm3");
+}
+
+// Blends four 2x2 to 4x1.
+// Alignment requirement: dst_argb 16 byte aligned.
+void ScaleARGBRowDownEvenBox_SSE2(const uint8_t* src_argb,
+ ptrdiff_t src_stride,
+ int src_stepx,
+ uint8_t* dst_argb,
+ int dst_width) {
+ intptr_t src_stepx_x4 = (intptr_t)(src_stepx);
+ intptr_t src_stepx_x12;
+ intptr_t row1 = (intptr_t)(src_stride);
+ asm volatile(
+ "lea 0x00(,%1,4),%1 \n"
+ "lea 0x00(%1,%1,2),%4 \n"
+ "lea 0x00(%0,%5,1),%5 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n"
+ "movhps 0x00(%0,%1,1),%%xmm0 \n"
+ "movq 0x00(%0,%1,2),%%xmm1 \n"
+ "movhps 0x00(%0,%4,1),%%xmm1 \n"
+ "lea 0x00(%0,%1,4),%0 \n"
+ "movq (%5),%%xmm2 \n"
+ "movhps 0x00(%5,%1,1),%%xmm2 \n"
+ "movq 0x00(%5,%1,2),%%xmm3 \n"
+ "movhps 0x00(%5,%4,1),%%xmm3 \n"
+ "lea 0x00(%5,%1,4),%5 \n"
+ "pavgb %%xmm2,%%xmm0 \n"
+ "pavgb %%xmm3,%%xmm1 \n"
+ "movdqa %%xmm0,%%xmm2 \n"
+ "shufps $0x88,%%xmm1,%%xmm0 \n"
+ "shufps $0xdd,%%xmm1,%%xmm2 \n"
+ "pavgb %%xmm2,%%xmm0 \n"
+ "movdqu %%xmm0,(%2) \n"
+ "lea 0x10(%2),%2 \n"
+ "sub $0x4,%3 \n"
+ "jg 1b \n"
+ : "+r"(src_argb), // %0
+ "+r"(src_stepx_x4), // %1
+ "+r"(dst_argb), // %2
+ "+rm"(dst_width), // %3
+ "=&r"(src_stepx_x12), // %4
+ "+r"(row1) // %5
+ ::"memory",
+ "cc", "xmm0", "xmm1", "xmm2", "xmm3");
+}
+
+void ScaleARGBCols_SSE2(uint8_t* dst_argb,
+ const uint8_t* src_argb,
+ int dst_width,
+ int x,
+ int dx) {
+ intptr_t x0, x1;
+ asm volatile(
+ "movd %5,%%xmm2 \n"
+ "movd %6,%%xmm3 \n"
+ "pshufd $0x0,%%xmm2,%%xmm2 \n"
+ "pshufd $0x11,%%xmm3,%%xmm0 \n"
+ "paddd %%xmm0,%%xmm2 \n"
+ "paddd %%xmm3,%%xmm3 \n"
+ "pshufd $0x5,%%xmm3,%%xmm0 \n"
+ "paddd %%xmm0,%%xmm2 \n"
+ "paddd %%xmm3,%%xmm3 \n"
+ "pshufd $0x0,%%xmm3,%%xmm3 \n"
+ "pextrw $0x1,%%xmm2,%k0 \n"
+ "pextrw $0x3,%%xmm2,%k1 \n"
+ "cmp $0x0,%4 \n"
+ "jl 99f \n"
+ "sub $0x4,%4 \n"
+ "jl 49f \n"
+
+ LABELALIGN
+ "40: \n"
+ "movd 0x00(%3,%0,4),%%xmm0 \n"
+ "movd 0x00(%3,%1,4),%%xmm1 \n"
+ "pextrw $0x5,%%xmm2,%k0 \n"
+ "pextrw $0x7,%%xmm2,%k1 \n"
+ "paddd %%xmm3,%%xmm2 \n"
+ "punpckldq %%xmm1,%%xmm0 \n"
+ "movd 0x00(%3,%0,4),%%xmm1 \n"
+ "movd 0x00(%3,%1,4),%%xmm4 \n"
+ "pextrw $0x1,%%xmm2,%k0 \n"
+ "pextrw $0x3,%%xmm2,%k1 \n"
+ "punpckldq %%xmm4,%%xmm1 \n"
+ "punpcklqdq %%xmm1,%%xmm0 \n"
+ "movdqu %%xmm0,(%2) \n"
+ "lea 0x10(%2),%2 \n"
+ "sub $0x4,%4 \n"
+ "jge 40b \n"
+
+ "49: \n"
+ "test $0x2,%4 \n"
+ "je 29f \n"
+ "movd 0x00(%3,%0,4),%%xmm0 \n"
+ "movd 0x00(%3,%1,4),%%xmm1 \n"
+ "pextrw $0x5,%%xmm2,%k0 \n"
+ "punpckldq %%xmm1,%%xmm0 \n"
+ "movq %%xmm0,(%2) \n"
+ "lea 0x8(%2),%2 \n"
+ "29: \n"
+ "test $0x1,%4 \n"
+ "je 99f \n"
+ "movd 0x00(%3,%0,4),%%xmm0 \n"
+ "movd %%xmm0,(%2) \n"
+ "99: \n"
+ : "=&a"(x0), // %0
+ "=&d"(x1), // %1
+ "+r"(dst_argb), // %2
+ "+r"(src_argb), // %3
+ "+r"(dst_width) // %4
+ : "rm"(x), // %5
+ "rm"(dx) // %6
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+}
+
+// Reads 4 pixels, duplicates them and writes 8 pixels.
+// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
+void ScaleARGBColsUp2_SSE2(uint8_t* dst_argb,
+ const uint8_t* src_argb,
+ int dst_width,
+ int x,
+ int dx) {
+ (void)x;
+ (void)dx;
+ asm volatile(LABELALIGN
+ "1: \n"
+ "movdqu (%1),%%xmm0 \n"
+ "lea 0x10(%1),%1 \n"
+ "movdqa %%xmm0,%%xmm1 \n"
+ "punpckldq %%xmm0,%%xmm0 \n"
+ "punpckhdq %%xmm1,%%xmm1 \n"
+ "movdqu %%xmm0,(%0) \n"
+ "movdqu %%xmm1,0x10(%0) \n"
+ "lea 0x20(%0),%0 \n"
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+
+ : "+r"(dst_argb), // %0
+ "+r"(src_argb), // %1
+ "+r"(dst_width) // %2
+ ::"memory",
+ "cc", "xmm0", "xmm1");
+}
+
+// Shuffle table for arranging 2 pixels into pairs for pmaddubsw
+static const uvec8 kShuffleColARGB = {
+ 0u, 4u, 1u, 5u, 2u, 6u, 3u, 7u, // bbggrraa 1st pixel
+ 8u, 12u, 9u, 13u, 10u, 14u, 11u, 15u // bbggrraa 2nd pixel
+};
+
+// Shuffle table for duplicating 2 fractions into 8 bytes each
+static const uvec8 kShuffleFractions = {
+ 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 4u, 4u, 4u, 4u, 4u, 4u, 4u, 4u,
+};
+
+// Bilinear row filtering combines 4x2 -> 4x1. SSSE3 version
+void ScaleARGBFilterCols_SSSE3(uint8_t* dst_argb,
+ const uint8_t* src_argb,
+ int dst_width,
+ int x,
+ int dx) {
+ intptr_t x0, x1;
+ asm volatile(
+ "movdqa %0,%%xmm4 \n"
+ "movdqa %1,%%xmm5 \n"
+ :
+ : "m"(kShuffleColARGB), // %0
+ "m"(kShuffleFractions) // %1
+ );
+
+ asm volatile(
+ "movd %5,%%xmm2 \n"
+ "movd %6,%%xmm3 \n"
+ "pcmpeqb %%xmm6,%%xmm6 \n"
+ "psrlw $0x9,%%xmm6 \n"
+ "pextrw $0x1,%%xmm2,%k3 \n"
+ "sub $0x2,%2 \n"
+ "jl 29f \n"
+ "movdqa %%xmm2,%%xmm0 \n"
+ "paddd %%xmm3,%%xmm0 \n"
+ "punpckldq %%xmm0,%%xmm2 \n"
+ "punpckldq %%xmm3,%%xmm3 \n"
+ "paddd %%xmm3,%%xmm3 \n"
+ "pextrw $0x3,%%xmm2,%k4 \n"
+
+ LABELALIGN
+ "2: \n"
+ "movdqa %%xmm2,%%xmm1 \n"
+ "paddd %%xmm3,%%xmm2 \n"
+ "movq 0x00(%1,%3,4),%%xmm0 \n"
+ "psrlw $0x9,%%xmm1 \n"
+ "movhps 0x00(%1,%4,4),%%xmm0 \n"
+ "pshufb %%xmm5,%%xmm1 \n"
+ "pshufb %%xmm4,%%xmm0 \n"
+ "pxor %%xmm6,%%xmm1 \n"
+ "pmaddubsw %%xmm1,%%xmm0 \n"
+ "psrlw $0x7,%%xmm0 \n"
+ "pextrw $0x1,%%xmm2,%k3 \n"
+ "pextrw $0x3,%%xmm2,%k4 \n"
+ "packuswb %%xmm0,%%xmm0 \n"
+ "movq %%xmm0,(%0) \n"
+ "lea 0x8(%0),%0 \n"
+ "sub $0x2,%2 \n"
+ "jge 2b \n"
+
+ LABELALIGN
+ "29: \n"
+ "add $0x1,%2 \n"
+ "jl 99f \n"
+ "psrlw $0x9,%%xmm2 \n"
+ "movq 0x00(%1,%3,4),%%xmm0 \n"
+ "pshufb %%xmm5,%%xmm2 \n"
+ "pshufb %%xmm4,%%xmm0 \n"
+ "pxor %%xmm6,%%xmm2 \n"
+ "pmaddubsw %%xmm2,%%xmm0 \n"
+ "psrlw $0x7,%%xmm0 \n"
+ "packuswb %%xmm0,%%xmm0 \n"
+ "movd %%xmm0,(%0) \n"
+
+ LABELALIGN
+ "99: \n" // clang-format error.
+
+ : "+r"(dst_argb), // %0
+ "+r"(src_argb), // %1
+ "+rm"(dst_width), // %2
+ "=&r"(x0), // %3
+ "=&r"(x1) // %4
+ : "rm"(x), // %5
+ "rm"(dx) // %6
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+
+// Divide num by div and return as 16.16 fixed point result.
+int FixedDiv_X86(int num, int div) {
+ asm volatile(
+ "cdq \n"
+ "shld $0x10,%%eax,%%edx \n"
+ "shl $0x10,%%eax \n"
+ "idiv %1 \n"
+ "mov %0, %%eax \n"
+ : "+a"(num) // %0
+ : "c"(div) // %1
+ : "memory", "cc", "edx");
+ return num;
+}
+
+// Divide num - 1 by div - 1 and return as 16.16 fixed point result.
+int FixedDiv1_X86(int num, int div) {
+ asm volatile(
+ "cdq \n"
+ "shld $0x10,%%eax,%%edx \n"
+ "shl $0x10,%%eax \n"
+ "sub $0x10001,%%eax \n"
+ "sbb $0x0,%%edx \n"
+ "sub $0x1,%1 \n"
+ "idiv %1 \n"
+ "mov %0, %%eax \n"
+ : "+a"(num) // %0
+ : "c"(div) // %1
+ : "memory", "cc", "edx");
+ return num;
+}
+
+#ifdef HAS_SCALEUVROWDOWN2BOX_SSSE3
+// Shuffle table for splitting UV into upper and lower part of register.
+static const uvec8 kShuffleSplitUV = {0u, 2u, 4u, 6u, 8u, 10u, 12u, 14u,
+ 1u, 3u, 5u, 7u, 9u, 11u, 13u, 15u};
+static const uvec8 kShuffleMergeUV = {0u, 8u, 2u, 10u, 4u, 12u,
+ 6u, 14u, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80};
+
+void ScaleUVRowDown2Box_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "pcmpeqb %%xmm4,%%xmm4 \n" // 01010101
+ "psrlw $0xf,%%xmm4 \n"
+ "packuswb %%xmm4,%%xmm4 \n"
+ "pxor %%xmm5, %%xmm5 \n" // zero
+ "movdqa %4,%%xmm1 \n" // split shuffler
+ "movdqa %5,%%xmm3 \n" // merge shuffler
+
+ LABELALIGN
+ "1: \n"
+ "movdqu (%0),%%xmm0 \n" // 8 UV row 0
+ "movdqu 0x00(%0,%3,1),%%xmm2 \n" // 8 UV row 1
+ "lea 0x10(%0),%0 \n"
+ "pshufb %%xmm1,%%xmm0 \n" // uuuuvvvv
+ "pshufb %%xmm1,%%xmm2 \n"
+ "pmaddubsw %%xmm4,%%xmm0 \n" // horizontal add
+ "pmaddubsw %%xmm4,%%xmm2 \n"
+ "paddw %%xmm2,%%xmm0 \n" // vertical add
+ "psrlw $0x1,%%xmm0 \n" // round
+ "pavgw %%xmm5,%%xmm0 \n"
+ "pshufb %%xmm3,%%xmm0 \n" // merge uv
+ "movq %%xmm0,(%1) \n"
+ "lea 0x8(%1),%1 \n" // 4 UV
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "m"(kShuffleSplitUV), // %4
+ "m"(kShuffleMergeUV) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif // HAS_SCALEUVROWDOWN2BOX_SSSE3
+
+#ifdef HAS_SCALEUVROWDOWN2BOX_AVX2
+void ScaleUVRowDown2Box_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101
+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n"
+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpxor %%ymm5,%%ymm5,%%ymm5 \n" // zero
+ "vbroadcastf128 %4,%%ymm1 \n" // split shuffler
+ "vbroadcastf128 %5,%%ymm3 \n" // merge shuffler
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%ymm0 \n" // 16 UV row 0
+ "vmovdqu 0x00(%0,%3,1),%%ymm2 \n" // 16 UV row 1
+ "lea 0x20(%0),%0 \n"
+ "vpshufb %%ymm1,%%ymm0,%%ymm0 \n" // uuuuvvvv
+ "vpshufb %%ymm1,%%ymm2,%%ymm2 \n"
+ "vpmaddubsw %%ymm4,%%ymm0,%%ymm0 \n" // horizontal add
+ "vpmaddubsw %%ymm4,%%ymm2,%%ymm2 \n"
+ "vpaddw %%ymm2,%%ymm0,%%ymm0 \n" // vertical add
+ "vpsrlw $0x1,%%ymm0,%%ymm0 \n" // round
+ "vpavgw %%ymm5,%%ymm0,%%ymm0 \n"
+ "vpshufb %%ymm3,%%ymm0,%%ymm0 \n" // merge uv
+ "vpermq $0xd8,%%ymm0,%%ymm0 \n" // combine qwords
+ "vmovdqu %%xmm0,(%1) \n"
+ "lea 0x10(%1),%1 \n" // 8 UV
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "m"(kShuffleSplitUV), // %4
+ "m"(kShuffleMergeUV) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif // HAS_SCALEUVROWDOWN2BOX_AVX2
+
+static const uvec8 kUVLinearMadd31 = {3, 1, 3, 1, 1, 3, 1, 3,
+ 3, 1, 3, 1, 1, 3, 1, 3};
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_SSSE3
+void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "pcmpeqw %%xmm4,%%xmm4 \n"
+ "psrlw $15,%%xmm4 \n"
+ "psllw $1,%%xmm4 \n" // all 2
+ "movdqa %3,%%xmm3 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 00112233 (1u1v)
+ "movq 2(%0),%%xmm1 \n" // 11223344 (1u1v)
+ "punpcklbw %%xmm1,%%xmm0 \n" // 0101121223233434 (2u2v)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckhdq %%xmm0,%%xmm2 \n" // 2323232334343434 (2u2v)
+ "punpckldq %%xmm0,%%xmm0 \n" // 0101010112121212 (2u2v)
+ "pmaddubsw %%xmm3,%%xmm2 \n" // 3*near+far (1u1v16, hi)
+ "pmaddubsw %%xmm3,%%xmm0 \n" // 3*near+far (1u1v16, lo)
+ "paddw %%xmm4,%%xmm0 \n" // 3*near+far+2 (lo)
+ "paddw %%xmm4,%%xmm2 \n" // 3*near+far+2 (hi)
+ "psrlw $2,%%xmm0 \n" // 3/4*near+1/4*far (lo)
+ "psrlw $2,%%xmm2 \n" // 3/4*near+1/4*far (hi)
+ "packuswb %%xmm2,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 4 uv to 8 uv
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "m"(kUVLinearMadd31) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_SSSE3
+void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "pcmpeqw %%xmm6,%%xmm6 \n"
+ "psrlw $15,%%xmm6 \n"
+ "psllw $3,%%xmm6 \n" // all 8
+ "movdqa %5,%%xmm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 00112233 (1u1v)
+ "movq 2(%0),%%xmm1 \n" // 11223344 (1u1v)
+ "punpcklbw %%xmm1,%%xmm0 \n" // 0101121223233434 (2u2v)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "punpckhdq %%xmm0,%%xmm2 \n" // 2323232334343434 (2u2v)
+ "punpckldq %%xmm0,%%xmm0 \n" // 0101010112121212 (2u2v)
+ "pmaddubsw %%xmm7,%%xmm2 \n" // 3*near+far (1u1v16, hi)
+ "pmaddubsw %%xmm7,%%xmm0 \n" // 3*near+far (1u1v16, lo)
+
+ "movq (%0,%3),%%xmm1 \n"
+ "movq 2(%0,%3),%%xmm4 \n"
+ "punpcklbw %%xmm4,%%xmm1 \n"
+ "movdqa %%xmm1,%%xmm3 \n"
+ "punpckhdq %%xmm1,%%xmm3 \n"
+ "punpckldq %%xmm1,%%xmm1 \n"
+ "pmaddubsw %%xmm7,%%xmm3 \n" // 3*near+far (2, hi)
+ "pmaddubsw %%xmm7,%%xmm1 \n" // 3*near+far (2, lo)
+
+ // xmm0 xmm2
+ // xmm1 xmm3
+
+ "movdqa %%xmm0,%%xmm4 \n"
+ "movdqa %%xmm1,%%xmm5 \n"
+ "paddw %%xmm0,%%xmm4 \n" // 6*near+2*far (1, lo)
+ "paddw %%xmm6,%%xmm5 \n" // 3*near+far+8 (2, lo)
+ "paddw %%xmm0,%%xmm4 \n" // 9*near+3*far (1, lo)
+ "paddw %%xmm5,%%xmm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "psrlw $4,%%xmm4 \n" // ^ div by 16 (1, lo)
+
+ "movdqa %%xmm1,%%xmm5 \n"
+ "paddw %%xmm1,%%xmm5 \n" // 6*near+2*far (2, lo)
+ "paddw %%xmm6,%%xmm0 \n" // 3*near+far+8 (1, lo)
+ "paddw %%xmm1,%%xmm5 \n" // 9*near+3*far (2, lo)
+ "paddw %%xmm0,%%xmm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "psrlw $4,%%xmm5 \n" // ^ div by 16 (2, lo)
+
+ "movdqa %%xmm2,%%xmm0 \n"
+ "movdqa %%xmm3,%%xmm1 \n"
+ "paddw %%xmm2,%%xmm0 \n" // 6*near+2*far (1, hi)
+ "paddw %%xmm6,%%xmm1 \n" // 3*near+far+8 (2, hi)
+ "paddw %%xmm2,%%xmm0 \n" // 9*near+3*far (1, hi)
+ "paddw %%xmm1,%%xmm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "psrlw $4,%%xmm0 \n" // ^ div by 16 (1, hi)
+
+ "movdqa %%xmm3,%%xmm1 \n"
+ "paddw %%xmm3,%%xmm1 \n" // 6*near+2*far (2, hi)
+ "paddw %%xmm6,%%xmm2 \n" // 3*near+far+8 (1, hi)
+ "paddw %%xmm3,%%xmm1 \n" // 9*near+3*far (2, hi)
+ "paddw %%xmm2,%%xmm1 \n" // 9 3 3 1 + 8 (2, hi)
+ "psrlw $4,%%xmm1 \n" // ^ div by 16 (2, hi)
+
+ "packuswb %%xmm0,%%xmm4 \n"
+ "movdqu %%xmm4,(%1) \n" // store above
+ "packuswb %%xmm1,%%xmm5 \n"
+ "movdqu %%xmm5,(%1,%4) \n" // store below
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 4 uv to 8 uv
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)), // %4
+ "m"(kUVLinearMadd31) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_AVX2
+
+void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrlw $15,%%ymm4,%%ymm4 \n"
+ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2
+ "vbroadcastf128 %3,%%ymm3 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%xmm0 \n"
+ "vmovdqu 2(%0),%%xmm1 \n"
+ "vpermq $0b11011000,%%ymm0,%%ymm0 \n"
+ "vpermq $0b11011000,%%ymm1,%%ymm1 \n"
+ "vpunpcklbw %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpunpckhdq %%ymm0,%%ymm0,%%ymm2 \n"
+ "vpunpckldq %%ymm0,%%ymm0,%%ymm0 \n"
+ "vpmaddubsw %%ymm3,%%ymm2,%%ymm1 \n" // 3*near+far (hi)
+ "vpmaddubsw %%ymm3,%%ymm0,%%ymm0 \n" // 3*near+far (lo)
+ "vpaddw %%ymm4,%%ymm0,%%ymm0 \n" // 3*near+far+2 (lo)
+ "vpaddw %%ymm4,%%ymm1,%%ymm1 \n" // 3*near+far+2 (hi)
+ "vpsrlw $2,%%ymm0,%%ymm0 \n" // 3/4*near+1/4*far (lo)
+ "vpsrlw $2,%%ymm1,%%ymm1 \n" // 3/4*near+1/4*far (hi)
+ "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 8 uv to 16 uv
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "m"(kUVLinearMadd31) // %3
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+}
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_AVX2
+void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n"
+ "vpsrlw $15,%%ymm6,%%ymm6 \n"
+ "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8
+ "vbroadcastf128 %5,%%ymm7 \n"
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%xmm0 \n"
+ "vmovdqu 2(%0),%%xmm1 \n"
+ "vpermq $0b11011000,%%ymm0,%%ymm0 \n"
+ "vpermq $0b11011000,%%ymm1,%%ymm1 \n"
+ "vpunpcklbw %%ymm1,%%ymm0,%%ymm0 \n"
+ "vpunpckhdq %%ymm0,%%ymm0,%%ymm2 \n"
+ "vpunpckldq %%ymm0,%%ymm0,%%ymm0 \n"
+ "vpmaddubsw %%ymm7,%%ymm2,%%ymm1 \n" // 3*near+far (1, hi)
+ "vpmaddubsw %%ymm7,%%ymm0,%%ymm0 \n" // 3*near+far (1, lo)
+
+ "vmovdqu (%0,%3),%%xmm2 \n" // 0123456789ABCDEF
+ "vmovdqu 2(%0,%3),%%xmm3 \n" // 123456789ABCDEF0
+ "vpermq $0b11011000,%%ymm2,%%ymm2 \n"
+ "vpermq $0b11011000,%%ymm3,%%ymm3 \n"
+ "vpunpcklbw %%ymm3,%%ymm2,%%ymm2 \n"
+ "vpunpckhdq %%ymm2,%%ymm2,%%ymm4 \n"
+ "vpunpckldq %%ymm2,%%ymm2,%%ymm2 \n"
+ "vpmaddubsw %%ymm7,%%ymm4,%%ymm3 \n" // 3*near+far (2, hi)
+ "vpmaddubsw %%ymm7,%%ymm2,%%ymm2 \n" // 3*near+far (2, lo)
+
+ // ymm0 ymm1
+ // ymm2 ymm3
+
+ "vpaddw %%ymm0,%%ymm0,%%ymm4 \n" // 6*near+2*far (1, lo)
+ "vpaddw %%ymm6,%%ymm2,%%ymm5 \n" // 3*near+far+8 (2, lo)
+ "vpaddw %%ymm4,%%ymm0,%%ymm4 \n" // 9*near+3*far (1, lo)
+ "vpaddw %%ymm4,%%ymm5,%%ymm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "vpsrlw $4,%%ymm4,%%ymm4 \n" // ^ div by 16 (1, lo)
+
+ "vpaddw %%ymm2,%%ymm2,%%ymm5 \n" // 6*near+2*far (2, lo)
+ "vpaddw %%ymm6,%%ymm0,%%ymm0 \n" // 3*near+far+8 (1, lo)
+ "vpaddw %%ymm5,%%ymm2,%%ymm5 \n" // 9*near+3*far (2, lo)
+ "vpaddw %%ymm5,%%ymm0,%%ymm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "vpsrlw $4,%%ymm5,%%ymm5 \n" // ^ div by 16 (2, lo)
+
+ "vpaddw %%ymm1,%%ymm1,%%ymm0 \n" // 6*near+2*far (1, hi)
+ "vpaddw %%ymm6,%%ymm3,%%ymm2 \n" // 3*near+far+8 (2, hi)
+ "vpaddw %%ymm0,%%ymm1,%%ymm0 \n" // 9*near+3*far (1, hi)
+ "vpaddw %%ymm0,%%ymm2,%%ymm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "vpsrlw $4,%%ymm0,%%ymm0 \n" // ^ div by 16 (1, hi)
+
+ "vpaddw %%ymm3,%%ymm3,%%ymm2 \n" // 6*near+2*far (2, hi)
+ "vpaddw %%ymm6,%%ymm1,%%ymm1 \n" // 3*near+far+8 (1, hi)
+ "vpaddw %%ymm2,%%ymm3,%%ymm2 \n" // 9*near+3*far (2, hi)
+ "vpaddw %%ymm2,%%ymm1,%%ymm2 \n" // 9 3 3 1 + 8 (2, hi)
+ "vpsrlw $4,%%ymm2,%%ymm2 \n" // ^ div by 16 (2, hi)
+
+ "vpackuswb %%ymm0,%%ymm4,%%ymm4 \n"
+ "vmovdqu %%ymm4,(%1) \n" // store above
+ "vpackuswb %%ymm2,%%ymm5,%%ymm5 \n"
+ "vmovdqu %%ymm5,(%1,%4) \n" // store below
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 8 uv to 16 uv
+ "sub $0x10,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)), // %4
+ "m"(kUVLinearMadd31) // %5
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_SSE2
+void ScaleUVRowUp2_Linear_16_SSE2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "pxor %%xmm5,%%xmm5 \n"
+ "pcmpeqd %%xmm4,%%xmm4 \n"
+ "psrld $31,%%xmm4 \n"
+ "pslld $1,%%xmm4 \n" // all 2
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 0011 (16b, 1u1v)
+ "movq 4(%0),%%xmm1 \n" // 1122 (16b, 1u1v)
+
+ "punpcklwd %%xmm5,%%xmm0 \n" // 0011 (32b, 1u1v)
+ "punpcklwd %%xmm5,%%xmm1 \n" // 1122 (32b, 1u1v)
+
+ "movdqa %%xmm0,%%xmm2 \n"
+ "movdqa %%xmm1,%%xmm3 \n"
+
+ "pshufd $0b01001110,%%xmm2,%%xmm2 \n" // 1100 (lo, far)
+ "pshufd $0b01001110,%%xmm3,%%xmm3 \n" // 2211 (hi, far)
+
+ "paddd %%xmm4,%%xmm2 \n" // far+2 (lo)
+ "paddd %%xmm4,%%xmm3 \n" // far+2 (hi)
+ "paddd %%xmm0,%%xmm2 \n" // near+far+2 (lo)
+ "paddd %%xmm1,%%xmm3 \n" // near+far+2 (hi)
+ "paddd %%xmm0,%%xmm0 \n" // 2*near (lo)
+ "paddd %%xmm1,%%xmm1 \n" // 2*near (hi)
+ "paddd %%xmm2,%%xmm0 \n" // 3*near+far+2 (lo)
+ "paddd %%xmm3,%%xmm1 \n" // 3*near+far+2 (hi)
+
+ "psrld $2,%%xmm0 \n" // 3/4*near+1/4*far (lo)
+ "psrld $2,%%xmm1 \n" // 3/4*near+1/4*far (hi)
+ "packusdw %%xmm1,%%xmm0 \n"
+ "movdqu %%xmm0,(%1) \n"
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 2 uv to 4 uv
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
+}
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_SSE2
+void ScaleUVRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "pxor %%xmm7,%%xmm7 \n"
+ "pcmpeqd %%xmm6,%%xmm6 \n"
+ "psrld $31,%%xmm6 \n"
+ "pslld $3,%%xmm6 \n" // all 8
+
+ LABELALIGN
+ "1: \n"
+ "movq (%0),%%xmm0 \n" // 0011 (16b, 1u1v)
+ "movq 4(%0),%%xmm1 \n" // 1122 (16b, 1u1v)
+ "punpcklwd %%xmm7,%%xmm0 \n" // 0011 (near) (32b, 1u1v)
+ "punpcklwd %%xmm7,%%xmm1 \n" // 1122 (near) (32b, 1u1v)
+ "movdqa %%xmm0,%%xmm2 \n"
+ "movdqa %%xmm1,%%xmm3 \n"
+ "pshufd $0b01001110,%%xmm2,%%xmm2 \n" // 1100 (far) (1, lo)
+ "pshufd $0b01001110,%%xmm3,%%xmm3 \n" // 2211 (far) (1, hi)
+ "paddd %%xmm0,%%xmm2 \n" // near+far (1, lo)
+ "paddd %%xmm1,%%xmm3 \n" // near+far (1, hi)
+ "paddd %%xmm0,%%xmm0 \n" // 2*near (1, lo)
+ "paddd %%xmm1,%%xmm1 \n" // 2*near (1, hi)
+ "paddd %%xmm2,%%xmm0 \n" // 3*near+far (1, lo)
+ "paddd %%xmm3,%%xmm1 \n" // 3*near+far (1, hi)
+
+ "movq (%0,%3,2),%%xmm2 \n"
+ "movq 4(%0,%3,2),%%xmm3 \n"
+ "punpcklwd %%xmm7,%%xmm2 \n"
+ "punpcklwd %%xmm7,%%xmm3 \n"
+ "movdqa %%xmm2,%%xmm4 \n"
+ "movdqa %%xmm3,%%xmm5 \n"
+ "pshufd $0b01001110,%%xmm4,%%xmm4 \n" // 1100 (far) (2, lo)
+ "pshufd $0b01001110,%%xmm5,%%xmm5 \n" // 2211 (far) (2, hi)
+ "paddd %%xmm2,%%xmm4 \n" // near+far (2, lo)
+ "paddd %%xmm3,%%xmm5 \n" // near+far (2, hi)
+ "paddd %%xmm2,%%xmm2 \n" // 2*near (2, lo)
+ "paddd %%xmm3,%%xmm3 \n" // 2*near (2, hi)
+ "paddd %%xmm4,%%xmm2 \n" // 3*near+far (2, lo)
+ "paddd %%xmm5,%%xmm3 \n" // 3*near+far (2, hi)
+
+ "movdqa %%xmm0,%%xmm4 \n"
+ "movdqa %%xmm2,%%xmm5 \n"
+ "paddd %%xmm0,%%xmm4 \n" // 6*near+2*far (1, lo)
+ "paddd %%xmm6,%%xmm5 \n" // 3*near+far+8 (2, lo)
+ "paddd %%xmm0,%%xmm4 \n" // 9*near+3*far (1, lo)
+ "paddd %%xmm5,%%xmm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "psrld $4,%%xmm4 \n" // ^ div by 16 (1, lo)
+
+ "movdqa %%xmm2,%%xmm5 \n"
+ "paddd %%xmm2,%%xmm5 \n" // 6*near+2*far (2, lo)
+ "paddd %%xmm6,%%xmm0 \n" // 3*near+far+8 (1, lo)
+ "paddd %%xmm2,%%xmm5 \n" // 9*near+3*far (2, lo)
+ "paddd %%xmm0,%%xmm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "psrld $4,%%xmm5 \n" // ^ div by 16 (2, lo)
+
+ "movdqa %%xmm1,%%xmm0 \n"
+ "movdqa %%xmm3,%%xmm2 \n"
+ "paddd %%xmm1,%%xmm0 \n" // 6*near+2*far (1, hi)
+ "paddd %%xmm6,%%xmm2 \n" // 3*near+far+8 (2, hi)
+ "paddd %%xmm1,%%xmm0 \n" // 9*near+3*far (1, hi)
+ "paddd %%xmm2,%%xmm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "psrld $4,%%xmm0 \n" // ^ div by 16 (1, hi)
+
+ "movdqa %%xmm3,%%xmm2 \n"
+ "paddd %%xmm3,%%xmm2 \n" // 6*near+2*far (2, hi)
+ "paddd %%xmm6,%%xmm1 \n" // 3*near+far+8 (1, hi)
+ "paddd %%xmm3,%%xmm2 \n" // 9*near+3*far (2, hi)
+ "paddd %%xmm1,%%xmm2 \n" // 9 3 3 1 + 8 (2, hi)
+ "psrld $4,%%xmm2 \n" // ^ div by 16 (2, hi)
+
+ "packusdw %%xmm0,%%xmm4 \n"
+ "movdqu %%xmm4,(%1) \n" // store above
+ "packusdw %%xmm2,%%xmm5 \n"
+ "movdqu %%xmm5,(%1,%4,2) \n" // store below
+
+ "lea 0x8(%0),%0 \n"
+ "lea 0x10(%1),%1 \n" // 2 uv to 4 uv
+ "sub $0x4,%2 \n"
+ "jg 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
+ "xmm7");
+}
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_AVX2
+void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n"
+ "vpsrld $31,%%ymm4,%%ymm4 \n"
+ "vpslld $1,%%ymm4,%%ymm4 \n" // all 2
+
+ LABELALIGN
+ "1: \n"
+ "vmovdqu (%0),%%xmm0 \n" // 00112233 (16b, 1u1v)
+ "vmovdqu 4(%0),%%xmm1 \n" // 11223344 (16b, 1u1v)
+
+ "vpmovzxwd %%xmm0,%%ymm0 \n" // 01234567 (32b, 1u1v)
+ "vpmovzxwd %%xmm1,%%ymm1 \n" // 12345678 (32b, 1u1v)
+
+ "vpshufd $0b01001110,%%ymm0,%%ymm2 \n" // 11003322 (lo, far)
+ "vpshufd $0b01001110,%%ymm1,%%ymm3 \n" // 22114433 (hi, far)
+
+ "vpaddd %%ymm4,%%ymm2,%%ymm2 \n" // far+2 (lo)
+ "vpaddd %%ymm4,%%ymm3,%%ymm3 \n" // far+2 (hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm2 \n" // near+far+2 (lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm3 \n" // near+far+2 (hi)
+ "vpaddd %%ymm0,%%ymm0,%%ymm0 \n" // 2*near (lo)
+ "vpaddd %%ymm1,%%ymm1,%%ymm1 \n" // 2*near (hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm0 \n" // 3*near+far+2 (lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm1 \n" // 3*near+far+2 (hi)
+
+ "vpsrld $2,%%ymm0,%%ymm0 \n" // 3/4*near+1/4*far (lo)
+ "vpsrld $2,%%ymm1,%%ymm1 \n" // 3/4*near+1/4*far (hi)
+ "vpackusdw %%ymm1,%%ymm0,%%ymm0 \n"
+ "vmovdqu %%ymm0,(%1) \n"
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 4 uv to 8 uv
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ :
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
+}
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_AVX2
+void ScaleUVRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ asm volatile(
+ "vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n"
+ "vpsrld $31,%%ymm6,%%ymm6 \n"
+ "vpslld $3,%%ymm6,%%ymm6 \n" // all 8
+
+ LABELALIGN
+ "1: \n"
+
+ "vmovdqu (%0),%%xmm0 \n" // 00112233 (16b, 1u1v)
+ "vmovdqu 4(%0),%%xmm1 \n" // 11223344 (16b, 1u1v)
+ "vpmovzxwd %%xmm0,%%ymm0 \n" // 01234567 (32b, 1u1v)
+ "vpmovzxwd %%xmm1,%%ymm1 \n" // 12345678 (32b, 1u1v)
+ "vpshufd $0b01001110,%%ymm0,%%ymm2 \n" // 11003322 (lo, far)
+ "vpshufd $0b01001110,%%ymm1,%%ymm3 \n" // 22114433 (hi, far)
+ "vpaddd %%ymm0,%%ymm2,%%ymm2 \n" // near+far (lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm3 \n" // near+far (hi)
+ "vpaddd %%ymm0,%%ymm0,%%ymm0 \n" // 2*near (lo)
+ "vpaddd %%ymm1,%%ymm1,%%ymm1 \n" // 2*near (hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm0 \n" // 3*near+far (lo)
+ "vpaddd %%ymm1,%%ymm3,%%ymm1 \n" // 3*near+far (hi)
+
+ "vmovdqu (%0,%3,2),%%xmm2 \n" // 00112233 (16b, 1u1v)
+ "vmovdqu 4(%0,%3,2),%%xmm3 \n" // 11223344 (16b, 1u1v)
+ "vpmovzxwd %%xmm2,%%ymm2 \n" // 01234567 (32b, 1u1v)
+ "vpmovzxwd %%xmm3,%%ymm3 \n" // 12345678 (32b, 1u1v)
+ "vpshufd $0b01001110,%%ymm2,%%ymm4 \n" // 11003322 (lo, far)
+ "vpshufd $0b01001110,%%ymm3,%%ymm5 \n" // 22114433 (hi, far)
+ "vpaddd %%ymm2,%%ymm4,%%ymm4 \n" // near+far (lo)
+ "vpaddd %%ymm3,%%ymm5,%%ymm5 \n" // near+far (hi)
+ "vpaddd %%ymm2,%%ymm2,%%ymm2 \n" // 2*near (lo)
+ "vpaddd %%ymm3,%%ymm3,%%ymm3 \n" // 2*near (hi)
+ "vpaddd %%ymm2,%%ymm4,%%ymm2 \n" // 3*near+far (lo)
+ "vpaddd %%ymm3,%%ymm5,%%ymm3 \n" // 3*near+far (hi)
+
+ "vpaddd %%ymm0,%%ymm0,%%ymm4 \n" // 6*near+2*far (1, lo)
+ "vpaddd %%ymm6,%%ymm2,%%ymm5 \n" // 3*near+far+8 (2, lo)
+ "vpaddd %%ymm4,%%ymm0,%%ymm4 \n" // 9*near+3*far (1, lo)
+ "vpaddd %%ymm4,%%ymm5,%%ymm4 \n" // 9 3 3 1 + 8 (1, lo)
+ "vpsrld $4,%%ymm4,%%ymm4 \n" // ^ div by 16 (1, lo)
+
+ "vpaddd %%ymm2,%%ymm2,%%ymm5 \n" // 6*near+2*far (2, lo)
+ "vpaddd %%ymm6,%%ymm0,%%ymm0 \n" // 3*near+far+8 (1, lo)
+ "vpaddd %%ymm5,%%ymm2,%%ymm5 \n" // 9*near+3*far (2, lo)
+ "vpaddd %%ymm5,%%ymm0,%%ymm5 \n" // 9 3 3 1 + 8 (2, lo)
+ "vpsrld $4,%%ymm5,%%ymm5 \n" // ^ div by 16 (2, lo)
+
+ "vpaddd %%ymm1,%%ymm1,%%ymm0 \n" // 6*near+2*far (1, hi)
+ "vpaddd %%ymm6,%%ymm3,%%ymm2 \n" // 3*near+far+8 (2, hi)
+ "vpaddd %%ymm0,%%ymm1,%%ymm0 \n" // 9*near+3*far (1, hi)
+ "vpaddd %%ymm0,%%ymm2,%%ymm0 \n" // 9 3 3 1 + 8 (1, hi)
+ "vpsrld $4,%%ymm0,%%ymm0 \n" // ^ div by 16 (1, hi)
+
+ "vpaddd %%ymm3,%%ymm3,%%ymm2 \n" // 6*near+2*far (2, hi)
+ "vpaddd %%ymm6,%%ymm1,%%ymm1 \n" // 3*near+far+8 (1, hi)
+ "vpaddd %%ymm2,%%ymm3,%%ymm2 \n" // 9*near+3*far (2, hi)
+ "vpaddd %%ymm2,%%ymm1,%%ymm2 \n" // 9 3 3 1 + 8 (2, hi)
+ "vpsrld $4,%%ymm2,%%ymm2 \n" // ^ div by 16 (2, hi)
+
+ "vpackusdw %%ymm0,%%ymm4,%%ymm4 \n"
+ "vmovdqu %%ymm4,(%1) \n" // store above
+ "vpackusdw %%ymm2,%%ymm5,%%ymm5 \n"
+ "vmovdqu %%ymm5,(%1,%4,2) \n" // store below
+
+ "lea 0x10(%0),%0 \n"
+ "lea 0x20(%1),%1 \n" // 4 uv to 8 uv
+ "sub $0x8,%2 \n"
+ "jg 1b \n"
+ "vzeroupper \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width) // %2
+ : "r"((intptr_t)(src_stride)), // %3
+ "r"((intptr_t)(dst_stride)) // %4
+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
+}
+#endif
+
+#endif // defined(__x86_64__) || defined(__i386__)
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace libyuv
+#endif
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_mmi.cc b/third-party/libyuv/third_party/libyuv/source/scale_mmi.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_mmi.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_mmi.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_msa.cc b/third-party/libyuv/third_party/libyuv/source/scale_msa.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_msa.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_msa.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_neon.cc b/third-party/libyuv/third_party/libyuv/source/scale_neon.cc
similarity index 65%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_neon.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_neon.cc
index 572b4bfa9b..6a0d6e1b49 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_neon.cc
+++ b/third-party/libyuv/third_party/libyuv/source/scale_neon.cc
@@ -194,21 +194,21 @@ void ScaleRowDown34_0_Box_NEON(const uint8_t* src_ptr,
"vmlal.u8 q10, d2, d24 \n"
"vmlal.u8 q11, d3, d24 \n"
- // (3 * line_0 + line_1) >> 2
+ // (3 * line_0 + line_1 + 2) >> 2
"vqrshrn.u16 d0, q8, #2 \n"
"vqrshrn.u16 d1, q9, #2 \n"
"vqrshrn.u16 d2, q10, #2 \n"
"vqrshrn.u16 d3, q11, #2 \n"
- // a0 = (src[0] * 3 + s[1] * 1) >> 2
+ // a0 = (src[0] * 3 + s[1] * 1 + 2) >> 2
"vmovl.u8 q8, d1 \n"
"vmlal.u8 q8, d0, d24 \n"
"vqrshrn.u16 d0, q8, #2 \n"
- // a1 = (src[1] * 1 + s[2] * 1) >> 1
+ // a1 = (src[1] * 1 + s[2] * 1 + 1) >> 1
"vrhadd.u8 d1, d1, d2 \n"
- // a2 = (src[2] * 1 + s[3] * 3) >> 2
+ // a2 = (src[2] * 1 + s[3] * 3 + 2) >> 2
"vmovl.u8 q8, d2 \n"
"vmlal.u8 q8, d3, d24 \n"
"vqrshrn.u16 d2, q8, #2 \n"
@@ -240,15 +240,15 @@ void ScaleRowDown34_1_Box_NEON(const uint8_t* src_ptr,
"vrhadd.u8 q0, q0, q2 \n"
"vrhadd.u8 q1, q1, q3 \n"
- // a0 = (src[0] * 3 + s[1] * 1) >> 2
+ // a0 = (src[0] * 3 + s[1] * 1 + 2) >> 2
"vmovl.u8 q3, d1 \n"
"vmlal.u8 q3, d0, d24 \n"
"vqrshrn.u16 d0, q3, #2 \n"
- // a1 = (src[1] * 1 + s[2] * 1) >> 1
+ // a1 = (src[1] * 1 + s[2] * 1 + 1) >> 1
"vrhadd.u8 d1, d1, d2 \n"
- // a2 = (src[2] * 1 + s[3] * 3) >> 2
+ // a2 = (src[2] * 1 + s[3] * 3 + 2) >> 2
"vmovl.u8 q3, d2 \n"
"vmlal.u8 q3, d3, d24 \n"
"vqrshrn.u16 d2, q3, #2 \n"
@@ -504,6 +504,484 @@ void ScaleRowDown38_2_Box_NEON(const uint8_t* src_ptr,
: "q0", "q1", "q2", "q3", "q13", "q14", "memory", "cc");
}
+void ScaleRowUp2_Linear_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ const uint8_t* src_temp = src_ptr + 1;
+ asm volatile(
+ "vmov.u8 d30, #3 \n"
+
+ "1: \n"
+ "vld1.8 {d4}, [%0]! \n" // 01234567
+ "vld1.8 {d5}, [%3]! \n" // 12345678
+
+ "vmovl.u8 q0, d4 \n" // 01234567 (16b)
+ "vmovl.u8 q1, d5 \n" // 12345678 (16b)
+ "vmlal.u8 q0, d5, d30 \n" // 3*near+far (odd)
+ "vmlal.u8 q1, d4, d30 \n" // 3*near+far (even)
+
+ "vrshrn.u16 d1, q0, #2 \n" // 3/4*near+1/4*far (odd)
+ "vrshrn.u16 d0, q1, #2 \n" // 3/4*near+1/4*far (even)
+
+ "vst2.8 {d0, d1}, [%1]! \n" // store
+ "subs %2, %2, #16 \n" // 8 sample -> 16 sample
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width), // %2
+ "+r"(src_temp) // %3
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q15" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint8_t* src_ptr1 = src_ptr + src_stride;
+ uint8_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint8_t* src_temp = src_ptr + 1;
+ const uint8_t* src_temp1 = src_ptr1 + 1;
+
+ asm volatile(
+ "vmov.u16 q15, #3 \n"
+ "vmov.u8 d28, #3 \n"
+
+ "1: \n"
+ "vld1.8 {d4}, [%0]! \n" // 01234567
+ "vld1.8 {d5}, [%5]! \n" // 12345678
+
+ "vmovl.u8 q0, d4 \n" // 01234567 (16b)
+ "vmovl.u8 q1, d5 \n" // 12345678 (16b)
+ "vmlal.u8 q0, d5, d28 \n" // 3*near+far (1, odd)
+ "vmlal.u8 q1, d4, d28 \n" // 3*near+far (1, even)
+
+ "vld1.8 {d8}, [%1]! \n"
+ "vld1.8 {d9}, [%6]! \n"
+
+ "vmovl.u8 q2, d8 \n"
+ "vmovl.u8 q3, d9 \n"
+ "vmlal.u8 q2, d9, d28 \n" // 3*near+far (2, odd)
+ "vmlal.u8 q3, d8, d28 \n" // 3*near+far (2, even)
+
+ // e o
+ // q1 q0
+ // q3 q2
+
+ "vmovq q4, q2 \n"
+ "vmovq q5, q3 \n"
+ "vmla.u16 q4, q0, q15 \n" // 9 3 3 1 (1, odd)
+ "vmla.u16 q5, q1, q15 \n" // 9 3 3 1 (1, even)
+ "vmla.u16 q0, q2, q15 \n" // 9 3 3 1 (2, odd)
+ "vmla.u16 q1, q3, q15 \n" // 9 3 3 1 (2, even)
+
+ // e o
+ // q5 q4
+ // q1 q0
+
+ "vrshrn.u16 d2, q1, #4 \n" // 2, even
+ "vrshrn.u16 d3, q0, #4 \n" // 2, odd
+ "vrshrn.u16 d0, q5, #4 \n" // 1, even
+ "vrshrn.u16 d1, q4, #4 \n" // 1, odd
+
+ "vst2.8 {d0, d1}, [%2]! \n" // store
+ "vst2.8 {d2, d3}, [%3]! \n" // store
+ "subs %4, %4, #16 \n" // 8 sample -> 16 sample
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_ptr1), // %3
+ "+r"(dst_width), // %4
+ "+r"(src_temp), // %5
+ "+r"(src_temp1) // %6
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q4", "q5", "d28",
+ "q15" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Linear_12_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ const uint16_t* src_temp = src_ptr + 1;
+ asm volatile(
+ "vmov.u16 q15, #3 \n"
+
+ "1: \n"
+ "vld1.16 {q1}, [%0]! \n" // 01234567 (16b)
+ "vld1.16 {q0}, [%3]! \n" // 12345678 (16b)
+
+ "vmovq q2, q0 \n"
+ "vmla.u16 q0, q1, q15 \n" // 3*near+far (odd)
+ "vmla.u16 q1, q2, q15 \n" // 3*near+far (even)
+
+ "vrshr.u16 q0, q0, #2 \n" // 3/4*near+1/4*far (odd)
+ "vrshr.u16 q1, q1, #2 \n" // 3/4*near+1/4*far (even)
+
+ "vst2.16 {d0, d1, d2, d3}, [%1]! \n" // store
+ "subs %2, %2, #16 \n" // 8 sample -> 16 sample
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width), // %2
+ "+r"(src_temp) // %3
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q15" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Bilinear_12_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* src_ptr1 = src_ptr + src_stride;
+ uint16_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint16_t* src_temp = src_ptr + 1;
+ const uint16_t* src_temp1 = src_ptr1 + 1;
+
+ asm volatile(
+ "vmov.u16 q15, #3 \n"
+
+ "1: \n"
+ "vld1.16 {q0}, [%0]! \n" // 01234567 (16b)
+ "vld1.16 {q1}, [%5]! \n" // 12345678 (16b)
+
+ "vmovq q2, q0 \n"
+ "vmla.u16 q0, q1, q15 \n" // 3*near+far (odd)
+ "vmla.u16 q1, q2, q15 \n" // 3*near+far (even)
+
+ "vld1.16 {q2}, [%1]! \n" // 01234567 (16b)
+ "vld1.16 {q3}, [%6]! \n" // 12345678 (16b)
+
+ "vmovq q4, q2 \n"
+ "vmla.u16 q2, q3, q15 \n" // 3*near+far (odd)
+ "vmla.u16 q3, q4, q15 \n" // 3*near+far (even)
+
+ "vmovq q4, q2 \n"
+ "vmovq q5, q3 \n"
+ "vmla.u16 q4, q0, q15 \n" // 9 3 3 1 (1, odd)
+ "vmla.u16 q5, q1, q15 \n" // 9 3 3 1 (1, even)
+ "vmla.u16 q0, q2, q15 \n" // 9 3 3 1 (2, odd)
+ "vmla.u16 q1, q3, q15 \n" // 9 3 3 1 (2, even)
+
+ "vrshr.u16 q2, q1, #4 \n" // 2, even
+ "vrshr.u16 q3, q0, #4 \n" // 2, odd
+ "vrshr.u16 q0, q5, #4 \n" // 1, even
+ "vrshr.u16 q1, q4, #4 \n" // 1, odd
+
+ "vst2.16 {d0, d1, d2, d3}, [%2]! \n" // store
+ "vst2.16 {d4, d5, d6, d7}, [%3]! \n" // store
+ "subs %4, %4, #16 \n" // 8 sample -> 16 sample
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_ptr1), // %3
+ "+r"(dst_width), // %4
+ "+r"(src_temp), // %5
+ "+r"(src_temp1) // %6
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q4", "q5",
+ "q15" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Linear_16_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ const uint16_t* src_temp = src_ptr + 1;
+ asm volatile(
+ "vmov.u16 d31, #3 \n"
+
+ "1: \n"
+ "vld1.16 {q0}, [%0]! \n" // 01234567 (16b)
+ "vld1.16 {q1}, [%3]! \n" // 12345678 (16b)
+
+ "vmovl.u16 q2, d0 \n" // 0123 (32b)
+ "vmovl.u16 q3, d1 \n" // 4567 (32b)
+ "vmovl.u16 q4, d2 \n" // 1234 (32b)
+ "vmovl.u16 q5, d3 \n" // 5678 (32b)
+
+ "vmlal.u16 q2, d2, d31 \n"
+ "vmlal.u16 q3, d3, d31 \n"
+ "vmlal.u16 q4, d0, d31 \n"
+ "vmlal.u16 q5, d1, d31 \n"
+
+ "vrshrn.u32 d0, q4, #2 \n"
+ "vrshrn.u32 d1, q5, #2 \n"
+ "vrshrn.u32 d2, q2, #2 \n"
+ "vrshrn.u32 d3, q3, #2 \n"
+
+ "vst2.16 {q0, q1}, [%1]! \n" // store
+ "subs %2, %2, #16 \n" // 8 sample -> 16 sample
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width), // %2
+ "+r"(src_temp) // %3
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q15" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Bilinear_16_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* src_ptr1 = src_ptr + src_stride;
+ uint16_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint16_t* src_temp = src_ptr + 1;
+ const uint16_t* src_temp1 = src_ptr1 + 1;
+
+ asm volatile(
+ "vmov.u16 d31, #3 \n"
+ "vmov.u32 q14, #3 \n"
+
+ "1: \n"
+ "vld1.16 {d0}, [%0]! \n" // 0123 (16b)
+ "vld1.16 {d1}, [%5]! \n" // 1234 (16b)
+ "vmovl.u16 q2, d0 \n" // 0123 (32b)
+ "vmovl.u16 q3, d1 \n" // 1234 (32b)
+ "vmlal.u16 q2, d1, d31 \n"
+ "vmlal.u16 q3, d0, d31 \n"
+
+ "vld1.16 {d0}, [%1]! \n" // 0123 (16b)
+ "vld1.16 {d1}, [%6]! \n" // 1234 (16b)
+ "vmovl.u16 q4, d0 \n" // 0123 (32b)
+ "vmovl.u16 q5, d1 \n" // 1234 (32b)
+ "vmlal.u16 q4, d1, d31 \n"
+ "vmlal.u16 q5, d0, d31 \n"
+
+ "vmovq q0, q4 \n"
+ "vmovq q1, q5 \n"
+ "vmla.u32 q4, q2, q14 \n"
+ "vmla.u32 q5, q3, q14 \n"
+ "vmla.u32 q2, q0, q14 \n"
+ "vmla.u32 q3, q1, q14 \n"
+
+ "vrshrn.u32 d1, q4, #4 \n"
+ "vrshrn.u32 d0, q5, #4 \n"
+ "vrshrn.u32 d3, q2, #4 \n"
+ "vrshrn.u32 d2, q3, #4 \n"
+
+ "vst2.16 {d0, d1}, [%2]! \n" // store
+ "vst2.16 {d2, d3}, [%3]! \n" // store
+ "subs %4, %4, #8 \n" // 4 sample -> 8 sample
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_ptr1), // %3
+ "+r"(dst_width), // %4
+ "+r"(src_temp), // %5
+ "+r"(src_temp1) // %6
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q4", "q5", "q14",
+ "d31" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Linear_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ const uint8_t* src_temp = src_ptr + 2;
+ asm volatile(
+ "vmov.u8 d30, #3 \n"
+
+ "1: \n"
+ "vld1.8 {d4}, [%0]! \n" // 00112233 (1u1v)
+ "vld1.8 {d5}, [%3]! \n" // 11223344 (1u1v)
+
+ "vmovl.u8 q0, d4 \n" // 00112233 (1u1v, 16b)
+ "vmovl.u8 q1, d5 \n" // 11223344 (1u1v, 16b)
+ "vmlal.u8 q0, d5, d30 \n" // 3*near+far (odd)
+ "vmlal.u8 q1, d4, d30 \n" // 3*near+far (even)
+
+ "vrshrn.u16 d1, q0, #2 \n" // 3/4*near+1/4*far (odd)
+ "vrshrn.u16 d0, q1, #2 \n" // 3/4*near+1/4*far (even)
+
+ "vst2.16 {d0, d1}, [%1]! \n" // store
+ "subs %2, %2, #8 \n" // 4 uv -> 8 uv
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width), // %2
+ "+r"(src_temp) // %3
+ :
+ : "memory", "cc", "q0", "q1", "q2", "d30" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint8_t* src_ptr1 = src_ptr + src_stride;
+ uint8_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint8_t* src_temp = src_ptr + 2;
+ const uint8_t* src_temp1 = src_ptr1 + 2;
+
+ asm volatile(
+ "vmov.u16 q15, #3 \n"
+ "vmov.u8 d28, #3 \n"
+
+ "1: \n"
+ "vld1.8 {d4}, [%0]! \n" // 00112233 (1u1v)
+ "vld1.8 {d5}, [%5]! \n" // 11223344 (1u1v)
+
+ "vmovl.u8 q0, d4 \n" // 00112233 (1u1v, 16b)
+ "vmovl.u8 q1, d5 \n" // 11223344 (1u1v, 16b)
+ "vmlal.u8 q0, d5, d28 \n" // 3*near+far (1, odd)
+ "vmlal.u8 q1, d4, d28 \n" // 3*near+far (1, even)
+
+ "vld1.8 {d8}, [%1]! \n" // 00112233 (1u1v)
+ "vld1.8 {d9}, [%6]! \n" // 11223344 (1u1v)
+
+ "vmovl.u8 q2, d8 \n" // 00112233 (1u1v, 16b)
+ "vmovl.u8 q3, d9 \n" // 11223344 (1u1v, 16b)
+ "vmlal.u8 q2, d9, d28 \n" // 3*near+far (2, odd)
+ "vmlal.u8 q3, d8, d28 \n" // 3*near+far (2, even)
+
+ // e o
+ // q1 q0
+ // q3 q2
+
+ "vmovq q4, q2 \n"
+ "vmovq q5, q3 \n"
+ "vmla.u16 q4, q0, q15 \n" // 9 3 3 1 (1, odd)
+ "vmla.u16 q5, q1, q15 \n" // 9 3 3 1 (1, even)
+ "vmla.u16 q0, q2, q15 \n" // 9 3 3 1 (2, odd)
+ "vmla.u16 q1, q3, q15 \n" // 9 3 3 1 (2, even)
+
+ // e o
+ // q5 q4
+ // q1 q0
+
+ "vrshrn.u16 d2, q1, #4 \n" // 2, even
+ "vrshrn.u16 d3, q0, #4 \n" // 2, odd
+ "vrshrn.u16 d0, q5, #4 \n" // 1, even
+ "vrshrn.u16 d1, q4, #4 \n" // 1, odd
+
+ "vst2.16 {d0, d1}, [%2]! \n" // store
+ "vst2.16 {d2, d3}, [%3]! \n" // store
+ "subs %4, %4, #8 \n" // 4 uv -> 8 uv
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_ptr1), // %3
+ "+r"(dst_width), // %4
+ "+r"(src_temp), // %5
+ "+r"(src_temp1) // %6
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q4", "q5", "d28",
+ "q15" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Linear_16_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ const uint16_t* src_temp = src_ptr + 2;
+ asm volatile(
+ "vmov.u16 d30, #3 \n"
+
+ "1: \n"
+ "vld1.16 {q0}, [%0]! \n" // 00112233 (1u1v, 16)
+ "vld1.16 {q1}, [%3]! \n" // 11223344 (1u1v, 16)
+
+ "vmovl.u16 q2, d0 \n" // 0011 (1u1v, 32b)
+ "vmovl.u16 q3, d2 \n" // 1122 (1u1v, 32b)
+ "vmovl.u16 q4, d1 \n" // 2233 (1u1v, 32b)
+ "vmovl.u16 q5, d3 \n" // 3344 (1u1v, 32b)
+ "vmlal.u16 q2, d2, d30 \n" // 3*near+far (odd)
+ "vmlal.u16 q3, d0, d30 \n" // 3*near+far (even)
+ "vmlal.u16 q4, d3, d30 \n" // 3*near+far (odd)
+ "vmlal.u16 q5, d1, d30 \n" // 3*near+far (even)
+
+ "vrshrn.u32 d1, q2, #2 \n" // 3/4*near+1/4*far (odd)
+ "vrshrn.u32 d0, q3, #2 \n" // 3/4*near+1/4*far (even)
+ "vrshrn.u32 d3, q4, #2 \n" // 3/4*near+1/4*far (odd)
+ "vrshrn.u32 d2, q5, #2 \n" // 3/4*near+1/4*far (even)
+
+ "vst2.32 {d0, d1}, [%1]! \n" // store
+ "vst2.32 {d2, d3}, [%1]! \n" // store
+ "subs %2, %2, #8 \n" // 4 uv -> 8 uv
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(dst_ptr), // %1
+ "+r"(dst_width), // %2
+ "+r"(src_temp) // %3
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q4", "q5",
+ "d30" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Bilinear_16_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* src_ptr1 = src_ptr + src_stride;
+ uint16_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint16_t* src_temp = src_ptr + 2;
+ const uint16_t* src_temp1 = src_ptr1 + 2;
+
+ asm volatile(
+ "vmov.u16 d30, #3 \n"
+ "vmov.u32 q14, #3 \n"
+
+ "1: \n"
+ "vld1.8 {d0}, [%0]! \n" // 0011 (1u1v)
+ "vld1.8 {d1}, [%5]! \n" // 1122 (1u1v)
+ "vmovl.u16 q2, d0 \n" // 0011 (1u1v, 32b)
+ "vmovl.u16 q3, d1 \n" // 1122 (1u1v, 32b)
+ "vmlal.u16 q2, d1, d30 \n" // 3*near+far (1, odd)
+ "vmlal.u16 q3, d0, d30 \n" // 3*near+far (1, even)
+
+ "vld1.8 {d0}, [%1]! \n" // 0011 (1u1v)
+ "vld1.8 {d1}, [%6]! \n" // 1122 (1u1v)
+ "vmovl.u16 q4, d0 \n" // 0011 (1u1v, 32b)
+ "vmovl.u16 q5, d1 \n" // 1122 (1u1v, 32b)
+ "vmlal.u16 q4, d1, d30 \n" // 3*near+far (2, odd)
+ "vmlal.u16 q5, d0, d30 \n" // 3*near+far (2, even)
+
+ "vmovq q0, q4 \n"
+ "vmovq q1, q5 \n"
+ "vmla.u32 q4, q2, q14 \n" // 9 3 3 1 (1, odd)
+ "vmla.u32 q5, q3, q14 \n" // 9 3 3 1 (1, even)
+ "vmla.u32 q2, q0, q14 \n" // 9 3 3 1 (2, odd)
+ "vmla.u32 q3, q1, q14 \n" // 9 3 3 1 (2, even)
+
+ "vrshrn.u32 d1, q4, #4 \n" // 1, odd
+ "vrshrn.u32 d0, q5, #4 \n" // 1, even
+ "vrshrn.u32 d3, q2, #4 \n" // 2, odd
+ "vrshrn.u32 d2, q3, #4 \n" // 2, even
+
+ "vst2.32 {d0, d1}, [%2]! \n" // store
+ "vst2.32 {d2, d3}, [%3]! \n" // store
+ "subs %4, %4, #4 \n" // 2 uv -> 4 uv
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_ptr1), // %3
+ "+r"(dst_width), // %4
+ "+r"(src_temp), // %5
+ "+r"(src_temp1) // %6
+ :
+ : "memory", "cc", "q0", "q1", "q2", "q3", "q4", "q5", "q14",
+ "d30" // Clobber List
+ );
+}
+
// Add a row of bytes to a row of shorts. Used for box filter.
// Reads 16 bytes and accumulates to 16 shorts at a time.
void ScaleAddRow_NEON(const uint8_t* src_ptr,
@@ -991,20 +1469,20 @@ void ScaleUVRowDownEven_NEON(const uint8_t* src_ptr,
(void)src_stride;
asm volatile(
"1: \n"
- "vld1.16 {d0[0]}, [%0], %6 \n"
- "vld1.16 {d0[1]}, [%1], %6 \n"
- "vld1.16 {d0[2]}, [%2], %6 \n"
- "vld1.16 {d0[3]}, [%3], %6 \n"
- "subs %5, %5, #4 \n" // 4 pixels per loop.
- "vst1.8 {d0}, [%4]! \n"
- "bgt 1b \n"
- : "+r"(src_ptr), // %0
- "+r"(src1_ptr), // %1
- "+r"(src2_ptr), // %2
- "+r"(src3_ptr), // %3
- "+r"(dst_ptr), // %4
- "+r"(dst_width) // %5
- : "r"(src_stepx * 8) // %6
+ "vld1.16 {d0[0]}, [%0], %6 \n"
+ "vld1.16 {d0[1]}, [%1], %6 \n"
+ "vld1.16 {d0[2]}, [%2], %6 \n"
+ "vld1.16 {d0[3]}, [%3], %6 \n"
+ "subs %5, %5, #4 \n" // 4 pixels per loop.
+ "vst1.8 {d0}, [%4]! \n"
+ "bgt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src1_ptr), // %1
+ "+r"(src2_ptr), // %2
+ "+r"(src3_ptr), // %3
+ "+r"(dst_ptr), // %4
+ "+r"(dst_width) // %5
+ : "r"(src_stepx * 8) // %6
: "memory", "cc", "d0");
}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_neon64.cc b/third-party/libyuv/third_party/libyuv/source/scale_neon64.cc
similarity index 68%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_neon64.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_neon64.cc
index 185591cb55..9f9636e646 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_neon64.cc
+++ b/third-party/libyuv/third_party/libyuv/source/scale_neon64.cc
@@ -201,22 +201,22 @@ void ScaleRowDown34_0_Box_NEON(const uint8_t* src_ptr,
"umlal v19.8h, v3.8b, v20.8b \n"
"prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
- // (3 * line_0 + line_1) >> 2
+ // (3 * line_0 + line_1 + 2) >> 2
"uqrshrn v0.8b, v16.8h, #2 \n"
"uqrshrn v1.8b, v17.8h, #2 \n"
"uqrshrn v2.8b, v18.8h, #2 \n"
"uqrshrn v3.8b, v19.8h, #2 \n"
"prfm pldl1keep, [%3, 448] \n"
- // a0 = (src[0] * 3 + s[1] * 1) >> 2
+ // a0 = (src[0] * 3 + s[1] * 1 + 2) >> 2
"ushll v16.8h, v1.8b, #0 \n"
"umlal v16.8h, v0.8b, v20.8b \n"
"uqrshrn v0.8b, v16.8h, #2 \n"
- // a1 = (src[1] * 1 + s[2] * 1) >> 1
+ // a1 = (src[1] * 1 + s[2] * 1 + 1) >> 1
"urhadd v1.8b, v1.8b, v2.8b \n"
- // a2 = (src[2] * 1 + s[3] * 3) >> 2
+ // a2 = (src[2] * 1 + s[3] * 3 + 2) >> 2
"ushll v16.8h, v2.8b, #0 \n"
"umlal v16.8h, v3.8b, v20.8b \n"
"uqrshrn v2.8b, v16.8h, #2 \n"
@@ -251,16 +251,16 @@ void ScaleRowDown34_1_Box_NEON(const uint8_t* src_ptr,
"urhadd v3.8b, v3.8b, v7.8b \n"
"prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
- // a0 = (src[0] * 3 + s[1] * 1) >> 2
+ // a0 = (src[0] * 3 + s[1] * 1 + 2) >> 2
"ushll v4.8h, v1.8b, #0 \n"
"umlal v4.8h, v0.8b, v20.8b \n"
"uqrshrn v0.8b, v4.8h, #2 \n"
"prfm pldl1keep, [%3, 448] \n"
- // a1 = (src[1] * 1 + s[2] * 1) >> 1
+ // a1 = (src[1] * 1 + s[2] * 1 + 1) >> 1
"urhadd v1.8b, v1.8b, v2.8b \n"
- // a2 = (src[2] * 1 + s[3] * 3) >> 2
+ // a2 = (src[2] * 1 + s[3] * 3 + 2) >> 2
"ushll v4.8h, v2.8b, #0 \n"
"umlal v4.8h, v3.8b, v20.8b \n"
"uqrshrn v2.8b, v4.8h, #2 \n"
@@ -535,6 +535,488 @@ void ScaleRowDown38_2_Box_NEON(const uint8_t* src_ptr,
"v19", "v30", "v31", "memory", "cc");
}
+void ScaleRowUp2_Linear_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ const uint8_t* src_temp = src_ptr + 1;
+ asm volatile(
+ "movi v31.8b, #3 \n"
+
+ "1: \n"
+ "ldr d0, [%0], #8 \n" // 01234567
+ "ldr d1, [%1], #8 \n" // 12345678
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v2.8h, v0.8b, #0 \n" // 01234567 (16b)
+ "ushll v3.8h, v1.8b, #0 \n" // 12345678 (16b)
+
+ "umlal v2.8h, v1.8b, v31.8b \n" // 3*near+far (odd)
+ "umlal v3.8h, v0.8b, v31.8b \n" // 3*near+far (even)
+
+ "rshrn v2.8b, v2.8h, #2 \n" // 3/4*near+1/4*far (odd)
+ "rshrn v1.8b, v3.8h, #2 \n" // 3/4*near+1/4*far (even)
+
+ "st2 {v1.8b, v2.8b}, [%2], #16 \n" // store
+ "subs %w3, %w3, #16 \n" // 8 sample -> 16 sample
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_temp), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_width) // %3
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v31" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint8_t* src_ptr1 = src_ptr + src_stride;
+ uint8_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint8_t* src_temp = src_ptr + 1;
+ const uint8_t* src_temp1 = src_ptr1 + 1;
+
+ asm volatile(
+ "movi v31.8b, #3 \n"
+ "movi v30.8h, #3 \n"
+
+ "1: \n"
+ "ldr d0, [%0], #8 \n" // 01234567
+ "ldr d1, [%2], #8 \n" // 12345678
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v2.8h, v0.8b, #0 \n" // 01234567 (16b)
+ "ushll v3.8h, v1.8b, #0 \n" // 12345678 (16b)
+ "umlal v2.8h, v1.8b, v31.8b \n" // 3*near+far (1, odd)
+ "umlal v3.8h, v0.8b, v31.8b \n" // 3*near+far (1, even)
+
+ "ldr d0, [%1], #8 \n"
+ "ldr d1, [%3], #8 \n"
+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v4.8h, v0.8b, #0 \n" // 01234567 (16b)
+ "ushll v5.8h, v1.8b, #0 \n" // 12345678 (16b)
+ "umlal v4.8h, v1.8b, v31.8b \n" // 3*near+far (2, odd)
+ "umlal v5.8h, v0.8b, v31.8b \n" // 3*near+far (2, even)
+
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
+ "mla v4.8h, v2.8h, v30.8h \n" // 9 3 3 1 (1, odd)
+ "mla v5.8h, v3.8h, v30.8h \n" // 9 3 3 1 (1, even)
+ "mla v2.8h, v0.8h, v30.8h \n" // 9 3 3 1 (2, odd)
+ "mla v3.8h, v1.8h, v30.8h \n" // 9 3 3 1 (2, even)
+
+ "rshrn v2.8b, v2.8h, #4 \n" // 2, odd
+ "rshrn v1.8b, v3.8h, #4 \n" // 2, even
+ "rshrn v4.8b, v4.8h, #4 \n" // 1, odd
+ "rshrn v3.8b, v5.8h, #4 \n" // 1, even
+
+ "st2 {v1.8b, v2.8b}, [%5], #16 \n" // store 1
+ "st2 {v3.8b, v4.8b}, [%4], #16 \n" // store 2
+ "subs %w6, %w6, #16 \n" // 8 sample -> 16 sample
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(src_temp), // %2
+ "+r"(src_temp1), // %3
+ "+r"(dst_ptr), // %4
+ "+r"(dst_ptr1), // %5
+ "+r"(dst_width) // %6
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v30",
+ "v31" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Linear_12_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ const uint16_t* src_temp = src_ptr + 1;
+ asm volatile(
+ "movi v31.8h, #3 \n"
+
+ "1: \n"
+ "ld1 {v0.8h}, [%0], #16 \n" // 01234567 (16b)
+ "ld1 {v1.8h}, [%1], #16 \n" // 12345678 (16b)
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "mov v2.16b, v0.16b \n"
+ "mla v0.8h, v1.8h, v31.8h \n" // 3*near+far (odd)
+ "mla v1.8h, v2.8h, v31.8h \n" // 3*near+far (even)
+
+ "urshr v2.8h, v0.8h, #2 \n" // 3/4*near+1/4*far (odd)
+ "urshr v1.8h, v1.8h, #2 \n" // 3/4*near+1/4*far (even)
+
+ "st2 {v1.8h, v2.8h}, [%2], #32 \n" // store
+ "subs %w3, %w3, #16 \n" // 8 sample -> 16 sample
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_temp), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_width) // %3
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v31" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Bilinear_12_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* src_ptr1 = src_ptr + src_stride;
+ uint16_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint16_t* src_temp = src_ptr + 1;
+ const uint16_t* src_temp1 = src_ptr1 + 1;
+
+ asm volatile(
+ "movi v31.8h, #3 \n"
+
+ "1: \n"
+ "ld1 {v2.8h}, [%0], #16 \n" // 01234567 (16b)
+ "ld1 {v3.8h}, [%2], #16 \n" // 12345678 (16b)
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "mov v0.16b, v2.16b \n"
+ "mla v2.8h, v3.8h, v31.8h \n" // 3*near+far (odd)
+ "mla v3.8h, v0.8h, v31.8h \n" // 3*near+far (even)
+
+ "ld1 {v4.8h}, [%1], #16 \n" // 01234567 (16b)
+ "ld1 {v5.8h}, [%3], #16 \n" // 12345678 (16b)
+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead
+
+ "mov v0.16b, v4.16b \n"
+ "mla v4.8h, v5.8h, v31.8h \n" // 3*near+far (odd)
+ "mla v5.8h, v0.8h, v31.8h \n" // 3*near+far (even)
+
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
+ "mla v4.8h, v2.8h, v31.8h \n" // 9 3 3 1 (1, odd)
+ "mla v5.8h, v3.8h, v31.8h \n" // 9 3 3 1 (1, even)
+ "mla v2.8h, v0.8h, v31.8h \n" // 9 3 3 1 (2, odd)
+ "mla v3.8h, v1.8h, v31.8h \n" // 9 3 3 1 (2, even)
+
+ "urshr v2.8h, v2.8h, #4 \n" // 2, odd
+ "urshr v1.8h, v3.8h, #4 \n" // 2, even
+ "urshr v4.8h, v4.8h, #4 \n" // 1, odd
+ "urshr v3.8h, v5.8h, #4 \n" // 1, even
+
+ "st2 {v3.8h, v4.8h}, [%4], #32 \n" // store 1
+ "st2 {v1.8h, v2.8h}, [%5], #32 \n" // store 2
+
+ "subs %w6, %w6, #16 \n" // 8 sample -> 16 sample
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(src_temp), // %2
+ "+r"(src_temp1), // %3
+ "+r"(dst_ptr), // %4
+ "+r"(dst_ptr1), // %5
+ "+r"(dst_width) // %6
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5",
+ "v31" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Linear_16_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ const uint16_t* src_temp = src_ptr + 1;
+ asm volatile(
+ "movi v31.8h, #3 \n"
+
+ "1: \n"
+ "ld1 {v0.8h}, [%0], #16 \n" // 01234567 (16b)
+ "ld1 {v1.8h}, [%1], #16 \n" // 12345678 (16b)
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v2.4s, v0.4h, #0 \n" // 0123 (32b)
+ "ushll2 v3.4s, v0.8h, #0 \n" // 4567 (32b)
+ "ushll v4.4s, v1.4h, #0 \n" // 1234 (32b)
+ "ushll2 v5.4s, v1.8h, #0 \n" // 5678 (32b)
+
+ "umlal v2.4s, v1.4h, v31.4h \n" // 3*near+far (1, odd)
+ "umlal2 v3.4s, v1.8h, v31.8h \n" // 3*near+far (2, odd)
+ "umlal v4.4s, v0.4h, v31.4h \n" // 3*near+far (1, even)
+ "umlal2 v5.4s, v0.8h, v31.8h \n" // 3*near+far (2, even)
+
+ "rshrn v0.4h, v4.4s, #2 \n" // 3/4*near+1/4*far
+ "rshrn2 v0.8h, v5.4s, #2 \n" // 3/4*near+1/4*far (even)
+ "rshrn v1.4h, v2.4s, #2 \n" // 3/4*near+1/4*far
+ "rshrn2 v1.8h, v3.4s, #2 \n" // 3/4*near+1/4*far (odd)
+
+ "st2 {v0.8h, v1.8h}, [%2], #32 \n" // store
+ "subs %w3, %w3, #16 \n" // 8 sample -> 16 sample
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_temp), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_width) // %3
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v31" // Clobber List
+ );
+}
+
+void ScaleRowUp2_Bilinear_16_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* src_ptr1 = src_ptr + src_stride;
+ uint16_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint16_t* src_temp = src_ptr + 1;
+ const uint16_t* src_temp1 = src_ptr1 + 1;
+
+ asm volatile(
+ "movi v31.4h, #3 \n"
+ "movi v30.4s, #3 \n"
+
+ "1: \n"
+ "ldr d0, [%0], #8 \n" // 0123 (16b)
+ "ldr d1, [%2], #8 \n" // 1234 (16b)
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+ "ushll v2.4s, v0.4h, #0 \n" // 0123 (32b)
+ "ushll v3.4s, v1.4h, #0 \n" // 1234 (32b)
+ "umlal v2.4s, v1.4h, v31.4h \n" // 3*near+far (1, odd)
+ "umlal v3.4s, v0.4h, v31.4h \n" // 3*near+far (1, even)
+
+ "ldr d0, [%1], #8 \n" // 0123 (16b)
+ "ldr d1, [%3], #8 \n" // 1234 (16b)
+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead
+ "ushll v4.4s, v0.4h, #0 \n" // 0123 (32b)
+ "ushll v5.4s, v1.4h, #0 \n" // 1234 (32b)
+ "umlal v4.4s, v1.4h, v31.4h \n" // 3*near+far (2, odd)
+ "umlal v5.4s, v0.4h, v31.4h \n" // 3*near+far (2, even)
+
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
+ "mla v4.4s, v2.4s, v30.4s \n" // 9 3 3 1 (1, odd)
+ "mla v5.4s, v3.4s, v30.4s \n" // 9 3 3 1 (1, even)
+ "mla v2.4s, v0.4s, v30.4s \n" // 9 3 3 1 (2, odd)
+ "mla v3.4s, v1.4s, v30.4s \n" // 9 3 3 1 (2, even)
+
+ "rshrn v1.4h, v4.4s, #4 \n" // 3/4*near+1/4*far
+ "rshrn v0.4h, v5.4s, #4 \n" // 3/4*near+1/4*far
+ "rshrn v5.4h, v2.4s, #4 \n" // 3/4*near+1/4*far
+ "rshrn v4.4h, v3.4s, #4 \n" // 3/4*near+1/4*far
+
+ "st2 {v0.4h, v1.4h}, [%4], #16 \n" // store 1
+ "st2 {v4.4h, v5.4h}, [%5], #16 \n" // store 2
+
+ "subs %w6, %w6, #8 \n" // 4 sample -> 8 sample
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(src_temp), // %2
+ "+r"(src_temp1), // %3
+ "+r"(dst_ptr), // %4
+ "+r"(dst_ptr1), // %5
+ "+r"(dst_width) // %6
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v30",
+ "v31" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Linear_NEON(const uint8_t* src_ptr,
+ uint8_t* dst_ptr,
+ int dst_width) {
+ const uint8_t* src_temp = src_ptr + 2;
+ asm volatile(
+ "movi v31.8b, #3 \n"
+
+ "1: \n"
+ "ldr d0, [%0], #8 \n" // 00112233 (1u1v)
+ "ldr d1, [%1], #8 \n" // 11223344 (1u1v)
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v2.8h, v0.8b, #0 \n" // 00112233 (1u1v, 16b)
+ "ushll v3.8h, v1.8b, #0 \n" // 11223344 (1u1v, 16b)
+
+ "umlal v2.8h, v1.8b, v31.8b \n" // 3*near+far (odd)
+ "umlal v3.8h, v0.8b, v31.8b \n" // 3*near+far (even)
+
+ "rshrn v2.8b, v2.8h, #2 \n" // 3/4*near+1/4*far (odd)
+ "rshrn v1.8b, v3.8h, #2 \n" // 3/4*near+1/4*far (even)
+
+ "st2 {v1.4h, v2.4h}, [%2], #16 \n" // store
+ "subs %w3, %w3, #8 \n" // 4 uv -> 8 uv
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_temp), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_width) // %3
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v31" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint8_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint8_t* src_ptr1 = src_ptr + src_stride;
+ uint8_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint8_t* src_temp = src_ptr + 2;
+ const uint8_t* src_temp1 = src_ptr1 + 2;
+
+ asm volatile(
+ "movi v31.8b, #3 \n"
+ "movi v30.8h, #3 \n"
+
+ "1: \n"
+ "ldr d0, [%0], #8 \n"
+ "ldr d1, [%2], #8 \n"
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v2.8h, v0.8b, #0 \n"
+ "ushll v3.8h, v1.8b, #0 \n"
+ "umlal v2.8h, v1.8b, v31.8b \n" // 3*near+far (1, odd)
+ "umlal v3.8h, v0.8b, v31.8b \n" // 3*near+far (1, even)
+
+ "ldr d0, [%1], #8 \n"
+ "ldr d1, [%3], #8 \n"
+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v4.8h, v0.8b, #0 \n"
+ "ushll v5.8h, v1.8b, #0 \n"
+ "umlal v4.8h, v1.8b, v31.8b \n" // 3*near+far (2, odd)
+ "umlal v5.8h, v0.8b, v31.8b \n" // 3*near+far (2, even)
+
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
+ "mla v4.8h, v2.8h, v30.8h \n" // 9 3 3 1 (1, odd)
+ "mla v5.8h, v3.8h, v30.8h \n" // 9 3 3 1 (1, even)
+ "mla v2.8h, v0.8h, v30.8h \n" // 9 3 3 1 (2, odd)
+ "mla v3.8h, v1.8h, v30.8h \n" // 9 3 3 1 (2, even)
+
+ "rshrn v2.8b, v2.8h, #4 \n" // 2, odd
+ "rshrn v1.8b, v3.8h, #4 \n" // 2, even
+ "rshrn v4.8b, v4.8h, #4 \n" // 1, odd
+ "rshrn v3.8b, v5.8h, #4 \n" // 1, even
+
+ "st2 {v1.4h, v2.4h}, [%5], #16 \n" // store 2
+ "st2 {v3.4h, v4.4h}, [%4], #16 \n" // store 1
+ "subs %w6, %w6, #8 \n" // 4 uv -> 8 uv
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(src_temp), // %2
+ "+r"(src_temp1), // %3
+ "+r"(dst_ptr), // %4
+ "+r"(dst_ptr1), // %5
+ "+r"(dst_width) // %6
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v30",
+ "v31" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Linear_16_NEON(const uint16_t* src_ptr,
+ uint16_t* dst_ptr,
+ int dst_width) {
+ const uint16_t* src_temp = src_ptr + 2;
+ asm volatile(
+ "movi v31.8h, #3 \n"
+
+ "1: \n"
+ "ld1 {v0.8h}, [%0], #16 \n" // 01234567 (16b)
+ "ld1 {v1.8h}, [%1], #16 \n" // 12345678 (16b)
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+
+ "ushll v2.4s, v0.4h, #0 \n" // 0011 (1u1v, 32b)
+ "ushll v3.4s, v1.4h, #0 \n" // 1122 (1u1v, 32b)
+ "ushll2 v4.4s, v0.8h, #0 \n" // 2233 (1u1v, 32b)
+ "ushll2 v5.4s, v1.8h, #0 \n" // 3344 (1u1v, 32b)
+
+ "umlal v2.4s, v1.4h, v31.4h \n" // 3*near+far (odd)
+ "umlal v3.4s, v0.4h, v31.4h \n" // 3*near+far (even)
+ "umlal2 v4.4s, v1.8h, v31.8h \n" // 3*near+far (odd)
+ "umlal2 v5.4s, v0.8h, v31.8h \n" // 3*near+far (even)
+
+ "rshrn v2.4h, v2.4s, #2 \n" // 3/4*near+1/4*far (odd)
+ "rshrn v1.4h, v3.4s, #2 \n" // 3/4*near+1/4*far (even)
+ "rshrn v4.4h, v4.4s, #2 \n" // 3/4*near+1/4*far (odd)
+ "rshrn v3.4h, v5.4s, #2 \n" // 3/4*near+1/4*far (even)
+
+ "st2 {v1.2s, v2.2s}, [%2], #16 \n" // store
+ "st2 {v3.2s, v4.2s}, [%2], #16 \n" // store
+ "subs %w3, %w3, #8 \n" // 4 uv -> 8 uv
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_temp), // %1
+ "+r"(dst_ptr), // %2
+ "+r"(dst_width) // %3
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5",
+ "v31" // Clobber List
+ );
+}
+
+void ScaleUVRowUp2_Bilinear_16_NEON(const uint16_t* src_ptr,
+ ptrdiff_t src_stride,
+ uint16_t* dst_ptr,
+ ptrdiff_t dst_stride,
+ int dst_width) {
+ const uint16_t* src_ptr1 = src_ptr + src_stride;
+ uint16_t* dst_ptr1 = dst_ptr + dst_stride;
+ const uint16_t* src_temp = src_ptr + 2;
+ const uint16_t* src_temp1 = src_ptr1 + 2;
+
+ asm volatile(
+ "movi v31.4h, #3 \n"
+ "movi v30.4s, #3 \n"
+
+ "1: \n"
+ "ldr d0, [%0], #8 \n"
+ "ldr d1, [%2], #8 \n"
+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
+ "ushll v2.4s, v0.4h, #0 \n" // 0011 (1u1v, 32b)
+ "ushll v3.4s, v1.4h, #0 \n" // 1122 (1u1v, 32b)
+ "umlal v2.4s, v1.4h, v31.4h \n" // 3*near+far (1, odd)
+ "umlal v3.4s, v0.4h, v31.4h \n" // 3*near+far (1, even)
+
+ "ldr d0, [%1], #8 \n"
+ "ldr d1, [%3], #8 \n"
+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead
+ "ushll v4.4s, v0.4h, #0 \n" // 0011 (1u1v, 32b)
+ "ushll v5.4s, v1.4h, #0 \n" // 1122 (1u1v, 32b)
+ "umlal v4.4s, v1.4h, v31.4h \n" // 3*near+far (2, odd)
+ "umlal v5.4s, v0.4h, v31.4h \n" // 3*near+far (2, even)
+
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
+ "mla v4.4s, v2.4s, v30.4s \n" // 9 3 3 1 (1, odd)
+ "mla v5.4s, v3.4s, v30.4s \n" // 9 3 3 1 (1, even)
+ "mla v2.4s, v0.4s, v30.4s \n" // 9 3 3 1 (2, odd)
+ "mla v3.4s, v1.4s, v30.4s \n" // 9 3 3 1 (2, even)
+
+ "rshrn v1.4h, v2.4s, #4 \n" // 2, odd
+ "rshrn v0.4h, v3.4s, #4 \n" // 2, even
+ "rshrn v3.4h, v4.4s, #4 \n" // 1, odd
+ "rshrn v2.4h, v5.4s, #4 \n" // 1, even
+
+ "st2 {v0.2s, v1.2s}, [%5], #16 \n" // store 2
+ "st2 {v2.2s, v3.2s}, [%4], #16 \n" // store 1
+ "subs %w6, %w6, #4 \n" // 2 uv -> 4 uv
+ "b.gt 1b \n"
+ : "+r"(src_ptr), // %0
+ "+r"(src_ptr1), // %1
+ "+r"(src_temp), // %2
+ "+r"(src_temp1), // %3
+ "+r"(dst_ptr), // %4
+ "+r"(dst_ptr1), // %5
+ "+r"(dst_width) // %6
+ :
+ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v30",
+ "v31" // Clobber List
+ );
+}
+
// Add a row of bytes to a row of shorts. Used for box filter.
// Reads 16 bytes and accumulates to 16 shorts at a time.
void ScaleAddRow_NEON(const uint8_t* src_ptr,
@@ -1127,13 +1609,13 @@ void ScaleUVRowDownEven_NEON(const uint8_t* src_ptr,
(void)src_stride;
asm volatile(
"1: \n"
- "ld1 {v0.h}[0], [%0], %6 \n"
- "ld1 {v1.h}[0], [%1], %6 \n"
- "ld1 {v2.h}[0], [%2], %6 \n"
- "ld1 {v3.h}[0], [%3], %6 \n"
- "subs %w5, %w5, #4 \n" // 4 pixels per loop.
- "st4 {v0.h, v1.h, v2.h, v3.h}[0], [%4], #8 \n"
- "b.gt 1b \n"
+ "ld1 {v0.h}[0], [%0], %6 \n"
+ "ld1 {v1.h}[0], [%1], %6 \n"
+ "ld1 {v2.h}[0], [%2], %6 \n"
+ "ld1 {v3.h}[0], [%3], %6 \n"
+ "subs %w5, %w5, #4 \n" // 4 pixels per loop.
+ "st4 {v0.h, v1.h, v2.h, v3.h}[0], [%4], #8 \n"
+ "b.gt 1b \n"
: "+r"(src_ptr), // %0
"+r"(src1_ptr), // %1
"+r"(src2_ptr), // %2
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_uv.cc b/third-party/libyuv/third_party/libyuv/source/scale_uv.cc
similarity index 73%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_uv.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_uv.cc
index b0469f09b8..d9a314453e 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_uv.cc
+++ b/third-party/libyuv/third_party/libyuv/source/scale_uv.cc
@@ -305,7 +305,7 @@ static void ScaleUVDownEven(int src_width,
ScaleUVRowDownEven = ScaleUVRowDownEven_NEON;
}
}
-#endif// TODO(fbarchard): Enable Box filter
+#endif // TODO(fbarchard): Enable Box filter
#if defined(HAS_SCALEUVROWDOWNEVENBOX_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
ScaleUVRowDownEven = filtering ? ScaleUVRowDownEvenBox_Any_NEON
@@ -492,7 +492,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_INTERPOLATEROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
InterpolateRow = InterpolateRow_Any_SSSE3;
- if (IS_ALIGNED(dst_width, 4)) {
+ if (IS_ALIGNED(dst_width, 8)) {
InterpolateRow = InterpolateRow_SSSE3;
}
}
@@ -500,7 +500,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_INTERPOLATEROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
InterpolateRow = InterpolateRow_Any_AVX2;
- if (IS_ALIGNED(dst_width, 8)) {
+ if (IS_ALIGNED(dst_width, 16)) {
InterpolateRow = InterpolateRow_AVX2;
}
}
@@ -508,7 +508,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_INTERPOLATEROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
InterpolateRow = InterpolateRow_Any_NEON;
- if (IS_ALIGNED(dst_width, 4)) {
+ if (IS_ALIGNED(dst_width, 8)) {
InterpolateRow = InterpolateRow_NEON;
}
}
@@ -516,7 +516,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_INTERPOLATEROW_MMI)
if (TestCpuFlag(kCpuHasMMI)) {
InterpolateRow = InterpolateRow_Any_MMI;
- if (IS_ALIGNED(dst_width, 2)) {
+ if (IS_ALIGNED(dst_width, 4)) {
InterpolateRow = InterpolateRow_MMI;
}
}
@@ -524,7 +524,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_INTERPOLATEROW_MSA)
if (TestCpuFlag(kCpuHasMSA)) {
InterpolateRow = InterpolateRow_Any_MSA;
- if (IS_ALIGNED(dst_width, 8)) {
+ if (IS_ALIGNED(dst_width, 16)) {
InterpolateRow = InterpolateRow_MSA;
}
}
@@ -540,7 +540,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_SCALEUVFILTERCOLS_NEON)
if (filtering && TestCpuFlag(kCpuHasNEON)) {
ScaleUVFilterCols = ScaleUVFilterCols_Any_NEON;
- if (IS_ALIGNED(dst_width, 4)) {
+ if (IS_ALIGNED(dst_width, 8)) {
ScaleUVFilterCols = ScaleUVFilterCols_NEON;
}
}
@@ -548,7 +548,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_SCALEUVFILTERCOLS_MSA)
if (filtering && TestCpuFlag(kCpuHasMSA)) {
ScaleUVFilterCols = ScaleUVFilterCols_Any_MSA;
- if (IS_ALIGNED(dst_width, 8)) {
+ if (IS_ALIGNED(dst_width, 16)) {
ScaleUVFilterCols = ScaleUVFilterCols_MSA;
}
}
@@ -561,7 +561,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_SCALEUVCOLS_NEON)
if (!filtering && TestCpuFlag(kCpuHasNEON)) {
ScaleUVFilterCols = ScaleUVCols_Any_NEON;
- if (IS_ALIGNED(dst_width, 8)) {
+ if (IS_ALIGNED(dst_width, 16)) {
ScaleUVFilterCols = ScaleUVCols_NEON;
}
}
@@ -577,7 +577,7 @@ static void ScaleUVBilinearUp(int src_width,
#if defined(HAS_SCALEUVCOLS_MSA)
if (!filtering && TestCpuFlag(kCpuHasMSA)) {
ScaleUVFilterCols = ScaleUVCols_Any_MSA;
- if (IS_ALIGNED(dst_width, 4)) {
+ if (IS_ALIGNED(dst_width, 8)) {
ScaleUVFilterCols = ScaleUVCols_MSA;
}
}
@@ -649,6 +649,218 @@ static void ScaleUVBilinearUp(int src_width,
}
#endif // HAS_SCALEUVBILINEARUP
+// Scale UV, horizontally up by 2 times.
+// Uses linear filter horizontally, nearest vertically.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original width, using linear interpolation.
+// This is used to scale U and V planes of NV16 to NV24.
+void ScaleUVLinearUp2(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint8_t* src_uv,
+ uint8_t* dst_uv) {
+ void (*ScaleRowUp)(const uint8_t* src_uv, uint8_t* dst_uv, int dst_width) =
+ ScaleUVRowUp2_Linear_Any_C;
+ int i;
+ int y;
+ int dy;
+
+ // This function can only scale up by 2 times horizontally.
+ assert(src_width == ((dst_width + 1) / 2));
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_SSSE3
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ ScaleRowUp = ScaleUVRowUp2_Linear_Any_SSSE3;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ScaleRowUp = ScaleUVRowUp2_Linear_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ScaleRowUp = ScaleUVRowUp2_Linear_Any_NEON;
+ }
+#endif
+
+ if (dst_height == 1) {
+ ScaleRowUp(src_uv + ((src_height - 1) / 2) * src_stride, dst_uv, dst_width);
+ } else {
+ dy = FixedDiv(src_height - 1, dst_height - 1);
+ y = (1 << 15) - 1;
+ for (i = 0; i < dst_height; ++i) {
+ ScaleRowUp(src_uv + (y >> 16) * src_stride, dst_uv, dst_width);
+ dst_uv += dst_stride;
+ y += dy;
+ }
+ }
+}
+
+// Scale plane, up by 2 times.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original size, using bilinear interpolation.
+// This is used to scale U and V planes of NV12 to NV24.
+void ScaleUVBilinearUp2(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint8_t* src_ptr,
+ uint8_t* dst_ptr) {
+ void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride,
+ uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
+ ScaleUVRowUp2_Bilinear_Any_C;
+ int x;
+
+ // This function can only scale up by 2 times.
+ assert(src_width == ((dst_width + 1) / 2));
+ assert(src_height == ((dst_height + 1) / 2));
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_SSSE3
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_SSSE3;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_NEON;
+ }
+#endif
+
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ dst_ptr += dst_stride;
+ for (x = 0; x < src_height - 1; ++x) {
+ Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
+ src_ptr += src_stride;
+ // TODO(fbarchard): Test performance of writing one row of destination at a
+ // time.
+ dst_ptr += 2 * dst_stride;
+ }
+ if (!(dst_height & 1)) {
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ }
+}
+
+// Scale 16 bit UV, horizontally up by 2 times.
+// Uses linear filter horizontally, nearest vertically.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original width, using linear interpolation.
+// This is used to scale U and V planes of P210 to P410.
+void ScaleUVLinearUp2_16(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint16_t* src_uv,
+ uint16_t* dst_uv) {
+ void (*ScaleRowUp)(const uint16_t* src_uv, uint16_t* dst_uv, int dst_width) =
+ ScaleUVRowUp2_Linear_16_Any_C;
+ int i;
+ int y;
+ int dy;
+
+ // This function can only scale up by 2 times horizontally.
+ assert(src_width == ((dst_width + 1) / 2));
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_SSE2
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_SSE2;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2LINEAR_16_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_NEON;
+ }
+#endif
+
+ if (dst_height == 1) {
+ ScaleRowUp(src_uv + ((src_height - 1) / 2) * src_stride, dst_uv, dst_width);
+ } else {
+ dy = FixedDiv(src_height - 1, dst_height - 1);
+ y = (1 << 15) - 1;
+ for (i = 0; i < dst_height; ++i) {
+ ScaleRowUp(src_uv + (y >> 16) * src_stride, dst_uv, dst_width);
+ dst_uv += dst_stride;
+ y += dy;
+ }
+ }
+}
+
+// Scale 16 bit UV, up by 2 times.
+// This is an optimized version for scaling up a plane to 2 times of
+// its original size, using bilinear interpolation.
+// This is used to scale U and V planes of P010 to P410.
+void ScaleUVBilinearUp2_16(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ int src_stride,
+ int dst_stride,
+ const uint16_t* src_ptr,
+ uint16_t* dst_ptr) {
+ void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride,
+ uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
+ ScaleUVRowUp2_Bilinear_16_Any_C;
+ int x;
+
+ // This function can only scale up by 2 times.
+ assert(src_width == ((dst_width + 1) / 2));
+ assert(src_height == ((dst_height + 1) / 2));
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_SSE2
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_SSE2;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_AVX2
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_AVX2;
+ }
+#endif
+
+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_NEON
+ if (TestCpuFlag(kCpuHasNEON)) {
+ Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_NEON;
+ }
+#endif
+
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ dst_ptr += dst_stride;
+ for (x = 0; x < src_height - 1; ++x) {
+ Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
+ src_ptr += src_stride;
+ // TODO(fbarchard): Test performance of writing one row of destination at a
+ // time.
+ dst_ptr += 2 * dst_stride;
+ }
+ if (!(dst_height & 1)) {
+ Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
+ }
+}
+
// Scale UV to/from any dimensions, without interpolation.
// Fixed point math is used for performance: The upper 16 bits
// of x and dx is the integer part of the source position and
@@ -724,9 +936,9 @@ static void ScaleUVSimple(int src_width,
// Copy UV with optional flipping
#if HAS_UVCOPY
static int UVCopy(const uint8_t* src_UV,
- int src_stride_UV,
+ int src_stride_uv,
uint8_t* dst_UV,
- int dst_stride_UV,
+ int dst_stride_uv,
int width,
int height) {
if (!src_UV || !dst_UV || width <= 0 || height == 0) {
@@ -735,11 +947,31 @@ static int UVCopy(const uint8_t* src_UV,
// Negative height means invert the image.
if (height < 0) {
height = -height;
- src_UV = src_UV + (height - 1) * src_stride_UV;
- src_stride_UV = -src_stride_UV;
+ src_UV = src_UV + (height - 1) * src_stride_uv;
+ src_stride_uv = -src_stride_uv;
}
- CopyPlane(src_UV, src_stride_UV, dst_UV, dst_stride_UV, width * 2, height);
+ CopyPlane(src_UV, src_stride_uv, dst_UV, dst_stride_uv, width * 2, height);
+ return 0;
+}
+
+static int UVCopy_16(const uint16_t* src_UV,
+ int src_stride_uv,
+ uint16_t* dst_UV,
+ int dst_stride_uv,
+ int width,
+ int height) {
+ if (!src_UV || !dst_UV || width <= 0 || height == 0) {
+ return -1;
+ }
+ // Negative height means invert the image.
+ if (height < 0) {
+ height = -height;
+ src_UV = src_UV + (height - 1) * src_stride_uv;
+ src_stride_uv = -src_stride_uv;
+ }
+
+ CopyPlane_16(src_UV, src_stride_uv, dst_UV, dst_stride_uv, width * 2, height);
return 0;
}
#endif // HAS_UVCOPY
@@ -844,7 +1076,18 @@ static void ScaleUV(const uint8_t* src,
dst_stride, src, dst, x, y, dy, 4, filtering);
return;
}
-
+ if (filtering && (dst_width + 1) / 2 == src_width) {
+ ScaleUVLinearUp2(src_width, src_height, clip_width, clip_height, src_stride,
+ dst_stride, src, dst);
+ return;
+ }
+ if ((clip_height + 1) / 2 == src_height &&
+ (clip_width + 1) / 2 == src_width &&
+ (filtering == kFilterBilinear || filtering == kFilterBox)) {
+ ScaleUVBilinearUp2(src_width, src_height, clip_width, clip_height,
+ src_stride, dst_stride, src, dst);
+ return;
+ }
#if HAS_SCALEUVBILINEARUP
if (filtering && dy < 65536) {
ScaleUVBilinearUp(src_width, src_height, clip_width, clip_height,
@@ -876,7 +1119,7 @@ int UVScale(const uint8_t* src_uv,
int dst_width,
int dst_height,
enum FilterMode filtering) {
- if (!src_uv || src_width == 0 || src_height == 0 || src_width > 32768 ||
+ if (!src_uv || src_width <= 0 || src_height == 0 || src_width > 32768 ||
src_height > 32768 || !dst_uv || dst_width <= 0 || dst_height <= 0) {
return -1;
}
@@ -885,6 +1128,69 @@ int UVScale(const uint8_t* src_uv,
return 0;
}
+// Scale a 16 bit UV image.
+// This function is currently incomplete, it can't handle all cases.
+LIBYUV_API
+int UVScale_16(const uint16_t* src_uv,
+ int src_stride_uv,
+ int src_width,
+ int src_height,
+ uint16_t* dst_uv,
+ int dst_stride_uv,
+ int dst_width,
+ int dst_height,
+ enum FilterMode filtering) {
+ int dy = 0;
+
+ if (!src_uv || src_width <= 0 || src_height == 0 || src_width > 32768 ||
+ src_height > 32768 || !dst_uv || dst_width <= 0 || dst_height <= 0) {
+ return -1;
+ }
+
+ // UV does not support box filter yet, but allow the user to pass it.
+ // Simplify filtering when possible.
+ filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
+ filtering);
+
+ // Negative src_height means invert the image.
+ if (src_height < 0) {
+ src_height = -src_height;
+ src_uv = src_uv + (src_height - 1) * src_stride_uv;
+ src_stride_uv = -src_stride_uv;
+ }
+ src_width = Abs(src_width);
+
+#ifdef HAS_UVCOPY
+ if (!filtering && src_width == dst_width && (src_height % dst_height == 0)) {
+ if (dst_height == 1) {
+ UVCopy_16(src_uv + ((src_height - 1) / 2) * src_stride_uv, src_stride_uv,
+ dst_uv, dst_stride_uv, dst_width, dst_height);
+ } else {
+ dy = src_height / dst_height;
+ UVCopy_16(src_uv + src_stride_uv * ((dy - 1) / 2), src_stride_uv * dy,
+ dst_uv, dst_stride_uv, dst_width, dst_height);
+ }
+
+ return 0;
+ }
+#endif
+
+ if (filtering && (dst_width + 1) / 2 == src_width) {
+ ScaleUVLinearUp2_16(src_width, src_height, dst_width, dst_height,
+ src_stride_uv, dst_stride_uv, src_uv, dst_uv);
+ return 0;
+ }
+
+ if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
+ (filtering == kFilterBilinear || filtering == kFilterBox)) {
+ ScaleUVBilinearUp2_16(src_width, src_height, dst_width, dst_height,
+ src_stride_uv, dst_stride_uv, src_uv, dst_uv);
+ return 0;
+ }
+
+ return -1;
+}
+
#ifdef __cplusplus
} // extern "C"
} // namespace libyuv
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_win.cc b/third-party/libyuv/third_party/libyuv/source/scale_win.cc
similarity index 99%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/scale_win.cc
rename to third-party/libyuv/third_party/libyuv/source/scale_win.cc
index c5fc86f3e9..ea1f95c6c3 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/source/scale_win.cc
+++ b/third-party/libyuv/third_party/libyuv/source/scale_win.cc
@@ -16,8 +16,9 @@ namespace libyuv {
extern "C" {
#endif
-// This module is for 32 bit Visual C x86 and clangcl
-#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
+// This module is for 32 bit Visual C x86
+#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \
+ !defined(__clang__) && defined(_M_IX86)
// Offsets for source bytes 0 to 9
static const uvec8 kShuf0 = {0, 1, 3, 4, 5, 7, 8, 9,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/test.sh b/third-party/libyuv/third_party/libyuv/source/test.sh
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/test.sh
rename to third-party/libyuv/third_party/libyuv/source/test.sh
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/source/video_common.cc b/third-party/libyuv/third_party/libyuv/source/video_common.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/source/video_common.cc
rename to third-party/libyuv/third_party/libyuv/source/video_common.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/OWNERS b/third-party/libyuv/third_party/libyuv/tools_libyuv/OWNERS
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/OWNERS
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/OWNERS
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py b/third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py
similarity index 98%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py
index 9b9660de0b..5b3cf8d6ee 100755
--- a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py
+++ b/third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py
@@ -46,7 +46,7 @@ CHECKOUT_SRC_DIR = os.path.realpath(os.path.join(SCRIPT_DIR, os.pardir,
CHECKOUT_ROOT_DIR = os.path.realpath(os.path.join(CHECKOUT_SRC_DIR, os.pardir))
sys.path.append(os.path.join(CHECKOUT_SRC_DIR, 'build'))
-import find_depot_tools
+import find_depot_tools # pylint: disable=wrong-import-position
find_depot_tools.add_depot_tools_to_path()
CLANG_UPDATE_SCRIPT_URL_PATH = 'tools/clang/scripts/update.py'
@@ -366,12 +366,12 @@ def _IsTreeClean():
def _EnsureUpdatedMasterBranch(dry_run):
current_branch = _RunCommand(
['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
- if current_branch != 'master':
- logging.error('Please checkout the master branch and re-run this script.')
+ if current_branch != 'main':
+ logging.error('Please checkout the main branch and re-run this script.')
if not dry_run:
sys.exit(-1)
- logging.info('Updating master branch...')
+ logging.info('Updating main branch...')
_RunCommand(['git', 'pull'])
@@ -384,7 +384,7 @@ def _CreateRollBranch(dry_run):
def _RemovePreviousRollBranch(dry_run):
active_branch, branches = _GetBranches()
if active_branch == ROLL_BRANCH_NAME:
- active_branch = 'master'
+ active_branch = 'main'
if ROLL_BRANCH_NAME in branches:
logging.info('Removing previous roll branch (%s)', ROLL_BRANCH_NAME)
if not dry_run:
@@ -444,7 +444,7 @@ def main():
'tryjobs.'))
p.add_argument('-i', '--ignore-unclean-workdir', action='store_true',
default=False,
- help=('Ignore if the current branch is not master or if there '
+ help=('Ignore if the current branch is not main or if there '
'are uncommitted changes (default: %(default)s).'))
grp = p.add_mutually_exclusive_group()
grp.add_argument('--skip-cq', action='store_true', default=False,
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py b/third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py
similarity index 97%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py
index 477b6e402a..a7e3f8a87e 100755
--- a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py
+++ b/third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py
@@ -18,9 +18,10 @@ import unittest
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARENT_DIR = os.path.join(SCRIPT_DIR, os.pardir)
sys.path.append(PARENT_DIR)
-import roll_deps
+import roll_deps # pylint: disable=wrong-import-position
from roll_deps import CalculateChangedDeps, GetMatchingDepsEntries, \
- ParseDepsDict, ParseLocalDepsFile, UpdateDepsFile
+ ParseDepsDict, ParseLocalDepsFile, \
+ UpdateDepsFile # pylint: disable=wrong-import-position
TEST_DATA_VARS = {
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS b/third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new b/third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old b/third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/get_landmines.py b/third-party/libyuv/third_party/libyuv/tools_libyuv/get_landmines.py
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/get_landmines.py
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/get_landmines.py
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/msan/OWNERS b/third-party/libyuv/third_party/libyuv/tools_libyuv/msan/OWNERS
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/msan/OWNERS
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/msan/OWNERS
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/msan/blacklist.txt b/third-party/libyuv/third_party/libyuv/tools_libyuv/msan/blacklist.txt
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/msan/blacklist.txt
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/msan/blacklist.txt
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/ubsan/OWNERS b/third-party/libyuv/third_party/libyuv/tools_libyuv/ubsan/OWNERS
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/ubsan/OWNERS
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/ubsan/OWNERS
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/ubsan/blacklist.txt b/third-party/libyuv/third_party/libyuv/tools_libyuv/ubsan/blacklist.txt
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/ubsan/blacklist.txt
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/ubsan/blacklist.txt
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt b/third-party/libyuv/third_party/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt
rename to third-party/libyuv/third_party/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/basictypes_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/basictypes_test.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/basictypes_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/basictypes_test.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/color_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/color_test.cc
similarity index 85%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/color_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/color_test.cc
index 842fd99444..e2d037ff79 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/color_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/color_test.cc
@@ -22,8 +22,7 @@ namespace libyuv {
// TODO(fbarchard): clang x86 has a higher accuracy YUV to RGB.
// Port to Visual C and other CPUs
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#define ERROR_FULL 5
#define ERROR_J420 4
#else
@@ -32,7 +31,11 @@ namespace libyuv {
#endif
#define ERROR_R 1
#define ERROR_G 1
-#define ERROR_B 3
+#ifdef LIBYUV_UNLIMITED_DATA
+#define ERROR_B 1
+#else
+#define ERROR_B 18
+#endif
#define TESTCS(TESTNAME, YUVTOARGB, ARGBTOYUV, HS1, HS, HN, DIFF) \
TEST_F(LibYUVColorTest, TESTNAME) { \
@@ -208,7 +211,33 @@ static void YUVHToRGB(int y, int u, int v, int* r, int* g, int* b) {
*r = orig_pixels[2];
}
-static void YUVRec2020ToRGB(int y, int u, int v, int* r, int* g, int* b) {
+#define F422ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j)
+
+static void YUVFToRGB(int y, int u, int v, int* r, int* g, int* b) {
+ const int kWidth = 16;
+ const int kHeight = 1;
+ const int kPixels = kWidth * kHeight;
+ const int kHalfPixels = ((kWidth + 1) / 2) * ((kHeight + 1) / 2);
+
+ SIMD_ALIGNED(uint8_t orig_y[16]);
+ SIMD_ALIGNED(uint8_t orig_u[8]);
+ SIMD_ALIGNED(uint8_t orig_v[8]);
+ SIMD_ALIGNED(uint8_t orig_pixels[16 * 4]);
+ memset(orig_y, y, kPixels);
+ memset(orig_u, u, kHalfPixels);
+ memset(orig_v, v, kHalfPixels);
+
+ /* YUV converted to ARGB. */
+ F422ToARGB(orig_y, kWidth, orig_u, (kWidth + 1) / 2, orig_v, (kWidth + 1) / 2,
+ orig_pixels, kWidth * 4, kWidth, kHeight);
+
+ *b = orig_pixels[0];
+ *g = orig_pixels[1];
+ *r = orig_pixels[2];
+}
+
+static void YUVUToRGB(int y, int u, int v, int* r, int* g, int* b) {
const int kWidth = 16;
const int kHeight = 1;
const int kPixels = kWidth * kHeight;
@@ -231,6 +260,32 @@ static void YUVRec2020ToRGB(int y, int u, int v, int* r, int* g, int* b) {
*r = orig_pixels[2];
}
+#define V422ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j)
+
+static void YUVVToRGB(int y, int u, int v, int* r, int* g, int* b) {
+ const int kWidth = 16;
+ const int kHeight = 1;
+ const int kPixels = kWidth * kHeight;
+ const int kHalfPixels = ((kWidth + 1) / 2) * ((kHeight + 1) / 2);
+
+ SIMD_ALIGNED(uint8_t orig_y[16]);
+ SIMD_ALIGNED(uint8_t orig_u[8]);
+ SIMD_ALIGNED(uint8_t orig_v[8]);
+ SIMD_ALIGNED(uint8_t orig_pixels[16 * 4]);
+ memset(orig_y, y, kPixels);
+ memset(orig_u, u, kHalfPixels);
+ memset(orig_v, v, kHalfPixels);
+
+ /* YUV converted to ARGB. */
+ V422ToARGB(orig_y, kWidth, orig_u, (kWidth + 1) / 2, orig_v, (kWidth + 1) / 2,
+ orig_pixels, kWidth * 4, kWidth, kHeight);
+
+ *b = orig_pixels[0];
+ *g = orig_pixels[1];
+ *r = orig_pixels[2];
+}
+
static void YToRGB(int y, int* r, int* g, int* b) {
const int kWidth = 16;
const int kHeight = 1;
@@ -379,21 +434,21 @@ TEST_F(LibYUVColorTest, TestRoundToByte) {
EXPECT_LE(allb, 255);
}
-// BT.601 YUV to RGB reference
+// BT.601 limited range YUV to RGB reference
static void YUVToRGBReference(int y, int u, int v, int* r, int* g, int* b) {
*r = RoundToByte((y - 16) * 1.164 - (v - 128) * -1.596);
*g = RoundToByte((y - 16) * 1.164 - (u - 128) * 0.391 - (v - 128) * 0.813);
*b = RoundToByte((y - 16) * 1.164 - (u - 128) * -2.018);
}
-// JPEG YUV to RGB reference
+// BT.601 full range YUV to RGB reference (aka JPEG)
static void YUVJToRGBReference(int y, int u, int v, int* r, int* g, int* b) {
*r = RoundToByte(y - (v - 128) * -1.40200);
*g = RoundToByte(y - (u - 128) * 0.34414 - (v - 128) * 0.71414);
*b = RoundToByte(y - (u - 128) * -1.77200);
}
-// BT.709 YUV to RGB reference
+// BT.709 limited range YUV to RGB reference
// See also http://www.equasys.de/colorconversion.html
static void YUVHToRGBReference(int y, int u, int v, int* r, int* g, int* b) {
*r = RoundToByte((y - 16) * 1.164 - (v - 128) * -1.793);
@@ -401,19 +456,28 @@ static void YUVHToRGBReference(int y, int u, int v, int* r, int* g, int* b) {
*b = RoundToByte((y - 16) * 1.164 - (u - 128) * -2.112);
}
-// BT.2020 YUV to RGB reference
-static void YUVRec2020ToRGBReference(int y,
- int u,
- int v,
- int* r,
- int* g,
- int* b) {
+// BT.709 full range YUV to RGB reference
+static void YUVFToRGBReference(int y, int u, int v, int* r, int* g, int* b) {
+ *r = RoundToByte(y - (v - 128) * -1.5748);
+ *g = RoundToByte(y - (u - 128) * 0.18732 - (v - 128) * 0.46812);
+ *b = RoundToByte(y - (u - 128) * -1.8556);
+}
+
+// BT.2020 limited range YUV to RGB reference
+static void YUVUToRGBReference(int y, int u, int v, int* r, int* g, int* b) {
*r = RoundToByte((y - 16) * 1.164384 - (v - 128) * -1.67867);
*g = RoundToByte((y - 16) * 1.164384 - (u - 128) * 0.187326 -
(v - 128) * 0.65042);
*b = RoundToByte((y - 16) * 1.164384 - (u - 128) * -2.14177);
}
+// BT.2020 full range YUV to RGB reference
+static void YUVVToRGBReference(int y, int u, int v, int* r, int* g, int* b) {
+ *r = RoundToByte(y + (v - 128) * 1.474600);
+ *g = RoundToByte(y - (u - 128) * 0.164553 - (v - 128) * 0.571353);
+ *b = RoundToByte(y + (u - 128) * 1.881400);
+}
+
TEST_F(LibYUVColorTest, TestYUV) {
int r0, g0, b0, r1, g1, b1;
@@ -437,7 +501,11 @@ TEST_F(LibYUVColorTest, TestYUV) {
YUVToRGB(240, 0, 0, &r1, &g1, &b1);
EXPECT_EQ(57, r1);
EXPECT_EQ(255, g1);
+#ifdef LIBYUV_UNLIMITED_DATA
+ EXPECT_EQ(3, b1);
+#else
EXPECT_EQ(5, b1);
+#endif
for (int i = 0; i < 256; ++i) {
YUVToRGBReference(i, 128, 128, &r0, &g0, &b0);
@@ -545,6 +613,8 @@ static void PrintHistogram(int rh[256], int gh[256], int bh[256]) {
#else
#define FASTSTEP 5
#endif
+
+// BT.601 limited range.
TEST_F(LibYUVColorTest, TestFullYUV) {
int rh[256] = {
0,
@@ -574,6 +644,7 @@ TEST_F(LibYUVColorTest, TestFullYUV) {
PrintHistogram(rh, gh, bh);
}
+// BT.601 full range.
TEST_F(LibYUVColorTest, TestFullYUVJ) {
int rh[256] = {
0,
@@ -591,9 +662,9 @@ TEST_F(LibYUVColorTest, TestFullYUVJ) {
int y = RANDOM256(y2);
YUVJToRGBReference(y, u, v, &r0, &g0, &b0);
YUVJToRGB(y, u, v, &r1, &g1, &b1);
- EXPECT_NEAR(r0, r1, 1);
- EXPECT_NEAR(g0, g1, 1);
- EXPECT_NEAR(b0, b1, 1);
+ EXPECT_NEAR(r0, r1, ERROR_R);
+ EXPECT_NEAR(g0, g1, ERROR_G);
+ EXPECT_NEAR(b0, b1, ERROR_B);
++rh[r1 - r0 + 128];
++gh[g1 - g0 + 128];
++bh[b1 - b0 + 128];
@@ -603,6 +674,7 @@ TEST_F(LibYUVColorTest, TestFullYUVJ) {
PrintHistogram(rh, gh, bh);
}
+// BT.709 limited range.
TEST_F(LibYUVColorTest, TestFullYUVH) {
int rh[256] = {
0,
@@ -622,8 +694,7 @@ TEST_F(LibYUVColorTest, TestFullYUVH) {
YUVHToRGB(y, u, v, &r1, &g1, &b1);
EXPECT_NEAR(r0, r1, ERROR_R);
EXPECT_NEAR(g0, g1, ERROR_G);
- // TODO(crbug.com/libyuv/862): Reduce the errors in the B channel.
- EXPECT_NEAR(b0, b1, 15);
+ EXPECT_NEAR(b0, b1, ERROR_B);
++rh[r1 - r0 + 128];
++gh[g1 - g0 + 128];
++bh[b1 - b0 + 128];
@@ -633,7 +704,8 @@ TEST_F(LibYUVColorTest, TestFullYUVH) {
PrintHistogram(rh, gh, bh);
}
-TEST_F(LibYUVColorTest, TestFullYUVRec2020) {
+// BT.709 full range.
+TEST_F(LibYUVColorTest, TestFullYUVF) {
int rh[256] = {
0,
};
@@ -648,12 +720,71 @@ TEST_F(LibYUVColorTest, TestFullYUVRec2020) {
for (int y2 = 0; y2 < 256; y2 += FASTSTEP) {
int r0, g0, b0, r1, g1, b1;
int y = RANDOM256(y2);
- YUVRec2020ToRGBReference(y, u, v, &r0, &g0, &b0);
- YUVRec2020ToRGB(y, u, v, &r1, &g1, &b1);
+ YUVFToRGBReference(y, u, v, &r0, &g0, &b0);
+ YUVFToRGB(y, u, v, &r1, &g1, &b1);
EXPECT_NEAR(r0, r1, ERROR_R);
EXPECT_NEAR(g0, g1, ERROR_G);
- // TODO(crbug.com/libyuv/863): Reduce the errors in the B channel.
- EXPECT_NEAR(b0, b1, 18);
+ EXPECT_NEAR(b0, b1, ERROR_B);
+ ++rh[r1 - r0 + 128];
+ ++gh[g1 - g0 + 128];
+ ++bh[b1 - b0 + 128];
+ }
+ }
+ }
+ PrintHistogram(rh, gh, bh);
+}
+
+// BT.2020 limited range.
+TEST_F(LibYUVColorTest, TestFullYUVU) {
+ int rh[256] = {
+ 0,
+ };
+ int gh[256] = {
+ 0,
+ };
+ int bh[256] = {
+ 0,
+ };
+ for (int u = 0; u < 256; ++u) {
+ for (int v = 0; v < 256; ++v) {
+ for (int y2 = 0; y2 < 256; y2 += FASTSTEP) {
+ int r0, g0, b0, r1, g1, b1;
+ int y = RANDOM256(y2);
+ YUVUToRGBReference(y, u, v, &r0, &g0, &b0);
+ YUVUToRGB(y, u, v, &r1, &g1, &b1);
+ EXPECT_NEAR(r0, r1, ERROR_R);
+ EXPECT_NEAR(g0, g1, ERROR_G);
+ EXPECT_NEAR(b0, b1, ERROR_B);
+ ++rh[r1 - r0 + 128];
+ ++gh[g1 - g0 + 128];
+ ++bh[b1 - b0 + 128];
+ }
+ }
+ }
+ PrintHistogram(rh, gh, bh);
+}
+
+// BT.2020 full range.
+TEST_F(LibYUVColorTest, TestFullYUVV) {
+ int rh[256] = {
+ 0,
+ };
+ int gh[256] = {
+ 0,
+ };
+ int bh[256] = {
+ 0,
+ };
+ for (int u = 0; u < 256; ++u) {
+ for (int v = 0; v < 256; ++v) {
+ for (int y2 = 0; y2 < 256; y2 += FASTSTEP) {
+ int r0, g0, b0, r1, g1, b1;
+ int y = RANDOM256(y2);
+ YUVVToRGBReference(y, u, v, &r0, &g0, &b0);
+ YUVVToRGB(y, u, v, &r1, &g1, &b1);
+ EXPECT_NEAR(r0, r1, ERROR_R);
+ EXPECT_NEAR(g0, g1, 2);
+ EXPECT_NEAR(b0, b1, ERROR_B);
++rh[r1 - r0 + 128];
++gh[g1 - g0 + 128];
++bh[b1 - b0 + 128];
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/compare_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/compare_test.cc
similarity index 99%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/compare_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/compare_test.cc
index bd99cdd3ac..c29562cb86 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/compare_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/compare_test.cc
@@ -344,7 +344,7 @@ static const int kMaxOptCount = (1 << (32 - 3)) - 64; // 536870848
TEST_F(LibYUVCompareTest, TestHammingDistance_Opt) {
uint32_t h1 = 0;
- const int kMaxWidth = (benchmark_width_ * benchmark_height_ + 31) & ~31;
+ const int kMaxWidth = (benchmark_width_ * benchmark_height_ + 63) & ~63;
align_buffer_page_end(src_a, kMaxWidth);
align_buffer_page_end(src_b, kMaxWidth);
memset(src_a, 255u, kMaxWidth);
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/convert_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/convert_test.cc
similarity index 69%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/convert_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/convert_test.cc
index 59a9480d67..3855838381 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/convert_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/convert_test.cc
@@ -49,19 +49,20 @@ namespace libyuv {
#define TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
- DST_SUBSAMP_X, DST_SUBSAMP_Y, W1280, N, NEG, OFF) \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, W1280, N, NEG, OFF, \
+ SRC_DEPTH) \
TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \
static_assert(SRC_BPC == 1 || SRC_BPC == 2, "SRC BPC unsupported"); \
static_assert(DST_BPC == 1 || DST_BPC == 2, "DST BPC unsupported"); \
static_assert(SRC_SUBSAMP_X == 1 || SRC_SUBSAMP_X == 2, \
- "DST SRC_SUBSAMP_X unsupported"); \
+ "SRC_SUBSAMP_X unsupported"); \
static_assert(SRC_SUBSAMP_Y == 1 || SRC_SUBSAMP_Y == 2, \
- "DST SRC_SUBSAMP_Y unsupported"); \
+ "SRC_SUBSAMP_Y unsupported"); \
static_assert(DST_SUBSAMP_X == 1 || DST_SUBSAMP_X == 2, \
- "DST DST_SUBSAMP_X unsupported"); \
+ "DST_SUBSAMP_X unsupported"); \
static_assert(DST_SUBSAMP_Y == 1 || DST_SUBSAMP_Y == 2, \
- "DST DST_SUBSAMP_Y unsupported"); \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ "DST_SUBSAMP_Y unsupported"); \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kSrcHalfWidth = SUBSAMPLE(kWidth, SRC_SUBSAMP_X); \
const int kSrcHalfHeight = SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); \
@@ -81,6 +82,16 @@ namespace libyuv {
MemRandomize(src_y + OFF, kWidth * kHeight * SRC_BPC); \
MemRandomize(src_u + OFF, kSrcHalfWidth * kSrcHalfHeight * SRC_BPC); \
MemRandomize(src_v + OFF, kSrcHalfWidth * kSrcHalfHeight * SRC_BPC); \
+ SRC_T* src_y_p = reinterpret_cast(src_y + OFF); \
+ SRC_T* src_u_p = reinterpret_cast(src_u + OFF); \
+ SRC_T* src_v_p = reinterpret_cast(src_v + OFF); \
+ for (int i = 0; i < kWidth * kHeight; ++i) { \
+ src_y_p[i] = src_y_p[i] & ((1 << SRC_DEPTH) - 1); \
+ } \
+ for (int i = 0; i < kSrcHalfWidth * kSrcHalfHeight; ++i) { \
+ src_u_p[i] = src_u_p[i] & ((1 << SRC_DEPTH) - 1); \
+ src_v_p[i] = src_v_p[i] & ((1 << SRC_DEPTH) - 1); \
+ } \
memset(dst_y_c, 1, kWidth* kHeight* DST_BPC); \
memset(dst_u_c, 2, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
memset(dst_v_c, 3, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
@@ -89,9 +100,7 @@ namespace libyuv {
memset(dst_v_opt, 103, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
MaskCpuFlags(disable_cpu_flags_); \
SRC_FMT_PLANAR##To##FMT_PLANAR( \
- reinterpret_cast(src_y + OFF), kWidth, \
- reinterpret_cast(src_u + OFF), kSrcHalfWidth, \
- reinterpret_cast(src_v + OFF), kSrcHalfWidth, \
+ src_y_p, kWidth, src_u_p, kSrcHalfWidth, src_v_p, kSrcHalfWidth, \
reinterpret_cast(dst_y_c), kWidth, \
reinterpret_cast(dst_u_c), kDstHalfWidth, \
reinterpret_cast(dst_v_c), kDstHalfWidth, kWidth, \
@@ -99,9 +108,7 @@ namespace libyuv {
MaskCpuFlags(benchmark_cpu_info_); \
for (int i = 0; i < benchmark_iterations_; ++i) { \
SRC_FMT_PLANAR##To##FMT_PLANAR( \
- reinterpret_cast(src_y + OFF), kWidth, \
- reinterpret_cast(src_u + OFF), kSrcHalfWidth, \
- reinterpret_cast(src_v + OFF), kSrcHalfWidth, \
+ src_y_p, kWidth, src_u_p, kSrcHalfWidth, src_v_p, kSrcHalfWidth, \
reinterpret_cast(dst_y_opt), kWidth, \
reinterpret_cast(dst_u_opt), kDstHalfWidth, \
reinterpret_cast(dst_v_opt), kDstHalfWidth, kWidth, \
@@ -127,41 +134,57 @@ namespace libyuv {
#define TESTPLANARTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
- DST_SUBSAMP_X, DST_SUBSAMP_Y) \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \
TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \
- benchmark_width_ - 4, _Any, +, 0) \
+ benchmark_width_ + 1, _Any, +, 0, SRC_DEPTH) \
TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \
- benchmark_width_, _Unaligned, +, 1) \
+ benchmark_width_, _Unaligned, +, 1, SRC_DEPTH) \
TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \
- benchmark_width_, _Invert, -, 0) \
+ benchmark_width_, _Invert, -, 0, SRC_DEPTH) \
TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \
- benchmark_width_, _Opt, +, 0)
+ benchmark_width_, _Opt, +, 0, SRC_DEPTH)
-TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2)
-TESTPLANARTOP(I422, uint8_t, 1, 2, 1, I420, uint8_t, 1, 2, 2)
-TESTPLANARTOP(I444, uint8_t, 1, 1, 1, I420, uint8_t, 1, 2, 2)
-TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I422, uint8_t, 1, 2, 1)
-TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I444, uint8_t, 1, 1, 1)
-TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I420Mirror, uint8_t, 1, 2, 2)
-TESTPLANARTOP(I422, uint8_t, 1, 2, 1, I422, uint8_t, 1, 2, 1)
-TESTPLANARTOP(I444, uint8_t, 1, 1, 1, I444, uint8_t, 1, 1, 1)
-TESTPLANARTOP(I010, uint16_t, 2, 2, 2, I010, uint16_t, 2, 2, 2)
-TESTPLANARTOP(I010, uint16_t, 2, 2, 2, I420, uint8_t, 1, 2, 2)
-TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I010, uint16_t, 2, 2, 2)
-TESTPLANARTOP(H010, uint16_t, 2, 2, 2, H010, uint16_t, 2, 2, 2)
-TESTPLANARTOP(H010, uint16_t, 2, 2, 2, H420, uint8_t, 1, 2, 2)
-TESTPLANARTOP(H420, uint8_t, 1, 2, 2, H010, uint16_t, 2, 2, 2)
+TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOP(I422, uint8_t, 1, 2, 1, I420, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOP(I444, uint8_t, 1, 1, 1, I420, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I422, uint8_t, 1, 2, 1, 8)
+TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I444, uint8_t, 1, 1, 1, 8)
+TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I420Mirror, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOP(I422, uint8_t, 1, 2, 1, I422, uint8_t, 1, 2, 1, 8)
+TESTPLANARTOP(I422, uint8_t, 1, 2, 1, I444, uint8_t, 1, 1, 1, 8)
+TESTPLANARTOP(I444, uint8_t, 1, 1, 1, I444, uint8_t, 1, 1, 1, 8)
+TESTPLANARTOP(I010, uint16_t, 2, 2, 2, I010, uint16_t, 2, 2, 2, 10)
+TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I010, uint16_t, 2, 2, 2, 8)
+TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I012, uint16_t, 2, 2, 2, 8)
+TESTPLANARTOP(H010, uint16_t, 2, 2, 2, H010, uint16_t, 2, 2, 2, 10)
+TESTPLANARTOP(H010, uint16_t, 2, 2, 2, H420, uint8_t, 1, 2, 2, 10)
+TESTPLANARTOP(H420, uint8_t, 1, 2, 2, H010, uint16_t, 2, 2, 2, 8)
+TESTPLANARTOP(H420, uint8_t, 1, 2, 2, H012, uint16_t, 2, 2, 2, 8)
+TESTPLANARTOP(I010, uint16_t, 2, 2, 2, I410, uint16_t, 2, 1, 1, 10)
+TESTPLANARTOP(I210, uint16_t, 2, 2, 1, I410, uint16_t, 2, 1, 1, 10)
+TESTPLANARTOP(I012, uint16_t, 2, 2, 2, I412, uint16_t, 2, 1, 1, 12)
+TESTPLANARTOP(I212, uint16_t, 2, 2, 1, I412, uint16_t, 2, 1, 1, 12)
+TESTPLANARTOP(I410, uint16_t, 2, 1, 1, I010, uint16_t, 2, 2, 2, 10)
+TESTPLANARTOP(I210, uint16_t, 2, 2, 1, I010, uint16_t, 2, 2, 2, 10)
+TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I012, uint16_t, 2, 2, 2, 12)
+TESTPLANARTOP(I212, uint16_t, 2, 2, 1, I012, uint16_t, 2, 2, 2, 12)
+TESTPLANARTOP(I010, uint16_t, 2, 2, 2, I420, uint8_t, 1, 2, 2, 10)
+TESTPLANARTOP(I210, uint16_t, 2, 2, 1, I422, uint8_t, 1, 2, 1, 10)
+TESTPLANARTOP(I410, uint16_t, 2, 1, 1, I444, uint8_t, 1, 1, 1, 10)
+TESTPLANARTOP(I012, uint16_t, 2, 2, 2, I420, uint8_t, 1, 2, 2, 12)
+TESTPLANARTOP(I212, uint16_t, 2, 2, 1, I422, uint8_t, 1, 2, 1, 12)
+TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I444, uint8_t, 1, 1, 1, 12)
// Test Android 420 to I420
#define TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, \
SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
W1280, N, NEG, OFF, PN, OFF_U, OFF_V) \
- TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##_##PN##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##To##PN##N) { \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kSizeUV = \
SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); \
@@ -247,7 +270,7 @@ TESTPLANARTOP(H420, uint8_t, 1, 2, 2, H010, uint16_t, 2, 2, 2)
SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, \
SUBSAMP_Y) \
TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, benchmark_width_ - 4, \
+ FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, benchmark_width_ + 1, \
_Any, +, 0, PN, OFF_U, OFF_V) \
TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, benchmark_width_, \
@@ -280,63 +303,74 @@ int I400ToNV21(const uint8_t* src_y,
dst_stride_vu, width, height);
}
-#define TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, W1280, N, NEG, OFF) \
+#define TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, W1280, N, NEG, OFF, \
+ SRC_DEPTH) \
TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ static_assert(SRC_BPC == 1 || SRC_BPC == 2, "SRC BPC unsupported"); \
+ static_assert(DST_BPC == 1 || DST_BPC == 2, "DST BPC unsupported"); \
+ static_assert(SRC_SUBSAMP_X == 1 || SRC_SUBSAMP_X == 2, \
+ "SRC_SUBSAMP_X unsupported"); \
+ static_assert(SRC_SUBSAMP_Y == 1 || SRC_SUBSAMP_Y == 2, \
+ "SRC_SUBSAMP_Y unsupported"); \
+ static_assert(DST_SUBSAMP_X == 1 || DST_SUBSAMP_X == 2, \
+ "DST_SUBSAMP_X unsupported"); \
+ static_assert(DST_SUBSAMP_Y == 1 || DST_SUBSAMP_Y == 2, \
+ "DST_SUBSAMP_Y unsupported"); \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
- align_buffer_page_end(src_y, kWidth* kHeight + OFF); \
- align_buffer_page_end(src_u, SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SRC_SUBSAMP_Y) + \
- OFF); \
- align_buffer_page_end(src_v, SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SRC_SUBSAMP_Y) + \
- OFF); \
- align_buffer_page_end(dst_y_c, kWidth* kHeight); \
- align_buffer_page_end(dst_uv_c, SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- align_buffer_page_end(dst_y_opt, kWidth* kHeight); \
- align_buffer_page_end(dst_uv_opt, SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- for (int i = 0; i < kHeight; ++i) \
- for (int j = 0; j < kWidth; ++j) \
- src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \
- for (int i = 0; i < SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); ++i) { \
- for (int j = 0; j < SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
- src_u[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
- (fastrand() & 0xff); \
- src_v[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
- (fastrand() & 0xff); \
- } \
+ const int kSrcHalfWidth = SUBSAMPLE(kWidth, SRC_SUBSAMP_X); \
+ const int kSrcHalfHeight = SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); \
+ const int kDstHalfWidth = SUBSAMPLE(kWidth, DST_SUBSAMP_X); \
+ const int kDstHalfHeight = SUBSAMPLE(kHeight, DST_SUBSAMP_Y); \
+ align_buffer_page_end(src_y, kWidth* kHeight* SRC_BPC + OFF); \
+ align_buffer_page_end(src_u, \
+ kSrcHalfWidth* kSrcHalfHeight* SRC_BPC + OFF); \
+ align_buffer_page_end(src_v, \
+ kSrcHalfWidth* kSrcHalfHeight* SRC_BPC + OFF); \
+ align_buffer_page_end(dst_y_c, kWidth* kHeight* DST_BPC); \
+ align_buffer_page_end(dst_uv_c, \
+ kDstHalfWidth* kDstHalfHeight* DST_BPC * 2); \
+ align_buffer_page_end(dst_y_opt, kWidth* kHeight* DST_BPC); \
+ align_buffer_page_end(dst_uv_opt, \
+ kDstHalfWidth* kDstHalfHeight* DST_BPC * 2); \
+ MemRandomize(src_y + OFF, kWidth * kHeight * SRC_BPC); \
+ MemRandomize(src_u + OFF, kSrcHalfWidth * kSrcHalfHeight * SRC_BPC); \
+ MemRandomize(src_v + OFF, kSrcHalfWidth * kSrcHalfHeight * SRC_BPC); \
+ SRC_T* src_y_p = reinterpret_cast(src_y + OFF); \
+ SRC_T* src_u_p = reinterpret_cast(src_u + OFF); \
+ SRC_T* src_v_p = reinterpret_cast(src_v + OFF); \
+ for (int i = 0; i < kWidth * kHeight; ++i) { \
+ src_y_p[i] = src_y_p[i] & ((1 << SRC_DEPTH) - 1); \
} \
- memset(dst_y_c, 1, kWidth* kHeight); \
- memset(dst_uv_c, 2, \
- SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- memset(dst_y_opt, 101, kWidth* kHeight); \
- memset(dst_uv_opt, 102, \
- SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
+ for (int i = 0; i < kSrcHalfWidth * kSrcHalfHeight; ++i) { \
+ src_u_p[i] = src_u_p[i] & ((1 << SRC_DEPTH) - 1); \
+ src_v_p[i] = src_v_p[i] & ((1 << SRC_DEPTH) - 1); \
+ } \
+ memset(dst_y_c, 1, kWidth* kHeight* DST_BPC); \
+ memset(dst_uv_c, 2, kDstHalfWidth* kDstHalfHeight* DST_BPC * 2); \
+ memset(dst_y_opt, 101, kWidth* kHeight* DST_BPC); \
+ memset(dst_uv_opt, 102, kDstHalfWidth* kDstHalfHeight* DST_BPC * 2); \
MaskCpuFlags(disable_cpu_flags_); \
- SRC_FMT_PLANAR##To##FMT_PLANAR( \
- src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
- src_v + OFF, SUBSAMPLE(kWidth, SRC_SUBSAMP_X), dst_y_c, kWidth, \
- dst_uv_c, SUBSAMPLE(kWidth, SUBSAMP_X) * 2, kWidth, NEG kHeight); \
+ SRC_FMT_PLANAR##To##FMT_PLANAR(src_y_p, kWidth, src_u_p, kSrcHalfWidth, \
+ src_v_p, kSrcHalfWidth, \
+ reinterpret_cast(dst_y_c), kWidth, \
+ reinterpret_cast(dst_uv_c), \
+ kDstHalfWidth * 2, kWidth, NEG kHeight); \
MaskCpuFlags(benchmark_cpu_info_); \
for (int i = 0; i < benchmark_iterations_; ++i) { \
SRC_FMT_PLANAR##To##FMT_PLANAR( \
- src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
- src_v + OFF, SUBSAMPLE(kWidth, SRC_SUBSAMP_X), dst_y_opt, kWidth, \
- dst_uv_opt, SUBSAMPLE(kWidth, SUBSAMP_X) * 2, kWidth, NEG kHeight); \
+ src_y_p, kWidth, src_u_p, kSrcHalfWidth, src_v_p, kSrcHalfWidth, \
+ reinterpret_cast(dst_y_opt), kWidth, \
+ reinterpret_cast(dst_uv_opt), kDstHalfWidth * 2, kWidth, \
+ NEG kHeight); \
} \
- for (int i = 0; i < kHeight; ++i) { \
- for (int j = 0; j < kWidth; ++j) { \
- EXPECT_EQ(dst_y_c[i * kWidth + j], dst_y_opt[i * kWidth + j]); \
- } \
+ for (int i = 0; i < kHeight * kWidth * DST_BPC; ++i) { \
+ EXPECT_EQ(dst_y_c[i], dst_y_opt[i]); \
} \
- for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
- for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X) * 2; ++j) { \
- EXPECT_EQ(dst_uv_c[i * SUBSAMPLE(kWidth, SUBSAMP_X) * 2 + j], \
- dst_uv_opt[i * SUBSAMPLE(kWidth, SUBSAMP_X) * 2 + j]); \
- } \
+ for (int i = 0; i < kDstHalfWidth * kDstHalfHeight * DST_BPC * 2; ++i) { \
+ EXPECT_EQ(dst_uv_c[i], dst_uv_opt[i]); \
} \
free_aligned_buffer_page_end(dst_y_c); \
free_aligned_buffer_page_end(dst_uv_c); \
@@ -347,158 +381,91 @@ int I400ToNV21(const uint8_t* src_y,
free_aligned_buffer_page_end(src_v); \
}
-#define TESTPLANARTOBP(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \
- TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_ - 4, _Any, +, 0) \
- TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Unaligned, +, 1) \
- TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Invert, -, 0) \
- TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Opt, +, 0)
+#define TESTPLANARTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \
+ TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_ + 1, _Any, +, 0, SRC_DEPTH) \
+ TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Unaligned, +, 1, \
+ SRC_DEPTH) \
+ TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Invert, -, 0, SRC_DEPTH) \
+ TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Opt, +, 0, SRC_DEPTH)
-TESTPLANARTOBP(I420, 2, 2, NV12, 2, 2)
-TESTPLANARTOBP(I420, 2, 2, NV21, 2, 2)
-TESTPLANARTOBP(I422, 2, 1, NV21, 2, 2)
-TESTPLANARTOBP(I444, 1, 1, NV12, 2, 2)
-TESTPLANARTOBP(I444, 1, 1, NV21, 2, 2)
-TESTPLANARTOBP(I400, 2, 2, NV21, 2, 2)
+TESTPLANARTOBP(I420, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOBP(I420, uint8_t, 1, 2, 2, NV21, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOBP(I422, uint8_t, 1, 2, 1, NV21, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOBP(I444, uint8_t, 1, 1, 1, NV12, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOBP(I444, uint8_t, 1, 1, 1, NV21, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOBP(I400, uint8_t, 1, 2, 2, NV21, uint8_t, 1, 2, 2, 8)
+TESTPLANARTOBP(I010, uint16_t, 2, 2, 2, P010, uint16_t, 2, 2, 2, 10)
+TESTPLANARTOBP(I210, uint16_t, 2, 2, 1, P210, uint16_t, 2, 2, 1, 10)
+TESTPLANARTOBP(I012, uint16_t, 2, 2, 2, P012, uint16_t, 2, 2, 2, 12)
+TESTPLANARTOBP(I212, uint16_t, 2, 2, 1, P212, uint16_t, 2, 2, 1, 12)
-#define TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, W1280, N, NEG, \
- OFF, DOY) \
- TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
- const int kHeight = benchmark_height_; \
- align_buffer_page_end(src_y, kWidth* kHeight + OFF); \
- align_buffer_page_end(src_uv, 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SRC_SUBSAMP_Y) + \
- OFF); \
- align_buffer_page_end(dst_y_c, kWidth* kHeight); \
- align_buffer_page_end(dst_uv_c, 2 * SUBSAMPLE(kWidth, SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- align_buffer_page_end(dst_y_opt, kWidth* kHeight); \
- align_buffer_page_end(dst_uv_opt, 2 * SUBSAMPLE(kWidth, SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- for (int i = 0; i < kHeight; ++i) \
- for (int j = 0; j < kWidth; ++j) \
- src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \
- for (int i = 0; i < SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); ++i) { \
- for (int j = 0; j < 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
- src_uv[(i * 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
- (fastrand() & 0xff); \
- } \
- } \
- memset(dst_y_c, 1, kWidth* kHeight); \
- memset(dst_uv_c, 2, \
- 2 * SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- memset(dst_y_opt, 101, kWidth* kHeight); \
- memset(dst_uv_opt, 102, \
- 2 * SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- MaskCpuFlags(disable_cpu_flags_); \
- SRC_FMT_PLANAR##To##FMT_PLANAR( \
- src_y + OFF, kWidth, src_uv + OFF, \
- 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), DOY ? dst_y_c : NULL, kWidth, \
- dst_uv_c, 2 * SUBSAMPLE(kWidth, SUBSAMP_X), kWidth, NEG kHeight); \
- MaskCpuFlags(benchmark_cpu_info_); \
- for (int i = 0; i < benchmark_iterations_; ++i) { \
- SRC_FMT_PLANAR##To##FMT_PLANAR( \
- src_y + OFF, kWidth, src_uv + OFF, \
- 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), DOY ? dst_y_opt : NULL, \
- kWidth, dst_uv_opt, 2 * SUBSAMPLE(kWidth, SUBSAMP_X), kWidth, \
- NEG kHeight); \
- } \
- if (DOY) { \
- for (int i = 0; i < kHeight; ++i) { \
- for (int j = 0; j < kWidth; ++j) { \
- EXPECT_EQ(dst_y_c[i * kWidth + j], dst_y_opt[i * kWidth + j]); \
- } \
- } \
- } \
- for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
- for (int j = 0; j < 2 * SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
- EXPECT_EQ(dst_uv_c[i * 2 * SUBSAMPLE(kWidth, SUBSAMP_X) + j], \
- dst_uv_opt[i * 2 * SUBSAMPLE(kWidth, SUBSAMP_X) + j]); \
- } \
- } \
- free_aligned_buffer_page_end(dst_y_c); \
- free_aligned_buffer_page_end(dst_uv_c); \
- free_aligned_buffer_page_end(dst_y_opt); \
- free_aligned_buffer_page_end(dst_uv_opt); \
- free_aligned_buffer_page_end(src_y); \
- free_aligned_buffer_page_end(src_uv); \
- }
-
-#define TESTBIPLANARTOBP(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \
- TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_ - 4, _Any, +, 0, 1) \
- TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Unaligned, +, 1, \
- 1) \
- TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Invert, -, 0, 1) \
- TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Opt, +, 0, 1) \
- TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _NullY, +, 0, 0)
-
-TESTBIPLANARTOBP(NV21, 2, 2, NV12, 2, 2)
-TESTBIPLANARTOBP(NV12, 2, 2, NV12Mirror, 2, 2)
-
-#define TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, W1280, N, NEG, OFF, \
- DOY) \
+#define TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, W1280, N, NEG, OFF, \
+ DOY, SRC_DEPTH) \
TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ static_assert(SRC_BPC == 1 || SRC_BPC == 2, "SRC BPC unsupported"); \
+ static_assert(DST_BPC == 1 || DST_BPC == 2, "DST BPC unsupported"); \
+ static_assert(SRC_SUBSAMP_X == 1 || SRC_SUBSAMP_X == 2, \
+ "SRC_SUBSAMP_X unsupported"); \
+ static_assert(SRC_SUBSAMP_Y == 1 || SRC_SUBSAMP_Y == 2, \
+ "SRC_SUBSAMP_Y unsupported"); \
+ static_assert(DST_SUBSAMP_X == 1 || DST_SUBSAMP_X == 2, \
+ "DST_SUBSAMP_X unsupported"); \
+ static_assert(DST_SUBSAMP_Y == 1 || DST_SUBSAMP_Y == 2, \
+ "DST_SUBSAMP_Y unsupported"); \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
- align_buffer_page_end(src_y, kWidth* kHeight + OFF); \
- align_buffer_page_end(src_uv, 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SRC_SUBSAMP_Y) + \
- OFF); \
- align_buffer_page_end(dst_y_c, kWidth* kHeight); \
- align_buffer_page_end(dst_u_c, SUBSAMPLE(kWidth, SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- align_buffer_page_end(dst_v_c, SUBSAMPLE(kWidth, SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- align_buffer_page_end(dst_y_opt, kWidth* kHeight); \
- align_buffer_page_end(dst_u_opt, SUBSAMPLE(kWidth, SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- align_buffer_page_end(dst_v_opt, SUBSAMPLE(kWidth, SUBSAMP_X) * \
- SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- for (int i = 0; i < kHeight; ++i) \
- for (int j = 0; j < kWidth; ++j) \
- src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \
- for (int i = 0; i < SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); ++i) { \
- for (int j = 0; j < 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
- src_uv[(i * 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
- (fastrand() & 0xff); \
- } \
+ const int kSrcHalfWidth = SUBSAMPLE(kWidth, SRC_SUBSAMP_X); \
+ const int kSrcHalfHeight = SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); \
+ const int kDstHalfWidth = SUBSAMPLE(kWidth, DST_SUBSAMP_X); \
+ const int kDstHalfHeight = SUBSAMPLE(kHeight, DST_SUBSAMP_Y); \
+ align_buffer_page_end(src_y, kWidth* kHeight* SRC_BPC + OFF); \
+ align_buffer_page_end(src_uv, \
+ 2 * kSrcHalfWidth * kSrcHalfHeight * SRC_BPC + OFF); \
+ align_buffer_page_end(dst_y_c, kWidth* kHeight* DST_BPC); \
+ align_buffer_page_end(dst_uv_c, \
+ 2 * kDstHalfWidth * kDstHalfHeight * DST_BPC); \
+ align_buffer_page_end(dst_y_opt, kWidth* kHeight* DST_BPC); \
+ align_buffer_page_end(dst_uv_opt, \
+ 2 * kDstHalfWidth * kDstHalfHeight * DST_BPC); \
+ SRC_T* src_y_p = reinterpret_cast(src_y + OFF); \
+ SRC_T* src_uv_p = reinterpret_cast(src_uv + OFF); \
+ for (int i = 0; i < kWidth * kHeight; ++i) { \
+ src_y_p[i] = \
+ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \
} \
- memset(dst_y_c, 1, kWidth* kHeight); \
- memset(dst_u_c, 2, \
- SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- memset(dst_v_c, 3, \
- SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- memset(dst_y_opt, 101, kWidth* kHeight); \
- memset(dst_u_opt, 102, \
- SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
- memset(dst_v_opt, 103, \
- SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
+ for (int i = 0; i < kSrcHalfWidth * kSrcHalfHeight * 2; ++i) { \
+ src_uv_p[i] = \
+ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \
+ } \
+ memset(dst_y_c, 1, kWidth* kHeight* DST_BPC); \
+ memset(dst_uv_c, 2, 2 * kDstHalfWidth * kDstHalfHeight * DST_BPC); \
+ memset(dst_y_opt, 101, kWidth* kHeight* DST_BPC); \
+ memset(dst_uv_opt, 102, 2 * kDstHalfWidth * kDstHalfHeight * DST_BPC); \
MaskCpuFlags(disable_cpu_flags_); \
SRC_FMT_PLANAR##To##FMT_PLANAR( \
- src_y + OFF, kWidth, src_uv + OFF, \
- 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), DOY ? dst_y_c : NULL, kWidth, \
- dst_u_c, SUBSAMPLE(kWidth, SUBSAMP_X), dst_v_c, \
- SUBSAMPLE(kWidth, SUBSAMP_X), kWidth, NEG kHeight); \
+ src_y_p, kWidth, src_uv_p, 2 * kSrcHalfWidth, \
+ DOY ? reinterpret_cast(dst_y_c) : NULL, kWidth, \
+ reinterpret_cast(dst_uv_c), 2 * kDstHalfWidth, kWidth, \
+ NEG kHeight); \
MaskCpuFlags(benchmark_cpu_info_); \
for (int i = 0; i < benchmark_iterations_; ++i) { \
SRC_FMT_PLANAR##To##FMT_PLANAR( \
- src_y + OFF, kWidth, src_uv + OFF, \
- 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), DOY ? dst_y_opt : NULL, \
- kWidth, dst_u_opt, SUBSAMPLE(kWidth, SUBSAMP_X), dst_v_opt, \
- SUBSAMPLE(kWidth, SUBSAMP_X), kWidth, NEG kHeight); \
+ src_y_p, kWidth, src_uv_p, 2 * kSrcHalfWidth, \
+ DOY ? reinterpret_cast(dst_y_opt) : NULL, kWidth, \
+ reinterpret_cast(dst_uv_opt), 2 * kDstHalfWidth, kWidth, \
+ NEG kHeight); \
} \
if (DOY) { \
for (int i = 0; i < kHeight; ++i) { \
@@ -507,51 +474,187 @@ TESTBIPLANARTOBP(NV12, 2, 2, NV12Mirror, 2, 2)
} \
} \
} \
- for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
- for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
- EXPECT_EQ(dst_u_c[i * SUBSAMPLE(kWidth, SUBSAMP_X) + j], \
- dst_u_opt[i * SUBSAMPLE(kWidth, SUBSAMP_X) + j]); \
- } \
- } \
- for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
- for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
- EXPECT_EQ(dst_v_c[i * SUBSAMPLE(kWidth, SUBSAMP_X) + j], \
- dst_v_opt[i * SUBSAMPLE(kWidth, SUBSAMP_X) + j]); \
+ for (int i = 0; i < kDstHalfHeight; ++i) { \
+ for (int j = 0; j < 2 * kDstHalfWidth; ++j) { \
+ EXPECT_EQ(dst_uv_c[i * 2 * kDstHalfWidth + j], \
+ dst_uv_opt[i * 2 * kDstHalfWidth + j]); \
} \
} \
free_aligned_buffer_page_end(dst_y_c); \
- free_aligned_buffer_page_end(dst_u_c); \
- free_aligned_buffer_page_end(dst_v_c); \
+ free_aligned_buffer_page_end(dst_uv_c); \
free_aligned_buffer_page_end(dst_y_opt); \
- free_aligned_buffer_page_end(dst_u_opt); \
- free_aligned_buffer_page_end(dst_v_opt); \
+ free_aligned_buffer_page_end(dst_uv_opt); \
free_aligned_buffer_page_end(src_y); \
free_aligned_buffer_page_end(src_uv); \
}
-#define TESTBIPLANARTOP(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \
- TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_ - 4, _Any, +, 0, 1) \
- TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Unaligned, +, 1, \
- 1) \
- TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Invert, -, 0, 1) \
- TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Opt, +, 0, 1) \
- TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, \
- SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _NullY, +, 0, 0)
+#define TESTBIPLANARTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \
+ TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_ + 1, _Any, +, 0, 1, \
+ SRC_DEPTH) \
+ TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Unaligned, +, 1, 1, \
+ SRC_DEPTH) \
+ TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Invert, -, 0, 1, \
+ SRC_DEPTH) \
+ TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Opt, +, 0, 1, SRC_DEPTH) \
+ TESTBIPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _NullY, +, 0, 0, \
+ SRC_DEPTH)
-TESTBIPLANARTOP(NV12, 2, 2, I420, 2, 2)
-TESTBIPLANARTOP(NV21, 2, 2, I420, 2, 2)
+TESTBIPLANARTOBP(NV21, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8)
+TESTBIPLANARTOBP(NV12, uint8_t, 1, 2, 2, NV12Mirror, uint8_t, 1, 2, 2, 8)
+TESTBIPLANARTOBP(NV12, uint8_t, 1, 2, 2, NV24, uint8_t, 1, 1, 1, 8)
+TESTBIPLANARTOBP(NV16, uint8_t, 1, 2, 1, NV24, uint8_t, 1, 1, 1, 8)
+TESTBIPLANARTOBP(P010, uint16_t, 2, 2, 2, P410, uint16_t, 2, 1, 1, 10)
+TESTBIPLANARTOBP(P210, uint16_t, 2, 2, 1, P410, uint16_t, 2, 1, 1, 10)
+TESTBIPLANARTOBP(P012, uint16_t, 2, 2, 2, P412, uint16_t, 2, 1, 1, 10)
+TESTBIPLANARTOBP(P212, uint16_t, 2, 2, 1, P412, uint16_t, 2, 1, 1, 12)
+TESTBIPLANARTOBP(P016, uint16_t, 2, 2, 2, P416, uint16_t, 2, 1, 1, 12)
+TESTBIPLANARTOBP(P216, uint16_t, 2, 2, 1, P416, uint16_t, 2, 1, 1, 12)
+
+#define TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, W1280, N, NEG, OFF, \
+ SRC_DEPTH) \
+ TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \
+ static_assert(SRC_BPC == 1 || SRC_BPC == 2, "SRC BPC unsupported"); \
+ static_assert(DST_BPC == 1 || DST_BPC == 2, "DST BPC unsupported"); \
+ static_assert(SRC_SUBSAMP_X == 1 || SRC_SUBSAMP_X == 2, \
+ "SRC_SUBSAMP_X unsupported"); \
+ static_assert(SRC_SUBSAMP_Y == 1 || SRC_SUBSAMP_Y == 2, \
+ "SRC_SUBSAMP_Y unsupported"); \
+ static_assert(DST_SUBSAMP_X == 1 || DST_SUBSAMP_X == 2, \
+ "DST_SUBSAMP_X unsupported"); \
+ static_assert(DST_SUBSAMP_Y == 1 || DST_SUBSAMP_Y == 2, \
+ "DST_SUBSAMP_Y unsupported"); \
+ const int kWidth = W1280; \
+ const int kHeight = benchmark_height_; \
+ const int kSrcHalfWidth = SUBSAMPLE(kWidth, SRC_SUBSAMP_X); \
+ const int kSrcHalfHeight = SUBSAMPLE(kHeight, SRC_SUBSAMP_Y); \
+ const int kDstHalfWidth = SUBSAMPLE(kWidth, DST_SUBSAMP_X); \
+ const int kDstHalfHeight = SUBSAMPLE(kHeight, DST_SUBSAMP_Y); \
+ align_buffer_page_end(src_y, kWidth* kHeight* SRC_BPC + OFF); \
+ align_buffer_page_end(src_uv, \
+ kSrcHalfWidth* kSrcHalfHeight* SRC_BPC * 2 + OFF); \
+ align_buffer_page_end(dst_y_c, kWidth* kHeight* DST_BPC); \
+ align_buffer_page_end(dst_u_c, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ align_buffer_page_end(dst_v_c, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ align_buffer_page_end(dst_y_opt, kWidth* kHeight* DST_BPC); \
+ align_buffer_page_end(dst_u_opt, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ align_buffer_page_end(dst_v_opt, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ SRC_T* src_y_p = reinterpret_cast(src_y + OFF); \
+ SRC_T* src_uv_p = reinterpret_cast(src_uv + OFF); \
+ for (int i = 0; i < kWidth * kHeight; ++i) { \
+ src_y_p[i] = \
+ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \
+ } \
+ for (int i = 0; i < kSrcHalfWidth * kSrcHalfHeight * 2; ++i) { \
+ src_uv_p[i] = \
+ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \
+ } \
+ memset(dst_y_c, 1, kWidth* kHeight* DST_BPC); \
+ memset(dst_u_c, 2, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ memset(dst_v_c, 3, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ memset(dst_y_opt, 101, kWidth* kHeight* DST_BPC); \
+ memset(dst_u_opt, 102, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ memset(dst_v_opt, 103, kDstHalfWidth* kDstHalfHeight* DST_BPC); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ SRC_FMT_PLANAR##To##FMT_PLANAR( \
+ src_y_p, kWidth, src_uv_p, kSrcHalfWidth * 2, \
+ reinterpret_cast(dst_y_c), kWidth, \
+ reinterpret_cast(dst_u_c), kDstHalfWidth, \
+ reinterpret_cast(dst_v_c), kDstHalfWidth, kWidth, \
+ NEG kHeight); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ SRC_FMT_PLANAR##To##FMT_PLANAR( \
+ src_y_p, kWidth, src_uv_p, kSrcHalfWidth * 2, \
+ reinterpret_cast(dst_y_opt), kWidth, \
+ reinterpret_cast(dst_u_opt), kDstHalfWidth, \
+ reinterpret_cast(dst_v_opt), kDstHalfWidth, kWidth, \
+ NEG kHeight); \
+ } \
+ for (int i = 0; i < kHeight * kWidth * DST_BPC; ++i) { \
+ EXPECT_EQ(dst_y_c[i], dst_y_opt[i]); \
+ } \
+ for (int i = 0; i < kDstHalfWidth * kDstHalfHeight * DST_BPC; ++i) { \
+ EXPECT_EQ(dst_u_c[i], dst_u_opt[i]); \
+ EXPECT_EQ(dst_v_c[i], dst_v_opt[i]); \
+ } \
+ free_aligned_buffer_page_end(dst_y_c); \
+ free_aligned_buffer_page_end(dst_u_c); \
+ free_aligned_buffer_page_end(dst_v_c); \
+ free_aligned_buffer_page_end(dst_y_opt); \
+ free_aligned_buffer_page_end(dst_u_opt); \
+ free_aligned_buffer_page_end(dst_v_opt); \
+ free_aligned_buffer_page_end(src_y); \
+ free_aligned_buffer_page_end(src_uv); \
+ }
+
+#define TESTBIPLANARTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \
+ DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \
+ TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_ + 1, _Any, +, 0, SRC_DEPTH) \
+ TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Unaligned, +, 1, \
+ SRC_DEPTH) \
+ TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Invert, -, 0, SRC_DEPTH) \
+ TESTBIPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \
+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \
+ DST_SUBSAMP_Y, benchmark_width_, _Opt, +, 0, SRC_DEPTH)
+
+TESTBIPLANARTOP(NV12, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8)
+TESTBIPLANARTOP(NV21, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8)
+
+// Provide matrix wrappers for full range bt.709
+#define F420ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I420ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j)
+#define F420ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I420ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j)
+#define F422ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I422ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j)
+#define F422ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j)
+#define F444ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I444ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j)
+#define F444ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I444ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j)
+
+// Provide matrix wrappers for full range bt.2020
+#define V420ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I420ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j)
+#define V420ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I420ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j)
+#define V422ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I422ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j)
+#define V422ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j)
+#define V444ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I444ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j)
+#define V444ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I444ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j)
#define ALIGNINT(V, ALIGN) (((V) + (ALIGN)-1) / (ALIGN) * (ALIGN))
#define TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN, W1280, N, NEG, OFF) \
TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
@@ -599,7 +702,7 @@ TESTBIPLANARTOP(NV21, 2, 2, I420, 2, 2)
#define TESTPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN) \
TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN, benchmark_width_ - 4, _Any, +, 0) \
+ YALIGN, benchmark_width_ + 1, _Any, +, 0) \
TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN, benchmark_width_, _Unaligned, +, 1) \
TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
@@ -611,10 +714,14 @@ TESTPLANARTOB(I420, 2, 2, ARGB, 4, 4, 1)
TESTPLANARTOB(I420, 2, 2, ABGR, 4, 4, 1)
TESTPLANARTOB(J420, 2, 2, ARGB, 4, 4, 1)
TESTPLANARTOB(J420, 2, 2, ABGR, 4, 4, 1)
+TESTPLANARTOB(F420, 2, 2, ARGB, 4, 4, 1)
+TESTPLANARTOB(F420, 2, 2, ABGR, 4, 4, 1)
TESTPLANARTOB(H420, 2, 2, ARGB, 4, 4, 1)
TESTPLANARTOB(H420, 2, 2, ABGR, 4, 4, 1)
TESTPLANARTOB(U420, 2, 2, ARGB, 4, 4, 1)
TESTPLANARTOB(U420, 2, 2, ABGR, 4, 4, 1)
+TESTPLANARTOB(V420, 2, 2, ARGB, 4, 4, 1)
+TESTPLANARTOB(V420, 2, 2, ABGR, 4, 4, 1)
TESTPLANARTOB(I420, 2, 2, BGRA, 4, 4, 1)
TESTPLANARTOB(I420, 2, 2, RGBA, 4, 4, 1)
TESTPLANARTOB(I420, 2, 2, RAW, 3, 3, 1)
@@ -639,6 +746,8 @@ TESTPLANARTOB(H422, 2, 1, ARGB, 4, 4, 1)
TESTPLANARTOB(H422, 2, 1, ABGR, 4, 4, 1)
TESTPLANARTOB(U422, 2, 1, ARGB, 4, 4, 1)
TESTPLANARTOB(U422, 2, 1, ABGR, 4, 4, 1)
+TESTPLANARTOB(V422, 2, 1, ARGB, 4, 4, 1)
+TESTPLANARTOB(V422, 2, 1, ABGR, 4, 4, 1)
TESTPLANARTOB(I422, 2, 1, BGRA, 4, 4, 1)
TESTPLANARTOB(I422, 2, 1, RGBA, 4, 4, 1)
TESTPLANARTOB(I444, 1, 1, ARGB, 4, 4, 1)
@@ -649,6 +758,8 @@ TESTPLANARTOB(H444, 1, 1, ARGB, 4, 4, 1)
TESTPLANARTOB(H444, 1, 1, ABGR, 4, 4, 1)
TESTPLANARTOB(U444, 1, 1, ARGB, 4, 4, 1)
TESTPLANARTOB(U444, 1, 1, ABGR, 4, 4, 1)
+TESTPLANARTOB(V444, 1, 1, ARGB, 4, 4, 1)
+TESTPLANARTOB(V444, 1, 1, ABGR, 4, 4, 1)
TESTPLANARTOB(I420, 2, 2, YUY2, 2, 4, 1)
TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4, 1)
TESTPLANARTOB(I422, 2, 1, YUY2, 2, 4, 1)
@@ -658,12 +769,14 @@ TESTPLANARTOB(J420, 2, 2, J400, 1, 1, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
TESTPLANARTOB(I420, 2, 2, AR30, 4, 4, 1)
TESTPLANARTOB(H420, 2, 2, AR30, 4, 4, 1)
+TESTPLANARTOB(I420, 2, 2, AB30, 4, 4, 1)
+TESTPLANARTOB(H420, 2, 2, AB30, 4, 4, 1)
#endif
#define TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN, W1280, N, NEG, OFF, ATTEN) \
TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
@@ -710,7 +823,7 @@ TESTPLANARTOB(H420, 2, 2, AR30, 4, 4, 1)
#define TESTQPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN) \
TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN, benchmark_width_ - 4, _Any, +, 0, 0) \
+ YALIGN, benchmark_width_ + 1, _Any, +, 0, 0) \
TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN, benchmark_width_, _Unaligned, +, 1, 0) \
TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
@@ -726,6 +839,12 @@ TESTPLANARTOB(H420, 2, 2, AR30, 4, 4, 1)
#define J420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
l, m)
+#define F420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define F420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
#define H420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
l, m)
@@ -738,6 +857,72 @@ TESTPLANARTOB(H420, 2, 2, AR30, 4, 4, 1)
#define U420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
l, m)
+#define V420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define V420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define J422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define J422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define F422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define F422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define H422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define H422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define U422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define U422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define V422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define V422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define J444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define J444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define F444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define F444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define H444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define H444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define U444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define U444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define V444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define V444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
TESTQPLANARTOB(I420Alpha, 2, 2, ARGB, 4, 4, 1)
TESTQPLANARTOB(I420Alpha, 2, 2, ABGR, 4, 4, 1)
@@ -745,13 +930,41 @@ TESTQPLANARTOB(J420Alpha, 2, 2, ARGB, 4, 4, 1)
TESTQPLANARTOB(J420Alpha, 2, 2, ABGR, 4, 4, 1)
TESTQPLANARTOB(H420Alpha, 2, 2, ARGB, 4, 4, 1)
TESTQPLANARTOB(H420Alpha, 2, 2, ABGR, 4, 4, 1)
+TESTQPLANARTOB(F420Alpha, 2, 2, ARGB, 4, 4, 1)
+TESTQPLANARTOB(F420Alpha, 2, 2, ABGR, 4, 4, 1)
TESTQPLANARTOB(U420Alpha, 2, 2, ARGB, 4, 4, 1)
TESTQPLANARTOB(U420Alpha, 2, 2, ABGR, 4, 4, 1)
+TESTQPLANARTOB(V420Alpha, 2, 2, ARGB, 4, 4, 1)
+TESTQPLANARTOB(V420Alpha, 2, 2, ABGR, 4, 4, 1)
+TESTQPLANARTOB(I422Alpha, 2, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(I422Alpha, 2, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(J422Alpha, 2, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(J422Alpha, 2, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(H422Alpha, 2, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(H422Alpha, 2, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(F422Alpha, 2, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(F422Alpha, 2, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(U422Alpha, 2, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(U422Alpha, 2, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(V422Alpha, 2, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(V422Alpha, 2, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(I444Alpha, 1, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(I444Alpha, 1, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(J444Alpha, 1, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(J444Alpha, 1, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(H444Alpha, 1, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(H444Alpha, 1, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(F444Alpha, 1, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(F444Alpha, 1, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(U444Alpha, 1, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(U444Alpha, 1, 1, ABGR, 4, 4, 1)
+TESTQPLANARTOB(V444Alpha, 1, 1, ARGB, 4, 4, 1)
+TESTQPLANARTOB(V444Alpha, 1, 1, ABGR, 4, 4, 1)
#define TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, \
BPP_B, W1280, N, NEG, OFF) \
TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kStrideB = kWidth * BPP_B; \
const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
@@ -804,7 +1017,7 @@ TESTQPLANARTOB(U420Alpha, 2, 2, ABGR, 4, 4, 1)
#define TESTBIPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B) \
TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \
- benchmark_width_ - 4, _Any, +, 0) \
+ benchmark_width_ + 1, _Any, +, 0) \
TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \
benchmark_width_, _Unaligned, +, 1) \
TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \
@@ -859,7 +1072,7 @@ TESTBIPLANARTOB(NV12, 2, 2, RGB565, RGB565, 2)
#define TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
W1280, N, NEG, OFF) \
TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
const int kStride = (kStrideUV * SUBSAMP_X * 8 * BPP_A + 7) / 8; \
@@ -906,7 +1119,7 @@ TESTBIPLANARTOB(NV12, 2, 2, RGB565, RGB565, 2)
#define TESTATOPLANAR(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \
TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
- benchmark_width_ - 4, _Any, +, 0) \
+ benchmark_width_ + 1, _Any, +, 0) \
TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
benchmark_width_, _Unaligned, +, 1) \
TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
@@ -929,6 +1142,7 @@ TESTATOPLANAR(BGRA, 4, 1, I420, 2, 2)
TESTATOPLANAR(I400, 1, 1, I420, 2, 2)
TESTATOPLANAR(J400, 1, 1, J420, 2, 2)
TESTATOPLANAR(RAW, 3, 1, I420, 2, 2)
+TESTATOPLANAR(RAW, 3, 1, J420, 2, 2)
TESTATOPLANAR(RGB24, 3, 1, I420, 2, 2)
TESTATOPLANAR(RGB24, 3, 1, J420, 2, 2)
TESTATOPLANAR(RGBA, 4, 1, I420, 2, 2)
@@ -940,7 +1154,7 @@ TESTATOPLANAR(YUY2, 2, 1, I422, 2, 1)
#define TESTATOBIPLANARI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, \
SUBSAMP_Y, W1280, N, NEG, OFF) \
TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kStride = SUBSAMPLE(kWidth, SUB_A) * BPP_A; \
const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
@@ -986,7 +1200,7 @@ TESTATOPLANAR(YUY2, 2, 1, I422, 2, 1)
#define TESTATOBIPLANAR(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \
TESTATOBIPLANARI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
- benchmark_width_ - 4, _Any, +, 0) \
+ benchmark_width_ + 1, _Any, +, 0) \
TESTATOBIPLANARI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
benchmark_width_, _Unaligned, +, 1) \
TESTATOBIPLANARI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
@@ -1003,152 +1217,166 @@ TESTATOBIPLANAR(UYVY, 2, 4, NV12, 2, 2)
TESTATOBIPLANAR(AYUV, 1, 4, NV12, 2, 2)
TESTATOBIPLANAR(AYUV, 1, 4, NV21, 2, 2)
-#define TESTATOBI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B, W1280, N, NEG, OFF) \
- TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
- const int kHeight = benchmark_height_; \
- const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \
- const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \
- const int kStrideA = \
- (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
- const int kStrideB = \
- (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \
- align_buffer_page_end(src_argb, kStrideA* kHeightA + OFF); \
- align_buffer_page_end(dst_argb_c, kStrideB* kHeightB); \
- align_buffer_page_end(dst_argb_opt, kStrideB* kHeightB); \
- for (int i = 0; i < kStrideA * kHeightA; ++i) { \
- src_argb[i + OFF] = (fastrand() & 0xff); \
- } \
- memset(dst_argb_c, 1, kStrideB* kHeightB); \
- memset(dst_argb_opt, 101, kStrideB* kHeightB); \
- MaskCpuFlags(disable_cpu_flags_); \
- FMT_A##To##FMT_B(src_argb + OFF, kStrideA, dst_argb_c, kStrideB, kWidth, \
- NEG kHeight); \
- MaskCpuFlags(benchmark_cpu_info_); \
- for (int i = 0; i < benchmark_iterations_; ++i) { \
- FMT_A##To##FMT_B(src_argb + OFF, kStrideA, dst_argb_opt, kStrideB, \
- kWidth, NEG kHeight); \
- } \
- for (int i = 0; i < kStrideB * kHeightB; ++i) { \
- EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \
- } \
- free_aligned_buffer_page_end(src_argb); \
- free_aligned_buffer_page_end(dst_argb_c); \
- free_aligned_buffer_page_end(dst_argb_opt); \
+#define TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \
+ EPP_B, STRIDE_B, HEIGHT_B, W1280, N, NEG, OFF) \
+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##N) { \
+ const int kWidth = W1280; \
+ const int kHeight = benchmark_height_; \
+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \
+ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \
+ const int kStrideA = \
+ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
+ const int kStrideB = \
+ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \
+ align_buffer_page_end(src_argb, \
+ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \
+ align_buffer_page_end(dst_argb_c, kStrideB* kHeightB*(int)sizeof(TYPE_B)); \
+ align_buffer_page_end(dst_argb_opt, \
+ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \
+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \
+ src_argb[i + OFF] = (fastrand() & 0xff); \
+ } \
+ memset(dst_argb_c, 1, kStrideB* kHeightB); \
+ memset(dst_argb_opt, 101, kStrideB* kHeightB); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FMT_A##To##FMT_B((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_B*)dst_argb_c, \
+ kStrideB, kWidth, NEG kHeight); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FMT_A##To##FMT_B((TYPE_A*)(src_argb + OFF), kStrideA, \
+ (TYPE_B*)dst_argb_opt, kStrideB, kWidth, NEG kHeight); \
+ } \
+ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \
+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \
+ } \
+ free_aligned_buffer_page_end(src_argb); \
+ free_aligned_buffer_page_end(dst_argb_c); \
+ free_aligned_buffer_page_end(dst_argb_opt); \
}
-#define TESTATOBRANDOM(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, \
- STRIDE_B, HEIGHT_B) \
- TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##_Random) { \
- for (int times = 0; times < benchmark_iterations_; ++times) { \
- const int kWidth = (fastrand() & 63) + 1; \
- const int kHeight = (fastrand() & 31) + 1; \
- const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \
- const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \
- const int kStrideA = \
- (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
- const int kStrideB = \
- (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \
- align_buffer_page_end(src_argb, kStrideA* kHeightA); \
- align_buffer_page_end(dst_argb_c, kStrideB* kHeightB); \
- align_buffer_page_end(dst_argb_opt, kStrideB* kHeightB); \
- for (int i = 0; i < kStrideA * kHeightA; ++i) { \
- src_argb[i] = (fastrand() & 0xff); \
- } \
- memset(dst_argb_c, 123, kStrideB* kHeightB); \
- memset(dst_argb_opt, 123, kStrideB* kHeightB); \
- MaskCpuFlags(disable_cpu_flags_); \
- FMT_A##To##FMT_B(src_argb, kStrideA, dst_argb_c, kStrideB, kWidth, \
- kHeight); \
- MaskCpuFlags(benchmark_cpu_info_); \
- FMT_A##To##FMT_B(src_argb, kStrideA, dst_argb_opt, kStrideB, kWidth, \
- kHeight); \
- for (int i = 0; i < kStrideB * kHeightB; ++i) { \
- EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \
- } \
- free_aligned_buffer_page_end(src_argb); \
- free_aligned_buffer_page_end(dst_argb_c); \
- free_aligned_buffer_page_end(dst_argb_opt); \
- } \
+#define TESTATOBRANDOM(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, \
+ TYPE_B, EPP_B, STRIDE_B, HEIGHT_B) \
+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##_Random) { \
+ for (int times = 0; times < benchmark_iterations_; ++times) { \
+ const int kWidth = (fastrand() & 63) + 1; \
+ const int kHeight = (fastrand() & 31) + 1; \
+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \
+ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \
+ const int kStrideA = \
+ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
+ const int kStrideB = \
+ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \
+ align_buffer_page_end(src_argb, kStrideA* kHeightA*(int)sizeof(TYPE_A)); \
+ align_buffer_page_end(dst_argb_c, \
+ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \
+ align_buffer_page_end(dst_argb_opt, \
+ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \
+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \
+ src_argb[i] = 0xfe; \
+ } \
+ memset(dst_argb_c, 123, kStrideB* kHeightB); \
+ memset(dst_argb_opt, 123, kStrideB* kHeightB); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FMT_A##To##FMT_B((TYPE_A*)src_argb, kStrideA, (TYPE_B*)dst_argb_c, \
+ kStrideB, kWidth, kHeight); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ FMT_A##To##FMT_B((TYPE_A*)src_argb, kStrideA, (TYPE_B*)dst_argb_opt, \
+ kStrideB, kWidth, kHeight); \
+ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \
+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \
+ } \
+ free_aligned_buffer_page_end(src_argb); \
+ free_aligned_buffer_page_end(dst_argb_c); \
+ free_aligned_buffer_page_end(dst_argb_opt); \
+ } \
}
-#define TESTATOB(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B) \
- TESTATOBI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B, benchmark_width_ - 4, _Any, +, 0) \
- TESTATOBI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B, benchmark_width_, _Unaligned, +, 1) \
- TESTATOBI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B, benchmark_width_, _Invert, -, 0) \
- TESTATOBI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B, benchmark_width_, _Opt, +, 0) \
- TESTATOBRANDOM(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B)
+#define TESTATOB(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \
+ EPP_B, STRIDE_B, HEIGHT_B) \
+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \
+ STRIDE_B, HEIGHT_B, benchmark_width_ + 1, _Any, +, 0) \
+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \
+ STRIDE_B, HEIGHT_B, benchmark_width_, _Unaligned, +, 1) \
+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \
+ STRIDE_B, HEIGHT_B, benchmark_width_, _Invert, -, 0) \
+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \
+ STRIDE_B, HEIGHT_B, benchmark_width_, _Opt, +, 0) \
+ TESTATOBRANDOM(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \
+ EPP_B, STRIDE_B, HEIGHT_B)
-TESTATOB(AB30, 4, 4, 1, ABGR, 4, 4, 1)
-TESTATOB(AB30, 4, 4, 1, ARGB, 4, 4, 1)
+TESTATOB(AB30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1)
+TESTATOB(AB30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
-TESTATOB(ABGR, 4, 4, 1, AR30, 4, 4, 1)
+TESTATOB(ABGR, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1)
#endif
-TESTATOB(ABGR, 4, 4, 1, ARGB, 4, 4, 1)
+TESTATOB(ABGR, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
-TESTATOB(AR30, 4, 4, 1, AB30, 4, 4, 1)
+TESTATOB(AR30, uint8_t, 4, 4, 1, AB30, uint8_t, 4, 4, 1)
#endif
-TESTATOB(AR30, 4, 4, 1, ABGR, 4, 4, 1)
+TESTATOB(AR30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
-TESTATOB(AR30, 4, 4, 1, AR30, 4, 4, 1)
-TESTATOB(AR30, 4, 4, 1, ARGB, 4, 4, 1)
+TESTATOB(AR30, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1)
+TESTATOB(AR30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
#endif
-TESTATOB(ARGB, 4, 4, 1, ABGR, 4, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
-TESTATOB(ARGB, 4, 4, 1, AR30, 4, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1)
#endif
-TESTATOB(ARGB, 4, 4, 1, ARGB, 4, 4, 1)
-TESTATOB(ARGB, 4, 4, 1, ARGB1555, 2, 2, 1)
-TESTATOB(ARGB, 4, 4, 1, ARGB4444, 2, 2, 1)
-TESTATOB(ARGB, 4, 4, 1, ARGBMirror, 4, 4, 1)
-TESTATOB(ARGB, 4, 4, 1, BGRA, 4, 4, 1)
-TESTATOB(ARGB, 4, 4, 1, I400, 1, 1, 1)
-TESTATOB(ARGB, 4, 4, 1, J400, 1, 1, 1)
-TESTATOB(RGBA, 4, 4, 1, J400, 1, 1, 1)
-TESTATOB(ARGB, 4, 4, 1, RAW, 3, 3, 1)
-TESTATOB(ARGB, 4, 4, 1, RGB24, 3, 3, 1)
-TESTATOB(ABGR, 4, 4, 1, RAW, 3, 3, 1)
-TESTATOB(ABGR, 4, 4, 1, RGB24, 3, 3, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB1555, uint8_t, 2, 2, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB4444, uint8_t, 2, 2, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGBMirror, uint8_t, 4, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, BGRA, uint8_t, 4, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, I400, uint8_t, 1, 1, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1)
+TESTATOB(RGBA, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1)
+TESTATOB(ABGR, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1)
+TESTATOB(ABGR, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
-TESTATOB(ARGB, 4, 4, 1, RGB565, 2, 2, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, RGB565, uint8_t, 2, 2, 1)
#endif
-TESTATOB(ARGB, 4, 4, 1, RGBA, 4, 4, 1)
-TESTATOB(ARGB, 4, 4, 1, UYVY, 2, 4, 1)
-TESTATOB(ARGB, 4, 4, 1, YUY2, 2, 4, 1) // 4
-TESTATOB(ARGB1555, 2, 2, 1, ARGB, 4, 4, 1)
-TESTATOB(ARGB4444, 2, 2, 1, ARGB, 4, 4, 1)
-TESTATOB(BGRA, 4, 4, 1, ARGB, 4, 4, 1)
-TESTATOB(I400, 1, 1, 1, ARGB, 4, 4, 1)
-TESTATOB(I400, 1, 1, 1, I400, 1, 1, 1)
-TESTATOB(I400, 1, 1, 1, I400Mirror, 1, 1, 1)
-TESTATOB(J400, 1, 1, 1, ARGB, 4, 4, 1)
-TESTATOB(J400, 1, 1, 1, J400, 1, 1, 1)
-TESTATOB(RAW, 3, 3, 1, ARGB, 4, 4, 1)
-TESTATOB(RAW, 3, 3, 1, RGBA, 4, 4, 1)
-TESTATOB(RAW, 3, 3, 1, RGB24, 3, 3, 1)
-TESTATOB(RGB24, 3, 3, 1, ARGB, 4, 4, 1)
-TESTATOB(RGB24, 3, 3, 1, J400, 1, 1, 1)
-TESTATOB(RGB24, 3, 3, 1, RGB24Mirror, 3, 3, 1)
-TESTATOB(RAW, 3, 3, 1, J400, 1, 1, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, RGBA, uint8_t, 4, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, UYVY, uint8_t, 2, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, YUY2, uint8_t, 2, 4, 1) // 4
+TESTATOB(ARGB1555, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(ARGB4444, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(BGRA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(I400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(I400, uint8_t, 1, 1, 1, I400, uint8_t, 1, 1, 1)
+TESTATOB(I400, uint8_t, 1, 1, 1, I400Mirror, uint8_t, 1, 1, 1)
+TESTATOB(J400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(J400, uint8_t, 1, 1, 1, J400, uint8_t, 1, 1, 1)
+TESTATOB(RAW, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(RAW, uint8_t, 3, 3, 1, RGBA, uint8_t, 4, 4, 1)
+TESTATOB(RAW, uint8_t, 3, 3, 1, RGB24, uint8_t, 3, 3, 1)
+TESTATOB(RGB24, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(RGB24, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1)
+TESTATOB(RGB24, uint8_t, 3, 3, 1, RGB24Mirror, uint8_t, 3, 3, 1)
+TESTATOB(RAW, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
-TESTATOB(RGB565, 2, 2, 1, ARGB, 4, 4, 1)
+TESTATOB(RGB565, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1)
#endif
-TESTATOB(RGBA, 4, 4, 1, ARGB, 4, 4, 1)
-TESTATOB(UYVY, 2, 4, 1, ARGB, 4, 4, 1)
-TESTATOB(YUY2, 2, 4, 1, ARGB, 4, 4, 1)
-TESTATOB(YUY2, 2, 4, 1, Y, 1, 1, 1)
+TESTATOB(RGBA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(UYVY, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(YUY2, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(YUY2, uint8_t, 2, 4, 1, Y, uint8_t, 1, 1, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1)
+TESTATOB(ARGB, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1)
+TESTATOB(ABGR, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1)
+TESTATOB(ABGR, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1)
+TESTATOB(AR64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(AB64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1)
+TESTATOB(AR64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1)
+TESTATOB(AB64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1)
+TESTATOB(AR64, uint16_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1)
+TESTATOB(AB64, uint16_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1)
#define TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
HEIGHT_B, W1280, N, NEG, OFF) \
TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##Dither##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \
const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \
@@ -1218,7 +1446,7 @@ TESTATOB(YUY2, 2, 4, 1, Y, 1, 1, 1)
#define TESTATOBD(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
HEIGHT_B) \
TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
- HEIGHT_B, benchmark_width_ - 4, _Any, +, 0) \
+ HEIGHT_B, benchmark_width_ + 1, _Any, +, 0) \
TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
HEIGHT_B, benchmark_width_, _Unaligned, +, 1) \
TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \
@@ -1232,35 +1460,39 @@ TESTATOB(YUY2, 2, 4, 1, Y, 1, 1, 1)
TESTATOBD(ARGB, 4, 4, 1, RGB565, 2, 2, 1)
#endif
-#define TESTSYMI(FMT_ATOB, BPP_A, STRIDE_A, HEIGHT_A, W1280, N, NEG, OFF) \
+#define TESTSYMI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, W1280, N, NEG, \
+ OFF) \
TEST_F(LibYUVConvertTest, FMT_ATOB##_Symetric##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \
const int kStrideA = \
- (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
- align_buffer_page_end(src_argb, kStrideA* kHeightA + OFF); \
- align_buffer_page_end(dst_argb_c, kStrideA* kHeightA); \
- align_buffer_page_end(dst_argb_opt, kStrideA* kHeightA); \
- for (int i = 0; i < kStrideA * kHeightA; ++i) { \
+ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
+ align_buffer_page_end(src_argb, \
+ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \
+ align_buffer_page_end(dst_argb_c, kStrideA* kHeightA*(int)sizeof(TYPE_A)); \
+ align_buffer_page_end(dst_argb_opt, \
+ kStrideA* kHeightA*(int)sizeof(TYPE_A)); \
+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \
src_argb[i + OFF] = (fastrand() & 0xff); \
} \
memset(dst_argb_c, 1, kStrideA* kHeightA); \
memset(dst_argb_opt, 101, kStrideA* kHeightA); \
MaskCpuFlags(disable_cpu_flags_); \
- FMT_ATOB(src_argb + OFF, kStrideA, dst_argb_c, kStrideA, kWidth, \
- NEG kHeight); \
+ FMT_ATOB((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_A*)dst_argb_c, \
+ kStrideA, kWidth, NEG kHeight); \
MaskCpuFlags(benchmark_cpu_info_); \
for (int i = 0; i < benchmark_iterations_; ++i) { \
- FMT_ATOB(src_argb + OFF, kStrideA, dst_argb_opt, kStrideA, kWidth, \
- NEG kHeight); \
+ FMT_ATOB((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_A*)dst_argb_opt, \
+ kStrideA, kWidth, NEG kHeight); \
} \
MaskCpuFlags(disable_cpu_flags_); \
- FMT_ATOB(dst_argb_c, kStrideA, dst_argb_c, kStrideA, kWidth, NEG kHeight); \
+ FMT_ATOB((TYPE_A*)dst_argb_c, kStrideA, (TYPE_A*)dst_argb_c, kStrideA, \
+ kWidth, NEG kHeight); \
MaskCpuFlags(benchmark_cpu_info_); \
- FMT_ATOB(dst_argb_opt, kStrideA, dst_argb_opt, kStrideA, kWidth, \
- NEG kHeight); \
- for (int i = 0; i < kStrideA * kHeightA; ++i) { \
+ FMT_ATOB((TYPE_A*)dst_argb_opt, kStrideA, (TYPE_A*)dst_argb_opt, kStrideA, \
+ kWidth, NEG kHeight); \
+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \
EXPECT_EQ(src_argb[i + OFF], dst_argb_opt[i]); \
EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \
} \
@@ -1269,18 +1501,20 @@ TESTATOBD(ARGB, 4, 4, 1, RGB565, 2, 2, 1)
free_aligned_buffer_page_end(dst_argb_opt); \
}
-#define TESTSYM(FMT_ATOB, BPP_A, STRIDE_A, HEIGHT_A) \
- TESTSYMI(FMT_ATOB, BPP_A, STRIDE_A, HEIGHT_A, benchmark_width_ - 4, _Any, +, \
- 0) \
- TESTSYMI(FMT_ATOB, BPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, _Unaligned, \
- +, 1) \
- TESTSYMI(FMT_ATOB, BPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, _Opt, +, 0)
+#define TESTSYM(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A) \
+ TESTSYMI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_ + 1, \
+ _Any, +, 0) \
+ TESTSYMI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \
+ _Unaligned, +, 1) \
+ TESTSYMI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \
+ _Opt, +, 0)
-TESTSYM(ARGBToARGB, 4, 4, 1)
-TESTSYM(ARGBToBGRA, 4, 4, 1)
-TESTSYM(ARGBToABGR, 4, 4, 1)
-TESTSYM(BGRAToARGB, 4, 4, 1)
-TESTSYM(ABGRToARGB, 4, 4, 1)
+TESTSYM(ARGBToARGB, uint8_t, 4, 4, 1)
+TESTSYM(ARGBToBGRA, uint8_t, 4, 4, 1)
+TESTSYM(ARGBToABGR, uint8_t, 4, 4, 1)
+TESTSYM(BGRAToARGB, uint8_t, 4, 4, 1)
+TESTSYM(ABGRToARGB, uint8_t, 4, 4, 1)
+TESTSYM(AB64ToAR64, uint16_t, 4, 4, 1)
TEST_F(LibYUVConvertTest, Test565) {
SIMD_ALIGNED(uint8_t orig_pixels[256][4]);
@@ -2144,7 +2378,11 @@ TEST_F(LibYUVConvertTest, TestMJPGToARGB) {
// Test result matches known hash value.
uint32_t dst_argb_hash = HashDjb2(dst_argb, width * height, 5381);
+#ifdef LIBYUV_UNLIMITED_DATA
+ EXPECT_EQ(dst_argb_hash, 3900633302u);
+#else
EXPECT_EQ(dst_argb_hash, 2355976473u);
+#endif
free_aligned_buffer_page_end(dst_argb);
}
@@ -2453,7 +2691,7 @@ TEST_F(LibYUVConvertTest, TestDither) {
#define TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN, W1280, N, NEG, OFF, FMT_C, BPP_C) \
TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##Dither##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
@@ -2506,7 +2744,7 @@ TEST_F(LibYUVConvertTest, TestDither) {
#define TESTPLANARTOBD(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN, FMT_C, BPP_C) \
TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN, benchmark_width_ - 4, _Any, +, 0, FMT_C, BPP_C) \
+ YALIGN, benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \
TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
YALIGN, benchmark_width_, _Unaligned, +, 1, FMT_C, BPP_C) \
TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
@@ -2579,11 +2817,12 @@ TESTPTOB(TestYUY2ToNV12, YUY2ToI420, YUY2ToNV12)
TESTPTOB(TestUYVYToNV12, UYVYToI420, UYVYToNV12)
// Transitive tests. A to B to C is same as A to C.
+// Benchmarks A To B to C for comparison to 1 step, benchmarked elsewhere.
#define TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
W1280, N, NEG, OFF, FMT_C, BPP_C) \
- TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##_##FMT_C##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##To##FMT_C##N) { \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \
const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
@@ -2600,23 +2839,23 @@ TESTPTOB(TestUYVYToNV12, UYVYToI420, UYVYToNV12)
src_v[i + OFF] = (fastrand() & 0xff); \
} \
memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \
- for (int i = 0; i < benchmark_iterations_; ++i) { \
- FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \
- src_v + OFF, kStrideUV, dst_argb_b + OFF, \
- kStrideB, kWidth, NEG kHeight); \
- } \
+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \
+ src_v + OFF, kStrideUV, dst_argb_b + OFF, kStrideB, \
+ kWidth, NEG kHeight); \
/* Convert to a 3rd format in 1 step and 2 steps and compare */ \
const int kStrideC = kWidth * BPP_C; \
align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \
align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \
memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \
memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \
- FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \
- src_v + OFF, kStrideUV, dst_argb_c + OFF, kStrideC, \
- kWidth, NEG kHeight); \
- /* Convert B to C */ \
- FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, kStrideC, \
- kWidth, kHeight); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \
+ src_v + OFF, kStrideUV, dst_argb_c + OFF, \
+ kStrideC, kWidth, NEG kHeight); \
+ /* Convert B to C */ \
+ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \
+ kStrideC, kWidth, kHeight); \
+ } \
for (int i = 0; i < kStrideC * kHeight; ++i) { \
EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_bc[i + OFF]); \
} \
@@ -2631,7 +2870,7 @@ TESTPTOB(TestUYVYToNV12, UYVYToI420, UYVYToNV12)
#define TESTPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
FMT_C, BPP_C) \
TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
- benchmark_width_ - 4, _Any, +, 0, FMT_C, BPP_C) \
+ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \
TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
benchmark_width_, _Unaligned, +, 1, FMT_C, BPP_C) \
TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
@@ -2639,26 +2878,28 @@ TESTPTOB(TestUYVYToNV12, UYVYToI420, UYVYToNV12)
TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
benchmark_width_, _Opt, +, 0, FMT_C, BPP_C)
-TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ABGR, 4)
TESTPLANARTOE(I420, 2, 2, ABGR, 1, 4, ARGB, 4)
-TESTPLANARTOE(J420, 2, 2, ARGB, 1, 4, ARGB, 4)
-TESTPLANARTOE(J420, 2, 2, ABGR, 1, 4, ARGB, 4)
-TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, ARGB, 4)
-TESTPLANARTOE(H420, 2, 2, ABGR, 1, 4, ARGB, 4)
-TESTPLANARTOE(U420, 2, 2, ARGB, 1, 4, ARGB, 4)
-TESTPLANARTOE(U420, 2, 2, ABGR, 1, 4, ARGB, 4)
-TESTPLANARTOE(I420, 2, 2, BGRA, 1, 4, ARGB, 4)
-TESTPLANARTOE(I420, 2, 2, RGBA, 1, 4, ARGB, 4)
-TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, ARGB, 4)
-TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, RGB24, 3)
-TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, RAW, 3)
+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ABGR, 4)
TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RAW, 3)
+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB24, 3)
+TESTPLANARTOE(I420, 2, 2, BGRA, 1, 4, ARGB, 4)
TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, ARGB, 4)
-TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, ARGB, 4)
-TESTPLANARTOE(H420, 2, 2, RAW, 1, 3, RGB24, 3)
-TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, RAW, 3)
+TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, RGB24, 3)
+TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, ARGB, 4)
+TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, RAW, 3)
+TESTPLANARTOE(I420, 2, 2, RGBA, 1, 4, ARGB, 4)
+TESTPLANARTOE(H420, 2, 2, ABGR, 1, 4, ARGB, 4)
+TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, ABGR, 4)
TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, RAW, 3)
+TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, RGB24, 3)
TESTPLANARTOE(H420, 2, 2, RAW, 1, 3, ARGB, 4)
+TESTPLANARTOE(H420, 2, 2, RAW, 1, 3, RGB24, 3)
+TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, ARGB, 4)
+TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, RAW, 3)
+TESTPLANARTOE(J420, 2, 2, ABGR, 1, 4, ARGB, 4)
+TESTPLANARTOE(J420, 2, 2, ARGB, 1, 4, ARGB, 4)
+TESTPLANARTOE(U420, 2, 2, ABGR, 1, 4, ARGB, 4)
+TESTPLANARTOE(U420, 2, 2, ARGB, 1, 4, ARGB, 4)
#ifdef LITTLE_ENDIAN_ONLY_TEST
TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB565, 2)
TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB1555, 2)
@@ -2673,6 +2914,8 @@ TESTPLANARTOE(H422, 2, 1, ARGB, 1, 4, ARGB, 4)
TESTPLANARTOE(H422, 2, 1, ABGR, 1, 4, ARGB, 4)
TESTPLANARTOE(U422, 2, 1, ARGB, 1, 4, ARGB, 4)
TESTPLANARTOE(U422, 2, 1, ABGR, 1, 4, ARGB, 4)
+TESTPLANARTOE(V422, 2, 1, ARGB, 1, 4, ARGB, 4)
+TESTPLANARTOE(V422, 2, 1, ABGR, 1, 4, ARGB, 4)
TESTPLANARTOE(I422, 2, 1, BGRA, 1, 4, ARGB, 4)
TESTPLANARTOE(I422, 2, 1, RGBA, 1, 4, ARGB, 4)
TESTPLANARTOE(I444, 1, 1, ARGB, 1, 4, ABGR, 4)
@@ -2683,6 +2926,8 @@ TESTPLANARTOE(H444, 1, 1, ARGB, 1, 4, ARGB, 4)
TESTPLANARTOE(H444, 1, 1, ABGR, 1, 4, ARGB, 4)
TESTPLANARTOE(U444, 1, 1, ARGB, 1, 4, ARGB, 4)
TESTPLANARTOE(U444, 1, 1, ABGR, 1, 4, ARGB, 4)
+TESTPLANARTOE(V444, 1, 1, ARGB, 1, 4, ARGB, 4)
+TESTPLANARTOE(V444, 1, 1, ABGR, 1, 4, ARGB, 4)
TESTPLANARTOE(I420, 2, 2, YUY2, 2, 4, ARGB, 4)
TESTPLANARTOE(I420, 2, 2, UYVY, 2, 4, ARGB, 4)
TESTPLANARTOE(I422, 2, 1, YUY2, 2, 4, ARGB, 4)
@@ -2690,8 +2935,8 @@ TESTPLANARTOE(I422, 2, 1, UYVY, 2, 4, ARGB, 4)
#define TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
W1280, N, NEG, OFF, FMT_C, BPP_C, ATTEN) \
- TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##_##FMT_C##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##To##FMT_C##N) { \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \
const int kSizeUV = \
@@ -2710,25 +2955,25 @@ TESTPLANARTOE(I422, 2, 1, UYVY, 2, 4, ARGB, 4)
src_v[i + OFF] = (fastrand() & 0xff); \
} \
memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \
- for (int i = 0; i < benchmark_iterations_; ++i) { \
- FMT_PLANAR##To##FMT_B( \
- src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
- src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \
- dst_argb_b + OFF, kStrideB, kWidth, NEG kHeight, ATTEN); \
- } \
+ FMT_PLANAR##To##FMT_B( \
+ src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
+ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \
+ dst_argb_b + OFF, kStrideB, kWidth, NEG kHeight, ATTEN); \
/* Convert to a 3rd format in 1 step and 2 steps and compare */ \
const int kStrideC = kWidth * BPP_C; \
align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \
align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \
memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \
memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \
- FMT_PLANAR##To##FMT_C( \
- src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
- src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \
- dst_argb_c + OFF, kStrideC, kWidth, NEG kHeight, ATTEN); \
- /* Convert B to C */ \
- FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, kStrideC, \
- kWidth, kHeight); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FMT_PLANAR##To##FMT_C( \
+ src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
+ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \
+ dst_argb_c + OFF, kStrideC, kWidth, NEG kHeight, ATTEN); \
+ /* Convert B to C */ \
+ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \
+ kStrideC, kWidth, kHeight); \
+ } \
for (int i = 0; i < kStrideC * kHeight; ++i) { \
EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_bc[i + OFF]); \
} \
@@ -2744,7 +2989,7 @@ TESTPLANARTOE(I422, 2, 1, UYVY, 2, 4, ARGB, 4)
#define TESTQPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
FMT_C, BPP_C) \
TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
- benchmark_width_ - 4, _Any, +, 0, FMT_C, BPP_C, 0) \
+ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C, 0) \
TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
benchmark_width_, _Unaligned, +, 1, FMT_C, BPP_C, 0) \
TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
@@ -2760,13 +3005,39 @@ TESTQPLANARTOE(J420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4)
TESTQPLANARTOE(J420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
TESTQPLANARTOE(H420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4)
TESTQPLANARTOE(H420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(F420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(F420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
TESTQPLANARTOE(U420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4)
TESTQPLANARTOE(U420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(V420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(V420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(I422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(I422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(J422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(J422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(F422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(F422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(H422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(H422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(U422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(U422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(V422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(V422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(I444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(I444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(J444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(J444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(H444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(H444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(U444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(U444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4)
+TESTQPLANARTOE(V444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4)
+TESTQPLANARTOE(V444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4)
#define TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, W1280, N, NEG, \
OFF, FMT_C, BPP_C) \
- TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##_##FMT_C##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##To##FMT_C##N) { \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kStrideA = SUBSAMPLE(kWidth, SUB_A) * BPP_A; \
const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \
@@ -2774,21 +3045,21 @@ TESTQPLANARTOE(U420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
align_buffer_page_end(dst_argb_b, kStrideB* kHeight + OFF); \
MemRandomize(src_argb_a + OFF, kStrideA * kHeight); \
memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \
- for (int i = 0; i < benchmark_iterations_; ++i) { \
- FMT_A##To##FMT_B(src_argb_a + OFF, kStrideA, dst_argb_b + OFF, kStrideB, \
- kWidth, NEG kHeight); \
- } \
+ FMT_A##To##FMT_B(src_argb_a + OFF, kStrideA, dst_argb_b + OFF, kStrideB, \
+ kWidth, NEG kHeight); \
/* Convert to a 3rd format in 1 step and 2 steps and compare */ \
const int kStrideC = kWidth * BPP_C; \
align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \
align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \
memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \
memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \
- FMT_A##To##FMT_C(src_argb_a + OFF, kStrideA, dst_argb_c + OFF, kStrideC, \
- kWidth, NEG kHeight); \
- /* Convert B to C */ \
- FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, kStrideC, \
- kWidth, kHeight); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FMT_A##To##FMT_C(src_argb_a + OFF, kStrideA, dst_argb_c + OFF, kStrideC, \
+ kWidth, NEG kHeight); \
+ /* Convert B to C */ \
+ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \
+ kStrideC, kWidth, kHeight); \
+ } \
for (int i = 0; i < kStrideC * kHeight; i += 4) { \
EXPECT_EQ(dst_argb_c[i + OFF + 0], dst_argb_bc[i + OFF + 0]); \
EXPECT_EQ(dst_argb_c[i + OFF + 1], dst_argb_bc[i + OFF + 1]); \
@@ -2803,7 +3074,7 @@ TESTQPLANARTOE(U420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
#define TESTPLANETOE(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, FMT_C, BPP_C) \
TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, \
- benchmark_width_ - 4, _Any, +, 0, FMT_C, BPP_C) \
+ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \
TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \
_Unaligned, +, 1, FMT_C, BPP_C) \
TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \
@@ -2926,91 +3197,457 @@ TEST_F(LibYUVConvertTest, ABGRToAR30Row_Opt) {
}
#endif // HAS_ABGRTOAR30ROW_AVX2
+// Provide matrix wrappers for 12 bit YUV
+#define I012ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I012ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j)
+#define I012ToAR30(a, b, c, d, e, f, g, h, i, j) \
+ I012ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j)
+
+#define I410ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j)
+#define I410ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j)
+#define H410ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j)
+#define H410ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j)
+#define U410ToARGB(a, b, c, d, e, f, g, h, i, j) \
+ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j)
+#define U410ToABGR(a, b, c, d, e, f, g, h, i, j) \
+ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j)
+#define I410ToAR30(a, b, c, d, e, f, g, h, i, j) \
+ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j)
+#define I410ToAB30(a, b, c, d, e, f, g, h, i, j) \
+ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j)
+#define H410ToAR30(a, b, c, d, e, f, g, h, i, j) \
+ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j)
+#define H410ToAB30(a, b, c, d, e, f, g, h, i, j) \
+ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j)
+#define U410ToAR30(a, b, c, d, e, f, g, h, i, j) \
+ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j)
+#define U410ToAB30(a, b, c, d, e, f, g, h, i, j) \
+ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j)
+
// TODO(fbarchard): Fix clamping issue affected by U channel.
-#define TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
- ALIGN, YALIGN, W1280, N, NEG, SOFF, DOFF) \
- TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
- const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
- const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
- const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
- const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \
- const int kBpc = 2; \
- align_buffer_page_end(src_y, kWidth* kHeight* kBpc + SOFF); \
- align_buffer_page_end(src_u, kSizeUV* kBpc + SOFF); \
- align_buffer_page_end(src_v, kSizeUV* kBpc + SOFF); \
- align_buffer_page_end(dst_argb_c, kStrideB* kHeight + DOFF); \
- align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + DOFF); \
- for (int i = 0; i < kWidth * kHeight; ++i) { \
- reinterpret_cast(src_y + SOFF)[i] = (fastrand() & 0x3ff); \
- } \
- for (int i = 0; i < kSizeUV; ++i) { \
- reinterpret_cast(src_u + SOFF)[i] = (fastrand() & 0x3ff); \
- reinterpret_cast(src_v + SOFF)[i] = (fastrand() & 0x3ff); \
- } \
- memset(dst_argb_c + DOFF, 1, kStrideB * kHeight); \
- memset(dst_argb_opt + DOFF, 101, kStrideB * kHeight); \
- MaskCpuFlags(disable_cpu_flags_); \
- FMT_PLANAR##To##FMT_B( \
- reinterpret_cast(src_y + SOFF), kWidth, \
- reinterpret_cast(src_u + SOFF), kStrideUV, \
- reinterpret_cast(src_v + SOFF), kStrideUV, \
- dst_argb_c + DOFF, kStrideB, kWidth, NEG kHeight); \
- MaskCpuFlags(benchmark_cpu_info_); \
- for (int i = 0; i < benchmark_iterations_; ++i) { \
- FMT_PLANAR##To##FMT_B( \
- reinterpret_cast(src_y + SOFF), kWidth, \
- reinterpret_cast(src_u + SOFF), kStrideUV, \
- reinterpret_cast(src_v + SOFF), kStrideUV, \
- dst_argb_opt + DOFF, kStrideB, kWidth, NEG kHeight); \
- } \
- for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \
- EXPECT_EQ(dst_argb_c[i + DOFF], dst_argb_opt[i + DOFF]); \
- } \
- free_aligned_buffer_page_end(src_y); \
- free_aligned_buffer_page_end(src_u); \
- free_aligned_buffer_page_end(src_v); \
- free_aligned_buffer_page_end(dst_argb_c); \
- free_aligned_buffer_page_end(dst_argb_opt); \
+#define TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, \
+ BPP_B, ALIGN, YALIGN, W1280, N, NEG, SOFF, DOFF) \
+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \
+ const int kWidth = W1280; \
+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \
+ const int kBpc = 2; \
+ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + SOFF); \
+ align_buffer_page_end(src_u, kSizeUV* kBpc + SOFF); \
+ align_buffer_page_end(src_v, kSizeUV* kBpc + SOFF); \
+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + DOFF); \
+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + DOFF); \
+ for (int i = 0; i < kWidth * kHeight; ++i) { \
+ reinterpret_cast(src_y + SOFF)[i] = (fastrand() & FMT_MASK); \
+ } \
+ for (int i = 0; i < kSizeUV; ++i) { \
+ reinterpret_cast(src_u + SOFF)[i] = (fastrand() & FMT_MASK); \
+ reinterpret_cast(src_v + SOFF)[i] = (fastrand() & FMT_MASK); \
+ } \
+ memset(dst_argb_c + DOFF, 1, kStrideB * kHeight); \
+ memset(dst_argb_opt + DOFF, 101, kStrideB * kHeight); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FMT_PLANAR##To##FMT_B( \
+ reinterpret_cast(src_y + SOFF), kWidth, \
+ reinterpret_cast(src_u + SOFF), kStrideUV, \
+ reinterpret_cast(src_v + SOFF), kStrideUV, \
+ dst_argb_c + DOFF, kStrideB, kWidth, NEG kHeight); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FMT_PLANAR##To##FMT_B( \
+ reinterpret_cast(src_y + SOFF), kWidth, \
+ reinterpret_cast(src_u + SOFF), kStrideUV, \
+ reinterpret_cast(src_v + SOFF), kStrideUV, \
+ dst_argb_opt + DOFF, kStrideB, kWidth, NEG kHeight); \
+ } \
+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \
+ EXPECT_EQ(dst_argb_c[i + DOFF], dst_argb_opt[i + DOFF]); \
+ } \
+ free_aligned_buffer_page_end(src_y); \
+ free_aligned_buffer_page_end(src_u); \
+ free_aligned_buffer_page_end(src_v); \
+ free_aligned_buffer_page_end(dst_argb_c); \
+ free_aligned_buffer_page_end(dst_argb_opt); \
}
-#define TESTPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN) \
- TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN, benchmark_width_ - 4, _Any, +, 0, 0) \
- TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN, benchmark_width_, _Unaligned, +, 1, 1) \
- TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN, benchmark_width_, _Invert, -, 0, 0) \
- TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
- YALIGN, benchmark_width_, _Opt, +, 0, 0)
+#define TESTPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, \
+ BPP_B, ALIGN, YALIGN) \
+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \
+ ALIGN, YALIGN, benchmark_width_ + 1, _Any, +, 0, 0) \
+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \
+ ALIGN, YALIGN, benchmark_width_, _Unaligned, +, 1, 1) \
+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \
+ ALIGN, YALIGN, benchmark_width_, _Invert, -, 0, 0) \
+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \
+ ALIGN, YALIGN, benchmark_width_, _Opt, +, 0, 0)
+
+// These conversions are only optimized for x86
+#if defined(ENABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__)
+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, ARGB, 4, 4, 1)
+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, ABGR, 4, 4, 1)
+TESTPLANAR16TOB(I012, 2, 2, 0xfff, ARGB, 4, 4, 1)
-TESTPLANAR16TOB(I010, 2, 2, ARGB, 4, 4, 1)
-TESTPLANAR16TOB(I010, 2, 2, ABGR, 4, 4, 1)
-TESTPLANAR16TOB(H010, 2, 2, ARGB, 4, 4, 1)
-TESTPLANAR16TOB(H010, 2, 2, ABGR, 4, 4, 1)
-TESTPLANAR16TOB(U010, 2, 2, ARGB, 4, 4, 1)
-TESTPLANAR16TOB(U010, 2, 2, ABGR, 4, 4, 1)
-TESTPLANAR16TOB(I210, 2, 1, ARGB, 4, 4, 1)
-TESTPLANAR16TOB(I210, 2, 1, ABGR, 4, 4, 1)
-TESTPLANAR16TOB(H210, 2, 1, ARGB, 4, 4, 1)
-TESTPLANAR16TOB(H210, 2, 1, ABGR, 4, 4, 1)
-TESTPLANAR16TOB(U210, 2, 1, ARGB, 4, 4, 1)
-TESTPLANAR16TOB(U210, 2, 1, ABGR, 4, 4, 1)
#ifdef LITTLE_ENDIAN_ONLY_TEST
-TESTPLANAR16TOB(I010, 2, 2, AR30, 4, 4, 1)
-TESTPLANAR16TOB(I010, 2, 2, AB30, 4, 4, 1)
-TESTPLANAR16TOB(H010, 2, 2, AR30, 4, 4, 1)
-TESTPLANAR16TOB(H010, 2, 2, AB30, 4, 4, 1)
-TESTPLANAR16TOB(U010, 2, 2, AR30, 4, 4, 1)
-TESTPLANAR16TOB(U010, 2, 2, AB30, 4, 4, 1)
-TESTPLANAR16TOB(I210, 2, 1, AR30, 4, 4, 1)
-TESTPLANAR16TOB(I210, 2, 1, AB30, 4, 4, 1)
-TESTPLANAR16TOB(H210, 2, 1, AR30, 4, 4, 1)
-TESTPLANAR16TOB(H210, 2, 1, AB30, 4, 4, 1)
-TESTPLANAR16TOB(U210, 2, 1, AR30, 4, 4, 1)
-TESTPLANAR16TOB(U210, 2, 1, AB30, 4, 4, 1)
-#endif
+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, AR30, 4, 4, 1)
+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, AB30, 4, 4, 1)
+TESTPLANAR16TOB(I012, 2, 2, 0xfff, AR30, 4, 4, 1)
+#endif // LITTLE_ENDIAN_ONLY_TEST
+#endif // ENABLE_SLOW_TESTS
+
+#define TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
+ ALIGN, YALIGN, W1280, N, NEG, OFF, ATTEN, S_DEPTH) \
+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \
+ const int kWidth = W1280; \
+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \
+ const int kBpc = 2; \
+ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + OFF); \
+ align_buffer_page_end(src_u, kSizeUV* kBpc + OFF); \
+ align_buffer_page_end(src_v, kSizeUV* kBpc + OFF); \
+ align_buffer_page_end(src_a, kWidth* kHeight* kBpc + OFF); \
+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \
+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \
+ for (int i = 0; i < kWidth * kHeight; ++i) { \
+ reinterpret_cast(src_y + OFF)[i] = \
+ (fastrand() & ((1 << S_DEPTH) - 1)); \
+ reinterpret_cast(src_a + OFF)[i] = \
+ (fastrand() & ((1 << S_DEPTH) - 1)); \
+ } \
+ for (int i = 0; i < kSizeUV; ++i) { \
+ reinterpret_cast(src_u + OFF)[i] = \
+ (fastrand() & ((1 << S_DEPTH) - 1)); \
+ reinterpret_cast(src_v + OFF)[i] = \
+ (fastrand() & ((1 << S_DEPTH) - 1)); \
+ } \
+ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \
+ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + OFF), kWidth, \
+ reinterpret_cast(src_u + OFF), kStrideUV, \
+ reinterpret_cast(src_v + OFF), kStrideUV, \
+ reinterpret_cast(src_a + OFF), kWidth, \
+ dst_argb_c + OFF, kStrideB, kWidth, NEG kHeight, \
+ ATTEN); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FMT_PLANAR##To##FMT_B( \
+ reinterpret_cast(src_y + OFF), kWidth, \
+ reinterpret_cast(src_u + OFF), kStrideUV, \
+ reinterpret_cast(src_v + OFF), kStrideUV, \
+ reinterpret_cast(src_a + OFF), kWidth, \
+ dst_argb_opt + OFF, kStrideB, kWidth, NEG kHeight, ATTEN); \
+ } \
+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \
+ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_opt[i + OFF]); \
+ } \
+ free_aligned_buffer_page_end(src_y); \
+ free_aligned_buffer_page_end(src_u); \
+ free_aligned_buffer_page_end(src_v); \
+ free_aligned_buffer_page_end(src_a); \
+ free_aligned_buffer_page_end(dst_argb_c); \
+ free_aligned_buffer_page_end(dst_argb_opt); \
+ }
+
+#define TESTQPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
+ ALIGN, YALIGN, S_DEPTH) \
+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_ + 1, _Any, +, 0, 0, S_DEPTH) \
+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_, _Unaligned, +, 1, 0, S_DEPTH) \
+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_, _Invert, -, 0, 0, S_DEPTH) \
+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_, _Opt, +, 0, 0, S_DEPTH) \
+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_, _Premult, +, 0, 1, S_DEPTH)
+
+#define I010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \
+ l, m)
+#define I010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \
+ l, m)
+#define J010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define J010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define F010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define F010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define H010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define H010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define U010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define U010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define V010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define V010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define I210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \
+ l, m)
+#define I210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \
+ l, m)
+#define J210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define J210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define F210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define F210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define H210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define H210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define U210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define U210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define V210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define V210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define I410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \
+ l, m)
+#define I410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \
+ l, m)
+#define J410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define J410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \
+ l, m)
+#define F410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define F410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \
+ l, m)
+#define H410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define H410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \
+ l, m)
+#define U410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define U410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \
+ l, m)
+#define V410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+#define V410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \
+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \
+ l, m)
+
+// These conversions are only optimized for x86
+#if defined(ENABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__)
+TESTQPLANAR16TOB(I010Alpha, 2, 2, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(I010Alpha, 2, 2, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(J010Alpha, 2, 2, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(J010Alpha, 2, 2, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(H010Alpha, 2, 2, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(H010Alpha, 2, 2, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(F010Alpha, 2, 2, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(F010Alpha, 2, 2, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(U010Alpha, 2, 2, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(U010Alpha, 2, 2, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(V010Alpha, 2, 2, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(V010Alpha, 2, 2, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(I210Alpha, 2, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(I210Alpha, 2, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(J210Alpha, 2, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(J210Alpha, 2, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(H210Alpha, 2, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(H210Alpha, 2, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(F210Alpha, 2, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(F210Alpha, 2, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(U210Alpha, 2, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(U210Alpha, 2, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(V210Alpha, 2, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(V210Alpha, 2, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(I410Alpha, 1, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(I410Alpha, 1, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(J410Alpha, 1, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(J410Alpha, 1, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(H410Alpha, 1, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(H410Alpha, 1, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(F410Alpha, 1, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(F410Alpha, 1, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(U410Alpha, 1, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(U410Alpha, 1, 1, ABGR, 4, 4, 1, 10)
+TESTQPLANAR16TOB(V410Alpha, 1, 1, ARGB, 4, 4, 1, 10)
+TESTQPLANAR16TOB(V410Alpha, 1, 1, ABGR, 4, 4, 1, 10)
+#endif // ENABLE_SLOW_TESTS
+
+#define TESTBIPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
+ ALIGN, YALIGN, W1280, N, NEG, SOFF, DOFF, S_DEPTH) \
+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \
+ const int kWidth = W1280; \
+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X) * 2; \
+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y) * 2; \
+ const int kBpc = 2; \
+ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + SOFF); \
+ align_buffer_page_end(src_uv, kSizeUV* kBpc + SOFF); \
+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + DOFF); \
+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + DOFF); \
+ for (int i = 0; i < kWidth * kHeight; ++i) { \
+ reinterpret_cast(src_y + SOFF)[i] = \
+ (fastrand() & (((uint16_t)(-1)) << (16 - S_DEPTH))); \
+ } \
+ for (int i = 0; i < kSizeUV; ++i) { \
+ reinterpret_cast(src_uv + SOFF)[i] = \
+ (fastrand() & (((uint16_t)(-1)) << (16 - S_DEPTH))); \
+ } \
+ memset(dst_argb_c + DOFF, 1, kStrideB * kHeight); \
+ memset(dst_argb_opt + DOFF, 101, kStrideB * kHeight); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + SOFF), kWidth, \
+ reinterpret_cast(src_uv + SOFF), \
+ kStrideUV, dst_argb_c + DOFF, kStrideB, kWidth, \
+ NEG kHeight); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + SOFF), kWidth, \
+ reinterpret_cast(src_uv + SOFF), \
+ kStrideUV, dst_argb_opt + DOFF, kStrideB, kWidth, \
+ NEG kHeight); \
+ } \
+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \
+ EXPECT_EQ(dst_argb_c[i + DOFF], dst_argb_opt[i + DOFF]); \
+ } \
+ free_aligned_buffer_page_end(src_y); \
+ free_aligned_buffer_page_end(src_uv); \
+ free_aligned_buffer_page_end(dst_argb_c); \
+ free_aligned_buffer_page_end(dst_argb_opt); \
+ }
+
+#define TESTBIPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
+ ALIGN, YALIGN, S_DEPTH) \
+ TESTBIPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_ + 1, _Any, +, 0, 0, S_DEPTH) \
+ TESTBIPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_, _Unaligned, +, 1, 1, S_DEPTH) \
+ TESTBIPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_, _Invert, -, 0, 0, S_DEPTH) \
+ TESTBIPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \
+ YALIGN, benchmark_width_, _Opt, +, 0, 0, S_DEPTH)
+
+#define P010ToARGB(a, b, c, d, e, f, g, h) \
+ P010ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P210ToARGB(a, b, c, d, e, f, g, h) \
+ P210ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P010ToAR30(a, b, c, d, e, f, g, h) \
+ P010ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P210ToAR30(a, b, c, d, e, f, g, h) \
+ P210ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+
+#define P012ToARGB(a, b, c, d, e, f, g, h) \
+ P012ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P212ToARGB(a, b, c, d, e, f, g, h) \
+ P212ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P012ToAR30(a, b, c, d, e, f, g, h) \
+ P012ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P212ToAR30(a, b, c, d, e, f, g, h) \
+ P212ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+
+#define P016ToARGB(a, b, c, d, e, f, g, h) \
+ P016ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P216ToARGB(a, b, c, d, e, f, g, h) \
+ P216ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P016ToAR30(a, b, c, d, e, f, g, h) \
+ P016ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+#define P216ToAR30(a, b, c, d, e, f, g, h) \
+ P216ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h)
+
+#if defined(ENABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__)
+TESTBIPLANAR16TOB(P010, 2, 2, ARGB, 4, 4, 1, 10)
+TESTBIPLANAR16TOB(P210, 2, 1, ARGB, 4, 4, 1, 10)
+TESTBIPLANAR16TOB(P012, 2, 2, ARGB, 4, 4, 1, 12)
+TESTBIPLANAR16TOB(P212, 2, 1, ARGB, 4, 4, 1, 12)
+TESTBIPLANAR16TOB(P016, 2, 2, ARGB, 4, 4, 1, 16)
+TESTBIPLANAR16TOB(P216, 2, 1, ARGB, 4, 4, 1, 16)
+#ifdef LITTLE_ENDIAN_ONLY_TEST
+TESTBIPLANAR16TOB(P010, 2, 2, AR30, 4, 4, 1, 10)
+TESTBIPLANAR16TOB(P210, 2, 1, AR30, 4, 4, 1, 10)
+TESTBIPLANAR16TOB(P012, 2, 2, AR30, 4, 4, 1, 12)
+TESTBIPLANAR16TOB(P212, 2, 1, AR30, 4, 4, 1, 12)
+TESTBIPLANAR16TOB(P016, 2, 2, AR30, 4, 4, 1, 16)
+TESTBIPLANAR16TOB(P216, 2, 1, AR30, 4, 4, 1, 16)
+#endif // LITTLE_ENDIAN_ONLY_TEST
+#endif // defined(ENABLE_SLOW_TESTS)
static int Clamp(int y) {
if (y < 0) {
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/cpu_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/cpu_test.cc
similarity index 72%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/cpu_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/cpu_test.cc
index 7264de0801..e528558167 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/cpu_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/cpu_test.cc
@@ -72,26 +72,98 @@ TEST_F(LibYUVBaseTest, TestCpuHas) {
#endif
}
-TEST_F(LibYUVBaseTest, TestCpuCompilerEnabled) {
-#if defined(__aarch64__)
- printf("Arm64 build\n");
+TEST_F(LibYUVBaseTest, TestCompilerMacros) {
+ // Tests all macros used in public headers.
+#ifdef __ATOMIC_RELAXED
+ printf("__ATOMIC_RELAXED %d\n", __ATOMIC_RELAXED);
#endif
-#if defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)
- printf("Neon build enabled\n");
+#ifdef __cplusplus
+ printf("__cplusplus %ld\n", __cplusplus);
#endif
-#if defined(__x86_64__) || defined(_M_X64)
- printf("x64 build\n");
+#ifdef __clang_major__
+ printf("__clang_major__ %d\n", __clang_major__);
+#endif
+#ifdef __clang_minor__
+ printf("__clang_minor__ %d\n", __clang_minor__);
+#endif
+#ifdef __GNUC__
+ printf("__GNUC__ %d\n", __GNUC__);
+#endif
+#ifdef __GNUC_MINOR__
+ printf("__GNUC_MINOR__ %d\n", __GNUC_MINOR__);
+#endif
+#ifdef __i386__
+ printf("__i386__ %d\n", __i386__);
+#endif
+#ifdef __mips
+ printf("__mips %d\n", __mips);
+#endif
+#ifdef __mips_isa_rev
+ printf("__mips_isa_rev %d\n", __mips_isa_rev);
+#endif
+#ifdef __x86_64__
+ printf("__x86_64__ %d\n", __x86_64__);
#endif
#ifdef _MSC_VER
printf("_MSC_VER %d\n", _MSC_VER);
#endif
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(GCC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
- defined(VISUALC_HAS_AVX2))
- printf("Has AVX2 1\n");
-#else
- printf("Has AVX2 0\n");
-// If compiler does not support AVX2, the following function not expected:
+#ifdef __aarch64__
+ printf("__aarch64__ %d\n", __aarch64__);
+#endif
+#ifdef __APPLE__
+ printf("__APPLE__ %d\n", __APPLE__);
+#endif
+#ifdef __arm__
+ printf("__arm__ %d\n", __arm__);
+#endif
+#ifdef __clang__
+ printf("__clang__ %d\n", __clang__);
+#endif
+#ifdef __CLR_VER
+ printf("__CLR_VER %d\n", __CLR_VER);
+#endif
+#ifdef __CYGWIN__
+ printf("__CYGWIN__ %d\n", __CYGWIN__);
+#endif
+#ifdef __llvm__
+ printf("__llvm__ %d\n", __llvm__);
+#endif
+#ifdef __mips_msa
+ printf("__mips_msa %d\n", __mips_msa);
+#endif
+#ifdef __native_client__
+ printf("__native_client__ %d\n", __native_client__);
+#endif
+#ifdef __pic__
+ printf("__pic__ %d\n", __pic__);
+#endif
+#ifdef __pnacl__
+ printf("__pnacl__ %d\n", __pnacl__);
+#endif
+#ifdef _M_IX86
+ printf("_M_IX86 %d\n", _M_IX86);
+#endif
+#ifdef _M_X64
+ printf("_M_X64 %d\n", _M_X64);
+#endif
+#ifdef _MIPS_ARCH_LOONGSON3A
+ printf("_MIPS_ARCH_LOONGSON3A %d\n", _MIPS_ARCH_LOONGSON3A);
+#endif
+#ifdef _WIN32
+ printf("_WIN32 %d\n", _WIN32);
+#endif
+#ifdef GG_LONGLONG
+ printf("GG_LONGLONG %d\n", GG_LONGLONG);
+#endif
+#ifdef INT_TYPES_DEFINED
+ printf("INT_TYPES_DEFINED\n");
+#endif
+#ifdef __has_feature
+ printf("__has_feature\n");
+#if __has_feature(memory_sanitizer)
+ printf("__has_feature(memory_sanitizer) %d\n",
+ __has_feature(memory_sanitizer));
+#endif
#endif
}
@@ -156,7 +228,14 @@ TEST_F(LibYUVBaseTest, TestLinuxNeon) {
printf("WARNING: unable to load \"../../unit_test/testdata/arm_v7.txt\"\n");
}
#if defined(__linux__) && defined(__ARM_NEON__)
- EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("/proc/cpuinfo"));
+ if (FileExists("/proc/cpuinfo")) {
+ if (kCpuHasNEON != ArmCpuCaps("/proc/cpuinfo")) {
+ // This can happen on ARM emulator but /proc/cpuinfo is from host.
+ printf("WARNING: Neon build enabled but CPU does not have NEON\n");
+ }
+ } else {
+ printf("WARNING: unable to load \"/proc/cpuinfo\"\n");
+ }
#endif
}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/cpu_thread_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/cpu_thread_test.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/cpu_thread_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/cpu_thread_test.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/math_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/math_test.cc
similarity index 100%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/math_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/math_test.cc
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/planar_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/planar_test.cc
similarity index 82%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/planar_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/planar_test.cc
index e05ff15640..5c60842136 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/planar_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/planar_test.cc
@@ -155,7 +155,7 @@ static int TestAttenuateI(int width,
}
TEST_F(LibYUVPlanarTest, ARGBAttenuate_Any) {
- int max_diff = TestAttenuateI(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestAttenuateI(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0);
EXPECT_LE(max_diff, 2);
@@ -228,7 +228,7 @@ static int TestUnattenuateI(int width,
}
TEST_F(LibYUVPlanarTest, ARGBUnattenuate_Any) {
- int max_diff = TestUnattenuateI(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestUnattenuateI(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0);
EXPECT_LE(max_diff, 2);
@@ -1076,7 +1076,7 @@ TEST_F(LibYUVPlanarTest, TestInterpolatePlane) {
#define TESTTERP(FMT_A, BPP_A, STRIDE_A, FMT_B, BPP_B, STRIDE_B, W1280, TERP, \
N, NEG, OFF) \
TEST_F(LibYUVPlanarTest, ARGBInterpolate##TERP##N) { \
- const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
+ const int kWidth = W1280; \
const int kHeight = benchmark_height_; \
const int kStrideA = \
(kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
@@ -1108,7 +1108,7 @@ TEST_F(LibYUVPlanarTest, TestInterpolatePlane) {
}
#define TESTINTERPOLATE(TERP) \
- TESTTERP(ARGB, 4, 1, ARGB, 4, 1, benchmark_width_ - 1, TERP, _Any, +, 0) \
+ TESTTERP(ARGB, 4, 1, ARGB, 4, 1, benchmark_width_ + 1, TERP, _Any, +, 0) \
TESTTERP(ARGB, 4, 1, ARGB, 4, 1, benchmark_width_, TERP, _Unaligned, +, 1) \
TESTTERP(ARGB, 4, 1, ARGB, 4, 1, benchmark_width_, TERP, _Invert, -, 0) \
TESTTERP(ARGB, 4, 1, ARGB, 4, 1, benchmark_width_, TERP, _Opt, +, 0)
@@ -1174,7 +1174,7 @@ static int TestBlend(int width,
TEST_F(LibYUVPlanarTest, ARGBBlend_Any) {
int max_diff =
- TestBlend(benchmark_width_ - 4, benchmark_height_, benchmark_iterations_,
+ TestBlend(benchmark_width_ + 1, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0, 1);
EXPECT_LE(max_diff, 1);
}
@@ -1280,7 +1280,7 @@ TEST_F(LibYUVPlanarTest, BlendPlane_Unaligned) {
disable_cpu_flags_, benchmark_cpu_info_, +1, 1);
}
TEST_F(LibYUVPlanarTest, BlendPlane_Any) {
- TestBlendPlane(benchmark_width_ - 4, benchmark_height_, benchmark_iterations_,
+ TestBlendPlane(benchmark_width_ + 1, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 1);
}
TEST_F(LibYUVPlanarTest, BlendPlane_Invert) {
@@ -1375,7 +1375,7 @@ TEST_F(LibYUVPlanarTest, I420Blend_Unaligned) {
// TODO(fbarchard): DISABLED because _Any uses C. Avoid C and re-enable.
TEST_F(LibYUVPlanarTest, DISABLED_I420Blend_Any) {
- TestI420Blend(benchmark_width_ - 4, benchmark_height_, benchmark_iterations_,
+ TestI420Blend(benchmark_width_ + 1, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0);
}
TEST_F(LibYUVPlanarTest, I420Blend_Invert) {
@@ -1524,7 +1524,7 @@ static int TestMultiply(int width,
}
TEST_F(LibYUVPlanarTest, ARGBMultiply_Any) {
- int max_diff = TestMultiply(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestMultiply(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0);
EXPECT_LE(max_diff, 1);
@@ -1599,7 +1599,7 @@ static int TestAdd(int width,
TEST_F(LibYUVPlanarTest, ARGBAdd_Any) {
int max_diff =
- TestAdd(benchmark_width_ - 1, benchmark_height_, benchmark_iterations_,
+ TestAdd(benchmark_width_ + 1, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0);
EXPECT_LE(max_diff, 1);
}
@@ -1672,7 +1672,7 @@ static int TestSubtract(int width,
}
TEST_F(LibYUVPlanarTest, ARGBSubtract_Any) {
- int max_diff = TestSubtract(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestSubtract(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0);
EXPECT_LE(max_diff, 1);
@@ -1745,7 +1745,7 @@ static int TestSobel(int width,
TEST_F(LibYUVPlanarTest, ARGBSobel_Any) {
int max_diff =
- TestSobel(benchmark_width_ - 1, benchmark_height_, benchmark_iterations_,
+ TestSobel(benchmark_width_ + 1, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0);
EXPECT_EQ(0, max_diff);
}
@@ -1818,7 +1818,7 @@ static int TestSobelToPlane(int width,
}
TEST_F(LibYUVPlanarTest, ARGBSobelToPlane_Any) {
- int max_diff = TestSobelToPlane(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestSobelToPlane(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0);
EXPECT_EQ(0, max_diff);
@@ -1890,7 +1890,7 @@ static int TestSobelXY(int width,
}
TEST_F(LibYUVPlanarTest, ARGBSobelXY_Any) {
- int max_diff = TestSobelXY(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestSobelXY(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0);
EXPECT_EQ(0, max_diff);
@@ -1966,29 +1966,35 @@ static int TestBlur(int width,
return max_diff;
}
+#if defined(ENABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__)
+#define DISABLED_ARM(name) name
+#else
+#define DISABLED_ARM(name) DISABLED_##name
+#endif
+
static const int kBlurSize = 55;
-TEST_F(LibYUVPlanarTest, ARGBBlur_Any) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlur_Any)) {
int max_diff =
- TestBlur(benchmark_width_ - 1, benchmark_height_, benchmark_iterations_,
+ TestBlur(benchmark_width_ + 1, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0, kBlurSize);
EXPECT_LE(max_diff, 1);
}
-TEST_F(LibYUVPlanarTest, ARGBBlur_Unaligned) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlur_Unaligned)) {
int max_diff =
TestBlur(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 1, kBlurSize);
EXPECT_LE(max_diff, 1);
}
-TEST_F(LibYUVPlanarTest, ARGBBlur_Invert) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlur_Invert)) {
int max_diff =
TestBlur(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, -1, 0, kBlurSize);
EXPECT_LE(max_diff, 1);
}
-TEST_F(LibYUVPlanarTest, ARGBBlur_Opt) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlur_Opt)) {
int max_diff =
TestBlur(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0, kBlurSize);
@@ -1996,35 +2002,35 @@ TEST_F(LibYUVPlanarTest, ARGBBlur_Opt) {
}
static const int kBlurSmallSize = 5;
-TEST_F(LibYUVPlanarTest, ARGBBlurSmall_Any) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlurSmall_Any)) {
int max_diff =
- TestBlur(benchmark_width_ - 1, benchmark_height_, benchmark_iterations_,
+ TestBlur(benchmark_width_ + 1, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0, kBlurSmallSize);
EXPECT_LE(max_diff, 1);
}
-TEST_F(LibYUVPlanarTest, ARGBBlurSmall_Unaligned) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlurSmall_Unaligned)) {
int max_diff =
TestBlur(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 1, kBlurSmallSize);
EXPECT_LE(max_diff, 1);
}
-TEST_F(LibYUVPlanarTest, ARGBBlurSmall_Invert) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlurSmall_Invert)) {
int max_diff =
TestBlur(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, -1, 0, kBlurSmallSize);
EXPECT_LE(max_diff, 1);
}
-TEST_F(LibYUVPlanarTest, ARGBBlurSmall_Opt) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(ARGBBlurSmall_Opt)) {
int max_diff =
TestBlur(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 0, kBlurSmallSize);
EXPECT_LE(max_diff, 1);
}
-TEST_F(LibYUVPlanarTest, TestARGBPolynomial) {
+TEST_F(LibYUVPlanarTest, DISABLED_ARM(TestARGBPolynomial)) {
SIMD_ALIGNED(uint8_t orig_pixels[1280][4]);
SIMD_ALIGNED(uint8_t dst_pixels_opt[1280][4]);
SIMD_ALIGNED(uint8_t dst_pixels_c[1280][4]);
@@ -2398,8 +2404,7 @@ TEST_F(LibYUVPlanarTest, TestARGBCopyAlpha) {
}
TEST_F(LibYUVPlanarTest, TestARGBExtractAlpha) {
- // Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_pixels, kPixels * 4);
align_buffer_page_end(dst_pixels_opt, kPixels);
align_buffer_page_end(dst_pixels_c, kPixels);
@@ -2427,8 +2432,7 @@ TEST_F(LibYUVPlanarTest, TestARGBExtractAlpha) {
}
TEST_F(LibYUVPlanarTest, TestARGBCopyYToAlpha) {
- // Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(orig_pixels, kPixels);
align_buffer_page_end(dst_pixels_opt, kPixels * 4);
align_buffer_page_end(dst_pixels_c, kPixels * 4);
@@ -2505,7 +2509,7 @@ static int TestARGBRect(int width,
}
TEST_F(LibYUVPlanarTest, ARGBRect_Any) {
- int max_diff = TestARGBRect(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestARGBRect(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0, 4);
EXPECT_EQ(0, max_diff);
@@ -2533,7 +2537,7 @@ TEST_F(LibYUVPlanarTest, ARGBRect_Opt) {
}
TEST_F(LibYUVPlanarTest, SetPlane_Any) {
- int max_diff = TestARGBRect(benchmark_width_ - 1, benchmark_height_,
+ int max_diff = TestARGBRect(benchmark_width_ + 1, benchmark_height_,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_, +1, 0, 1);
EXPECT_EQ(0, max_diff);
@@ -2561,35 +2565,25 @@ TEST_F(LibYUVPlanarTest, SetPlane_Opt) {
}
TEST_F(LibYUVPlanarTest, MergeUVPlane_Opt) {
- // Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
- align_buffer_page_end(src_pixels, kPixels * 2);
- align_buffer_page_end(tmp_pixels_u, kPixels);
- align_buffer_page_end(tmp_pixels_v, kPixels);
+ const int kPixels = benchmark_width_ * benchmark_height_;
+ align_buffer_page_end(src_pixels_u, kPixels);
+ align_buffer_page_end(src_pixels_v, kPixels);
align_buffer_page_end(dst_pixels_opt, kPixels * 2);
align_buffer_page_end(dst_pixels_c, kPixels * 2);
- MemRandomize(src_pixels, kPixels * 2);
- MemRandomize(tmp_pixels_u, kPixels);
- MemRandomize(tmp_pixels_v, kPixels);
+ MemRandomize(src_pixels_u, kPixels);
+ MemRandomize(src_pixels_v, kPixels);
MemRandomize(dst_pixels_opt, kPixels * 2);
MemRandomize(dst_pixels_c, kPixels * 2);
MaskCpuFlags(disable_cpu_flags_);
- SplitUVPlane(src_pixels, benchmark_width_ * 2, tmp_pixels_u, benchmark_width_,
- tmp_pixels_v, benchmark_width_, benchmark_width_,
- benchmark_height_);
- MergeUVPlane(tmp_pixels_u, benchmark_width_, tmp_pixels_v, benchmark_width_,
+ MergeUVPlane(src_pixels_u, benchmark_width_, src_pixels_v, benchmark_width_,
dst_pixels_c, benchmark_width_ * 2, benchmark_width_,
benchmark_height_);
MaskCpuFlags(benchmark_cpu_info_);
- SplitUVPlane(src_pixels, benchmark_width_ * 2, tmp_pixels_u, benchmark_width_,
- tmp_pixels_v, benchmark_width_, benchmark_width_,
- benchmark_height_);
-
for (int i = 0; i < benchmark_iterations_; ++i) {
- MergeUVPlane(tmp_pixels_u, benchmark_width_, tmp_pixels_v, benchmark_width_,
+ MergeUVPlane(src_pixels_u, benchmark_width_, src_pixels_v, benchmark_width_,
dst_pixels_opt, benchmark_width_ * 2, benchmark_width_,
benchmark_height_);
}
@@ -2598,60 +2592,127 @@ TEST_F(LibYUVPlanarTest, MergeUVPlane_Opt) {
EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
}
- free_aligned_buffer_page_end(src_pixels);
- free_aligned_buffer_page_end(tmp_pixels_u);
- free_aligned_buffer_page_end(tmp_pixels_v);
+ free_aligned_buffer_page_end(src_pixels_u);
+ free_aligned_buffer_page_end(src_pixels_v);
+ free_aligned_buffer_page_end(dst_pixels_opt);
+ free_aligned_buffer_page_end(dst_pixels_c);
+}
+
+// 16 bit channel split and merge
+TEST_F(LibYUVPlanarTest, MergeUVPlane_16_Opt) {
+ const int kPixels = benchmark_width_ * benchmark_height_;
+ align_buffer_page_end(src_pixels_u, kPixels * 2);
+ align_buffer_page_end(src_pixels_v, kPixels * 2);
+ align_buffer_page_end(dst_pixels_opt, kPixels * 2 * 2);
+ align_buffer_page_end(dst_pixels_c, kPixels * 2 * 2);
+ MemRandomize(src_pixels_u, kPixels * 2);
+ MemRandomize(src_pixels_v, kPixels * 2);
+ MemRandomize(dst_pixels_opt, kPixels * 2 * 2);
+ MemRandomize(dst_pixels_c, kPixels * 2 * 2);
+
+ MaskCpuFlags(disable_cpu_flags_);
+ MergeUVPlane_16((const uint16_t*)src_pixels_u, benchmark_width_,
+ (const uint16_t*)src_pixels_v, benchmark_width_,
+ (uint16_t*)dst_pixels_c, benchmark_width_ * 2,
+ benchmark_width_, benchmark_height_, 12);
+ MaskCpuFlags(benchmark_cpu_info_);
+
+ for (int i = 0; i < benchmark_iterations_; ++i) {
+ MergeUVPlane_16((const uint16_t*)src_pixels_u, benchmark_width_,
+ (const uint16_t*)src_pixels_v, benchmark_width_,
+ (uint16_t*)dst_pixels_opt, benchmark_width_ * 2,
+ benchmark_width_, benchmark_height_, 12);
+ }
+
+ for (int i = 0; i < kPixels * 2 * 2; ++i) {
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
+ }
+ free_aligned_buffer_page_end(src_pixels_u);
+ free_aligned_buffer_page_end(src_pixels_v);
free_aligned_buffer_page_end(dst_pixels_opt);
free_aligned_buffer_page_end(dst_pixels_c);
}
TEST_F(LibYUVPlanarTest, SplitUVPlane_Opt) {
- // Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_pixels, kPixels * 2);
- align_buffer_page_end(tmp_pixels_u, kPixels);
- align_buffer_page_end(tmp_pixels_v, kPixels);
- align_buffer_page_end(dst_pixels_opt, kPixels * 2);
- align_buffer_page_end(dst_pixels_c, kPixels * 2);
+ align_buffer_page_end(dst_pixels_u_c, kPixels);
+ align_buffer_page_end(dst_pixels_v_c, kPixels);
+ align_buffer_page_end(dst_pixels_u_opt, kPixels);
+ align_buffer_page_end(dst_pixels_v_opt, kPixels);
MemRandomize(src_pixels, kPixels * 2);
- MemRandomize(tmp_pixels_u, kPixels);
- MemRandomize(tmp_pixels_v, kPixels);
- MemRandomize(dst_pixels_opt, kPixels * 2);
- MemRandomize(dst_pixels_c, kPixels * 2);
+ MemRandomize(dst_pixels_u_c, kPixels);
+ MemRandomize(dst_pixels_v_c, kPixels);
+ MemRandomize(dst_pixels_u_opt, kPixels);
+ MemRandomize(dst_pixels_v_opt, kPixels);
MaskCpuFlags(disable_cpu_flags_);
- SplitUVPlane(src_pixels, benchmark_width_ * 2, tmp_pixels_u, benchmark_width_,
- tmp_pixels_v, benchmark_width_, benchmark_width_,
- benchmark_height_);
- MergeUVPlane(tmp_pixels_u, benchmark_width_, tmp_pixels_v, benchmark_width_,
- dst_pixels_c, benchmark_width_ * 2, benchmark_width_,
- benchmark_height_);
+ SplitUVPlane(src_pixels, benchmark_width_ * 2, dst_pixels_u_c,
+ benchmark_width_, dst_pixels_v_c, benchmark_width_,
+ benchmark_width_, benchmark_height_);
MaskCpuFlags(benchmark_cpu_info_);
for (int i = 0; i < benchmark_iterations_; ++i) {
- SplitUVPlane(src_pixels, benchmark_width_ * 2, tmp_pixels_u,
- benchmark_width_, tmp_pixels_v, benchmark_width_,
+ SplitUVPlane(src_pixels, benchmark_width_ * 2, dst_pixels_u_opt,
+ benchmark_width_, dst_pixels_v_opt, benchmark_width_,
benchmark_width_, benchmark_height_);
}
- MergeUVPlane(tmp_pixels_u, benchmark_width_, tmp_pixels_v, benchmark_width_,
- dst_pixels_opt, benchmark_width_ * 2, benchmark_width_,
- benchmark_height_);
- for (int i = 0; i < kPixels * 2; ++i) {
- EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
+ for (int i = 0; i < kPixels; ++i) {
+ EXPECT_EQ(dst_pixels_u_c[i], dst_pixels_u_opt[i]);
+ EXPECT_EQ(dst_pixels_v_c[i], dst_pixels_v_opt[i]);
}
free_aligned_buffer_page_end(src_pixels);
- free_aligned_buffer_page_end(tmp_pixels_u);
- free_aligned_buffer_page_end(tmp_pixels_v);
- free_aligned_buffer_page_end(dst_pixels_opt);
- free_aligned_buffer_page_end(dst_pixels_c);
+ free_aligned_buffer_page_end(dst_pixels_u_c);
+ free_aligned_buffer_page_end(dst_pixels_v_c);
+ free_aligned_buffer_page_end(dst_pixels_u_opt);
+ free_aligned_buffer_page_end(dst_pixels_v_opt);
+}
+
+// 16 bit channel split
+TEST_F(LibYUVPlanarTest, SplitUVPlane_16_Opt) {
+ const int kPixels = benchmark_width_ * benchmark_height_;
+ align_buffer_page_end(src_pixels, kPixels * 2 * 2);
+ align_buffer_page_end(dst_pixels_u_c, kPixels * 2);
+ align_buffer_page_end(dst_pixels_v_c, kPixels * 2);
+ align_buffer_page_end(dst_pixels_u_opt, kPixels * 2);
+ align_buffer_page_end(dst_pixels_v_opt, kPixels * 2);
+ MemRandomize(src_pixels, kPixels * 2 * 2);
+ MemRandomize(dst_pixels_u_c, kPixels * 2);
+ MemRandomize(dst_pixels_v_c, kPixels * 2);
+ MemRandomize(dst_pixels_u_opt, kPixels * 2);
+ MemRandomize(dst_pixels_v_opt, kPixels * 2);
+
+ MaskCpuFlags(disable_cpu_flags_);
+ SplitUVPlane_16((const uint16_t*)src_pixels, benchmark_width_ * 2,
+ (uint16_t*)dst_pixels_u_c, benchmark_width_,
+ (uint16_t*)dst_pixels_v_c, benchmark_width_, benchmark_width_,
+ benchmark_height_, 10);
+ MaskCpuFlags(benchmark_cpu_info_);
+
+ for (int i = 0; i < benchmark_iterations_; ++i) {
+ SplitUVPlane_16((const uint16_t*)src_pixels, benchmark_width_ * 2,
+ (uint16_t*)dst_pixels_u_opt, benchmark_width_,
+ (uint16_t*)dst_pixels_v_opt, benchmark_width_,
+ benchmark_width_, benchmark_height_, 10);
+ }
+
+ for (int i = 0; i < kPixels * 2; ++i) {
+ EXPECT_EQ(dst_pixels_u_c[i], dst_pixels_u_opt[i]);
+ EXPECT_EQ(dst_pixels_v_c[i], dst_pixels_v_opt[i]);
+ }
+ free_aligned_buffer_page_end(src_pixels);
+ free_aligned_buffer_page_end(dst_pixels_u_c);
+ free_aligned_buffer_page_end(dst_pixels_v_c);
+ free_aligned_buffer_page_end(dst_pixels_u_opt);
+ free_aligned_buffer_page_end(dst_pixels_v_opt);
}
TEST_F(LibYUVPlanarTest, SwapUVPlane_Opt) {
// Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_pixels, kPixels * 2);
align_buffer_page_end(dst_pixels_opt, kPixels * 2);
align_buffer_page_end(dst_pixels_c, kPixels * 2);
@@ -2681,7 +2742,7 @@ TEST_F(LibYUVPlanarTest, SwapUVPlane_Opt) {
TEST_F(LibYUVPlanarTest, MergeRGBPlane_Opt) {
// Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_pixels, kPixels * 3);
align_buffer_page_end(tmp_pixels_r, kPixels);
align_buffer_page_end(tmp_pixels_g, kPixels);
@@ -2730,7 +2791,7 @@ TEST_F(LibYUVPlanarTest, MergeRGBPlane_Opt) {
TEST_F(LibYUVPlanarTest, SplitRGBPlane_Opt) {
// Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_pixels, kPixels * 3);
align_buffer_page_end(tmp_pixels_r, kPixels);
align_buffer_page_end(tmp_pixels_g, kPixels);
@@ -2776,11 +2837,373 @@ TEST_F(LibYUVPlanarTest, SplitRGBPlane_Opt) {
free_aligned_buffer_page_end(dst_pixels_c);
}
+TEST_F(LibYUVPlanarTest, MergeARGBPlane_Opt) {
+ const int kPixels = benchmark_width_ * benchmark_height_;
+ align_buffer_page_end(src_pixels, kPixels * 4);
+ align_buffer_page_end(tmp_pixels_r, kPixels);
+ align_buffer_page_end(tmp_pixels_g, kPixels);
+ align_buffer_page_end(tmp_pixels_b, kPixels);
+ align_buffer_page_end(tmp_pixels_a, kPixels);
+ align_buffer_page_end(dst_pixels_opt, kPixels * 4);
+ align_buffer_page_end(dst_pixels_c, kPixels * 4);
+
+ MemRandomize(src_pixels, kPixels * 4);
+ MemRandomize(tmp_pixels_r, kPixels);
+ MemRandomize(tmp_pixels_g, kPixels);
+ MemRandomize(tmp_pixels_b, kPixels);
+ MemRandomize(tmp_pixels_a, kPixels);
+ MemRandomize(dst_pixels_opt, kPixels * 4);
+ MemRandomize(dst_pixels_c, kPixels * 4);
+
+ MaskCpuFlags(disable_cpu_flags_);
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_, tmp_pixels_b,
+ benchmark_width_, tmp_pixels_a, benchmark_width_,
+ benchmark_width_, benchmark_height_);
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, tmp_pixels_a, benchmark_width_,
+ dst_pixels_c, benchmark_width_ * 4, benchmark_width_,
+ benchmark_height_);
+
+ MaskCpuFlags(benchmark_cpu_info_);
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_, tmp_pixels_b,
+ benchmark_width_, tmp_pixels_a, benchmark_width_,
+ benchmark_width_, benchmark_height_);
+
+ for (int i = 0; i < benchmark_iterations_; ++i) {
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g,
+ benchmark_width_, tmp_pixels_b, benchmark_width_,
+ tmp_pixels_a, benchmark_width_, dst_pixels_opt,
+ benchmark_width_ * 4, benchmark_width_, benchmark_height_);
+ }
+
+ for (int i = 0; i < kPixels * 4; ++i) {
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
+ }
+
+ free_aligned_buffer_page_end(src_pixels);
+ free_aligned_buffer_page_end(tmp_pixels_r);
+ free_aligned_buffer_page_end(tmp_pixels_g);
+ free_aligned_buffer_page_end(tmp_pixels_b);
+ free_aligned_buffer_page_end(tmp_pixels_a);
+ free_aligned_buffer_page_end(dst_pixels_opt);
+ free_aligned_buffer_page_end(dst_pixels_c);
+}
+
+TEST_F(LibYUVPlanarTest, SplitARGBPlane_Opt) {
+ const int kPixels = benchmark_width_ * benchmark_height_;
+ align_buffer_page_end(src_pixels, kPixels * 4);
+ align_buffer_page_end(tmp_pixels_r, kPixels);
+ align_buffer_page_end(tmp_pixels_g, kPixels);
+ align_buffer_page_end(tmp_pixels_b, kPixels);
+ align_buffer_page_end(tmp_pixels_a, kPixels);
+ align_buffer_page_end(dst_pixels_opt, kPixels * 4);
+ align_buffer_page_end(dst_pixels_c, kPixels * 4);
+
+ MemRandomize(src_pixels, kPixels * 4);
+ MemRandomize(tmp_pixels_r, kPixels);
+ MemRandomize(tmp_pixels_g, kPixels);
+ MemRandomize(tmp_pixels_b, kPixels);
+ MemRandomize(tmp_pixels_a, kPixels);
+ MemRandomize(dst_pixels_opt, kPixels * 4);
+ MemRandomize(dst_pixels_c, kPixels * 4);
+
+ MaskCpuFlags(disable_cpu_flags_);
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_, tmp_pixels_b,
+ benchmark_width_, tmp_pixels_a, benchmark_width_,
+ benchmark_width_, benchmark_height_);
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, tmp_pixels_a, benchmark_width_,
+ dst_pixels_c, benchmark_width_ * 4, benchmark_width_,
+ benchmark_height_);
+
+ MaskCpuFlags(benchmark_cpu_info_);
+ for (int i = 0; i < benchmark_iterations_; ++i) {
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, tmp_pixels_a,
+ benchmark_width_, benchmark_width_, benchmark_height_);
+ }
+
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, tmp_pixels_a, benchmark_width_,
+ dst_pixels_opt, benchmark_width_ * 4, benchmark_width_,
+ benchmark_height_);
+
+ for (int i = 0; i < kPixels * 4; ++i) {
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
+ }
+
+ free_aligned_buffer_page_end(src_pixels);
+ free_aligned_buffer_page_end(tmp_pixels_r);
+ free_aligned_buffer_page_end(tmp_pixels_g);
+ free_aligned_buffer_page_end(tmp_pixels_b);
+ free_aligned_buffer_page_end(tmp_pixels_a);
+ free_aligned_buffer_page_end(dst_pixels_opt);
+ free_aligned_buffer_page_end(dst_pixels_c);
+}
+
+TEST_F(LibYUVPlanarTest, MergeXRGBPlane_Opt) {
+ const int kPixels = benchmark_width_ * benchmark_height_;
+ align_buffer_page_end(src_pixels, kPixels * 4);
+ align_buffer_page_end(tmp_pixels_r, kPixels);
+ align_buffer_page_end(tmp_pixels_g, kPixels);
+ align_buffer_page_end(tmp_pixels_b, kPixels);
+ align_buffer_page_end(dst_pixels_opt, kPixels * 4);
+ align_buffer_page_end(dst_pixels_c, kPixels * 4);
+
+ MemRandomize(src_pixels, kPixels * 4);
+ MemRandomize(tmp_pixels_r, kPixels);
+ MemRandomize(tmp_pixels_g, kPixels);
+ MemRandomize(tmp_pixels_b, kPixels);
+ MemRandomize(dst_pixels_opt, kPixels * 4);
+ MemRandomize(dst_pixels_c, kPixels * 4);
+
+ MaskCpuFlags(disable_cpu_flags_);
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_, tmp_pixels_b,
+ benchmark_width_, NULL, 0, benchmark_width_,
+ benchmark_height_);
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, NULL, 0, dst_pixels_c,
+ benchmark_width_ * 4, benchmark_width_, benchmark_height_);
+
+ MaskCpuFlags(benchmark_cpu_info_);
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_, tmp_pixels_b,
+ benchmark_width_, NULL, 0, benchmark_width_,
+ benchmark_height_);
+
+ for (int i = 0; i < benchmark_iterations_; ++i) {
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g,
+ benchmark_width_, tmp_pixels_b, benchmark_width_, NULL, 0,
+ dst_pixels_opt, benchmark_width_ * 4, benchmark_width_,
+ benchmark_height_);
+ }
+
+ for (int i = 0; i < kPixels * 4; ++i) {
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
+ }
+
+ free_aligned_buffer_page_end(src_pixels);
+ free_aligned_buffer_page_end(tmp_pixels_r);
+ free_aligned_buffer_page_end(tmp_pixels_g);
+ free_aligned_buffer_page_end(tmp_pixels_b);
+ free_aligned_buffer_page_end(dst_pixels_opt);
+ free_aligned_buffer_page_end(dst_pixels_c);
+}
+
+TEST_F(LibYUVPlanarTest, SplitXRGBPlane_Opt) {
+ const int kPixels = benchmark_width_ * benchmark_height_;
+ align_buffer_page_end(src_pixels, kPixels * 4);
+ align_buffer_page_end(tmp_pixels_r, kPixels);
+ align_buffer_page_end(tmp_pixels_g, kPixels);
+ align_buffer_page_end(tmp_pixels_b, kPixels);
+ align_buffer_page_end(dst_pixels_opt, kPixels * 4);
+ align_buffer_page_end(dst_pixels_c, kPixels * 4);
+
+ MemRandomize(src_pixels, kPixels * 4);
+ MemRandomize(tmp_pixels_r, kPixels);
+ MemRandomize(tmp_pixels_g, kPixels);
+ MemRandomize(tmp_pixels_b, kPixels);
+ MemRandomize(dst_pixels_opt, kPixels * 4);
+ MemRandomize(dst_pixels_c, kPixels * 4);
+
+ MaskCpuFlags(disable_cpu_flags_);
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_, tmp_pixels_b,
+ benchmark_width_, NULL, 0, benchmark_width_,
+ benchmark_height_);
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, NULL, 0, dst_pixels_c,
+ benchmark_width_ * 4, benchmark_width_, benchmark_height_);
+
+ MaskCpuFlags(benchmark_cpu_info_);
+ for (int i = 0; i < benchmark_iterations_; ++i) {
+ SplitARGBPlane(src_pixels, benchmark_width_ * 4, tmp_pixels_r,
+ benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, NULL, 0, benchmark_width_,
+ benchmark_height_);
+ }
+
+ MergeARGBPlane(tmp_pixels_r, benchmark_width_, tmp_pixels_g, benchmark_width_,
+ tmp_pixels_b, benchmark_width_, NULL, 0, dst_pixels_opt,
+ benchmark_width_ * 4, benchmark_width_, benchmark_height_);
+
+ for (int i = 0; i < kPixels * 4; ++i) {
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
+ }
+
+ free_aligned_buffer_page_end(src_pixels);
+ free_aligned_buffer_page_end(tmp_pixels_r);
+ free_aligned_buffer_page_end(tmp_pixels_g);
+ free_aligned_buffer_page_end(tmp_pixels_b);
+ free_aligned_buffer_page_end(dst_pixels_opt);
+ free_aligned_buffer_page_end(dst_pixels_c);
+}
+
+// Merge 4 channels
+#define TESTQPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, W1280, N, NEG, OFF) \
+ TEST_F(LibYUVPlanarTest, FUNC##Plane_##DEPTH##N) { \
+ const int kWidth = W1280; \
+ const int kPixels = kWidth * benchmark_height_; \
+ align_buffer_page_end(src_memory_r, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(src_memory_g, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(src_memory_b, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(src_memory_a, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(dst_memory_c, kPixels * 4 * sizeof(DTYPE)); \
+ align_buffer_page_end(dst_memory_opt, kPixels * 4 * sizeof(DTYPE)); \
+ MemRandomize(src_memory_r, kPixels * sizeof(STYPE) + OFF); \
+ MemRandomize(src_memory_g, kPixels * sizeof(STYPE) + OFF); \
+ MemRandomize(src_memory_b, kPixels * sizeof(STYPE) + OFF); \
+ MemRandomize(src_memory_a, kPixels * sizeof(STYPE) + OFF); \
+ memset(dst_memory_c, 0, kPixels * 4 * sizeof(DTYPE)); \
+ memset(dst_memory_opt, 0, kPixels * 4 * sizeof(DTYPE)); \
+ STYPE* src_pixels_r = reinterpret_cast(src_memory_r + OFF); \
+ STYPE* src_pixels_g = reinterpret_cast(src_memory_g + OFF); \
+ STYPE* src_pixels_b = reinterpret_cast(src_memory_b + OFF); \
+ STYPE* src_pixels_a = reinterpret_cast(src_memory_a + OFF); \
+ DTYPE* dst_pixels_c = reinterpret_cast(dst_memory_c); \
+ DTYPE* dst_pixels_opt = reinterpret_cast(dst_memory_opt); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FUNC##Plane(src_pixels_r, kWidth, src_pixels_g, kWidth, src_pixels_b, \
+ kWidth, src_pixels_a, kWidth, dst_pixels_c, kWidth * 4, \
+ kWidth, NEG benchmark_height_, DEPTH); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FUNC##Plane(src_pixels_r, kWidth, src_pixels_g, kWidth, src_pixels_b, \
+ kWidth, src_pixels_a, kWidth, dst_pixels_opt, kWidth * 4, \
+ kWidth, NEG benchmark_height_, DEPTH); \
+ } \
+ for (int i = 0; i < kPixels * 4; ++i) { \
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); \
+ } \
+ free_aligned_buffer_page_end(src_memory_r); \
+ free_aligned_buffer_page_end(src_memory_g); \
+ free_aligned_buffer_page_end(src_memory_b); \
+ free_aligned_buffer_page_end(src_memory_a); \
+ free_aligned_buffer_page_end(dst_memory_c); \
+ free_aligned_buffer_page_end(dst_memory_opt); \
+ }
+
+// Merge 3 channel RGB into 4 channel XRGB with opaque alpha
+#define TESTQPLANAROTOPI(FUNC, STYPE, DTYPE, DEPTH, W1280, N, NEG, OFF) \
+ TEST_F(LibYUVPlanarTest, FUNC##Plane_Opaque_##DEPTH##N) { \
+ const int kWidth = W1280; \
+ const int kPixels = kWidth * benchmark_height_; \
+ align_buffer_page_end(src_memory_r, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(src_memory_g, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(src_memory_b, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(dst_memory_c, kPixels * 4 * sizeof(DTYPE)); \
+ align_buffer_page_end(dst_memory_opt, kPixels * 4 * sizeof(DTYPE)); \
+ MemRandomize(src_memory_r, kPixels * sizeof(STYPE) + OFF); \
+ MemRandomize(src_memory_g, kPixels * sizeof(STYPE) + OFF); \
+ MemRandomize(src_memory_b, kPixels * sizeof(STYPE) + OFF); \
+ memset(dst_memory_c, 0, kPixels * 4 * sizeof(DTYPE)); \
+ memset(dst_memory_opt, 0, kPixels * 4 * sizeof(DTYPE)); \
+ STYPE* src_pixels_r = reinterpret_cast(src_memory_r + OFF); \
+ STYPE* src_pixels_g = reinterpret_cast(src_memory_g + OFF); \
+ STYPE* src_pixels_b = reinterpret_cast(src_memory_b + OFF); \
+ DTYPE* dst_pixels_c = reinterpret_cast(dst_memory_c); \
+ DTYPE* dst_pixels_opt = reinterpret_cast(dst_memory_opt); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FUNC##Plane(src_pixels_r, kWidth, src_pixels_g, kWidth, src_pixels_b, \
+ kWidth, NULL, 0, dst_pixels_c, kWidth * 4, kWidth, \
+ NEG benchmark_height_, DEPTH); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FUNC##Plane(src_pixels_r, kWidth, src_pixels_g, kWidth, src_pixels_b, \
+ kWidth, NULL, 0, dst_pixels_opt, kWidth * 4, kWidth, \
+ NEG benchmark_height_, DEPTH); \
+ } \
+ for (int i = 0; i < kPixels * 4; ++i) { \
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); \
+ } \
+ free_aligned_buffer_page_end(src_memory_r); \
+ free_aligned_buffer_page_end(src_memory_g); \
+ free_aligned_buffer_page_end(src_memory_b); \
+ free_aligned_buffer_page_end(dst_memory_c); \
+ free_aligned_buffer_page_end(dst_memory_opt); \
+ }
+
+#define TESTQPLANARTOP(FUNC, STYPE, DTYPE, DEPTH) \
+ TESTQPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_ + 1, _Any, +, 0) \
+ TESTQPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Unaligned, +, \
+ 1) \
+ TESTQPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Invert, -, 0) \
+ TESTQPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Opt, +, 0) \
+ TESTQPLANAROTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_ + 1, _Any, +, \
+ 0) \
+ TESTQPLANAROTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Unaligned, +, \
+ 1) \
+ TESTQPLANAROTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Invert, -, 0) \
+ TESTQPLANAROTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Opt, +, 0)
+
+TESTQPLANARTOP(MergeAR64, uint16_t, uint16_t, 10)
+TESTQPLANARTOP(MergeAR64, uint16_t, uint16_t, 12)
+TESTQPLANARTOP(MergeAR64, uint16_t, uint16_t, 16)
+TESTQPLANARTOP(MergeARGB16To8, uint16_t, uint8_t, 10)
+TESTQPLANARTOP(MergeARGB16To8, uint16_t, uint8_t, 12)
+TESTQPLANARTOP(MergeARGB16To8, uint16_t, uint8_t, 16)
+
+#define TESTTPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, W1280, N, NEG, OFF) \
+ TEST_F(LibYUVPlanarTest, FUNC##Plane_##DEPTH##N) { \
+ const int kWidth = W1280; \
+ const int kPixels = kWidth * benchmark_height_; \
+ align_buffer_page_end(src_memory_r, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(src_memory_g, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(src_memory_b, kPixels * sizeof(STYPE) + OFF); \
+ align_buffer_page_end(dst_memory_c, kPixels * 4 * sizeof(DTYPE)); \
+ align_buffer_page_end(dst_memory_opt, kPixels * 4 * sizeof(DTYPE)); \
+ MemRandomize(src_memory_r, kPixels * sizeof(STYPE) + OFF); \
+ MemRandomize(src_memory_g, kPixels * sizeof(STYPE) + OFF); \
+ MemRandomize(src_memory_b, kPixels * sizeof(STYPE) + OFF); \
+ STYPE* src_pixels_r = reinterpret_cast(src_memory_r + OFF); \
+ STYPE* src_pixels_g = reinterpret_cast(src_memory_g + OFF); \
+ STYPE* src_pixels_b = reinterpret_cast(src_memory_b + OFF); \
+ DTYPE* dst_pixels_c = reinterpret_cast(dst_memory_c); \
+ DTYPE* dst_pixels_opt = reinterpret_cast(dst_memory_opt); \
+ memset(dst_pixels_c, 1, kPixels * 4 * sizeof(DTYPE)); \
+ memset(dst_pixels_opt, 2, kPixels * 4 * sizeof(DTYPE)); \
+ MaskCpuFlags(disable_cpu_flags_); \
+ FUNC##Plane(src_pixels_r, kWidth, src_pixels_g, kWidth, src_pixels_b, \
+ kWidth, dst_pixels_c, kWidth * 4, kWidth, \
+ NEG benchmark_height_, DEPTH); \
+ MaskCpuFlags(benchmark_cpu_info_); \
+ for (int i = 0; i < benchmark_iterations_; ++i) { \
+ FUNC##Plane(src_pixels_r, kWidth, src_pixels_g, kWidth, src_pixels_b, \
+ kWidth, dst_pixels_opt, kWidth * 4, kWidth, \
+ NEG benchmark_height_, DEPTH); \
+ } \
+ for (int i = 0; i < kPixels * 4; ++i) { \
+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); \
+ } \
+ free_aligned_buffer_page_end(src_memory_r); \
+ free_aligned_buffer_page_end(src_memory_g); \
+ free_aligned_buffer_page_end(src_memory_b); \
+ free_aligned_buffer_page_end(dst_memory_c); \
+ free_aligned_buffer_page_end(dst_memory_opt); \
+ }
+
+#define TESTTPLANARTOP(FUNC, STYPE, DTYPE, DEPTH) \
+ TESTTPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_ + 1, _Any, +, 0) \
+ TESTTPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Unaligned, +, \
+ 1) \
+ TESTTPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Invert, -, 0) \
+ TESTTPLANARTOPI(FUNC, STYPE, DTYPE, DEPTH, benchmark_width_, _Opt, +, 0)
+
+TESTTPLANARTOP(MergeXR30, uint16_t, uint8_t, 10)
+TESTTPLANARTOP(MergeXR30, uint16_t, uint8_t, 12)
+TESTTPLANARTOP(MergeXR30, uint16_t, uint8_t, 16)
+
// TODO(fbarchard): improve test for platforms and cpu detect
#ifdef HAS_MERGEUVROW_16_AVX2
TEST_F(LibYUVPlanarTest, MergeUVRow_16_Opt) {
// Round count up to multiple of 16
const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+
align_buffer_page_end(src_pixels_u, kPixels * 2);
align_buffer_page_end(src_pixels_v, kPixels * 2);
align_buffer_page_end(dst_pixels_uv_opt, kPixels * 2 * 2);
@@ -2824,8 +3247,9 @@ TEST_F(LibYUVPlanarTest, MergeUVRow_16_Opt) {
// TODO(fbarchard): Improve test for more platforms.
#ifdef HAS_MULTIPLYROW_16_AVX2
TEST_F(LibYUVPlanarTest, MultiplyRow_16_Opt) {
- // Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ // Round count up to multiple of 32
+ const int kPixels = (benchmark_width_ * benchmark_height_ + 31) & ~31;
+
align_buffer_page_end(src_pixels_y, kPixels * 2);
align_buffer_page_end(dst_pixels_y_opt, kPixels * 2);
align_buffer_page_end(dst_pixels_y_c, kPixels * 2);
@@ -2861,8 +3285,7 @@ TEST_F(LibYUVPlanarTest, MultiplyRow_16_Opt) {
#endif // HAS_MULTIPLYROW_16_AVX2
TEST_F(LibYUVPlanarTest, Convert16To8Plane) {
- // Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_pixels_y, kPixels * 2);
align_buffer_page_end(dst_pixels_y_opt, kPixels);
align_buffer_page_end(dst_pixels_y_c, kPixels);
@@ -2941,8 +3364,7 @@ TEST_F(LibYUVPlanarTest, Convert16To8Row_Opt) {
#endif // ENABLE_ROW_TESTS
TEST_F(LibYUVPlanarTest, Convert8To16Plane) {
- // Round count up to multiple of 16
- const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15;
+ const int kPixels = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_pixels_y, kPixels);
align_buffer_page_end(dst_pixels_y_opt, kPixels * 2);
align_buffer_page_end(dst_pixels_y_c, kPixels * 2);
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/rotate_argb_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/rotate_argb_test.cc
similarity index 94%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/rotate_argb_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/rotate_argb_test.cc
index 3208b66a2a..01ed69ca55 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/rotate_argb_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/rotate_argb_test.cc
@@ -156,29 +156,29 @@ TEST_F(LibYUVRotateTest, RotatePlane270_Opt) {
}
TEST_F(LibYUVRotateTest, DISABLED_RotatePlane0_Odd) {
- TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate0,
+ TestRotatePlane(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate0,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_RotatePlane90_Odd) {
- TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate90,
+ TestRotatePlane(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate90,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_RotatePlane180_Odd) {
- TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate180,
+ TestRotatePlane(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate180,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_RotatePlane270_Odd) {
- TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate270,
+ TestRotatePlane(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate270,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/rotate_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/rotate_test.cc
similarity index 90%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/rotate_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/rotate_test.cc
index 61941e63e0..1bab584fa1 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/rotate_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/rotate_test.cc
@@ -108,29 +108,29 @@ TEST_F(LibYUVRotateTest, I420Rotate270_Opt) {
// Odd width tests work but disabled because they use C code and can be
// tested by passing an odd width command line or environment variable.
TEST_F(LibYUVRotateTest, DISABLED_I420Rotate0_Odd) {
- I420TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate0,
+ I420TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate0,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_I420Rotate90_Odd) {
- I420TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate90,
+ I420TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate90,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_I420Rotate180_Odd) {
- I420TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate180,
+ I420TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate180,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_I420Rotate270_Odd) {
- I420TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate270,
+ I420TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate270,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
@@ -225,29 +225,29 @@ TEST_F(LibYUVRotateTest, I444Rotate270_Opt) {
// Odd width tests work but disabled because they use C code and can be
// tested by passing an odd width command line or environment variable.
TEST_F(LibYUVRotateTest, DISABLED_I444Rotate0_Odd) {
- I444TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate0,
+ I444TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate0,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_I444Rotate90_Odd) {
- I444TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate90,
+ I444TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate90,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_I444Rotate180_Odd) {
- I444TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate180,
+ I444TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate180,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_I444Rotate270_Odd) {
- I444TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate270,
+ I444TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate270,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
@@ -340,29 +340,29 @@ TEST_F(LibYUVRotateTest, NV12Rotate270_Opt) {
}
TEST_F(LibYUVRotateTest, DISABLED_NV12Rotate0_Odd) {
- NV12TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate0,
+ NV12TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate0,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_NV12Rotate90_Odd) {
- NV12TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate90,
+ NV12TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate90,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_NV12Rotate180_Odd) {
- NV12TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_width_ - 3, benchmark_height_ - 1, kRotate180,
+ NV12TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_width_ + 1, benchmark_height_ + 1, kRotate180,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
TEST_F(LibYUVRotateTest, DISABLED_NV12Rotate270_Odd) {
- NV12TestRotate(benchmark_width_ - 3, benchmark_height_ - 1,
- benchmark_height_ - 1, benchmark_width_ - 3, kRotate270,
+ NV12TestRotate(benchmark_width_ + 1, benchmark_height_ + 1,
+ benchmark_height_ + 1, benchmark_width_ + 1, kRotate270,
benchmark_iterations_, disable_cpu_flags_,
benchmark_cpu_info_);
}
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/scale_argb_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/scale_argb_test.cc
similarity index 89%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/scale_argb_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/scale_argb_test.cc
index 2fdf5f6034..48ad75eafd 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/scale_argb_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/scale_argb_test.cc
@@ -114,8 +114,8 @@ static int ARGBTestFilter(int src_width,
return max_diff;
}
-static const int kTileX = 8;
-static const int kTileY = 8;
+static const int kTileX = 64;
+static const int kTileY = 64;
static int TileARGBScale(const uint8_t* src_argb,
int src_stride_argb,
@@ -232,7 +232,7 @@ static int ARGBClipTestFilter(int src_width,
#define DX(x, nom, denom) static_cast((Abs(x) / nom) * nom)
#define SX(x, nom, denom) static_cast((x / nom) * denom)
-#define TEST_FACTOR1(name, filter, nom, denom, max_diff) \
+#define TEST_FACTOR1(DISABLED_, name, filter, nom, denom, max_diff) \
TEST_F(LibYUVScaleTest, ARGBScaleDownBy##name##_##filter) { \
int diff = ARGBTestFilter( \
SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \
@@ -241,7 +241,7 @@ static int ARGBClipTestFilter(int src_width,
benchmark_cpu_info_); \
EXPECT_LE(diff, max_diff); \
} \
- TEST_F(LibYUVScaleTest, ARGBScaleDownClipBy##name##_##filter) { \
+ TEST_F(LibYUVScaleTest, DISABLED_##ARGBScaleDownClipBy##name##_##filter) { \
int diff = ARGBClipTestFilter( \
SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \
DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \
@@ -251,11 +251,19 @@ static int ARGBClipTestFilter(int src_width,
// Test a scale factor with all 4 filters. Expect unfiltered to be exact, but
// filtering is different fixed point implementations for SSSE3, Neon and C.
-#define TEST_FACTOR(name, nom, denom) \
- TEST_FACTOR1(name, None, nom, denom, 0) \
- TEST_FACTOR1(name, Linear, nom, denom, 3) \
- TEST_FACTOR1(name, Bilinear, nom, denom, 3) \
- TEST_FACTOR1(name, Box, nom, denom, 3)
+#ifdef ENABLE_SLOW_TESTS
+#define TEST_FACTOR(name, nom, denom) \
+ TEST_FACTOR1(, name, None, nom, denom, 0) \
+ TEST_FACTOR1(, name, Linear, nom, denom, 3) \
+ TEST_FACTOR1(, name, Bilinear, nom, denom, 3) \
+ TEST_FACTOR1(, name, Box, nom, denom, 3)
+#else
+#define TEST_FACTOR(name, nom, denom) \
+ TEST_FACTOR1(DISABLED_, name, None, nom, denom, 0) \
+ TEST_FACTOR1(DISABLED_, name, Linear, nom, denom, 3) \
+ TEST_FACTOR1(DISABLED_, name, Bilinear, nom, denom, 3) \
+ TEST_FACTOR1(DISABLED_, name, Box, nom, denom, 3)
+#endif
TEST_FACTOR(2, 1, 2)
TEST_FACTOR(4, 1, 4)
@@ -268,7 +276,7 @@ TEST_FACTOR(3, 1, 3)
#undef SX
#undef DX
-#define TEST_SCALETO1(name, width, height, filter, max_diff) \
+#define TEST_SCALETO1(DISABLED_, name, width, height, filter, max_diff) \
TEST_F(LibYUVScaleTest, name##To##width##x##height##_##filter) { \
int diff = ARGBTestFilter(benchmark_width_, benchmark_height_, width, \
height, kFilter##filter, benchmark_iterations_, \
@@ -282,13 +290,15 @@ TEST_FACTOR(3, 1, 3)
benchmark_cpu_info_); \
EXPECT_LE(diff, max_diff); \
} \
- TEST_F(LibYUVScaleTest, name##ClipTo##width##x##height##_##filter) { \
+ TEST_F(LibYUVScaleTest, \
+ DISABLED_##name##ClipTo##width##x##height##_##filter) { \
int diff = \
ARGBClipTestFilter(benchmark_width_, benchmark_height_, width, height, \
kFilter##filter, benchmark_iterations_); \
EXPECT_LE(diff, max_diff); \
} \
- TEST_F(LibYUVScaleTest, name##ClipFrom##width##x##height##_##filter) { \
+ TEST_F(LibYUVScaleTest, \
+ DISABLED_##name##ClipFrom##width##x##height##_##filter) { \
int diff = ARGBClipTestFilter(width, height, Abs(benchmark_width_), \
Abs(benchmark_height_), kFilter##filter, \
benchmark_iterations_); \
@@ -296,12 +306,20 @@ TEST_FACTOR(3, 1, 3)
}
/// Test scale to a specified size with all 4 filters.
-#define TEST_SCALETO(name, width, height) \
- TEST_SCALETO1(name, width, height, None, 0) \
- TEST_SCALETO1(name, width, height, Linear, 3) \
- TEST_SCALETO1(name, width, height, Bilinear, 3)
+#ifdef ENABLE_SLOW_TESTS
+#define TEST_SCALETO(name, width, height) \
+ TEST_SCALETO1(, name, width, height, None, 0) \
+ TEST_SCALETO1(, name, width, height, Linear, 3) \
+ TEST_SCALETO1(, name, width, height, Bilinear, 3)
+#else
+#define TEST_SCALETO(name, width, height) \
+ TEST_SCALETO1(DISABLED_, name, width, height, None, 0) \
+ TEST_SCALETO1(DISABLED_, name, width, height, Linear, 3) \
+ TEST_SCALETO1(DISABLED_, name, width, height, Bilinear, 3)
+#endif
TEST_SCALETO(ARGBScale, 1, 1)
+TEST_SCALETO(ARGBScale, 256, 144) /* 128x72 * 2 */
TEST_SCALETO(ARGBScale, 320, 240)
TEST_SCALETO(ARGBScale, 569, 480)
TEST_SCALETO(ARGBScale, 640, 360)
@@ -312,6 +330,21 @@ TEST_SCALETO(ARGBScale, 1920, 1080)
#undef TEST_SCALETO1
#undef TEST_SCALETO
+#define TEST_SCALESWAPXY1(name, filter, max_diff) \
+ TEST_F(LibYUVScaleTest, name##SwapXY_##filter) { \
+ int diff = ARGBTestFilter(benchmark_width_, benchmark_height_, \
+ benchmark_height_, benchmark_width_, \
+ kFilter##filter, benchmark_iterations_, \
+ disable_cpu_flags_, benchmark_cpu_info_); \
+ EXPECT_LE(diff, max_diff); \
+ }
+
+// Test scale with swapped width and height with all 3 filters.
+TEST_SCALESWAPXY1(ARGBScale, None, 0)
+TEST_SCALESWAPXY1(ARGBScale, Linear, 0)
+TEST_SCALESWAPXY1(ARGBScale, Bilinear, 0)
+#undef TEST_SCALESWAPXY1
+
// Scale with YUV conversion to ARGB and clipping.
// TODO(fbarchard): Add fourcc support. All 4 ARGB formats is easy to support.
LIBYUV_API
diff --git a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/scale_test.cc b/third-party/libyuv/third_party/libyuv/unit_test/scale_test.cc
similarity index 73%
rename from third-party/webrtc/dependencies/third_party/libyuv/unit_test/scale_test.cc
rename to third-party/libyuv/third_party/libyuv/unit_test/scale_test.cc
index d627af02d6..6da6b574d1 100644
--- a/third-party/webrtc/dependencies/third_party/libyuv/unit_test/scale_test.cc
+++ b/third-party/libyuv/third_party/libyuv/unit_test/scale_test.cc
@@ -142,6 +142,123 @@ static int I420TestFilter(int src_width,
return max_diff;
}
+// Test scaling with 8 bit C vs 12 bit C and return maximum pixel difference.
+// 0 = exact.
+static int I420TestFilter_12(int src_width,
+ int src_height,
+ int dst_width,
+ int dst_height,
+ FilterMode f,
+ int benchmark_iterations,
+ int disable_cpu_flags,
+ int benchmark_cpu_info) {
+ if (!SizeValid(src_width, src_height, dst_width, dst_height)) {
+ return 0;
+ }
+
+ int i;
+ int src_width_uv = (Abs(src_width) + 1) >> 1;
+ int src_height_uv = (Abs(src_height) + 1) >> 1;
+
+ int64_t src_y_plane_size = (Abs(src_width)) * (Abs(src_height));
+ int64_t src_uv_plane_size = (src_width_uv) * (src_height_uv);
+
+ int src_stride_y = Abs(src_width);
+ int src_stride_uv = src_width_uv;
+
+ align_buffer_page_end(src_y, src_y_plane_size);
+ align_buffer_page_end(src_u, src_uv_plane_size);
+ align_buffer_page_end(src_v, src_uv_plane_size);
+ align_buffer_page_end(src_y_12, src_y_plane_size * 2);
+ align_buffer_page_end(src_u_12, src_uv_plane_size * 2);
+ align_buffer_page_end(src_v_12, src_uv_plane_size * 2);
+ if (!src_y || !src_u || !src_v || !src_y_12 || !src_u_12 || !src_v_12) {
+ printf("Skipped. Alloc failed " FILELINESTR(__FILE__, __LINE__) "\n");
+ return 0;
+ }
+ uint16_t* p_src_y_12 = reinterpret_cast(src_y_12);
+ uint16_t* p_src_u_12 = reinterpret_cast(src_u_12);
+ uint16_t* p_src_v_12 = reinterpret_cast(src_v_12);
+
+ MemRandomize(src_y, src_y_plane_size);
+ MemRandomize(src_u, src_uv_plane_size);
+ MemRandomize(src_v, src_uv_plane_size);
+
+ for (i = 0; i < src_y_plane_size; ++i) {
+ p_src_y_12[i] = src_y[i];
+ }
+ for (i = 0; i < src_uv_plane_size; ++i) {
+ p_src_u_12[i] = src_u[i];
+ p_src_v_12[i] = src_v[i];
+ }
+
+ int dst_width_uv = (dst_width + 1) >> 1;
+ int dst_height_uv = (dst_height + 1) >> 1;
+
+ int dst_y_plane_size = (dst_width) * (dst_height);
+ int dst_uv_plane_size = (dst_width_uv) * (dst_height_uv);
+
+ int dst_stride_y = dst_width;
+ int dst_stride_uv = dst_width_uv;
+
+ align_buffer_page_end(dst_y_8, dst_y_plane_size);
+ align_buffer_page_end(dst_u_8, dst_uv_plane_size);
+ align_buffer_page_end(dst_v_8, dst_uv_plane_size);
+ align_buffer_page_end(dst_y_12, dst_y_plane_size * 2);
+ align_buffer_page_end(dst_u_12, dst_uv_plane_size * 2);
+ align_buffer_page_end(dst_v_12, dst_uv_plane_size * 2);
+
+ uint16_t* p_dst_y_12 = reinterpret_cast