Commit 27e71d2f by huangdarwin Committed by Rohit Singh

Transformer: Simplify EncoderWrapper rotationDegrees logic.

Small refactoring change to simplify the logic a tiny bit by removing one
unnecessary variable. No functional change intended.

PiperOrigin-RevId: 501566533
parent 8ccb8b64
...@@ -425,8 +425,7 @@ import org.checkerframework.dataflow.qual.Pure; ...@@ -425,8 +425,7 @@ import org.checkerframework.dataflow.qual.Pure;
// frame before encoding, so the encoded frame's width >= height, and sets // frame before encoding, so the encoded frame's width >= height, and sets
// rotationDegrees in the output Format to ensure the frame is displayed in the correct // rotationDegrees in the output Format to ensure the frame is displayed in the correct
// orientation. // orientation.
boolean flipOrientation = requestedWidth < requestedHeight; if (requestedWidth < requestedHeight) {
if (flipOrientation) {
int temp = requestedWidth; int temp = requestedWidth;
requestedWidth = requestedHeight; requestedWidth = requestedHeight;
requestedHeight = temp; requestedHeight = temp;
...@@ -477,7 +476,7 @@ import org.checkerframework.dataflow.qual.Pure; ...@@ -477,7 +476,7 @@ import org.checkerframework.dataflow.qual.Pure;
fallbackListener.onTransformationRequestFinalized( fallbackListener.onTransformationRequestFinalized(
createSupportedTransformationRequest( createSupportedTransformationRequest(
transformationRequest, transformationRequest,
/* hasOutputFormatRotation= */ flipOrientation, /* hasOutputFormatRotation= */ outputRotationDegrees != 0,
requestedEncoderFormat, requestedEncoderFormat,
encoderSupportedFormat, encoderSupportedFormat,
supportedFallbackHdrMode)); supportedFallbackHdrMode));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment