a.smali
.class public final Lcom/tencent/liteav/beauty/b/a;
.super Lcom/tencent/liteav/videobase/a/b;
.source "SourceFile"
# interfaces
.implements Lcom/tencent/liteav/beauty/b/b;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/tencent/liteav/beauty/b/a$a;
}
.end annotation
# instance fields
.field private final a:Ljava/nio/FloatBuffer;
.field private final b:Ljava/nio/FloatBuffer;
.field private final c:Lcom/tencent/liteav/beauty/b/e;
.field private final d:Lcom/tencent/liteav/beauty/b/a$a;
.field private final e:Lcom/tencent/liteav/beauty/b/m;
.field private f:F
.field private g:F
.field private h:F
.field private i:F
# direct methods
.method public constructor <init>()V
.registers 3
.line 39
invoke-direct {p0}, Lcom/tencent/liteav/videobase/a/b;-><init>()V
const/4 v0, 0x0
.line 34
iput v0, p0, Lcom/tencent/liteav/beauty/b/a;->f:F
.line 35
iput v0, p0, Lcom/tencent/liteav/beauty/b/a;->g:F
.line 36
iput v0, p0, Lcom/tencent/liteav/beauty/b/a;->h:F
.line 37
iput v0, p0, Lcom/tencent/liteav/beauty/b/a;->i:F
.line 40
invoke-static {}, Lcom/tencent/liteav/videobase/utils/OpenGlUtils;->createNormalCubeVerticesBuffer()Ljava/nio/FloatBuffer;
move-result-object v0
iput-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->a:Ljava/nio/FloatBuffer;
.line 41
sget-object v0, Lcom/tencent/liteav/videobase/utils/Rotation;->a:Lcom/tencent/liteav/videobase/utils/Rotation;
const/4 v1, 0x0
.line 42
invoke-static {v0, v1, v1}, Lcom/tencent/liteav/videobase/utils/OpenGlUtils;->createTextureCoordsBuffer(Lcom/tencent/liteav/videobase/utils/Rotation;ZZ)Ljava/nio/FloatBuffer;
move-result-object v0
iput-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->b:Ljava/nio/FloatBuffer;
.line 43
new-instance v0, Lcom/tencent/liteav/beauty/b/e;
invoke-direct {v0}, Lcom/tencent/liteav/beauty/b/e;-><init>()V
iput-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->c:Lcom/tencent/liteav/beauty/b/e;
.line 44
new-instance v0, Lcom/tencent/liteav/beauty/b/a$a;
invoke-direct {v0}, Lcom/tencent/liteav/beauty/b/a$a;-><init>()V
iput-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
.line 45
new-instance v0, Lcom/tencent/liteav/beauty/b/m;
invoke-direct {v0}, Lcom/tencent/liteav/beauty/b/m;-><init>()V
iput-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->e:Lcom/tencent/liteav/beauty/b/m;
return-void
.end method
# virtual methods
.method public final a(F)V
.registers 11
.line 128
iput p1, p0, Lcom/tencent/liteav/beauty/b/a;->f:F
.line 129
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
.line 1174
iget v1, v0, Lcom/tencent/liteav/beauty/b/a$a;->a:I
const/high16 v2, 0x3f800000 # 1.0f
cmpl-float v3, p1, v2
if-lez v3, :cond_50
float-to-double v3, p1
const-wide/high16 v5, 0x4004000000000000L # 2.5
cmpg-double v5, v3, v5
const/high16 v6, 0x3fc00000 # 1.5f
if-gez v5, :cond_1d
sub-float/2addr p1, v2
div-float/2addr p1, v6
const v3, 0x40466666 # 3.1f
:goto_1a
mul-float/2addr p1, v3
:goto_1b
add-float/2addr p1, v2
goto :goto_4c
:cond_1d
const/high16 v2, 0x40800000 # 4.0f
cmpg-float v5, p1, v2
if-gez v5, :cond_2c
const/high16 v2, 0x40200000 # 2.5f
sub-float/2addr p1, v2
div-float/2addr p1, v6
const v2, 0x40833333 # 4.1f
mul-float/2addr p1, v6
goto :goto_1b
:cond_2c
const-wide/high16 v7, 0x4016000000000000L # 5.5
cmpg-double v5, v3, v7
if-gez v5, :cond_3b
sub-float/2addr p1, v2
div-float/2addr p1, v6
const v2, 0x40b33333 # 5.6f
const v3, 0x3f99999c # 1.2000003f
goto :goto_1a
:cond_3b
const-wide/high16 v7, 0x401c000000000000L # 7.0
cmpg-double v2, v3, v7
if-gtz v2, :cond_4c
const/high16 v2, 0x40b00000 # 5.5f
sub-float/2addr p1, v2
div-float/2addr p1, v6
const v2, 0x40d9999a # 6.8f
const v3, 0x3e4cccc0 # 0.19999981f
goto :goto_1a
:cond_4c
:goto_4c
const/high16 v2, 0x41200000 # 10.0f
div-float/2addr p1, v2
goto :goto_53
:cond_50
const p1, 0x3dcccccd # 0.1f
:goto_53
invoke-virtual {v0, v1, p1}, Lcom/tencent/liteav/beauty/b/a$a;->setFloatOnDraw(IF)V
return-void
.end method
.method public final b(F)V
.registers 5
.line 134
iput p1, p0, Lcom/tencent/liteav/beauty/b/a;->g:F
.line 135
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
.line 6178
iget v1, v0, Lcom/tencent/liteav/beauty/b/a$a;->b:I
const/high16 v2, 0x40400000 # 3.0f
div-float/2addr p1, v2
invoke-virtual {v0, v1, p1}, Lcom/tencent/liteav/beauty/b/a$a;->setFloatOnDraw(IF)V
return-void
.end method
.method public final c(F)V
.registers 5
.line 140
iput p1, p0, Lcom/tencent/liteav/beauty/b/a;->h:F
.line 141
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
.line 6182
iget v1, v0, Lcom/tencent/liteav/beauty/b/a$a;->c:I
const/high16 v2, 0x41200000 # 10.0f
div-float/2addr p1, v2
const/high16 v2, 0x40000000 # 2.0f
div-float/2addr p1, v2
invoke-virtual {v0, v1, p1}, Lcom/tencent/liteav/beauty/b/a$a;->setFloatOnDraw(IF)V
return-void
.end method
.method public final canBeSkipped()Z
.registers 2
.line 106
iget v0, p0, Lcom/tencent/liteav/beauty/b/a;->f:F
invoke-virtual {p0, v0}, Lcom/tencent/liteav/beauty/b/a;->isLessOrEqualZero(F)Z
move-result v0
if-eqz v0, :cond_22
iget v0, p0, Lcom/tencent/liteav/beauty/b/a;->g:F
invoke-virtual {p0, v0}, Lcom/tencent/liteav/beauty/b/a;->isLessOrEqualZero(F)Z
move-result v0
if-eqz v0, :cond_22
iget v0, p0, Lcom/tencent/liteav/beauty/b/a;->h:F
.line 107
invoke-virtual {p0, v0}, Lcom/tencent/liteav/beauty/b/a;->isLessOrEqualZero(F)Z
move-result v0
if-eqz v0, :cond_22
iget v0, p0, Lcom/tencent/liteav/beauty/b/a;->i:F
invoke-virtual {p0, v0}, Lcom/tencent/liteav/beauty/b/a;->isLessOrEqualZero(F)Z
move-result v0
if-eqz v0, :cond_22
const/4 v0, 0x1
return v0
:cond_22
const/4 v0, 0x0
return v0
.end method
.method public final d(F)V
.registers 3
const/high16 v0, 0x3fc00000 # 1.5f
div-float/2addr p1, v0
.line 146
iput p1, p0, Lcom/tencent/liteav/beauty/b/a;->i:F
.line 147
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->e:Lcom/tencent/liteav/beauty/b/m;
invoke-virtual {v0, p1}, Lcom/tencent/liteav/beauty/b/m;->a(F)V
return-void
.end method
.method public final onDraw(ILcom/tencent/liteav/videobase/frame/d;Ljava/nio/FloatBuffer;Ljava/nio/FloatBuffer;)V
.registers 11
.line 60
invoke-virtual {p0}, Lcom/tencent/liteav/beauty/b/a;->isInitialized()Z
move-result v0
if-nez v0, :cond_7
return-void
.line 63
:cond_7
invoke-virtual {p0}, Lcom/tencent/liteav/beauty/b/a;->runPendingOnDrawTasks()V
.line 67
iget v0, p0, Lcom/tencent/liteav/beauty/b/a;->f:F
const/4 v1, 0x0
cmpl-float v2, v0, v1
const/4 v3, 0x0
if-gtz v2, :cond_23
iget v2, p0, Lcom/tencent/liteav/beauty/b/a;->g:F
cmpl-float v2, v2, v1
if-gtz v2, :cond_23
iget v2, p0, Lcom/tencent/liteav/beauty/b/a;->h:F
cmpl-float v2, v2, v1
if-lez v2, :cond_1f
goto :goto_23
:cond_1f
move-object v0, p4
move-object p4, p3
move p3, p1
goto :goto_7a
:cond_23
:goto_23
cmpl-float v0, v0, v1
if-eqz v0, :cond_43
.line 70
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->mTexturePool:Lcom/tencent/liteav/videobase/frame/e;
iget-object v2, p0, Lcom/tencent/liteav/beauty/b/a;->mOutputSize:Lcom/tencent/liteav/base/util/Size;
iget v2, v2, Lcom/tencent/liteav/base/util/Size;->width:I
iget-object v3, p0, Lcom/tencent/liteav/beauty/b/a;->mOutputSize:Lcom/tencent/liteav/base/util/Size;
iget v3, v3, Lcom/tencent/liteav/base/util/Size;->height:I
invoke-virtual {v0, v2, v3}, Lcom/tencent/liteav/videobase/frame/e;->a(II)Lcom/tencent/liteav/videobase/frame/d;
move-result-object v3
.line 71
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->c:Lcom/tencent/liteav/beauty/b/e;
invoke-virtual {v0, p1, v3, p3, p4}, Lcom/tencent/liteav/beauty/b/e;->onDraw(ILcom/tencent/liteav/videobase/frame/d;Ljava/nio/FloatBuffer;Ljava/nio/FloatBuffer;)V
.line 73
invoke-virtual {v3}, Lcom/tencent/liteav/videobase/frame/d;->a()I
move-result p3
.line 74
iget-object p4, p0, Lcom/tencent/liteav/beauty/b/a;->a:Ljava/nio/FloatBuffer;
.line 75
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->b:Ljava/nio/FloatBuffer;
goto :goto_46
:cond_43
move-object v0, p4
move-object p4, p3
move p3, p1
.line 78
:goto_46
iget-object v2, p0, Lcom/tencent/liteav/beauty/b/a;->mTexturePool:Lcom/tencent/liteav/videobase/frame/e;
iget-object v4, p0, Lcom/tencent/liteav/beauty/b/a;->mOutputSize:Lcom/tencent/liteav/base/util/Size;
iget v4, v4, Lcom/tencent/liteav/base/util/Size;->width:I
iget-object v5, p0, Lcom/tencent/liteav/beauty/b/a;->mOutputSize:Lcom/tencent/liteav/base/util/Size;
iget v5, v5, Lcom/tencent/liteav/base/util/Size;->height:I
invoke-virtual {v2, v4, v5}, Lcom/tencent/liteav/videobase/frame/e;->a(II)Lcom/tencent/liteav/videobase/frame/d;
move-result-object v2
.line 79
iget-object v4, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
const-string v5, "inputImageTexture2"
.line 1048
invoke-virtual {v4, v5, p1}, Lcom/tencent/liteav/videobase/b/d;->a(Ljava/lang/String;I)V
.line 80
iget v4, p0, Lcom/tencent/liteav/beauty/b/a;->i:F
cmpl-float v4, v4, v1
if-lez v4, :cond_67
.line 81
iget-object v4, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
invoke-virtual {v4, p3, v2, p4, v0}, Lcom/tencent/liteav/beauty/b/a$a;->onDraw(ILcom/tencent/liteav/videobase/frame/d;Ljava/nio/FloatBuffer;Ljava/nio/FloatBuffer;)V
goto :goto_6c
.line 84
:cond_67
iget-object v4, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
invoke-virtual {v4, p3, p2, p4, v0}, Lcom/tencent/liteav/beauty/b/a$a;->onDraw(ILcom/tencent/liteav/videobase/frame/d;Ljava/nio/FloatBuffer;Ljava/nio/FloatBuffer;)V
.line 87
:goto_6c
invoke-virtual {v2}, Lcom/tencent/liteav/videobase/frame/d;->a()I
move-result p3
.line 88
iget-object p4, p0, Lcom/tencent/liteav/beauty/b/a;->a:Ljava/nio/FloatBuffer;
.line 89
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->b:Ljava/nio/FloatBuffer;
if-eqz v3, :cond_79
.line 91
invoke-virtual {v3}, Lcom/tencent/liteav/videobase/frame/d;->release()V
:cond_79
move-object v3, v2
.line 95
:goto_7a
iget v2, p0, Lcom/tencent/liteav/beauty/b/a;->i:F
cmpl-float v1, v2, v1
if-gtz v1, :cond_82
if-ne p3, p1, :cond_87
.line 96
:cond_82
iget-object p1, p0, Lcom/tencent/liteav/beauty/b/a;->e:Lcom/tencent/liteav/beauty/b/m;
invoke-virtual {p1, p3, p2, p4, v0}, Lcom/tencent/liteav/beauty/b/m;->onDraw(ILcom/tencent/liteav/videobase/frame/d;Ljava/nio/FloatBuffer;Ljava/nio/FloatBuffer;)V
:cond_87
if-eqz v3, :cond_8c
.line 100
invoke-virtual {v3}, Lcom/tencent/liteav/videobase/frame/d;->release()V
:cond_8c
return-void
.end method
.method public final onInit(Lcom/tencent/liteav/videobase/frame/e;)V
.registers 3
.line 50
invoke-super {p0, p1}, Lcom/tencent/liteav/videobase/a/b;->onInit(Lcom/tencent/liteav/videobase/frame/e;)V
.line 51
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->c:Lcom/tencent/liteav/beauty/b/e;
invoke-virtual {v0, p1}, Lcom/tencent/liteav/beauty/b/e;->initialize(Lcom/tencent/liteav/videobase/frame/e;)V
.line 52
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
invoke-virtual {v0, p1}, Lcom/tencent/liteav/beauty/b/a$a;->initialize(Lcom/tencent/liteav/videobase/frame/e;)V
.line 53
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->e:Lcom/tencent/liteav/beauty/b/m;
invoke-virtual {v0, p1}, Lcom/tencent/liteav/beauty/b/m;->initialize(Lcom/tencent/liteav/videobase/frame/e;)V
return-void
.end method
.method public final onOutputSizeChanged(II)V
.registers 4
.line 112
invoke-super {p0, p1, p2}, Lcom/tencent/liteav/videobase/a/b;->onOutputSizeChanged(II)V
.line 113
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
invoke-virtual {v0, p1, p2}, Lcom/tencent/liteav/beauty/b/a$a;->onOutputSizeChanged(II)V
.line 114
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->c:Lcom/tencent/liteav/beauty/b/e;
invoke-virtual {v0, p1, p2}, Lcom/tencent/liteav/beauty/b/e;->onOutputSizeChanged(II)V
.line 115
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->e:Lcom/tencent/liteav/beauty/b/m;
invoke-virtual {v0, p1, p2}, Lcom/tencent/liteav/beauty/b/m;->onOutputSizeChanged(II)V
return-void
.end method
.method public final onUninit()V
.registers 2
.line 120
invoke-super {p0}, Lcom/tencent/liteav/videobase/a/b;->onUninit()V
.line 121
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->d:Lcom/tencent/liteav/beauty/b/a$a;
invoke-virtual {v0}, Lcom/tencent/liteav/beauty/b/a$a;->uninitialize()V
.line 122
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->c:Lcom/tencent/liteav/beauty/b/e;
invoke-virtual {v0}, Lcom/tencent/liteav/beauty/b/e;->uninitialize()V
.line 123
iget-object v0, p0, Lcom/tencent/liteav/beauty/b/a;->e:Lcom/tencent/liteav/beauty/b/m;
invoke-virtual {v0}, Lcom/tencent/liteav/beauty/b/m;->uninitialize()V
return-void
.end method