summaryrefslogtreecommitdiff
path: root/libs/jpegrecoverymap/recoverymapmath.cpp
diff options
context:
space:
mode:
author Nick Deakin <deakin@google.com> 2022-12-13 01:00:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-12-13 01:00:59 +0000
commit80a1dd74e8fe800cd9a855c3a4af32aec2eb642f (patch)
tree365f3a0cabb77b544fae1ebb0b930c9bcb071157 /libs/jpegrecoverymap/recoverymapmath.cpp
parent2b436dd3f14f6d62c0e39da8dfb35caf9a722638 (diff)
parent3812533636fe4d5327b99fb51198444912ab0e9f (diff)
Merge "A couple recoverymap fixes."
Diffstat (limited to 'libs/jpegrecoverymap/recoverymapmath.cpp')
-rw-r--r--libs/jpegrecoverymap/recoverymapmath.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/jpegrecoverymap/recoverymapmath.cpp b/libs/jpegrecoverymap/recoverymapmath.cpp
index e838f43b58..9ed2949509 100644
--- a/libs/jpegrecoverymap/recoverymapmath.cpp
+++ b/libs/jpegrecoverymap/recoverymapmath.cpp
@@ -336,9 +336,9 @@ Color getP010Pixel(jr_uncompressed_ptr image, size_t x, size_t y) {
>> 6;
// Conversions include taking narrow-range into account.
- return {{{ static_cast<float>(y_uint) / 940.0f,
- (static_cast<float>(u_uint) - 64.0f) / 940.0f - 0.5f,
- (static_cast<float>(v_uint) - 64.0f) / 940.0f - 0.5f }}};
+ return {{{ (static_cast<float>(y_uint) - 64.0f) / 876.0f,
+ (static_cast<float>(u_uint) - 64.0f) / 896.0f - 0.5f,
+ (static_cast<float>(v_uint) - 64.0f) / 896.0f - 0.5f }}};
}
typedef Color (*getPixelFn)(jr_uncompressed_ptr, size_t, size_t);