You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
ipmovie: do not read audio packets before the codec is known
truemotion2: check size before GetBitContext initialisation
avio: Only do implicit network initialization for network protocols
avio: Add an URLProtocol flag for indicating that a protocol uses network
adpcm: ADPCM Electronic Arts has always two channels
matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc()
fate: Add missing reference file from 9b4767e4.
mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions.
4xm: Prevent buffer overreads.
mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan
vp3: add fate test for non-zero last coefficient
vp3: fix streams with non-zero last coefficient
swscale: remove unused U/V arguments from yuv2rgb_write().
timer: K&R formatting cosmetics
lavf: cosmetics, reformat av_read_frame().
lavf: refactor av_read_frame() to make it easier to understand.
Report an error if pitch_lag is zero in AMR-NB decoder.
Revert "4xm: Prevent buffer overreads."
4xm: Prevent buffer overreads.
4xm: pass the correct remaining buffer size to decode_i2_frame().
...
Conflicts:
libavcodec/4xm.c
libavcodec/mjpegdec.c
libavcodec/truemotion2.c
libavformat/ipmovie.c
libavformat/mov_chan.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if ARCH_ARM
|
||||
@@ -45,29 +46,32 @@
|
||||
#endif
|
||||
|
||||
#ifdef AV_READ_TIME
|
||||
#define START_TIMER \
|
||||
uint64_t tend;\
|
||||
uint64_t tstart= AV_READ_TIME();\
|
||||
#define START_TIMER \
|
||||
uint64_t tend; \
|
||||
uint64_t tstart = AV_READ_TIME(); \
|
||||
|
||||
#define STOP_TIMER(id) \
|
||||
tend= AV_READ_TIME();\
|
||||
{\
|
||||
static uint64_t tsum=0;\
|
||||
static int tcount=0;\
|
||||
static int tskip_count=0;\
|
||||
if(tcount<2 || tend - tstart < 8*tsum/tcount || tend - tstart < 2000){\
|
||||
tsum+= tend - tstart;\
|
||||
tcount++;\
|
||||
}else\
|
||||
tskip_count++;\
|
||||
if(((tcount+tskip_count)&(tcount+tskip_count-1))==0){\
|
||||
av_log(NULL, AV_LOG_ERROR, "%"PRIu64" decicycles in %s, %d runs, %d skips\n",\
|
||||
tsum*10/tcount, id, tcount, tskip_count);\
|
||||
}\
|
||||
}
|
||||
#define STOP_TIMER(id) \
|
||||
tend = AV_READ_TIME(); \
|
||||
{ \
|
||||
static uint64_t tsum = 0; \
|
||||
static int tcount = 0; \
|
||||
static int tskip_count = 0; \
|
||||
if (tcount < 2 || \
|
||||
tend - tstart < 8 * tsum / tcount || \
|
||||
tend - tstart < 2000) { \
|
||||
tsum+= tend - tstart; \
|
||||
tcount++; \
|
||||
} else \
|
||||
tskip_count++; \
|
||||
if (((tcount + tskip_count) & (tcount + tskip_count - 1)) == 0) { \
|
||||
av_log(NULL, AV_LOG_ERROR, \
|
||||
"%"PRIu64" decicycles in %s, %d runs, %d skips\n", \
|
||||
tsum * 10 / tcount, id, tcount, tskip_count); \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define START_TIMER
|
||||
#define STOP_TIMER(id) {}
|
||||
#define STOP_TIMER(id) { }
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_TIMER_H */
|
||||
|
||||
Reference in New Issue
Block a user