This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have a bespoke system with a 24 bit RGB 1080p signal from an FPGA feeding into the DM8168's video input port.
I have followed the suggestions here to rebuild the video system to work without the TVP7002 chip:
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/160009.aspx
however I am stuck at the selection of the input pixel format.
The options are these but there don't seem to be any RGB 24 bit formats.
enum v4l2_mbus_pixelcode {
V4L2_MBUS_FMT_FIXED = 0x0001,
/* RGB - next is 0x1009 */
V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001,
V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002,
V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003,
V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004,
V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005,
V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006,
V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007,
V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008,
/* YUV (including grey) - next is 0x2013 */
V4L2_MBUS_FMT_Y8_1X8 = 0x2001,
V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002,
V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003,
V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004,
V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005,
V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006,
V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007,
V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008,
V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009,
V4L2_MBUS_FMT_Y10_1X10 = 0x200a,
V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b,
V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c,
V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f,
V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010,
V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011,
V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012,
V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d,
V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e,
/* Bayer - next is 0x3013 */
V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001,
V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002,
V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b,
V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c,
V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009,
V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d,
V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003,
V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004,
V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE = 0x3005,
V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE = 0x3006,
V4L2_MBUS_FMT_SBGGR10_1X10 = 0x3007,
V4L2_MBUS_FMT_SGBRG10_1X10 = 0x300e,
V4L2_MBUS_FMT_SGRBG10_1X10 = 0x300a,
V4L2_MBUS_FMT_SRGGB10_1X10 = 0x300f,
V4L2_MBUS_FMT_SBGGR12_1X12 = 0x3008,
V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010,
V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011,
V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012,
Any ideas which one I should use?
Thanks,
Ralph
Hi, I am currently busy with some other activity. I will reply in a day or two.
Regards,
Hardik Shah
For now until I look into the V4L2 documentation I am unsure what v4l2_mbus_pixelcode does.
I have things on the way to working now that I have worked out that I need to set all the fields of hdvpss_capture_sdev_info in ti81xx_vpss.c appropriately.
It seems that v4l2_mbus_pixelcode doesn't matter too much for me at this moment in time.
Many thanks to Jun for the heads up on the pixel formats.
I am now capturing the attached 1080p60 image using saLoopBackFbdev:
The image I am trying to capture is offset and the red and blue channels are swapped. I have tried playing with every setting there is in "static struct ti81xxvin_subdev_info hdvpss_capture_sdev_info" but I still can't get the capture working correctly.
Do you have any suggestions what I must do to capture the image correctly?
Thanks,
Ralph
Hi,
You need to set FVID2_DF_RGB24_888 in vpss.c file for capturing RGB888. In hardware only red and blue are swapped so you wont be able to do much in software. You need to connect the input differently rather than tweaking software.
Regards,
Hardik Shah
We have checked that our red, blue and green channels are connected up correctly. I think the issue is to do with capturing the Linux framebuffer. Even when I do not have my video input I can still only capture an image with R and B transposed.
I have tweaked some settings and am now getting the following image. Notice the vertical purple line of single pixels that precedes the color bar patterns. You can't really see it but there is also a 1 pixel "blur" between each stripe of colour.
This should not be here. There should be only a 1 pixel black border around the colour bar image and the colour bars should be distinct and not blurred together at the edges.
Any idea what is causing this? Is it because of some internal colourspace conversion of the DM8168 from RGB to YUV and back again?
Thanks,
Ralph
Hi,
There is no conversion done for RGB capture to RGB in memory. May be you may have to tune your decoder timings.
Regards,
Hardik Shah
Hi Ralph,
You are not the only one has R and B swaped issue.
When I was trying capture RGB, using saLoopFbdev code, I met the same problem.
And I am also sure our hardware connection is okay.
What changes did you make to get at least right R and B?
Regards,
Jun
Hi Jun, it's good to know it isn't just me. I have found that my framebuffer RGB is correct however that is completely separate from the issue of captured video having R and B channels swapped.
To correct the captured raw RGB data, I imported it into GIMP image editor as a "raw" image of dimension 1920x1080. Then once imported you can use Colors->Components->Channel mixer to specify how to swap around the colours.
Ralph
Hi Ralph,
Thanks for your info. I see what you did. I though you have a way to set the firmware of DM8148 to capture correct image.
I also used a software vooya to replay the captured raw data.
If choosing format as BGR interleave 444, the images seems to be okay, altough what I am expecting is RGB444 Planar.
Maybe at this point, TI expert really should clarify for us how come the R and B get swaped.
Regards,
Jun
Hi,
RGB planar is not possible. RGB interleaved is only possible. RGB in memory arranged as B(LSB) G and R(MSB).
Regards,
Hardik Shah