Revision fb38685e psnr.sh

View differences:

psnr.sh
20 20

  
21 21
function usage {
22 22
   echo "Usage: $0 init <orig video>";
23
   echo "       $0 calc <chunksize> <file with losses> <output file>";
23
   echo "       $0 calc <chunksize> <file with losses>";
24 24
   exit $1 
25 25
}
26 26

  
......
45 45
}
46 46

  
47 47
function calc {
48
  [[ $# -eq 3 ]] || usage 1
48
  [[ $# -eq 2 ]] || usage 1
49 49

  
50 50
  CHUNK_SIZE=$1
51 51
  LOST_FILE=$2
52
  OUTPUT_FILE=$3
53 52

  
54 53
  #cut lost chunks
55 54
  if [[ $CHUNK_SIZE == 0 ]]; then
......
69 68

  
70 69
  #reconstruct sequence by duplicating 
71 70
  $LOGPARSER ${TMPPREFIX}orig_log.txt ${TMPPREFIX}received_log.txt > ${TMPPREFIX}received_dup.txt
72
  $REFILLER $RECEIVED_MP4 $REFILLED_YUV ${TMPPREFIX}received_dup.txt
71
  $REFILLER $RECEIVED_MP4 $REFILLED_YUV ${TMPPREFIX}received_dup.txt > ${TMPPREFIX}refiller_log.txt
73 72
  $EVALPSNR $XSIZE $YSIZE 420 $ORIG_YUV $REFILLED_YUV >${TMPPREFIX}psnr_log.txt 2>&1
74 73

  
75 74
  PSNR=`awk '/^psnr:/ {print $8}' ${TMPPREFIX}psnr_log.txt`

Also available in: Unified diff