run_dec.sh 1.0 KB

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. #creat by samin@starfive
  3. ##########################JPU Dec Test#####################################
  4. dec_input_path='stream'
  5. dec_output_path='output/dec'
  6. dec_exec='./jpg_dec_test'
  7. dec_log_path='log/dec'
  8. BITSTREAM_8M="8388608" #8M
  9. if [ -d $dec_output_path ];then
  10. rm -rf $dec_output_path
  11. fi
  12. if [ -d $dec_log_path ];then
  13. rm -rf $dec_log_path
  14. fi
  15. mkdir -p $dec_output_path
  16. mkdir -p $dec_log_path
  17. dec_cmd_base="--rotation=0 --mirror=0 --stream-endian=0 --frame-endian=0 --subsample=none --ordering=none --scaleH=0 --scaleV=0 --pixelj=0"
  18. for dec_file in $dec_input_path/*; do
  19. dec_file_base=$(basename $dec_file)
  20. dec_file_base=${dec_file_base%.*}
  21. dec_output_file="$dec_output_path/$dec_file_base.yuv"
  22. echo [input]:$dec_file
  23. echo [output]:$dec_output_file
  24. echo "$dec_exec $dec_cmd_base --bs-size=$BITSTREAM_8M --output=$dec_output_file --input=$dec_file" | tee ${dec_log_path}/${dec_file_base}.log
  25. $dec_exec $dec_cmd_base --bs-size=$BITSTREAM_8M --output=$dec_output_file --input=$dec_file 2>&1| tee -a ${dec_log_path}/${dec_file_base}.log
  26. done