Skip to content

Native image presentation

Source:alpine/aports/fplinux-present

fplinux-present shows an NV16 frame on the phone display. On UMS9117, it either sends the frame directly to the display controller, which converts it to the panel’s colors, or converts it to RGB565 on the CPU first. On the SC9820E Xiaomi Qin 1s+, use the CPU mode; only grayscale output is verified, and native NV16 output is not verified.

The command is included in UMS9117 images. On Xiaomi Qin 1s+, install the optional fplinux-present.apk as described in Packages. See Applications for running commands, and your phone page for the verified image results.

On a UMS9117 phone with native NV16 presentation support, show a frame through the display controller and keep it on the screen for two seconds:

Phone
fplinux-present --input /run/frame.nv16 --hold-ms 2000

For CPU conversion on either platform, show the frame and keep the converted RGB565 image. This is the mode used on Xiaomi Qin 1s+:

Phone
fplinux-present --input /run/frame.nv16 --mode cpu-rgb565 \
--output /run/frame.rgb565 --hold-ms 2000
Option Meaning
--input FILE The NV16 frame. Required.
--mode nv16|cpu-rgb565 Convert in the UMS9117 display controller (nv16, the default) or on the CPU. Select cpu-rgb565 on Xiaomi Qin 1s+.
--repeat N Show the frame 1 to 4096 times. Default: 1.
--fps N Requested pace of the repeats, 1 to 30 per second. Default: 10.
--hold-ms N Keep the last frame on the screen for 0 to 60000 ms. Default: 0.
--output FILE Write the CPU-converted RGB565 image. Only with --mode cpu-rgb565.
--drm PATH Display device. By default, selects the unique connected display supporting the frame format.
--tty PATH Console terminal. Default: /dev/tty0.

--fps sets a schedule measured from the start of the series: the first frame is shown at once, and a slow repeat does not shift the later ones. It is not a measured refresh rate.

The input is one packed NV16 file of exactly the display’s native size, for example 153,600 bytes for a 240×320 display; see Raw image formats. The command takes the size from the display and has no size option. It does not resize, crop, rotate or decode images. On UMS9117, prepare the frame with fplinux-rotate or fplinux-jpeg. For Xiaomi Qin 1s+, prepare a native-size NV16 frame on your computer and upload it.

With --mode cpu-rgb565, the command converts the frame as full-range BT.601 and writes --output as packed RGB565 of the same size. It writes the file only after the whole series and the final hold have completed and the terminal has been restored.

Stop the graphical session before presentation and restart it afterwards, following Direct-display applications. The terminal restoration below concerns the DRM virtual terminal; it does not restart Home.

While it runs, the command takes over the display. It returns to the previous terminal when it finishes or receives SIGINT (Ctrl+C) or SIGTERM. Switching to another terminal pauses the presentation until you switch back. If the terminal cannot be restored, the command fails even though the frames were shown.

After the series, the command prints the number of completed frames and the time spent converting, submitting to the display and running the whole series. These figures describe the command, not the panel’s latency or refresh rate.

A successful run means the display accepted every frame, not that the picture on the panel is correct. The command cannot read back what the panel shows, and the two modes and the visible result are not guaranteed to match pixel for pixel.