--add-x-timings

This commit is contained in:
Devaev Maxim
2018-09-30 16:54:29 +03:00
parent 5146314725
commit f18a3ef992
6 changed files with 90 additions and 21 deletions

View File

@@ -131,6 +131,8 @@ void encoder_prepare_for_device(struct encoder_t *encoder, struct device_t *dev)
int encoder_compress_buffer(struct encoder_t *encoder, struct device_t *dev, const unsigned index) {
assert(encoder->type != ENCODER_TYPE_UNKNOWN);
dev->run->pictures[index].encode_begin_time = now_monotonic_ms();
if (encoder->type == ENCODER_TYPE_CPU) {
jpeg_encoder_compress_buffer(dev, index, encoder->quality);
}
@@ -142,6 +144,8 @@ int encoder_compress_buffer(struct encoder_t *encoder, struct device_t *dev, con
}
# endif
dev->run->pictures[index].encode_end_time = now_monotonic_ms();
return 0;
# pragma GCC diagnostic ignored "-Wunused-label"