Revert "Expose AV1 encoder&decoder from Android SDK."
This reverts commit fedd5029c584e9dc1352434b62a30cd8af2889d8. Reason for revert: Speculative revert due to crashes in downstream tests on Android. Original change's description: > Expose AV1 encoder&decoder from Android SDK. > > Bug: None > Change-Id: Ie32be36da498d4bed2a3cf51aa6abc8838e42da1 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212024 > Reviewed-by: Xavier Lepaul <xalep@webrtc.org> > Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com> > Cr-Commit-Position: refs/heads/master@{#33743} TBR=alessiob@webrtc.org,mflodman@webrtc.org,yura.yaroshevich@gmail.com,xalep@webrtc.org Change-Id: I76171087d1998b9d7573c2b86b1cf9ed65154bbf No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215324 Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33753}
This commit is contained in:
committed by
Commit Bot
parent
220a252de6
commit
dd36198ae8
@ -137,9 +137,9 @@ public class HardwareVideoEncoderFactory implements VideoEncoderFactory {
|
||||
|
||||
List<VideoCodecInfo> supportedCodecInfos = new ArrayList<VideoCodecInfo>();
|
||||
// Generate a list of supported codecs in order of preference:
|
||||
// VP8, VP9, H264 (high profile), H264 (baseline profile) and AV1.
|
||||
for (VideoCodecMimeType type : new VideoCodecMimeType[] {VideoCodecMimeType.VP8,
|
||||
VideoCodecMimeType.VP9, VideoCodecMimeType.H264, VideoCodecMimeType.AV1}) {
|
||||
// VP8, VP9, H264 (high profile), and H264 (baseline profile).
|
||||
for (VideoCodecMimeType type : new VideoCodecMimeType[] {
|
||||
VideoCodecMimeType.VP8, VideoCodecMimeType.VP9, VideoCodecMimeType.H264}) {
|
||||
MediaCodecInfo codec = findCodecForType(type);
|
||||
if (codec != null) {
|
||||
String name = type.name();
|
||||
@ -202,8 +202,6 @@ public class HardwareVideoEncoderFactory implements VideoEncoderFactory {
|
||||
return isHardwareSupportedInCurrentSdkVp9(info);
|
||||
case H264:
|
||||
return isHardwareSupportedInCurrentSdkH264(info);
|
||||
case AV1:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -250,7 +248,6 @@ public class HardwareVideoEncoderFactory implements VideoEncoderFactory {
|
||||
switch (type) {
|
||||
case VP8: // Fallthrough intended.
|
||||
case VP9:
|
||||
case AV1:
|
||||
return 100;
|
||||
case H264:
|
||||
return 20;
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
public class LibaomAv1Decoder extends WrappedNativeVideoDecoder {
|
||||
@Override
|
||||
public long createNativeVideoDecoder() {
|
||||
return nativeCreateDecoder();
|
||||
}
|
||||
|
||||
static native long nativeCreateDecoder();
|
||||
|
||||
static native boolean nativeIsSupported();
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
public class LibaomAv1Encoder extends WrappedNativeVideoEncoder {
|
||||
@Override
|
||||
public long createNativeVideoEncoder() {
|
||||
return nativeCreateEncoder();
|
||||
}
|
||||
|
||||
static native long nativeCreateEncoder();
|
||||
|
||||
@Override
|
||||
public boolean isHardwareEncoder() {
|
||||
return false;
|
||||
}
|
||||
|
||||
static native boolean nativeIsSupported();
|
||||
}
|
||||
@ -32,9 +32,6 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory {
|
||||
if (codecType.getName().equalsIgnoreCase("VP9") && LibvpxVp9Decoder.nativeIsSupported()) {
|
||||
return new LibvpxVp9Decoder();
|
||||
}
|
||||
if (codecType.getName().equalsIgnoreCase("AV1") && LibaomAv1Decoder.nativeIsSupported()) {
|
||||
return new LibaomAv1Decoder();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@ -51,9 +48,6 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory {
|
||||
if (LibvpxVp9Decoder.nativeIsSupported()) {
|
||||
codecs.add(new VideoCodecInfo("VP9", new HashMap<>()));
|
||||
}
|
||||
if (LibaomAv1Decoder.nativeIsSupported()) {
|
||||
codecs.add(new VideoCodecInfo("AV1", new HashMap<>()));
|
||||
}
|
||||
|
||||
return codecs.toArray(new VideoCodecInfo[codecs.size()]);
|
||||
}
|
||||
|
||||
@ -25,9 +25,6 @@ public class SoftwareVideoEncoderFactory implements VideoEncoderFactory {
|
||||
if (info.name.equalsIgnoreCase("VP9") && LibvpxVp9Encoder.nativeIsSupported()) {
|
||||
return new LibvpxVp9Encoder();
|
||||
}
|
||||
if (info.name.equalsIgnoreCase("AV1") && LibaomAv1Encoder.nativeIsSupported()) {
|
||||
return new LibaomAv1Encoder();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@ -44,9 +41,6 @@ public class SoftwareVideoEncoderFactory implements VideoEncoderFactory {
|
||||
if (LibvpxVp9Encoder.nativeIsSupported()) {
|
||||
codecs.add(new VideoCodecInfo("VP9", new HashMap<>()));
|
||||
}
|
||||
if (LibaomAv1Encoder.nativeIsSupported()) {
|
||||
codecs.add(new VideoCodecInfo("AV1", new HashMap<>()));
|
||||
}
|
||||
|
||||
return codecs.toArray(new VideoCodecInfo[codecs.size()]);
|
||||
}
|
||||
|
||||
@ -86,8 +86,6 @@ public interface VideoEncoder {
|
||||
|
||||
public class CodecSpecificInfoH264 extends CodecSpecificInfo {}
|
||||
|
||||
public class CodecSpecificInfoAV1 extends CodecSpecificInfo {}
|
||||
|
||||
/**
|
||||
* Represents bitrate allocated for an encoder to produce frames. Bitrate can be divided between
|
||||
* spatial and temporal layers.
|
||||
|
||||
Reference in New Issue
Block a user