mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Update METADATA to add clang-format
requirement for glsl files
also ran clang-format for good measure PiperOrigin-RevId: 600759938 (cherry picked from commit acc78125d20b3f36859ceb6099c99f0ec251b00d)
This commit is contained in:
parent
eda2080279
commit
b8ff9cd715
@ -20,6 +20,4 @@ precision mediump float;
|
||||
uniform sampler2D uTexSampler;
|
||||
varying vec2 vTexSamplingCoord;
|
||||
|
||||
void main() {
|
||||
gl_FragColor = texture2D(uTexSampler, vTexSamplingCoord);
|
||||
}
|
||||
void main() { gl_FragColor = texture2D(uTexSampler, vTexSamplingCoord); }
|
||||
|
@ -182,14 +182,15 @@ highp vec3 applyPqBt2020ToBt709Ootf(highp vec3 linearRgbBt2020) {
|
||||
} else if (nits < x2) {
|
||||
// Scale [x1, x2] to [y1, y2] using Hermite interpolation.
|
||||
float t = (nits - x1) / h12;
|
||||
nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t)
|
||||
+ (y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t;
|
||||
nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t) +
|
||||
(y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t;
|
||||
} else {
|
||||
// Scale [x2, maxInputLuminance] to [y2, maxOutputLuminance] using
|
||||
// Hermite interpolation.
|
||||
float t = (nits - x2) / h23;
|
||||
nits = (y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t)
|
||||
+ (maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t;
|
||||
nits =
|
||||
(y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t) +
|
||||
(maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t;
|
||||
}
|
||||
|
||||
// color.y is greater than 0 and is thus non-zero.
|
||||
|
@ -174,14 +174,15 @@ highp vec3 applyPqBt2020ToBt709Ootf(highp vec3 linearRgbBt2020) {
|
||||
} else if (nits < x2) {
|
||||
// Scale [x1, x2] to [y1, y2] using Hermite interpolation.
|
||||
float t = (nits - x1) / h12;
|
||||
nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t)
|
||||
+ (y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t;
|
||||
nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t) +
|
||||
(y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t;
|
||||
} else {
|
||||
// Scale [x2, maxInputLuminance] to [y2, maxOutputLuminance] using
|
||||
// Hermite interpolation.
|
||||
float t = (nits - x2) / h23;
|
||||
nits = (y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t)
|
||||
+ (maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t;
|
||||
nits =
|
||||
(y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t) +
|
||||
(maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t;
|
||||
}
|
||||
|
||||
// color.y is greater than 0 and is thus non-zero.
|
||||
|
Loading…
x
Reference in New Issue
Block a user