AnsweredAssumed Answered

how to use ADV7513 for 12b grayscale data

Question asked by jpcad on May 3, 2018
Latest reply on May 14, 2018 by jpcad

HDMI was developed with color image formats in mind, but what if my raw video data is simply 12b grayscale, i.e., 12bpp of intensity?  Historically I've seen people have to quantize to 8bpp (throw away 6 LSBs) and then use RGB colorspace by setting R=G=B=intensity and output to a receiver that way.  Any compression or converting to YCbCr 4:2:2 could degrade the image.

But the ADV7513 can work with 8,10,12b input pixel depths (24,30.36bpp) in YCbCr colorspace.  Surely there must be a way to take advantage of 12b input mode and transmit grayscale data to a HDMI receiver/capture device with minimal (or ideally no?) loss of image quality or resolution.  My video is 1080p60.

But it's not clear to me how to do that, is it simply a matter of programming the ADV7513 for input ID=1, style=3, 12b pixel depth, and then as long as I input my intensity data onto Y[11:0] and set Cb/Cr[11:0] to midscale 0x800, I should be able to reproduce the raw data perfectly at the receiving end?  What other register bits are critical to ensure this is the case?

I'm figuring that all receivers try to produce a color image from whatever bits they receive, that there is no control to tell them that they can basically ignore Cb/Cr and just use Y (a shame because a grayscale-specific HDMI mode would cut BW in half.)  Further, my grayscale data is being saved to disk as a GB-hungry MP4 color image (and I don't want to overcompress or I lose critical resolution).  I end up with a file that could actually be larger than if I saved the raw uncompressed sensor data before going through the HDMI transmitter!

So my questions would be, how should I use the ADV7513 to transmit 12bpp grayscale data across HDMI most efficiently (with minimal quality loss) and what must I do at the receiving end to optimally save the data (retaining maximum resolution but minimum file size)?

Thanks to anyone who can shed some light on this topic or point me to a resource.

p.s. I'm currently using the ADV7513 successfully by sending in 8bpp grayscale data on Y bits with the above ID/style and setting Cb/Cr bits to 0x80 (a design I partially inherited).  So long as I save at the receiver end with high kbps video rate setting the resolution is ok but my file size is massive.  I'm hoping that by utilizing 12b mode I can at least get back the information I gave up at the transmitter end, essentially for free.

Below is my power-up I2C addr,data sequence.  Note that register 0xAF is telling the chip to ignore AVI infoframe, forcing output to be RGB--I'm guessing this is the first thing to change for 12b mode because I need output data to remain in YCbCr 4:2:2 colorspace?

  0xD6, 0xC0
  0x41, 0x50
  0x98, 0x03
  0x9A, 0xE0
  0x9C, 0x30
  0x9D, 0x61
  0xA2, 0xA4
  0xA3, 0xA4
  0xE0, 0xD0
  0xF9, 0x00
  0x15, 0x01
  0x48, 0x10
  0x16, 0x2E
  0x55, 0x12
  0x17, 0x02
  0xD0, 0x3C
  0xAF, 0x04
  0x18-0x2F are programmed per Table 33 in programming guide
  0x44, 0x11
  0x0B, 0x0E
  0xE2, 0x01
  0x56, 0xA8
  0x57, 0x88
  0x59, 0x10

Outcomes