package j5;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.ImageHeaderParser$ImageType;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;

/* JADX INFO: loaded from: classes.dex */
public final class u implements x {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final ByteBuffer f28692a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final List f28693b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final c5.b f28694c;

    public u(List list, ByteBuffer byteBuffer, c5.b bVar) {
        this.f28692a = byteBuffer;
        this.f28693b = list;
        this.f28694c = bVar;
    }

    @Override // j5.x
    public final int a() {
        AtomicReference atomicReference = t5.c.f32957a;
        return a5.g.getOrientation((List<a5.c>) this.f28693b, (ByteBuffer) this.f28692a.position(0), this.f28694c);
    }

    @Override // j5.x
    public final void b() {
    }

    @Override // j5.x
    public final ImageHeaderParser$ImageType c() {
        AtomicReference atomicReference = t5.c.f32957a;
        return a5.g.getType(this.f28693b, (ByteBuffer) this.f28692a.position(0));
    }

    @Override // j5.x
    @Nullable
    public Bitmap decodeBitmap(BitmapFactory.Options options) {
        AtomicReference atomicReference = t5.c.f32957a;
        return BitmapFactory.decodeStream(new t5.a((ByteBuffer) this.f28692a.position(0)), null, options);
    }
}
