update weights used in rgb to yuv conversion equations - #338
Conversation
0c280ea to
fa0e814
Compare
Display P3 color space is using bt601 equations. Updated these to use the ones derived using p3 primaries Test: ./ultrahdr_unit_test Change-Id: I9306fe13c4651c7d55a830d0597924a8d26d2745
|
Using BT.601 explicitly for JPEG and converting RGB directly to it avoids an extra conversion. Could that improvement be kept separate from changing how raw Display P3 YUV input is interpreted? The existing code uses BT.601 coefficients for P3 to match DataSpace. Changing those coefficients would appear to change the colors produced from existing inputs that follow that convention. Keeping the current behavior, or letting callers explicitly choose the conversion matrix, would avoid that compatibility problem. Tests covering existing P3 YUV inputs and JPEG encoding from both RGB and YUV would help check the full pipeline, beyond the updated matrix tests. The standard and NEON-optimized paths should also produce matching results within the expected rounding tolerance. |
Also simplify sdr rgb jpeg encoding.