#!/bin/bash

if [ $# -ne 8 ]; then
    echo "Illegal number of parameters"
	echo "S5-AV1-01.sh <num_frame> <fps_norm> <fps_denom> <width> <height> <cq-level> <input> <output>"
	exit 2
fi

# encode
aomenc --verbose --codec=av1 -v --psnr --obu --frame-parallel=0 --cpu-used=0 --limit=$1 --passes=1 --end-usage=q --i420 --enable-tpl-model=0 --enable-keyframe-filtering=1 --fps=$2/$3 --input-bit-depth=10 --bit-depth=10 -w $4 -h $5 --cq-level=$6 --tile-columns=0 --threads=1 --min-gf-interval=32 --max-gf-interval=32 --gf-min-pyr-height=5 --gf-max-pyr-height=5 --kf-min-dist=9999 --kf-max-dist=9999 --lag-in-frames=0  --use-fixed-qp-offsets=1  --deltaq-mode=0 -o $8 $7
