R-Car/Boards/Yocto-Gen3-CommonFAQ/How to scale up/down the video using vspfilter.

From eLinux.org
Jump to: navigation, search

How to scale up/down the video using vspfilter.

Please execute following commands:

  • <Example using VSPI0 of H3>
INPUT=$(media-ctl -d /dev/media2 -e "fe9a0000.vsp rpf.0 input")
OUTPUT=$(media-ctl -d /dev/media2 -e "fe9a0000.vsp wpf.0 output")
cat << EOS > /etc/gstvspfilter.conf
input-device-name=$INPUT
output-device-name=$OUTPUT
EOS
  • <Example using VSPI0 of M3>
INPUT=$(media-ctl -d /dev/media1 -e "fe9a0000.vsp rpf.0 input")
OUTPUT=$(media-ctl -d /dev/media1 -e "fe9a0000.vsp wpf.0 output")
cat << EOS > /etc/gstvspfilter.conf
input-device-name=$INPUT
output-device-name=$OUTPUT
EOS

Ex1) Case of Up Scaling (HD->FullHD)

$ modprobe -a uvcs_drv vspm_if mmngr mmngrbuf
$ gst-launch-1.0 filesrc location=./<HDsize_h264_file> ! h264parse ! queue ! omxh264dec ! queue ! vspfilter ! video/x-raw, format=BGRA, width=1920, height=1080 ! waylandsink

Ex2) Case of Down Scaling (FullHD -> HD)

$ modprobe -a uvcs_drv vspm_if mmngr mmngrbuf
$ gst-launch-1.0 filesrc location=./<FullHDsize_h264_file> ! h264parse ! queue ! omxh264dec ! queue ! vspfilter ! video/x-raw, format=BGRA, width=1280, height=720 ! waylandsink