diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2013-08-10 21:25:16 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2013-08-15 16:40:02 +0100 |
commit | bc1cf77534fa11fbdc5bb95313fe5728c6411235 (patch) | |
tree | 5bc3f7912d998425386f275dcf305efb5a26cad9 /tools/intel_infoframes.c | |
parent | e58891d0aef37391ccd09091871db35516427884 (diff) |
intel_infoframes: Add support for decoding HDMI VICs
The HDMI vendor infoframe can contain a HDMI VIC (as of HDMI 1.4, only
used for 4k formats).
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Diffstat (limited to 'tools/intel_infoframes.c')
-rw-r--r-- | tools/intel_infoframes.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c index 09fdcb97..b6d289f1 100644 --- a/tools/intel_infoframes.c +++ b/tools/intel_infoframes.c @@ -184,8 +184,13 @@ typedef union { uint8_t Rsvd0 :5; uint8_t video_format :3; - uint8_t Rsvd1 :4; - uint8_t s3d_structure :4; + union { + uint8_t vic; + struct { + uint8_t Rsvd1 :4; + uint8_t s3d_structure :4; + } s3d; + } pb5; uint8_t Rsvd2 :4; uint8_t s3d_ext_data :4; @@ -467,13 +472,26 @@ static const char *s3d_structure_to_string(int format) static void dump_vendor_hdmi(DipInfoFrame *frame) { + int vic_present = frame->vendor.video_format & 0x1; int s3d_present = frame->vendor.video_format & 0x2; printf("- video format: 0x%03x %s\n", frame->vendor.video_format, s3d_present ? "(3D)" : ""); - if (s3d_present) + + if (vic_present && s3d_present) { + printf("Error: HDMI VIC and S3D bits set. Only one of those " + " at a time is valid\n"); + return; + } + + if (vic_present) + printf("- HDMI VIC: %d\n", frame->vendor.pb5.vic); + else if (s3d_present) { + int s3d_structure = frame->vendor.pb5.s3d.s3d_structure; + printf("- 3D Format: %s\n", - s3d_structure_to_string(frame->vendor.s3d_structure)); + s3d_structure_to_string(s3d_structure)); + } } static void dump_vendor_info(Transcoder transcoder) |