Skip to content

update weights used in rgb to yuv conversion equations - #338

Open
ram-mohan wants to merge 2 commits into
google:mainfrom
ittiam-systems:csc
Open

update weights used in rgb to yuv conversion equations#338
ram-mohan wants to merge 2 commits into
google:mainfrom
ittiam-systems:csc

Conversation

@ram-mohan

Copy link
Copy Markdown
Contributor

Also simplify sdr rgb jpeg encoding.

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
@gregbenz

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants