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
This commit is contained in:
huangdarwin 2023-01-27 14:35:34 +00:00 committed by christosts
parent 00436a04a4
commit 181564e026
4 changed files with 5 additions and 5 deletions

View File

@ -209,8 +209,8 @@ import java.util.concurrent.atomic.AtomicLong;
}
@Override
public ColorInfo getExpectedColorInfo() {
return sampleConsumer.getExpectedColorInfo();
public ColorInfo getExpectedInputColorInfo() {
return sampleConsumer.getExpectedInputColorInfo();
}
@Override

View File

@ -68,7 +68,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
protected void initDecoder(Format inputFormat) throws TransformationException {
boolean isDecoderToneMappingRequired =
ColorInfo.isTransferHdr(inputFormat.colorInfo)
&& !ColorInfo.isTransferHdr(sampleConsumer.getExpectedColorInfo());
&& !ColorInfo.isTransferHdr(sampleConsumer.getExpectedInputColorInfo());
decoder =
decoderFactory.createForVideoDecoding(
inputFormat,

View File

@ -81,7 +81,7 @@ public interface SampleConsumer {
*
* <p>Should only be used for raw video data.
*/
default ColorInfo getExpectedColorInfo() {
default ColorInfo getExpectedInputColorInfo() {
throw new UnsupportedOperationException();
}

View File

@ -218,7 +218,7 @@ import org.checkerframework.dataflow.qual.Pure;
}
@Override
public ColorInfo getExpectedColorInfo() {
public ColorInfo getExpectedInputColorInfo() {
return frameProcessorInputColor;
}