high precision timer, useful to profile code
More...
#include "config.h"
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include "log.h"
Go to the source code of this file.
|
|
#define | FF_TIMER_UNITS "UNITS" |
| |
| #define | TIMER_REPORT(id, tdiff) |
| |
|
#define | START_TIMER |
| |
|
#define | STOP_TIMER(id) { } |
| |
high precision timer, useful to profile code
§ TIMER_REPORT
| #define TIMER_REPORT |
( |
|
id, |
|
|
|
tdiff |
|
) |
| |
Value:{ \
static uint64_t tsum = 0; \
static int tcount = 0; \
static int tskip_count = 0; \
static int thistogram[32] = {0}; \
thistogram[av_log2(tdiff)]++; \
if (tcount < 2 || \
(tdiff) < 8 * tsum / tcount || \
(tdiff) < 2000) { \
tsum += (tdiff); \
tcount++; \
} else \
tskip_count++; \
if (((tcount + tskip_count) & (tcount + tskip_count - 1)) == 0) { \
int i; \
"%7"PRIu64" " FF_TIMER_UNITS " in %s,%8d runs,%7d skips", \
tsum * 10 / tcount, id, tcount, tskip_count); \
for (i = 0; i < 32; i++) \
} \
}
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:192
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176