Repository navigation
vc4/kms: vc4_plane: Support 2020 colourspace for yuv planes - #4276
Conversation
https://github.com/gist.github.com/popcornmix/6b3e23103c60170b02b148e0ba5d6ed7 is the script used to generate the 601, 709 and 2020 colourspaces. I've regenetated the existing ones using script so it is reprocable but there are lsb dfferences compared to values here (copied from spec) whose origin is now lost. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
6fb53aa to
f93699f
Compare
|
Some positive reports e.g. https://forum.libreelec.tv/thread/23442-rpi4-testbuild-with-hdr-support/?postID=153971#post153971 Spec mentions: and: Using CSC2 9:0, coef_cb_blu = 0x1C5 = 1 + 0xc5/0x100 = 1.76953125 (off by 0.0025) So how did the spec calculate the fractional parts, 0xc5 and 0x67? The coef_cb_blu fractional part comes from 0.772 * 0x100 = 197.632 which is 0xc5 when truncated and 0xc6 when rounded So it looks like spec truncated for coef_cb_blu and rounded for coef_cr_red. Or perhaps rounded for both but used a coefficient with less precision. The script produces the rounded version for both. I think changing them to a reproducible value makes sense. |
|
This is a low risk patch, and if Hias is happy then so am I. |
|
Although:
It's not clear whether this patch is the "changing" or if another change is pending. |
|
The script and values in this PR use rounded coefficients: The previous values (which came from spec) seem to have inconsistent rounding. |
|
So for |
|
@mripard This is another piece needed for correct HDR output upstream. |
|
FYI: noggin checked with an HDMI grabber and verified that the colors are correct https://forum.libreelec.tv/thread/23442-rpi4-testbuild-with-hdr-support/?postID=154099#post154099 - thanks a lot @popcornmix, great work! |
kernel: Update Allo Piano Plus DAC driver See: raspberrypi/linux#4258 kernel: sc16is7xx: Defer probe if device read fails See: raspberrypi/linux#4272 kernel: Codec Fixes for the tlv320aic32x4 codec on 5.10 See: raspberrypi/linux#4273 kernel: HDR improvements See: raspberrypi/linux#4268 kernel: staging: vcsm-cma: Fix memory leak from not detaching dmabuf See: raspberrypi/linux#4277 kernel: vc4/kms: vc4_plane: Support 2020 colourspace for yuv planes See: raspberrypi/linux#4276 kernel: Prevent A4tech FHD 1080p webcams from being suspended automatically See: raspberrypi/linux#4283 kernel: overlays: ghost-amp: Add DAC mute control
kernel: Update Allo Piano Plus DAC driver See: raspberrypi/linux#4258 kernel: sc16is7xx: Defer probe if device read fails See: raspberrypi/linux#4272 kernel: Codec Fixes for the tlv320aic32x4 codec on 5.10 See: raspberrypi/linux#4273 kernel: HDR improvements See: raspberrypi/linux#4268 kernel: staging: vcsm-cma: Fix memory leak from not detaching dmabuf See: raspberrypi/linux#4277 kernel: vc4/kms: vc4_plane: Support 2020 colourspace for yuv planes See: raspberrypi/linux#4276 kernel: Prevent A4tech FHD 1080p webcams from being suspended automatically See: raspberrypi/linux#4283 kernel: overlays: ghost-amp: Add DAC mute control
https://github.com/gist.github.com/popcornmix/6b3e23103c60170b02b148e0ba5d6ed7
is the script used to generate the 601, 709 and 2020 colourspaces.
I've regenetated the existing ones using script so it is reprocable
but there are lsb dfferences compared to values here (copied from spec)
whose origin is now lost.
Signed-off-by: Dom Cobley popcornmix@gmail.com