#!/bin/bash

if [ $# -ne 9 ]; then
    echo "Illegal number of parameters"
	echo "S1-AV1-02.sh <num_frame> <fps_norm> <fps_denom> <width> <height> <cq-level> <intra_period> <input> <output>"
	exit 2
fi
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  --fwd-kf-dist=$7  --lag-in-frames=35 --auto-alt-ref=1  --use-fixed-qp-offsets=1  --deltaq-mode=5 --color-primaries=bt2020 --transfer-characteristics=smpte2084 --matrix-coefficients=bt2020ncl --chroma-sample-position=colocated -o $9 $8
