FFmpeg  4.0
Macros
timer.h File Reference

high precision timer, useful to profile code More...

#include "config.h"
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include "log.h"
#include "x86/timer.h"

Go to the source code of this file.

Macros

#define FF_TIMER_UNITS   "UNITS"
 
#define TIMER_REPORT(id, tdiff)
 
#define START_TIMER
 
#define STOP_TIMER(id)   { }
 

Detailed Description

high precision timer, useful to profile code

Definition in file timer.h.

Macro Definition Documentation

◆ FF_TIMER_UNITS

#define FF_TIMER_UNITS   "UNITS"

Definition at line 70 of file timer.h.

◆ 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; \
av_log(NULL, AV_LOG_ERROR, \
"%7"PRIu64" " FF_TIMER_UNITS " in %s,%8d runs,%7d skips", \
tsum * 10 / tcount, id, tcount, tskip_count); \
for (i = 0; i < 32; i++) \
av_log(NULL, AV_LOG_VERBOSE, " %2d", av_log2(2*thistogram[i]));\
av_log(NULL, AV_LOG_ERROR, "\n"); \
} \
}
#define NULL
Definition: coverity.c:32
#define FF_TIMER_UNITS
Definition: timer.h:70
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:192
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
#define av_log2
Definition: intmath.h:83

Definition at line 73 of file timer.h.

◆ START_TIMER

#define START_TIMER

Definition at line 137 of file timer.h.

Referenced by dct_quantize_refine(), and main().

◆ STOP_TIMER

#define STOP_TIMER (   id)    { }

Definition at line 138 of file timer.h.

Referenced by dct_quantize_refine(), and main().