From c0e6c6ecc8dc9d72cf003c77fd5abd77aaa44777 Mon Sep 17 00:00:00 2001 From: David Michael Barr Date: Mon, 25 Feb 2019 21:11:27 +0900 Subject: [PATCH] Wrong offset for the 10-bit Cr plane in CIEDE Adds doubling of Adiv2, missed while handling odd dimensions. --- tools/dump_ciede2000.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dump_ciede2000.py b/tools/dump_ciede2000.py index 388882c8..942b2942 100755 --- a/tools/dump_ciede2000.py +++ b/tools/dump_ciede2000.py @@ -26,7 +26,7 @@ def decode_y4m_buffer(frame): A, Adiv2, div2 = W * H, Hdiv2 * Wdiv2, (Hdiv2, Wdiv2) dtype, scale = 'uint8', 1. if C.endswith('p10'): - dtype, scale, A = 'uint16', 4., A * 2 + dtype, scale, A, Adiv2 = 'uint16', 4., A * 2, Adiv2 * 2 Y = (np.ndarray((H, W), dtype, buf) - 16. * scale) / (219. * scale) if C.startswith('420'): Cb = (np.ndarray(div2, dtype, buf, A) - 128. * scale) / (224. * scale)