Format with google-java-format
This commit is contained in:
parent
f8d98861ea
commit
ee1b1500e2
@ -125,7 +125,7 @@ public final class ColorInfo implements Bundleable {
|
|||||||
/**
|
/**
|
||||||
* Sets the luma bit depth.
|
* Sets the luma bit depth.
|
||||||
*
|
*
|
||||||
* @param lumaBitdepth The lumaBitdepth. The default value is {@link Format#NO_VALUE}.
|
* @param lumaBitdepth The lumaBitdepth. The default value is {@link Format#NO_VALUE}.
|
||||||
* @return The builder.
|
* @return The builder.
|
||||||
*/
|
*/
|
||||||
@CanIgnoreReturnValue
|
@CanIgnoreReturnValue
|
||||||
@ -148,7 +148,8 @@ public final class ColorInfo implements Bundleable {
|
|||||||
|
|
||||||
/** Builds a new {@link ColorInfo} instance. */
|
/** Builds a new {@link ColorInfo} instance. */
|
||||||
public ColorInfo build() {
|
public ColorInfo build() {
|
||||||
return new ColorInfo(colorSpace, colorRange, colorTransfer, hdrStaticInfo, lumaBitdepth, chromaBitdepth);
|
return new ColorInfo(
|
||||||
|
colorSpace, colorRange, colorTransfer, hdrStaticInfo, lumaBitdepth, chromaBitdepth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,6 +246,7 @@ public final class ColorInfo implements Bundleable {
|
|||||||
|
|
||||||
/** The bit depth of the luma samples of the video. */
|
/** The bit depth of the luma samples of the video. */
|
||||||
public final int lumaBitdepth;
|
public final int lumaBitdepth;
|
||||||
|
|
||||||
/** The bit depth of the chroma samples of the video. It may differ from the luma bit depth. */
|
/** The bit depth of the chroma samples of the video. It may differ from the luma bit depth. */
|
||||||
public final int chromaBitdepth;
|
public final int chromaBitdepth;
|
||||||
|
|
||||||
@ -286,8 +288,8 @@ public final class ColorInfo implements Bundleable {
|
|||||||
/**
|
/**
|
||||||
* Returns whether this instance is valid.
|
* Returns whether this instance is valid.
|
||||||
*
|
*
|
||||||
* <p>This instance is valid if no color members are {@link Format#NO_VALUE},
|
* <p>This instance is valid if no color members are {@link Format#NO_VALUE}, while bit depths may
|
||||||
* while bit depths may be unset.
|
* be unset.
|
||||||
*/
|
*/
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
return colorSpace != Format.NO_VALUE
|
return colorSpace != Format.NO_VALUE
|
||||||
@ -318,8 +320,7 @@ public final class ColorInfo implements Bundleable {
|
|||||||
* <p>This instance has valid bitdepths if none of them is {@link Format#NO_VALUE}.
|
* <p>This instance has valid bitdepths if none of them is {@link Format#NO_VALUE}.
|
||||||
*/
|
*/
|
||||||
public boolean isBppValid() {
|
public boolean isBppValid() {
|
||||||
return lumaBitdepth != Format.NO_VALUE
|
return lumaBitdepth != Format.NO_VALUE && chromaBitdepth != Format.NO_VALUE;
|
||||||
&& chromaBitdepth != Format.NO_VALUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toBppString() {
|
public String toBppString() {
|
||||||
|
@ -189,8 +189,10 @@ public class DebugTextViewHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String getColorInfoString(@Nullable ColorInfo colorInfo) {
|
private static String getColorInfoString(@Nullable ColorInfo colorInfo) {
|
||||||
return colorInfo != null ? (colorInfo.isBppValid() ? " b:" + colorInfo.toBppString() : "")
|
return colorInfo != null
|
||||||
+ (colorInfo.isValid() ? " colr:" + colorInfo.toColorString() : "") : "";
|
? (colorInfo.isBppValid() ? " b:" + colorInfo.toBppString() : "")
|
||||||
|
+ (colorInfo.isValid() ? " colr:" + colorInfo.toColorString() : "")
|
||||||
|
: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getPixelAspectRatioString(float pixelAspectRatio) {
|
private static String getPixelAspectRatioString(float pixelAspectRatio) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user