From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Johan Korsnes <jkorsnes@cisco.com>
Cc: Hans Verkuil <hansverk@cisco.com>,
Martin Bugge <marbugge@cisco.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] video: hdmi: indicate applicability in avi infoframe log
Date: Wed, 11 Dec 2019 18:08:16 +0200 [thread overview]
Message-ID: <20191211160816.GK1208@intel.com> (raw)
In-Reply-To: <20191211094842.165087-1-jkorsnes@cisco.com>
On Wed, Dec 11, 2019 at 10:48:42AM +0100, Johan Korsnes wrote:
> When logging the AVI InfoFrame, clearly indicate whether or not
> attributes are active/"in effect". The specification is given in
> CTA-861-G Section 6.4: Format of Version 2, 3 & 4 AVI InfoFrames.
>
> Attribute Bytes Requirement
> Ext. Colorimetry EC0..EC2 Colorimetry (C0,C1) set to Extended.
> IT Contents Type CN0,CN1 IT Content (ITC) set to True.
> RGB Quant. Range Q0,Q1 Color Space (Y0..Y2) set to RGB.
> YCC Quant. Range YQ0,YQ1 Color space (Y0..Y2) set to YCbCr.
>
> Example log output with patch applied:
> HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
> colorspace: RGB
> scan mode: No Data
> colorimetry: ITU709
> picture aspect: 16:9
> active aspect: Same as Picture
> itc: IT Content
> extended colorimetry: N/A (0x0)
> quantization range: Full
> nups: Unknown Non-uniform Scaling
> video code: 16
> ycc quantization range: N/A (0x0)
> hdmi content type: Graphics
> pixel repeat: 0
> bar top 0, bottom 0, left 0, right 0
>
> Signed-off-by: Johan Korsnes <jkorsnes@cisco.com>
> Cc: Hans Verkuil <hansverk@cisco.com>
> Cc: Martin Bugge <marbugge@cisco.com>
>
> ---
> v1 -> v2:
> * Indicate applicability not only for ext. colorimetry
> ---
> drivers/video/hdmi.c | 40 ++++++++++++++++++++++++++++++++--------
> 1 file changed, 32 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
> index 9c82e2a0a411..491a77b28a9b 100644
> --- a/drivers/video/hdmi.c
> +++ b/drivers/video/hdmi.c
> @@ -1209,16 +1209,40 @@ static void hdmi_avi_infoframe_log(const char *level,
> hdmi_log(" active aspect: %s\n",
> hdmi_active_aspect_get_name(frame->active_aspect));
> hdmi_log(" itc: %s\n", frame->itc ? "IT Content" : "No Data");
> - hdmi_log(" extended colorimetry: %s\n",
> - hdmi_extended_colorimetry_get_name(frame->extended_colorimetry));
> - hdmi_log(" quantization range: %s\n",
> - hdmi_quantization_range_get_name(frame->quantization_range));
> +
> + if (frame->colorimetry == HDMI_COLORIMETRY_EXTENDED)
> + hdmi_log(" extended colorimetry: %s\n",
> + hdmi_extended_colorimetry_get_name(frame->extended_colorimetry));
> + else
> + hdmi_log(" extended colorimetry: N/A (0x%x)\n",
> + frame->extended_colorimetry);
> +
> + if (frame->colorspace == HDMI_COLORSPACE_RGB)
> + hdmi_log(" quantization range: %s\n",
> + hdmi_quantization_range_get_name(frame->quantization_range));
> + else
> + hdmi_log(" quantization range: N/A (0x%x)\n",
> + frame->quantization_range);
> +
> hdmi_log(" nups: %s\n", hdmi_nups_get_name(frame->nups));
> hdmi_log(" video code: %u\n", frame->video_code);
> - hdmi_log(" ycc quantization range: %s\n",
> - hdmi_ycc_quantization_range_get_name(frame->ycc_quantization_range));
> - hdmi_log(" hdmi content type: %s\n",
> - hdmi_content_type_get_name(frame->content_type));
> +
> + if (frame->colorspace == HDMI_COLORSPACE_YUV422 ||
> + frame->colorspace == HDMI_COLORSPACE_YUV444 ||
> + frame->colorspace == HDMI_COLORSPACE_YUV420)
ocd nit: order 444||422||420 or 420||422||444
> + hdmi_log(" ycc quantization range: %s\n",
> + hdmi_ycc_quantization_range_get_name(frame->ycc_quantization_range));
> + else
> + hdmi_log(" ycc quantization range: N/A (0x%x)\n",
> + frame->ycc_quantization_range);
CTA-861-G does recommend that we set YQ to match Q when trasmitting
RGB. So not sure "N/A" is entirely accurate here. However we also
found out that following that recommendation did break some crappy
sinks which get confused when they see RGB + YQ!=0. So now we follow
that recommendation only for HDMI 2.0+ sinks. Anyways, as long as the
raw value is present I guess we can stil spot such cases from the logs.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +
> + if (frame->itc)
> + hdmi_log(" hdmi content type: %s\n",
> + hdmi_content_type_get_name(frame->content_type));
> + else
> + hdmi_log(" hdmi content type: N/A (0x%x)\n",
> + frame->content_type);
> +
> hdmi_log(" pixel repeat: %u\n", frame->pixel_repeat);
> hdmi_log(" bar top %u, bottom %u, left %u, right %u\n",
> frame->top_bar, frame->bottom_bar,
> --
> 2.23.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-12-11 16:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 9:48 [PATCH v2] video: hdmi: indicate applicability in avi infoframe log Johan Korsnes
2019-12-11 16:08 ` Ville Syrjälä [this message]
2019-12-12 11:52 ` Johan Korsnes (jkorsnes)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191211160816.GK1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansverk@cisco.com \
--cc=jkorsnes@cisco.com \
--cc=marbugge@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox