Welcome to RDK X3 Board repository
5. VPS scaling example
5. VPS scaling example
1. Preparation
This example implements the video scaling function based on the video processing module VPS, and users can preview the screen on the display.
Environment preparation:
- Connect the development board and the monitor via an HDMI cable
- Power on the development board and log in via the command line
- Prepare images (NV12) and video files (H264) as input
2. Running method
The sample code is provided in source code form and needs to be compiled and run using the make command.
The steps are as follows.
sunrise@ubuntu:~$ cd /app/cdev_demo/vpssunrise@ubuntu:/app/cdev_demo/vps$ sudo makesunrise@ubuntu:/app/cdev_demo/vps$ sudo ./vps -m 1 -i test.h264 -o yuv_1.yuv --iheight 1080 --iwidth 1920 --oheight 720 --owidth 1280Parameter configuration:
- -i: file path to be operated
- -iheight: input height
- -iwidth: input width
- -m: input mode, 1: video stream; 2: NV12 image
- -o: output path
- -oheight: output height
- -width: output width
- -skip: (optional) for video stream input, skip the number of frames at the beginning
3. Result

The following command copies the test.h264 file saved in [3. Camera image encoding] to the current directory for use.
xxxxxxxxxxcp /app/cdev_demo/vio2encoder/test.h264 .The following command copies the yuv_1.yuv file saved in [2. Save camera image to the current directory for use.
xxxxxxxxxxcp /app/cdev_demo/vio_capture/yuv_1.yuv .After the program runs correctly, the processed image file outpu.yuv will be saved in the current directory.
The running log is as follows.

xxxxxxxxxxsunrise@ubuntu:/app/cdev_demo/vps$ sudo ./vps -m 1 -i test.h264 -o yuv_1.yuv --iheight 1080 --iwidth 1920 --oheight 720 --owidth 1280[x3_av_open_stream]:[380]:probesize: 5000000hb_vp_deinit success