Remove row VP9 multi-threading option

PiperOrigin-RevId: 283319944
This commit is contained in:
andrewlewis 2019-12-02 13:10:01 +00:00 committed by Oliver Woodman
parent 8e44e3b795
commit 78e72abbc4
2 changed files with 7 additions and 21 deletions

View File

@ -68,7 +68,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
*/
private static final int DEFAULT_INPUT_BUFFER_SIZE = 768 * 1024;
private final boolean enableRowMultiThreadMode;
private final int threads;
@Nullable private VpxDecoder decoder;
@ -121,8 +120,8 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
* permitted to play clear regions of encrypted media files before {@code drmSessionManager}
* has obtained the keys necessary to decrypt encrypted regions of the media.
* @deprecated Use {@link #LibvpxVideoRenderer(long, Handler, VideoRendererEventListener, int,
* boolean, int, int, int)}} instead, and pass DRM-related parameters to the {@link
* MediaSource} factories.
* int, int, int)}} instead, and pass DRM-related parameters to the {@link MediaSource}
* factories.
*/
@Deprecated
@SuppressWarnings("deprecation")
@ -140,7 +139,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
maxDroppedFramesToNotify,
drmSessionManager,
playClearSamplesWithoutKeys,
/* enableRowMultiThreadMode= */ false,
getRuntime().availableProcessors(),
/* numInputBuffers= */ 4,
/* numOutputBuffers= */ 4);
@ -154,7 +152,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
* invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param threads Number of threads libvpx will use to decode.
* @param numInputBuffers Number of input buffers.
* @param numOutputBuffers Number of output buffers.
@ -165,7 +162,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
@Nullable Handler eventHandler,
@Nullable VideoRendererEventListener eventListener,
int maxDroppedFramesToNotify,
boolean enableRowMultiThreadMode,
int threads,
int numInputBuffers,
int numOutputBuffers) {
@ -176,7 +172,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
maxDroppedFramesToNotify,
/* drmSessionManager= */ null,
/* playClearSamplesWithoutKeys= */ false,
enableRowMultiThreadMode,
threads,
numInputBuffers,
numOutputBuffers);
@ -197,13 +192,12 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
* begin in parallel with key acquisition. This parameter specifies whether the renderer is
* permitted to play clear regions of encrypted media files before {@code drmSessionManager}
* has obtained the keys necessary to decrypt encrypted regions of the media.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param threads Number of threads libvpx will use to decode.
* @param numInputBuffers Number of input buffers.
* @param numOutputBuffers Number of output buffers.
* @deprecated Use {@link #LibvpxVideoRenderer(long, Handler, VideoRendererEventListener, int,
* boolean, int, int, int)}} instead, and pass DRM-related parameters to the {@link
* MediaSource} factories.
* int, int, int)}} instead, and pass DRM-related parameters to the {@link MediaSource}
* factories.
*/
@Deprecated
public LibvpxVideoRenderer(
@ -213,7 +207,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
int maxDroppedFramesToNotify,
@Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
boolean playClearSamplesWithoutKeys,
boolean enableRowMultiThreadMode,
int threads,
int numInputBuffers,
int numOutputBuffers) {
@ -224,7 +217,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
maxDroppedFramesToNotify,
drmSessionManager,
playClearSamplesWithoutKeys);
this.enableRowMultiThreadMode = enableRowMultiThreadMode;
this.threads = threads;
this.numInputBuffers = numInputBuffers;
this.numOutputBuffers = numOutputBuffers;
@ -259,12 +251,7 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
format.maxInputSize != Format.NO_VALUE ? format.maxInputSize : DEFAULT_INPUT_BUFFER_SIZE;
VpxDecoder decoder =
new VpxDecoder(
numInputBuffers,
numOutputBuffers,
initialInputBufferSize,
mediaCrypto,
enableRowMultiThreadMode,
threads);
numInputBuffers, numOutputBuffers, initialInputBufferSize, mediaCrypto, threads);
this.decoder = decoder;
TraceUtil.endSection();
return decoder;

View File

@ -53,7 +53,6 @@ import java.nio.ByteBuffer;
* @param initialInputBufferSize The initial size of each input buffer.
* @param exoMediaCrypto The {@link ExoMediaCrypto} object required for decoding encrypted
* content. Maybe null and can be ignored if decoder does not handle encrypted content.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param threads Number of threads libvpx will use to decode.
* @throws VpxDecoderException Thrown if an exception occurs when initializing the decoder.
*/
@ -62,7 +61,6 @@ import java.nio.ByteBuffer;
int numOutputBuffers,
int initialInputBufferSize,
@Nullable ExoMediaCrypto exoMediaCrypto,
boolean enableRowMultiThreadMode,
int threads)
throws VpxDecoderException {
super(
@ -75,7 +73,8 @@ import java.nio.ByteBuffer;
if (exoMediaCrypto != null && !VpxLibrary.vpxIsSecureDecodeSupported()) {
throw new VpxDecoderException("Vpx decoder does not support secure decode.");
}
vpxDecContext = vpxInit(/* disableLoopFilter= */ false, enableRowMultiThreadMode, threads);
vpxDecContext =
vpxInit(/* disableLoopFilter= */ false, /* enableRowMultiThreadMode= */ false, threads);
if (vpxDecContext == 0) {
throw new VpxDecoderException("Failed to initialize decoder");
}