Skip to content

Commit

Permalink
Update to 7.3.0 (2195)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrKLO committed Dec 23, 2020
1 parent 5a47056 commit d52b2c9
Show file tree
Hide file tree
Showing 4,526 changed files with 73,704 additions and 104,732 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM gradle:6.5.0-jdk8

ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
ENV ANDROID_API_LEVEL android-30
ENV ANDROID_BUILD_TOOLS_VERSION 30.0.2
ENV ANDROID_BUILD_TOOLS_VERSION 30.0.3
ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV ANDROID_NDK_VERSION 21.1.6352462
ENV ANDROID_VERSION 30
Expand Down
27 changes: 16 additions & 11 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ configurations {

configurations.all {
exclude group: 'com.google.firebase', module: 'firebase-core'
exclude group: 'androidx.recyclerview', module: 'recyclerview'
}

dependencies {
implementation 'androidx.core:core:1.3.2'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.1'
implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation "androidx.sharetarget:sharetarget:1.0.0"

compileOnly 'org.checkerframework:checker-qual:2.5.2'
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
implementation 'com.google.firebase:firebase-messaging:20.3.0'
implementation 'com.google.firebase:firebase-config:19.2.0'
implementation 'com.google.firebase:firebase-datatransport:17.0.8'
implementation 'com.google.firebase:firebase-messaging:21.0.1'
implementation 'com.google.firebase:firebase-config:20.0.2'
implementation 'com.google.firebase:firebase-datatransport:17.0.10'
implementation 'com.google.firebase:firebase-appindexing:19.1.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-auth:18.1.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.google.android.gms:play-services-vision:16.2.0'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'
Expand All @@ -40,12 +41,12 @@ dependencies {
implementation 'com.stripe:stripe-android:2.0.2'
implementation files('libs/libgsaverification-client.aar')

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
}

android {
compileSdkVersion 30
buildToolsVersion '30.0.2'
buildToolsVersion '30.0.3'
ndkVersion "21.1.6352462"

defaultConfig.applicationId = "org.telegram.messenger"
Expand Down Expand Up @@ -97,9 +98,11 @@ android {
jniDebuggable true
signingConfig signingConfigs.debug
applicationIdSuffix ".beta"
minifyEnabled true
minifyEnabled false
shrinkResources false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
}

/*debugAsan {
Expand Down Expand Up @@ -139,6 +142,7 @@ android {
minifyEnabled true
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
}

release {
Expand All @@ -149,6 +153,7 @@ android {
shrinkResources false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
}
}

Expand Down Expand Up @@ -285,7 +290,7 @@ android {
}
}

defaultConfig.versionCode = 2139
defaultConfig.versionCode = 2195

applicationVariants.all { variant ->
variant.outputs.all { output ->
Expand All @@ -303,8 +308,8 @@ android {

defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionName "7.2.1"
targetSdkVersion 29
versionName "7.3.0"

vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']

Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/config/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true"
android:supportsRtl="false"
android:requestLegacyExternalStorage="true"
tools:replace="android:supportsRtl">

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/config/debug/AndroidManifest_SDK23.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true"
android:supportsRtl="false"
android:requestLegacyExternalStorage="true"
tools:replace="android:supportsRtl">

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/config/release/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true"
android:supportsRtl="false"
android:requestLegacyExternalStorage="true"
tools:replace="android:supportsRtl">

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/config/release/AndroidManifest_SDK23.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true"
android:supportsRtl="false"
android:requestLegacyExternalStorage="true"
tools:replace="android:supportsRtl">

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />
Expand Down
5 changes: 3 additions & 2 deletions TMessagesProj/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ target_compile_definitions(sqlite PUBLIC
#voip
include(${CMAKE_HOME_DIRECTORY}/voip/CMakeLists.txt)

set(NATIVE_LIB "tmessages.34")
set(NATIVE_LIB "tmessages.35")

#tmessages
add_library(${NATIVE_LIB} SHARED
Expand Down Expand Up @@ -642,7 +642,8 @@ target_sources(${NATIVE_LIB} PRIVATE
third_party/libyuv/source/scale_neon64.cc
third_party/libyuv/source/scale_win.cc
third_party/libyuv/source/scale.cc
third_party/libyuv/source/video_common.cc)
third_party/libyuv/source/video_common.cc
third_party/libyuv/source/scale_uv.cc)

target_include_directories(${NATIVE_LIB} PUBLIC
opus/include
Expand Down
25 changes: 14 additions & 11 deletions TMessagesProj/jni/gifvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileDr
info->src = new char[len + 1];
memcpy(info->src, srcString, len);
info->src[len] = '\0';
if (srcString != 0) {
if (srcString != nullptr) {
env->ReleaseStringUTFChars(src, srcString);
}

Expand Down Expand Up @@ -364,7 +364,7 @@ extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileDr
dataArr[PARAM_NUM_WIDTH] = info->video_stream->codecpar->width;
dataArr[PARAM_NUM_HEIGHT] = info->video_stream->codecpar->height;
AVDictionaryEntry *rotate_tag = av_dict_get(info->video_stream->metadata, "rotate", NULL, 0);
if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0")) {
if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0") != 0) {
char *tail;
dataArr[PARAM_NUM_ROTATION] = (jint) av_strtod(rotate_tag->value, &tail);
if (*tail) {
Expand All @@ -373,7 +373,7 @@ extern "C" JNIEXPORT void JNICALL Java_org_telegram_ui_Components_AnimatedFileDr
} else {
dataArr[PARAM_NUM_ROTATION] = 0;
}
if (info->video_stream->codecpar->codec_id == AV_CODEC_ID_H264) {
if (info->video_stream->codecpar->codec_id == AV_CODEC_ID_H264 || info->video_stream->codecpar->codec_id == AV_CODEC_ID_HEVC) {
dataArr[PARAM_NUM_FRAMERATE] = (jint) av_q2d(info->video_stream->avg_frame_rate);
} else {
dataArr[PARAM_NUM_FRAMERATE] = (jint) av_q2d(info->video_stream->r_frame_rate);
Expand Down Expand Up @@ -605,34 +605,37 @@ static inline void writeFrameToBitmap(JNIEnv *env, VideoInfo *info, jintArray da
jint *dataArr = env->GetIntArrayElements(data, 0);
int32_t wantedWidth;
int32_t wantedHeight;

AndroidBitmapInfo bitmapInfo;
AndroidBitmap_getInfo(env, bitmap, &bitmapInfo);
int32_t bitmapWidth = bitmapInfo.width;
int32_t bitmapHeight = bitmapInfo.height;
if (dataArr != nullptr) {
wantedWidth = dataArr[0];
wantedHeight = dataArr[1];
dataArr[3] = (jint) (1000 * info->frame->best_effort_timestamp * av_q2d(info->video_stream->time_base));
env->ReleaseIntArrayElements(data, dataArr, 0);
} else {
AndroidBitmapInfo bitmapInfo;
AndroidBitmap_getInfo(env, bitmap, &bitmapInfo);
wantedWidth = bitmapInfo.width;
wantedHeight = bitmapInfo.height;
wantedWidth = bitmapWidth;
wantedHeight = bitmapHeight;
}

void *pixels;
if (AndroidBitmap_lockPixels(env, bitmap, &pixels) >= 0) {
if (wantedWidth == info->frame->width && wantedHeight == info->frame->height || wantedWidth == info->frame->height && wantedHeight == info->frame->width) {
if (info->sws_ctx == nullptr) {
if (info->frame->format > AV_PIX_FMT_NONE && info->frame->format < AV_PIX_FMT_NB) {
info->sws_ctx = sws_getContext(info->frame->width, info->frame->height, (AVPixelFormat) info->frame->format, info->frame->width, info->frame->height, AV_PIX_FMT_RGBA, SWS_BILINEAR, NULL, NULL, NULL);
info->sws_ctx = sws_getContext(info->frame->width, info->frame->height, (AVPixelFormat) info->frame->format, bitmapWidth, bitmapHeight, AV_PIX_FMT_RGBA, SWS_BILINEAR, NULL, NULL, NULL);
} else if (info->video_dec_ctx->pix_fmt > AV_PIX_FMT_NONE && info->video_dec_ctx->pix_fmt < AV_PIX_FMT_NB) {
info->sws_ctx = sws_getContext(info->video_dec_ctx->width, info->video_dec_ctx->height, info->video_dec_ctx->pix_fmt, info->video_dec_ctx->width, info->video_dec_ctx->height, AV_PIX_FMT_RGBA, SWS_BILINEAR, NULL, NULL, NULL);
info->sws_ctx = sws_getContext(info->video_dec_ctx->width, info->video_dec_ctx->height, info->video_dec_ctx->pix_fmt, bitmapWidth, bitmapHeight, AV_PIX_FMT_RGBA, SWS_BILINEAR, NULL, NULL, NULL);
}
}
if (info->sws_ctx == nullptr || ((intptr_t) pixels) % 16 != 0) {
if (info->frame->format == AV_PIX_FMT_YUV420P || info->frame->format == AV_PIX_FMT_YUVJ420P) {
if (info->frame->colorspace == AVColorSpace::AVCOL_SPC_BT709) {
libyuv::H420ToARGB(info->frame->data[0], info->frame->linesize[0], info->frame->data[2], info->frame->linesize[2], info->frame->data[1], info->frame->linesize[1], (uint8_t *) pixels, info->frame->width * 4, info->frame->width, info->frame->height);
libyuv::H420ToARGB(info->frame->data[0], info->frame->linesize[0], info->frame->data[2], info->frame->linesize[2], info->frame->data[1], info->frame->linesize[1], (uint8_t *) pixels, bitmapWidth * 4, bitmapWidth, bitmapHeight);
} else {
libyuv::I420ToARGB(info->frame->data[0], info->frame->linesize[0], info->frame->data[2], info->frame->linesize[2], info->frame->data[1], info->frame->linesize[1], (uint8_t *) pixels, info->frame->width * 4, info->frame->width, info->frame->height);
libyuv::I420ToARGB(info->frame->data[0], info->frame->linesize[0], info->frame->data[2], info->frame->linesize[2], info->frame->data[1], info->frame->linesize[1], (uint8_t *) pixels, bitmapWidth * 4, bitmapWidth, bitmapHeight);
}
} else if (info->frame->format == AV_PIX_FMT_BGRA) {
libyuv::ABGRToARGB(info->frame->data[0], info->frame->linesize[0], (uint8_t *) pixels, info->frame->width * 4, info->frame->width, info->frame->height);
Expand Down
2 changes: 1 addition & 1 deletion TMessagesProj/jni/tgnet/Handshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ inline bool factorizeValue(uint64_t what, uint32_t &p, uint32_t &q) {

inline bool check_prime(BIGNUM *p) {
int result = 0;
if (!BN_primality_test(&result, p, BN_prime_checks, bnContext, 0, NULL)) {
if (!BN_primality_test(&result, p, 64, bnContext, 0, NULL)) {
if (LOGS_ENABLED) DEBUG_E("OpenSSL error at BN_primality_test");
return false;
}
Expand Down
6 changes: 6 additions & 0 deletions TMessagesProj/jni/third_party/libvpx/source/libvpx/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Angie Chiang <angiebird@google.com>
Aron Rosenberg <arosenberg@logitech.com>
Attila Nagy <attilanagy@google.com>
Birk Magnussen <birk.magnussen@googlemail.com>
Brian Foley <bpfoley@google.com>
Brion Vibber <bvibber@wikimedia.org>
changjun.yang <changjun.yang@intel.com>
Charles 'Buck' Krasic <ckrasic@google.com>
Expand All @@ -33,6 +34,7 @@ Chi Yo Tsai <chiyotsai@google.com>
chm <chm@rock-chips.com>
Chris Cunningham <chcunningham@chromium.org>
Christian Duvivier <cduvivier@google.com>
Clement Courbet <courbet@google.com>
Daniele Castagna <dcastagna@chromium.org>
Daniel Kang <ddkang@google.com>
Dan Zhu <zxdan@google.com>
Expand Down Expand Up @@ -91,6 +93,7 @@ John Koleszar <jkoleszar@google.com>
Johnny Klonaris <google@jawknee.com>
John Stark <jhnstrk@gmail.com>
Jon Kunkee <jkunkee@microsoft.com>
Jorge E. Moreira <jemoreira@google.com>
Joshua Bleecher Snyder <josh@treelinelabs.com>
Joshua Litt <joshualitt@google.com>
Julia Robson <juliamrobson@gmail.com>
Expand Down Expand Up @@ -125,6 +128,7 @@ Mirko Bonadei <mbonadei@google.com>
Moriyoshi Koizumi <mozo@mozo.jp>
Morton Jonuschat <yabawock@gmail.com>
Nathan E. Egge <negge@mozilla.com>
Neil Birkbeck <neil.birkbeck@gmail.com>
Nico Weber <thakis@chromium.org>
Niveditha Rau <niveditha.rau@gmail.com>
Parag Salasakar <img.mips1@gmail.com>
Expand Down Expand Up @@ -165,6 +169,7 @@ Shimon Doodkin <helpmepro1@gmail.com>
Shiyou Yin <yinshiyou-hf@loongson.cn>
Shubham Tandle <shubham.tandle@ittiam.com>
Shunyao Li <shunyaoli@google.com>
Sreerenj Balachandran <bsreerenj@gmail.com>
Stefan Holmer <holmer@google.com>
Suman Sunkara <sunkaras@google.com>
Supradeep T R <supradeep.tr@ittiam.com>
Expand All @@ -185,6 +190,7 @@ Vignesh Venkatasubramanian <vigneshv@google.com>
Vitaly Buka <vitalybuka@chromium.org>
Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Wan-Teh Chang <wtc@google.com>
Wonkap Jang <wonkap@google.com>
xiwei gu <guxiwei-hf@loongson.cn>
Yaowu Xu <yaowu@google.com>
Yi Luo <luoyi@google.com>
Expand Down
24 changes: 24 additions & 0 deletions TMessagesProj/jni/third_party/libvpx/source/libvpx/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
2020-07-29 v1.9.0 "Quacking Duck"
This release adds support for NV12, a separate library for rate control, as
well as incremental improvements.

- Upgrading:
NV12 support is added to this release.
A new interface is added for VP9 rate control. The new library libvp9rc.a
must be linked by applications.
Googletest is updated to v1.10.0.
simple_encode.cc is compiled into a new library libsimple_encode.a with
CONFIG_RATE_CTRL.

- Enhancement:
Various changes to improve VP9 SVC, rate control, quality and speed to real
time encoding.

- Bug fixes:
Fix key frame update refresh simulcast flexible svc.
Fix to disable_16x16part speed feature for real time encoding.
Fix some signed integer overflows for VP9 rate control.
Fix initialization of delta_q_uv.
Fix condition in regulate_q for cyclic refresh.
Various fixes to dynamic resizing for VP9 SVC.

2019-12-09 v1.8.2 "Pekin Duck"
This release collects incremental improvements to many aspects of the library.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
URL: https://git.videolan.org/git/x264.git
Version: d23d18655249944c1ca894b451e2c82c7a584c62
Version: 3e5aed95cc470f37e2db3e6506a8deb89b527720
License: ISC
License File: LICENSE

Expand All @@ -12,10 +12,8 @@ Get configuration from vpx_config.asm.
Prefix functions with vpx by default.
Manage name mangling (prefixing with '_') manually because 'PREFIX' does not
exist in libvpx.
Expand PIC default to macho64 and respect CONFIG_PIC from libvpx
Set 'private_extern' visibility for macho targets.
Copy PIC 'GLOBAL' macros from x86_abi_support.asm
Use .text instead of .rodata on macho to avoid broken tables in PIC mode.
Use .text with no alignment for aout
Only use 'hidden' visibility with Chromium
Use .text with no alignment for aout.
Only use 'hidden' visibility with Chromium.
Prefix ARCH_* with VPX_.
Loading

0 comments on commit d52b2c9

Please sign in to comment.