#!/bin/sh # # Test FCNL compression on the WPF. Use a RPF -> WPF pipeline with the same # format at the input and output, and capture output frames in all FCNL-enabled # formats supported by the WPF. # . ./vsp-lib.sh features="rpf.0 wpf.0 rpf.0[control:'Near-Lossless+Compression'] wpf.0[control:'Near-Lossless+Compression']" formats="ARGB32 YUYV YUV420M YUV422M YUV444M" test_wpf_packing() { local file local frame test_start "WPF packing in $format with FCNL compression" pipe_configure rpf-wpf 0 0 format_configure rpf-wpf 0 0 $format 1024x768 $format # Step 1: compress the frame with FCNL vsp1_set_control rpf.0 "Near-Lossless Compression" 0 vsp1_set_control wpf.0 "Near-Lossless Compression" 1 vsp_runner rpf.0 & vsp_runner wpf.0 cp ${frames_dir}frame-000007.bin ${frames_dir}frame-fcnl.bin cp ${frames_dir}frame-000007.bin ./${format}-frame-fcnl.bin # Step 2: use the output of step 1 and decompress it vsp1_set_control rpf.0 "Near-Lossless Compression" 1 vsp1_set_control wpf.0 "Near-Lossless Compression" 0 vsp_runner rpf.0 --file=${frames_dir}frame-fcnl.bin & vsp_runner wpf.0 for frame in ${frames_dir}frame-*.bin ; do cp ${frame} ./$format-$(basename ${frame}) done rm ${frames_dir}frame-fcnl.bin test_complete pass } test_main() { local format for format in $formats ; do test_wpf_packing $format done } test_init $0 "$features" test_run