IMX Scaler / CSC m2m driver.

Philipp Zabel p.zabel at pengutronix.de
Thu Mar 19 08:45:46 PDT 2015


Hi Ian,

Am Donnerstag, den 19.03.2015, 13:45 +0000 schrieb Ian Molton:
> Hi all,
> 
> Thanks for all your help, guys!
> 
> I've applied the patches Philipp posted to linux-media yesterday,
> and built the gstreamer plugin from Jean-Michels
> repo: https://github.com/Vodalys/gst-plugins-good
> 
> I'm not clear if I should be using Philipps or Steves version of
> the kernel stuff here. For now, I'm using Philips, as its the most
> recent I have, and it appeared to work first time.
> 
> I can now run the following pipeline:
> 
> gst-launch-1.0 filesrc location= Downloads/big_buck_bunny_1080p_h264.mov ! qtdemux ! h264parse ! queue ! v4l2video3videodec ! queue ! v4l2video0convert ! video/x-raw,width=1920,height=1080 ! ximagesink sync=false
> 
> And see video on the screen - and its noticeably faster than:
> 
> gst-launch-1.0 filesrc location= Downloads/big_buck_bunny_1080p_h264.mov ! qtdemux ! h264parse ! queue ! v4l2video3videodec ! queue ! videoscale ! video/x-raw,width=1920,height=1080 ! videoconvert !ximagesink sync=false
> 
> About 2-3x as fast. To be more precise,
> 
> I get:
>   5.5 FPS @ 1980x1080
> 10.5 FPS @ 960x540
> 13.0 FPS @ 640x320
> 13.6 FPS @ 540x320
> 13.7 FPS @ 540x300 , 540x280

As Nicolas points out, you would have to reduce the amount of copies by
using DMABUF between the hardware units v4l2videodec
capture-io-mode=dmabuf ! v4l2convert output-io-mode=dmabuf-import should
work, output-io-mode=userptr with the current coda driver still throws
errors. I'll have to investigate that.

> attempting to go to 540x270 resulted in a flashing green /
> black window, accompanied by the following in dmesg:
> 
> imx-ipuv3-scaler imx-ipuv3-scaler.4: Timeout waiting for scaling result

Thanks for testing. I have concentrated on upscaling, and missed that
while the downsize ratio bit field is two bits, only values 0, 1 and 2
are allowed (downsize ratios 1:1, 1:2 and 1:4, respectively).

Since the CODA outputs a height of 1088 pixels (macroblock aligned), the
scaler tries to downsize 1:8 in your example, which crashes the IPU. (It
would then upscale the 136 pixel downscale result to 270 pixels using
bilinear scaling.)

Try scaling to 272, or I to use the attached patch to crop the height to
1080 at the scaler sink side. I presume this eventually should be done
automatically using a GstVideoCropMeta somehow.

> ...followed about 30 seconds later by a fairly spectacular oops, which I
> didn't manage to catch anything useful from, and a (soft) system lockup.
> (serial still works, but its all oops). HDMI still shows a display,
> usually, but on one occasion it killed HDMI too. Refcounting / locking
> issue?

Oh dear, I'll fix that.

> I've also noticed that on some occasions the pipeline refused to run, but
> choosing different resolutions (and then going back to the one I wanted)
> seemed to fix it - possibly something uninitialised somewhere?

If you notice next time, would you mind reporting the settings?

regards
Philipp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-v4l2-move-crop-from-v4l2sink-into-gstv4l2object-and-.patch
Type: text/x-patch
Size: 20548 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150319/931ae252/attachment-0001.bin>


More information about the gstreamer-devel mailing list