mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Only print PSNR if some frames were encoded.
This commit is contained in:
parent
089ff895ad
commit
cc580ac861
|
@ -248,9 +248,16 @@ int main(int argc, char *argv[])
|
|||
// Coding finished
|
||||
|
||||
// Print statistics of the coding
|
||||
fprintf(stderr, " Processed %d frames, %10llu bits AVG PSNR: %2.4f %2.4f %2.4f\n",
|
||||
frames_done, (long long unsigned int)bitstream_length * 8,
|
||||
psnr_sum[0] / frames_done, psnr_sum[1] / frames_done, psnr_sum[2] / frames_done);
|
||||
fprintf(stderr, " Processed %d frames, %10llu bits",
|
||||
frames_done,
|
||||
(long long unsigned int)bitstream_length * 8);
|
||||
if (frames_done > 0) {
|
||||
fprintf(stderr, " AVG PSNR: %2.4f %2.4f %2.4f",
|
||||
psnr_sum[0] / frames_done,
|
||||
psnr_sum[1] / frames_done,
|
||||
psnr_sum[2] / frames_done);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " Total CPU time: %.3f s.\n", ((float)(clock() - start_time)) / CLOCKS_PER_SEC);
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue