Skip to content

Commit 85f72fe

Browse files
committed
stats: add clear() function to frame-level stats struct
1 parent 1afcf93 commit 85f72fe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

source/x265.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,17 @@ typedef struct x265_sliceType_stats
396396
double psnrV;
397397
double ssim;
398398
uint32_t numPics;
399+
400+
void clear() {
401+
avgQp = 0.0;
402+
bitrate = 0.0;
403+
psnrY = 0.0;
404+
psnrU = 0.0;
405+
psnrV = 0.0;
406+
ssim = 0.0;
407+
numPics = 0;
408+
}
409+
399410
} x265_sliceType_stats;
400411

401412
/* Output statistics from encoder */

0 commit comments

Comments
 (0)