Re: [Intel-gfx] [PATCH 3/3] drm/i915/icl: Fixed Input CSC Co-efficients for BT601/709
>-Original Message- >From: Ville Syrjälä [mailto:ville.syrj...@linux.intel.com] >Sent: Friday, May 10, 2019 12:54 AM >To: Shankar, Uma >Cc: intel-gfx@lists.freedesktop.org; maarten.lankho...@linux.intel.com; Sharma, >Shashank >Subject: Re: [PATCH 3/3] drm/i915/icl: Fixed Input CSC Co-efficients for >BT601/709 > >On Fri, May 10, 2019 at 12:41:48AM +0530, Uma Shankar wrote: >> Input CSC Co-efficients for BT601 and BT709 YCbCR to RGB conversion >> were slightly off. Fixed the same. >> >> Signed-off-by: Uma Shankar >> --- >> drivers/gpu/drm/i915/intel_sprite.c | 24 >> 1 file changed, 12 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/intel_sprite.c >> b/drivers/gpu/drm/i915/intel_sprite.c >> index c9c970f..1239457 100644 >> --- a/drivers/gpu/drm/i915/intel_sprite.c >> +++ b/drivers/gpu/drm/i915/intel_sprite.c >> @@ -430,7 +430,7 @@ int intel_plane_check_src_coordinates(struct >intel_plane_state *plane_state) >> */ >> [DRM_COLOR_YCBCR_BT709] = { >> 0x7C98, 0x7800, 0x0, >> -0x9EF8, 0x7800, 0xABF8, >> +0x9EF8, 0x7800, 0xAC00, >> 0x0, 0x7800, 0x7ED8, >> }, >> /* >> @@ -453,25 +453,25 @@ int intel_plane_check_src_coordinates(struct >intel_plane_state *plane_state) >> * BT.601 Limted range YCbCr -> full range RGB >> * The matrix required is : >> * [1.164384, 0.000, 1.596370, >> - * 1.138393, -0.382500, -0.794598, >> - * 1.138393, 1.971696, 0.] >> + * 1.164384, -0.382500, -0.794598, >> + * 1.164384, 1.971696, 0.] > >Still not quite what I'm getting here: >1.164384 0.00 1.596027 >1.164384 -0.391762 -0.812968 >1.164384 2.017232 0.00 Hmm yeah, the reference matrix I used earlier is not accurate it seems. With igt_color_encoding I am getting what you get here. Will update and resend. >> */ >> [DRM_COLOR_YCBCR_BT601] = { >> -0x7CC8, 0x7950, 0x0, >> -0x8CB8, 0x7918, 0x9C40, >> -0x0, 0x7918, 0x7FC8, >> +0x7C80, 0x7950, 0x0, >> +0x8CB8, 0x7950, 0x9C40, >> +0x0, 0x7950, 0x7FC8, >> }, >> /* >> * BT.709 Limited range YCbCr -> full range RGB >> * The matrix required is : >> - * [1.164, 0.000, 1.833671, >> - * 1.138393, -0.213249, -0.532909, >> - * 1.138393, 2.112402, 0.] >> + * [1.164384, 0.000, 1.792741, >> + * 1.164384, -0.213249, -0.532909, >> + * 1.164384, 2.112402, 0.] >> */ > >This one matches what I'm getting. > >> [DRM_COLOR_YCBCR_BT709] = { >> -0x7EA8, 0x7950, 0x0, >> -0x, 0x7918, 0xADA8, >> -0x0, 0x7918, 0x6870, >> +0x7E58, 0x7950, 0x0, >> +0x, 0x7950, 0xADA8, >> +0x0, 0x7950, 0x6870, >> }, >> /* >> * BT.2020 Limited range YCbCr -> full range RGB >> -- >> 1.9.1 > >-- >Ville Syrjälä >Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/3] drm/i915/icl: Fixed Input CSC Co-efficients for BT601/709
On Fri, May 10, 2019 at 12:41:48AM +0530, Uma Shankar wrote: > Input CSC Co-efficients for BT601 and BT709 YCbCR to RGB > conversion were slightly off. Fixed the same. > > Signed-off-by: Uma Shankar > --- > drivers/gpu/drm/i915/intel_sprite.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c > b/drivers/gpu/drm/i915/intel_sprite.c > index c9c970f..1239457 100644 > --- a/drivers/gpu/drm/i915/intel_sprite.c > +++ b/drivers/gpu/drm/i915/intel_sprite.c > @@ -430,7 +430,7 @@ int intel_plane_check_src_coordinates(struct > intel_plane_state *plane_state) >*/ > [DRM_COLOR_YCBCR_BT709] = { > 0x7C98, 0x7800, 0x0, > - 0x9EF8, 0x7800, 0xABF8, > + 0x9EF8, 0x7800, 0xAC00, > 0x0, 0x7800, 0x7ED8, > }, > /* > @@ -453,25 +453,25 @@ int intel_plane_check_src_coordinates(struct > intel_plane_state *plane_state) >* BT.601 Limted range YCbCr -> full range RGB >* The matrix required is : >* [1.164384, 0.000, 1.596370, > - * 1.138393, -0.382500, -0.794598, > - * 1.138393, 1.971696, 0.] > + * 1.164384, -0.382500, -0.794598, > + * 1.164384, 1.971696, 0.] Still not quite what I'm getting here: 1.164384 0.00 1.596027 1.164384 -0.391762 -0.812968 1.164384 2.017232 0.00 >*/ > [DRM_COLOR_YCBCR_BT601] = { > - 0x7CC8, 0x7950, 0x0, > - 0x8CB8, 0x7918, 0x9C40, > - 0x0, 0x7918, 0x7FC8, > + 0x7C80, 0x7950, 0x0, > + 0x8CB8, 0x7950, 0x9C40, > + 0x0, 0x7950, 0x7FC8, > }, > /* >* BT.709 Limited range YCbCr -> full range RGB >* The matrix required is : > - * [1.164, 0.000, 1.833671, > - * 1.138393, -0.213249, -0.532909, > - * 1.138393, 2.112402, 0.] > + * [1.164384, 0.000, 1.792741, > + * 1.164384, -0.213249, -0.532909, > + * 1.164384, 2.112402, 0.] >*/ This one matches what I'm getting. > [DRM_COLOR_YCBCR_BT709] = { > - 0x7EA8, 0x7950, 0x0, > - 0x, 0x7918, 0xADA8, > - 0x0, 0x7918, 0x6870, > + 0x7E58, 0x7950, 0x0, > + 0x, 0x7950, 0xADA8, > + 0x0, 0x7950, 0x6870, > }, > /* >* BT.2020 Limited range YCbCr -> full range RGB > -- > 1.9.1 -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/3] drm/i915/icl: Fixed Input CSC Co-efficients for BT601/709
Input CSC Co-efficients for BT601 and BT709 YCbCR to RGB conversion were slightly off. Fixed the same. Signed-off-by: Uma Shankar --- drivers/gpu/drm/i915/intel_sprite.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index c9c970f..1239457 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -430,7 +430,7 @@ int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state) */ [DRM_COLOR_YCBCR_BT709] = { 0x7C98, 0x7800, 0x0, - 0x9EF8, 0x7800, 0xABF8, + 0x9EF8, 0x7800, 0xAC00, 0x0, 0x7800, 0x7ED8, }, /* @@ -453,25 +453,25 @@ int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state) * BT.601 Limted range YCbCr -> full range RGB * The matrix required is : * [1.164384, 0.000, 1.596370, -* 1.138393, -0.382500, -0.794598, -* 1.138393, 1.971696, 0.] +* 1.164384, -0.382500, -0.794598, +* 1.164384, 1.971696, 0.] */ [DRM_COLOR_YCBCR_BT601] = { - 0x7CC8, 0x7950, 0x0, - 0x8CB8, 0x7918, 0x9C40, - 0x0, 0x7918, 0x7FC8, + 0x7C80, 0x7950, 0x0, + 0x8CB8, 0x7950, 0x9C40, + 0x0, 0x7950, 0x7FC8, }, /* * BT.709 Limited range YCbCr -> full range RGB * The matrix required is : -* [1.164, 0.000, 1.833671, -* 1.138393, -0.213249, -0.532909, -* 1.138393, 2.112402, 0.] +* [1.164384, 0.000, 1.792741, +* 1.164384, -0.213249, -0.532909, +* 1.164384, 2.112402, 0.] */ [DRM_COLOR_YCBCR_BT709] = { - 0x7EA8, 0x7950, 0x0, - 0x, 0x7918, 0xADA8, - 0x0, 0x7918, 0x6870, + 0x7E58, 0x7950, 0x0, + 0x, 0x7950, 0xADA8, + 0x0, 0x7950, 0x6870, }, /* * BT.2020 Limited range YCbCr -> full range RGB -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx