Skip to content

Commit

Permalink
Update to 3.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DrKLO committed Jun 24, 2016
1 parent f563fbb commit 55463a9
Show file tree
Hide file tree
Showing 459 changed files with 56,943 additions and 10,555 deletions.
12 changes: 6 additions & 6 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ repositories {
}

dependencies {
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:support-v4:23.4.0'
compile "com.google.android.gms:play-services-gcm:8.4.0"
compile "com.google.android.gms:play-services-maps:8.4.0"
compile 'net.hockeyapp.android:HockeySDK:4.0.+'
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
compile 'net.hockeyapp.android:HockeySDK:4.0.1'
compile 'com.googlecode.mp4parser:isoparser:1.0.6'
}

android {
Expand Down Expand Up @@ -63,7 +63,7 @@ android {
}
}

defaultConfig.versionCode = 803
defaultConfig.versionCode = 821

sourceSets.main {
jniLibs.srcDir 'libs'
Expand Down Expand Up @@ -112,9 +112,9 @@ android {
}

defaultConfig {
minSdkVersion 9
minSdkVersion 14
targetSdkVersion 23
versionName "3.9.0"
versionName "3.10.1"
}
}

Expand Down
17 changes: 17 additions & 0 deletions TMessagesProj/config/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.telegram.messenger"
android:installLocation="auto">

Expand Down Expand Up @@ -62,6 +63,22 @@

<uses-library android:name="com.google.android.maps" android:required="false"/>


<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="false">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
</receiver>

<service
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="false"
android:exported="false" />

</application>

</manifest>
16 changes: 16 additions & 0 deletions TMessagesProj/config/release/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.telegram.messenger"
android:installLocation="auto">

Expand Down Expand Up @@ -62,6 +63,21 @@

<uses-library android:name="com.google.android.maps" android:required="false"/>

<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="false">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
</receiver>

<service
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="false"
android:exported="false" />

</application>

