

### Requirements ###
- CDSP build: 
    -- The CDSP image on the DUT must support standalone testing (as opposed to IFE mastering). The cdsp build command is: python ./cdsp_proc/build/ms/build_client.py SM8250_CDSP_PROD bparams="USES_FLAGS=USES_STANDALONE_STREAMER_TEST"  
- Android App:
    -- The Android App "dsp_streamer_test" executable makes fastrpc calls to open/clos/start/stop/configure/etc the streamer.
    -- The Android App "dsp_streamer_test" executable is built within the SDK environment.
    -- Build and push:
        --- Copy the entire camera_streamer directory in Hexagon_SDK\<ver>\examples\common. 
        --- Add a glue directory 
            ---- cd Hexagon_SDK\<ver>\examples\common\camera_streamer\tests
            ---- make tree V=android_ReleaseG
            ---- adb push Hexagon_SDK\<ver>\examples\common\camera_streamer\test\android_ReleaseG\ship\dsp_streamer_test /data/local/tmp
            ---- adb shell chmod 777 /data/local/tmp/dsp_streamer_test
### Execution ###
- Parameters:
 [t]: test type: see test_type_t
 [u]: unit test id
    for each sess (these are applied to the most recent session which was supplied through the "-s" option):
     [s]: session ID
     [n]: num_frms. Number of input/output frames read from/to the files and sent to the streamer.
     [m]: mode flag. Bit fields: see mode_offset_t
     [a]: algo_name
     [i]: input filename
     [b]: input file offset (bytes)
     [o]: output filename
     [k]: number of dynamic_config sent
     [y]: metadata filename
     [f]: pixel format. See 
     [d]: bixel bit_depth. bits per pixel
     [r]: frame rate
     [p]: numer of seconds to pause before starting test.
     for each of input/output (these parameters are applied to the input until the "-o" option is supplied. After that, the parameters will be applied on the output):
        [w]: image width
        [h]: image height 

 Notes: 
 - metadata buf sz is determined by usecase/algo_name
 
  Examples:
    - single session add_constant
    adb shell /data/local/tmp/dsp_streamer_test -t 1 -s 1 -n 10 -m 2 -a add_constant -k 10 -y /data/local/tmp/metafile.txt -f 0 -d 10 -w 1920 -h 1080 -i /sdcard/DCIM/Camera/tomi_jump_20191107_RGGB10_1920x1080.yuv -o /data/local/tmp/outfile.yuv -w 1920 -h 1080 
    
    -single session vpt
    adb shell /data/local/tmp/dsp_streamer_test -t 1 -s 1 -n 300 -m 3 -a vpt -k 2 -y /data/local/tmp/metafile.txt -f 0 -d 8 -w 1920 -h 1080 -i /sdcard/DCIM/Camera/tomi_jump_20191107_RGGB8_1920x1080.yuv -r 120 -o /data/local/tmp/outfile.yuv -w 1920 -h 1080
    adb shell /data/local/tmp/dsp_streamer_test -t 1 -s 1 -n 720 -m 3 -a vpt -k 4 -y /data/local/tmp/metafile.txt -f 0 -d 8 -w 1920 -h 1080 -i /sdcard/DCIM/Camera/vpt_20191003_054634_1920x1080_240fps_0_RGGB8_1920x1080_rot2.yuv -b 4147200 -r 240 -o /data/local/tmp/outfile.yuv -w 1920 -h 1080
    
 Conversions:
    - MP4->NV12->BAYER10_RGGB: 
        1) ffmpeg.exe -i tomi_jump_20191107_1920x1080.mp4 -f rawvideo -vcodec rawvideo -pix_fmt nv12 -s 1920x1080 -r 30 tomi_jump_20191107_nv12_1920x1080.yuv
        2) imageconvert.exe tomi_jump_20191107_nv12_1920x1080.yuv tomi_jump_20191107_RGGB10_1920x1080.yuv 1920 1080 NV12 BAYER10_RGGB