setlocal ENABLEDELAYEDEXPANSION
set ENCODER=TAppEncoder.exe
set DECODER=TAppDecoder.exe
set SRC=sandstorms_352x288_30
set CFG_DIR=..\..\..\..\..\cfg

set FRM=30

set BASE_CFG=encoder_randomaccess
FOR %%I IN (0 4 8 12) DO (
SET /A QP=%%I
%ENCODER% -c %CFG_DIR%\%BASE_CFG%.cfg -c %SRC%.cfg -q !QP! -b %SRC%.%BASE_CFG%.qp!QP!.bin -o %SRC%.%BASE_CFG%.qp!QP!.yuv --FrameToBeEncoded=%FRM% --PCMEnabledFlag=1 > %SRC%.%BASE_CFG%.qp!QP!.log
%DECODER% -b %SRC%.%BASE_CFG%.qp!QP!.bin >  %SRC%.%BASE_CFG%.qp!QP!.dec.log
)

set BASE_CFG=encoder_randomaccess_loco
FOR %%I IN (0 4 8 12) DO (
SET /A QP=%%I
%ENCODER% -c %CFG_DIR%\%BASE_CFG%.cfg -c %SRC%.cfg -q !QP! -b %SRC%.%BASE_CFG%.qp!QP!.bin -o %SRC%.%BASE_CFG%.qp!QP!.yuv --FrameToBeEncoded=%FRM% --PCMEnabledFlag=1 > %SRC%.%BASE_CFG%.qp!QP!.log
%DECODER% -b %SRC%.%BASE_CFG%.qp!QP!.bin >  %SRC%.%BASE_CFG%.qp!QP!.dec.log
)