package com.bumptech.glide.load.resource.bitmap;

import android.os.Build;
import ඓ.ῲ.K.ᕣ.C0850;

public abstract class DownsampleStrategy {

    /* renamed from: ʬ  reason: contains not printable characters */
    public static final DownsampleStrategy f2243 = new C0341();

    /* renamed from: ඓ  reason: contains not printable characters */
    public static final DownsampleStrategy f2244 = f2243;

    /* renamed from: ῲ  reason: contains not printable characters */
    public static final DownsampleStrategy f2245 = new C0342();

    /* renamed from: ⁱ  reason: contains not printable characters */
    public static final boolean f2246 = true;

    /* renamed from: K  reason: contains not printable characters */
    public static final DownsampleStrategy f2247 = new C0340();

    /* renamed from: 㴹  reason: contains not printable characters */
    public static final C0850<DownsampleStrategy> f2248 = C0850.m2469("com.bumptech.glide.load.resource.bitmap.Downsampler.DownsampleStrategy", f2244);

    /* renamed from: 㸾  reason: contains not printable characters */
    public static final DownsampleStrategy f2249 = new C0343();

    public enum SampleSizeRounding {
        MEMORY,
        QUALITY
    }

    /* renamed from: com.bumptech.glide.load.resource.bitmap.DownsampleStrategy$ʬ  reason: contains not printable characters */
    public static class C0340 extends DownsampleStrategy {
        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: ῲ  reason: contains not printable characters */
        public float m1319(int i, int i2, int i3, int i4) {
            if (DownsampleStrategy.f2246) {
                return Math.min(((float) i3) / ((float) i), ((float) i4) / ((float) i2));
            }
            int max = Math.max(i2 / i4, i / i3);
            if (max == 0) {
                return 1.0f;
            }
            return 1.0f / ((float) Integer.highestOneBit(max));
        }

        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: K  reason: contains not printable characters */
        public SampleSizeRounding m1320(int i, int i2, int i3, int i4) {
            if (DownsampleStrategy.f2246) {
                return SampleSizeRounding.QUALITY;
            }
            return SampleSizeRounding.MEMORY;
        }
    }

    /* renamed from: com.bumptech.glide.load.resource.bitmap.DownsampleStrategy$ῲ  reason: contains not printable characters */
    public static class C0341 extends DownsampleStrategy {
        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: ῲ  reason: contains not printable characters */
        public float m1321(int i, int i2, int i3, int i4) {
            return Math.max(((float) i3) / ((float) i), ((float) i4) / ((float) i2));
        }

        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: K  reason: contains not printable characters */
        public SampleSizeRounding m1322(int i, int i2, int i3, int i4) {
            return SampleSizeRounding.QUALITY;
        }
    }

    /* renamed from: com.bumptech.glide.load.resource.bitmap.DownsampleStrategy$K  reason: contains not printable characters */
    public static class C0342 extends DownsampleStrategy {
        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: ῲ  reason: contains not printable characters */
        public float m1323(int i, int i2, int i3, int i4) {
            return Math.min(1.0f, DownsampleStrategy.f2247.m1317(i, i2, i3, i4));
        }

        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: K  reason: contains not printable characters */
        public SampleSizeRounding m1324(int i, int i2, int i3, int i4) {
            if (m1323(i, i2, i3, i4) == 1.0f) {
                return SampleSizeRounding.QUALITY;
            }
            return DownsampleStrategy.f2247.m1318(i, i2, i3, i4);
        }
    }

    /* renamed from: com.bumptech.glide.load.resource.bitmap.DownsampleStrategy$㸾  reason: contains not printable characters */
    public static class C0343 extends DownsampleStrategy {
        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: ῲ  reason: contains not printable characters */
        public float m1325(int i, int i2, int i3, int i4) {
            return 1.0f;
        }

        @Override // com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
        /* renamed from: K  reason: contains not printable characters */
        public SampleSizeRounding m1326(int i, int i2, int i3, int i4) {
            return SampleSizeRounding.QUALITY;
        }
    }

    static {
        int i = Build.VERSION.SDK_INT;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public abstract float m1317(int i, int i2, int i3, int i4);

    /* renamed from: K  reason: contains not printable characters */
    public abstract SampleSizeRounding m1318(int i, int i2, int i3, int i4);
}
