Dear TI staff,
I'm investigating the capability of DISPC VID Scaler Unit and have some related question:
Our intention is to dynamically cropping the image while keeping a fixed output resolution to achieve a zooming feature. The resolution after cropping would be smaller that the desired output resolution, so we consdier using the DISPC scaling feature instead, given the fact that the MSC only supports downscaling.
My first attemp was to add a videocrop in a valid pipeline, and it worked as expected:
gst-launch-1.0 \ v4l2src device=/dev/video2 io-mode=5 ! \ video/x-bayer, width=2592, height=1944, format=bggi10 ! queue leaky=2 ! \ tiovxisp sensor-name=SENSOR_OX05B_RGBIR \ dcc-isp-file=/opt/imaging/ox05b/dcc_viss.bin \ sink_0::dcc-2a-file=/opt/imaging/ox05b/dcc_2a.bin sink_0::device=/dev/v4l-subdev2 format-msb=9 ! \ video/x-raw, format=NV12 ! \ tiovxmultiscaler ! \ video/x-raw, format=NV12, width=1920, height=1280, framerate=30/1 ! \ tiovxldc dcc-file=/opt/imaging/ox05b/dcc_ldc.bin sensor-name=SENSOR_OX05B_RGBIR ! \ videocrop top=200 left=480 ! \ video/x-raw, format=NV12, width=1280, height=720, framerate=30/1 ! queue ! \ kmssink driver-name=tidss sync=false
Then I wrote a python script to modify the cropping parameters as well as the resolution in the capsfilter at the same time periodically. But the image would always stuck when the method for modification is invoked. Part of the code is as follows:
//cap definitions default_caps = Gst.Caps.from_string("video/x-raw, width=1920, height=1080") cropped_caps = Gst.Caps.from_string("video/x-raw, width=960, height=540") //code snippet in the modification method if zoom_in: crop_right += zoom_step1 crop_bottom += zoom_step else: crop_right -= zoom_step1 crop_bottom -= zoom_step if crop_right == 480: zoom_in = False capsfilter.set_property("caps", cropped_caps) elif crop_right == 0: zoom_in = True capsfilter.set_property("caps", default_caps) crop_element.set_property("right", crop_right) crop_element.set_property("bottom", crop_bottom)
While trying to debug with limited log printed by gstreamer, I want to ask whether DISPC can accept input stream with variable resolution? And if it is capable to do so, would you mind provide me with an example?
Looking forward to your reply.
Regards,
Huang Jingjie