</manifest>
26 changes: 0 additions & 26 deletions TMessagesProj/google-services.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,9 @@
"oauth_client": [],
"api_key": [],
"services": {
"analytics_service": {
"status": 1
},
"cloud_messaging_service": {
"status": 2,
"apns_config": []
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"google_signin_service": {
"status": 1
},
"ads_service": {
"status": 1
}
}
},
Expand All @@ -50,22 +37,9 @@
"oauth_client": [],
"api_key": [],
"services": {
"analytics_service": {
"status": 1
},
"cloud_messaging_service": {
"status": 2,
"apns_config": []
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"google_signin_service": {
"status": 1
},
"ads_service": {
"status": 1
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions TMessagesProj/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ else

else
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_CPPFLAGS += -Dx86fix
LOCAL_CFLAGS += -Dx86fix
LOCAL_ARM_MODE := arm
LOCAL_SRC_FILE += \
./libyuv/source/row_x86.asm
Expand Down
6 changes: 2 additions & 4 deletions TMessagesProj/jni/libyuv/include/libyuv/convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
#define INCLUDE_LIBYUV_CONVERT_H_

#include "libyuv/basic_types.h"
// TODO(fbarchard): Remove the following headers includes.
#include "libyuv/convert_from.h"
#include "libyuv/planar_functions.h"
#include "libyuv/rotate.h"

#include "libyuv/rotate.h" // For enum RotationMode.

#ifdef __cplusplus
namespace libyuv {
Expand Down
6 changes: 2 additions & 4 deletions TMessagesProj/jni/libyuv/include/libyuv/convert_argb.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
#define INCLUDE_LIBYUV_CONVERT_ARGB_H_

#include "libyuv/basic_types.h"
// TODO(fbarchard): Remove the following headers includes
#include "libyuv/convert_from.h"
#include "libyuv/planar_functions.h"
#include "libyuv/rotate.h"

#include "libyuv/rotate.h" // For enum RotationMode.

// TODO(fbarchard): This set of functions should exactly match convert.h
// TODO(fbarchard): Add tests. Create random content of right size and convert
Expand Down
2 changes: 0 additions & 2 deletions TMessagesProj/jni/libyuv/include/libyuv/convert_from.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ int I400Copy(const uint8* src_y, int src_stride_y,
uint8* dst_y, int dst_stride_y,
int width, int height);

// TODO(fbarchard): I420ToM420

LIBYUV_API
int I420ToNV12(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
Expand Down
2 changes: 1 addition & 1 deletion TMessagesProj/jni/libyuv/include/libyuv/cpu_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static __inline int TestCpuFlag(int test_flag) {
// For testing, allow CPU flags to be disabled.
// ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3.
// MaskCpuFlags(-1) to enable all cpu specific optimizations.
// MaskCpuFlags(0) to disable all cpu specific optimizations.
// MaskCpuFlags(1) to disable all cpu specific optimizations.
LIBYUV_API
void MaskCpuFlags(int enable_flags);

Expand Down
6 changes: 6 additions & 0 deletions TMessagesProj/jni/libyuv/include/libyuv/planar_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ int ARGBCopyAlpha(const uint8* src_argb, int src_stride_argb,
uint8* dst_argb, int dst_stride_argb,
int width, int height);

// Extract the alpha channel from ARGB.
LIBYUV_API
int ARGBExtractAlpha(const uint8* src_argb, int src_stride_argb,
uint8* dst_a, int dst_stride_a,
int width, int height);

// Copy Y channel to Alpha of ARGB.
LIBYUV_API
int ARGBCopyYToAlpha(const uint8* src_y, int src_stride_y,
Expand Down
15 changes: 12 additions & 3 deletions TMessagesProj/jni/libyuv/include/libyuv/row.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ extern "C" {
#define HAS_ARGBTOUVROW_SSSE3
#define HAS_ARGBTOYJROW_SSSE3
#define HAS_ARGBTOYROW_SSSE3
#define HAS_ARGBEXTRACTALPHAROW_SSE2
#define HAS_BGRATOUVROW_SSSE3
#define HAS_BGRATOYROW_SSSE3
#define HAS_COPYROW_ERMS
Expand Down Expand Up @@ -179,8 +180,7 @@ extern "C" {

// The following functions fail on gcc/clang 32 bit with fpic and framepointer.
// caveat: clangcl uses row_win.cc which works.
#if defined(NDEBUG) || !(defined(_DEBUG) && defined(__i386__)) || \
!defined(__i386__) || defined(_MSC_VER)
#if !defined(x86fix)
// TODO(fbarchard): fix build error on x86 debug
// https://code.google.com/p/libyuv/issues/detail?id=524
#define HAS_I411TOARGBROW_SSSE3
Expand Down Expand Up @@ -208,7 +208,7 @@ extern "C" {
#define HAS_COPYROW_AVX
#define HAS_H422TOARGBROW_AVX2
#define HAS_I400TOARGBROW_AVX2
#if !(defined(_DEBUG) && defined(__i386__))
#if !defined(x86fix)
// TODO(fbarchard): fix build error on android_full_debug=1
// https://code.google.com/p/libyuv/issues/detail?id=517
#define HAS_I422ALPHATOARGBROW_AVX2
Expand Down Expand Up @@ -291,6 +291,7 @@ extern "C" {
#define HAS_ARGBTOUVROW_NEON
#define HAS_ARGBTOYJROW_NEON
#define HAS_ARGBTOYROW_NEON
#define HAS_ARGBEXTRACTALPHAROW_NEON
#define HAS_BGRATOUVROW_NEON
#define HAS_BGRATOYROW_NEON
#define HAS_COPYROW_NEON
Expand Down Expand Up @@ -877,6 +878,14 @@ void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
int width);

void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width);
void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width);
void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width);
void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_a,
int width);
void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, uint8* dst_a,
int width);

void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width);
void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
Expand Down
2 changes: 1 addition & 1 deletion TMessagesProj/jni/libyuv/include/libyuv/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_

#define LIBYUV_VERSION 1586
#define LIBYUV_VERSION 1597

#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
1 change: 1 addition & 0 deletions TMessagesProj/jni/libyuv/source/convert_argb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#ifdef HAVE_JPEG
#include "libyuv/mjpeg_decoder.h"
#endif
#include "libyuv/planar_functions.h" // For CopyPlane and ARGBShuffle.
#include "libyuv/rotate_argb.h"
#include "libyuv/row.h"
#include "libyuv/video_common.h"
Expand Down
1 change: 0 additions & 1 deletion TMessagesProj/jni/libyuv/source/convert_from.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,6 @@ int ConvertFromI420(const uint8* y, int y_stride,
// Triplanar formats
// TODO(fbarchard): halfstride instead of halfwidth
case FOURCC_I420:
case FOURCC_YU12:
case FOURCC_YV12: {
int halfwidth = (width + 1) / 2;
int halfheight = (height + 1) / 2;
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/jni/libyuv/source/convert_jpeg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

#include "libyuv/convert.h"
#include "libyuv/convert_argb.h"

#ifdef HAVE_JPEG
#include "libyuv/mjpeg_decoder.h"
Expand Down
1 change: 0 additions & 1 deletion TMessagesProj/jni/libyuv/source/convert_to_argb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ int ConvertToARGB(const uint8* sample, size_t sample_size,
break;
// Triplanar formats
case FOURCC_I420:
case FOURCC_YU12:
case FOURCC_YV12: {
const uint8* src_y = sample + (src_width * crop_y + crop_x);
const uint8* src_u;
Expand Down
14 changes: 6 additions & 8 deletions TMessagesProj/jni/libyuv/source/convert_to_i420.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,28 @@ int ConvertToI420(const uint8* sample,
int aligned_src_width = (src_width + 1) & ~1;
const uint8* src;
const uint8* src_uv;
int abs_src_height = (src_height < 0) ? -src_height : src_height;
int inv_crop_height = (crop_height < 0) ? -crop_height : crop_height;
const int abs_src_height = (src_height < 0) ? -src_height : src_height;
// TODO(nisse): Why allow crop_height < 0?
const int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height;
int r = 0;
LIBYUV_BOOL need_buf = (rotation && format != FOURCC_I420 &&
format != FOURCC_NV12 && format != FOURCC_NV21 &&
format != FOURCC_YU12 && format != FOURCC_YV12) || y == sample;
format != FOURCC_YV12) || y == sample;
uint8* tmp_y = y;
uint8* tmp_u = u;
uint8* tmp_v = v;
int tmp_y_stride = y_stride;
int tmp_u_stride = u_stride;
int tmp_v_stride = v_stride;
uint8* rotate_buffer = NULL;
int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height;
const int inv_crop_height =
(src_height < 0) ? -abs_crop_height : abs_crop_height;

if (!y || !u || !v || !sample ||
src_width <= 0 || crop_width <= 0 ||
src_height == 0 || crop_height == 0) {
return -1;
}
if (src_height < 0) {
inv_crop_height = -inv_crop_height;
}

// One pass rotation is available for some formats. For the rest, convert
// to I420 (with optional vertical flipping) into a temporary I420 buffer,
Expand Down Expand Up @@ -214,7 +213,6 @@ int ConvertToI420(const uint8* sample,
break;
// Triplanar formats
case FOURCC_I420:
case FOURCC_YU12:
case FOURCC_YV12: {
const uint8* src_y = sample + (src_width * crop_y + crop_x);
const uint8* src_u;
Expand Down
43 changes: 43 additions & 0 deletions TMessagesProj/jni/libyuv/source/planar_functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2374,6 +2374,49 @@ int ARGBCopyAlpha(const uint8* src_argb, int src_stride_argb,
return 0;
}

// Extract just the alpha channel from ARGB.
LIBYUV_API
int ARGBExtractAlpha(const uint8* src_argb, int src_stride,
uint8* dst_a, int dst_stride,
int width, int height) {
if (!src_argb || !dst_a || width <= 0 || height == 0) {
return -1;
}
// Negative height means invert the image.
if (height < 0) {
height = -height;
src_argb += (height - 1) * src_stride;
src_stride = -src_stride;
}
// Coalesce rows.
if (src_stride == width * 4 && dst_stride == width) {
width *= height;
height = 1;
src_stride = dst_stride = 0;
}
void (*ARGBExtractAlphaRow)(const uint8 *src_argb, uint8 *dst_a, int width) =
ARGBExtractAlphaRow_C;
#if defined(HAS_ARGBEXTRACTALPHAROW_SSE2)
if (TestCpuFlag(kCpuHasSSE2)) {
ARGBExtractAlphaRow = IS_ALIGNED(width, 8) ? ARGBExtractAlphaRow_SSE2
: ARGBExtractAlphaRow_Any_SSE2;
}
#endif
#if defined(HAS_ARGBEXTRACTALPHAROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_NEON
: ARGBExtractAlphaRow_Any_NEON;
}
#endif

for (int y = 0; y < height; ++y) {
ARGBExtractAlphaRow(src_argb, dst_a, width);
src_argb += src_stride;
dst_a += dst_stride;
}
return 0;
}

// Copy a planar Y channel to the alpha channel of a destination ARGB image.
LIBYUV_API
int ARGBCopyYToAlpha(const uint8* src_y, int src_stride_y,
Expand Down
Loading

0 comments on commit 55463a9

Please sign in to comment.