Re: IMX CSI capture issues with tda1997x HDMI receiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tim, cc: Philipp,

On 2/2/19 11:10 AM, Steve Longerbeam wrote:

<snip>
On 1/30/19 5:18 PM, Tim Harvey wrote:

# stream upscale via mem2mem then JPEG/RTP/UDP
gst-launch-1.0 v4l2src device=/dev/video4 ! \
   v4l2video8convert ! video/x-raw,width=1280,height=720 ! \
   jpegenc ! rtpjpegpay ! udpsink host=172.24.20.19 port=5000
ERROR: from element
/GstPipeline:pipeline0/v4l2video8convert:v4l2video8convert0: Device
'/dev/video8' does not support 2:4:7:1 colorimetry
# ^^^ fails because mem2mem doesn't support itu601
# stream H264/RTP/UDP
gst-launch-1.0 v4l2src device=/dev/video4 ! \
   v4l2h264enc output-io-mode=dmabuf-import ! \
   rtph264pay ! udpsink host=172.24.20.19 port=5001
ERROR: from element /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0:
Device '/dev/video9' does not support 2:4:7:1 colorimetry
# ^^^ coda has same issue... can't del with itu601

Well, just to see things working, try hacking imx_media_fill_default_mbus_fields() to set Rec. 709 encoding:

--- a/drivers/staging/media/imx/imx-media-utils.c
+++ b/drivers/staging/media/imx/imx-media-utils.c
@@ -571,7 +571,7 @@ void imx_media_fill_default_mbus_fields(struct v4l2_mbus_framefmt *tryfmt,
                tryfmt->quantization = is_rgb ?
                        V4L2_QUANTIZATION_FULL_RANGE :
                        V4L2_QUANTIZATION_LIM_RANGE;
-               tryfmt->ycbcr_enc = V4L2_YCBCR_ENC_601;
+               tryfmt->ycbcr_enc = V4L2_YCBCR_ENC_709;
        }
 }
 EXPORT_SYMBOL_GPL(imx_media_fill_default_mbus_fields);


But of course that's not technically correct because the encoding in ipu-ic.c is BT.601.

The *real* way to fix this would be to allow programmable encodings in ipu-ic.c. But unfortunately the encodings are hardcoded (grep for ic_csc_rgb2ycbcr in ipu-ic.c).

I went ahead and implemented this!

The IC will now support both BT.601 and BT.709 encoding. I will post a patchset, please test!



Am I perhaps missing a capsfilter to get the mem2mem driver to convert
the colorspace properly? If so, they the mem2mem driver could be used
to correct the colorspace to get IC output to coda working.

Well, first I don't think the mem2mem driver is using the correct encoding. The mem2mem driver is making use of the IC encoding so it should be reporting and accepting only BT.601.

The mem2mem driver can now require BT.709 and/or BT.601 encoding with the above patchset.

Steve




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux