Commit 181564e0 by huangdarwin Committed by christosts

Transformer: Make it clear that getExpectedColorInfo is input.

Otherwise, it's not clear if it's the expected output.

Renaming-only change. No functional change intended.

PiperOrigin-RevId: 505103740
parent 00436a04
...@@ -209,8 +209,8 @@ import java.util.concurrent.atomic.AtomicLong; ...@@ -209,8 +209,8 @@ import java.util.concurrent.atomic.AtomicLong;
} }
@Override @Override
public ColorInfo getExpectedColorInfo() { public ColorInfo getExpectedInputColorInfo() {
return sampleConsumer.getExpectedColorInfo(); return sampleConsumer.getExpectedInputColorInfo();
} }
@Override @Override
......
...@@ -68,7 +68,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -68,7 +68,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
protected void initDecoder(Format inputFormat) throws TransformationException { protected void initDecoder(Format inputFormat) throws TransformationException {
boolean isDecoderToneMappingRequired = boolean isDecoderToneMappingRequired =
ColorInfo.isTransferHdr(inputFormat.colorInfo) ColorInfo.isTransferHdr(inputFormat.colorInfo)
&& !ColorInfo.isTransferHdr(sampleConsumer.getExpectedColorInfo()); && !ColorInfo.isTransferHdr(sampleConsumer.getExpectedInputColorInfo());
decoder = decoder =
decoderFactory.createForVideoDecoding( decoderFactory.createForVideoDecoding(
inputFormat, inputFormat,
......
...@@ -81,7 +81,7 @@ public interface SampleConsumer { ...@@ -81,7 +81,7 @@ public interface SampleConsumer {
* *
* <p>Should only be used for raw video data. * <p>Should only be used for raw video data.
*/ */
default ColorInfo getExpectedColorInfo() { default ColorInfo getExpectedInputColorInfo() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -218,7 +218,7 @@ import org.checkerframework.dataflow.qual.Pure; ...@@ -218,7 +218,7 @@ import org.checkerframework.dataflow.qual.Pure;
} }
@Override @Override
public ColorInfo getExpectedColorInfo() { public ColorInfo getExpectedInputColorInfo() {
return frameProcessorInputColor; return frameProcessorInputColor;
} }
......
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