package j5;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.ImageHeaderParser$ImageType;
import java.io.IOException;
import java.util.List;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final com.bumptech.glide.load.data.n f28695a;

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

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

    public v(List list, t5.l lVar, c5.b bVar) {
        this.f28696b = (c5.b) t5.n.checkNotNull(bVar);
        this.f28697c = (List) t5.n.checkNotNull(list);
        this.f28695a = new com.bumptech.glide.load.data.n(lVar, bVar);
    }

    @Override // j5.x
    public final int a() {
        com.bumptech.glide.load.resource.bitmap.a aVar = (com.bumptech.glide.load.resource.bitmap.a) this.f28695a.f5630b;
        aVar.reset();
        return a5.g.getOrientation((List<a5.c>) this.f28697c, aVar, this.f28696b);
    }

    @Override // j5.x
    public final void b() {
        com.bumptech.glide.load.resource.bitmap.a aVar = (com.bumptech.glide.load.resource.bitmap.a) this.f28695a.f5630b;
        synchronized (aVar) {
            aVar.f5816c = aVar.f5814a.length;
        }
    }

    @Override // j5.x
    public final ImageHeaderParser$ImageType c() {
        com.bumptech.glide.load.resource.bitmap.a aVar = (com.bumptech.glide.load.resource.bitmap.a) this.f28695a.f5630b;
        aVar.reset();
        return a5.g.getType(this.f28697c, aVar, this.f28696b);
    }

    @Override // j5.x
    @Nullable
    public Bitmap decodeBitmap(BitmapFactory.Options options) throws IOException {
        com.bumptech.glide.load.resource.bitmap.a aVar = (com.bumptech.glide.load.resource.bitmap.a) this.f28695a.f5630b;
        aVar.reset();
        return BitmapFactory.decodeStream(aVar, null, options);
    }
}
