tests: add decoder stream output

       refact code, it's easy to support other decode output such as psnr, md5.