Always use FrameEditor for Nexus 5 and Moto Z Play.

PiperOrigin-RevId: 435628703
This commit is contained in:
hschlueter 2022-03-18 14:10:07 +00:00 committed by Ian Baker
parent e476337dd5
commit 96f8771de0

View File

@ -101,7 +101,8 @@ import org.checkerframework.dataflow.qual.Pure;
if (transformationRequest.enableHdrEditing
|| inputFormat.height != encoderSupportedFormat.height
|| inputFormat.width != encoderSupportedFormat.width
|| scaleToFitFrameProcessor.shouldProcess()) {
|| scaleToFitFrameProcessor.shouldProcess()
|| shouldAlwaysUseFrameEditor()) {
frameEditor =
FrameEditor.create(
context,
@ -275,6 +276,17 @@ import org.checkerframework.dataflow.qual.Pure;
.build();
}
/** Always use {@link FrameEditor} to work around device-specific encoder issues. */
private static boolean shouldAlwaysUseFrameEditor() {
switch (Util.MODEL) {
case "XT1635-02":
case "Nexus 5":
return true;
default:
return false;
}
}
/**
* Feeds at most one decoder output frame to the next step of the pipeline.
*