2019-10-03 02:31:26 +00:00
|
|
|
.class public Lcom/jpegkit/Jpeg;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "Jpeg.java"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Landroid/os/Parcelable;
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Landroid/os/Parcelable$Creator<",
|
|
|
|
"Lcom/jpegkit/Jpeg;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static final e:Ljava/lang/Object;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public d:Ljava/nio/ByteBuffer;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static constructor <clinit>()V
|
2019-10-03 02:31:26 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sput-object v0, Lcom/jpegkit/Jpeg;->e:Ljava/lang/Object;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
const-string v0, "jpegkit"
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v0, Lcom/jpegkit/Jpeg$a;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v0}, Lcom/jpegkit/Jpeg$a;-><init>()V
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
sput-object v0, Lcom/jpegkit/Jpeg;->CREATOR:Landroid/os/Parcelable$Creator;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public constructor <init>()V
|
2019-10-03 02:31:26 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>([B)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 0
|
|
|
|
.param p1 # [B
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p0, p1}, Lcom/jpegkit/Jpeg;->a([B)V
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniCrop(Ljava/nio/ByteBuffer;IIII)V
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniFlipHorizontal(Ljava/nio/ByteBuffer;)V
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniFlipVertical(Ljava/nio/ByteBuffer;)V
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniGetHeight(Ljava/nio/ByteBuffer;)I
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniGetJpegBytes(Ljava/nio/ByteBuffer;)[B
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniGetJpegSize(Ljava/nio/ByteBuffer;)J
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniGetWidth(Ljava/nio/ByteBuffer;)I
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniMount([B)Ljava/nio/ByteBuffer;
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniRelease(Ljava/nio/ByteBuffer;)V
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private native jniRotate(Ljava/nio/ByteBuffer;I)V
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public a(I)V
|
2019-10-03 02:31:26 +00:00
|
|
|
.locals 2
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v0, Lcom/jpegkit/Jpeg;->e:Ljava/lang/Object;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v1, p0, Lcom/jpegkit/Jpeg;->d:Ljava/nio/ByteBuffer;
|
2019-10-09 23:16:36 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {p0, v1, p1}, Lcom/jpegkit/Jpeg;->jniRotate(Ljava/nio/ByteBuffer;I)V
|
2019-10-09 23:16:36 +00:00
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
return-void
|
2019-10-09 23:16:36 +00:00
|
|
|
|
|
|
|
:catchall_0
|
2019-12-06 03:29:40 +00:00
|
|
|
move-exception p1
|
2019-10-09 23:16:36 +00:00
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
throw p1
|
2019-10-09 23:16:36 +00:00
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public a([B)V
|
|
|
|
.locals 1
|
2019-10-09 23:16:36 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v0, Lcom/jpegkit/Jpeg;->e:Ljava/lang/Object;
|
2019-10-09 23:16:36 +00:00
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/jpegkit/Jpeg;->jniMount([B)Ljava/nio/ByteBuffer;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/jpegkit/Jpeg;->d:Ljava/nio/ByteBuffer;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 01:29:57 +00:00
|
|
|
.method public describeContents()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-04-17 17:35:24 +00:00
|
|
|
.method public p()[B
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Lcom/jpegkit/Jpeg;->e:Ljava/lang/Object;
|
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v1, p0, Lcom/jpegkit/Jpeg;->d:Ljava/nio/ByteBuffer;
|
|
|
|
|
|
|
|
invoke-direct {p0, v1}, Lcom/jpegkit/Jpeg;->jniGetJpegBytes(Ljava/nio/ByteBuffer;)[B
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
2020-04-17 17:35:24 +00:00
|
|
|
.method public q()V
|
2019-10-03 02:31:26 +00:00
|
|
|
.locals 2
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v0, Lcom/jpegkit/Jpeg;->e:Ljava/lang/Object;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v1, p0, Lcom/jpegkit/Jpeg;->d:Ljava/nio/ByteBuffer;
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v1}, Lcom/jpegkit/Jpeg;->jniRelease(Ljava/nio/ByteBuffer;)V
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public writeToParcel(Landroid/os/Parcel;I)V
|
|
|
|
.locals 1
|
|
|
|
|
2020-04-17 17:35:24 +00:00
|
|
|
invoke-virtual {p0}, Lcom/jpegkit/Jpeg;->p()[B
|
2019-10-03 02:31:26 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
array-length v0, p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeByteArray([B)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|