enc_qsv: clean up encoding loop.