72 #if HAVE_SYS_RESOURCE_H
74 #include <sys/types.h>
75 #include <sys/resource.h>
76 #elif HAVE_GETPROCESSTIMES
79 #if HAVE_GETPROCESSMEMORYINFO
85 #include <sys/select.h>
90 #include <sys/ioctl.h>
136 #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass"
154 static struct termios oldtty;
155 static int restore_tty;
184 uint32_t *pal, *dst2;
192 if (r->
x < 0 || r->
x + r->
w > w || r->
y < 0 || r->
y + r->
h > h) {
197 dst += r->
y * dst_linesize + r->
x * 4;
200 for (y = 0; y < r->
h; y++) {
201 dst2 = (uint32_t *)dst;
203 for (x = 0; x < r->
w; x++)
204 *(dst2++) = pal[*(src2++)];
230 int64_t pts, end_pts;
247 "Impossible to get a blank canvas.\n");
250 dst = frame->
data [0];
252 for (i = 0; i < num_rects; i++)
276 if (pts2 <= ist2->sub2video.last_pts)
280 for (j = 0, nb_reqs = 0; j < ist2->
nb_filters; j++)
303 tcsetattr (0, TCSANOW, &oldtty);
335 istty = isatty(0) && isatty(2);
337 if (istty && tcgetattr (0, &tty) == 0) {
341 tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
342 |INLCR|IGNCR|ICRNL|IXON);
343 tty.c_oflag |= OPOST;
344 tty.c_lflag &= ~(
ECHO|ECHONL|ICANON|IEXTEN);
345 tty.c_cflag &= ~(CSIZE|PARENB);
350 tcsetattr (0, TCSANOW, &tty);
377 n = select(1, &rfds, NULL, NULL, &tv);
386 # if HAVE_PEEKNAMEDPIPE
388 static HANDLE input_handle;
391 input_handle = GetStdHandle(STD_INPUT_HANDLE);
392 is_pipe = !GetConsoleMode(input_handle, &dw);
395 if (stdin->_cnt > 0) {
401 if (!PeekNamedPipe(input_handle, NULL, 0, NULL, &nchars, NULL)) {
433 printf(
"bench: maxrss=%ikB\n", maxrss);
572 printf(
"bench: %8"PRIu64
" %s \n", t -
current_time, buf);
583 ost2->
finished |= ost == ost2 ? this_stream : others;
632 memcpy(t, new_pkt.
data, new_pkt.
size);
649 av_log(NULL,
AV_LOG_ERROR,
"Failed to open bitstream filter %s for stream %d with codec %s",
667 if (pkt->
dts < max) {
669 av_log(s, loglevel,
"Non-monotonous DTS in output stream "
670 "%d:%d; previous: %"PRId64
", current: %"PRId64
"; ",
676 av_log(s, loglevel,
"changing to %"PRId64
". This may result "
677 "in incorrect timestamps in the output file.\n",
703 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s size:%d\n",
768 "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n",
784 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
798 int subtitle_out_max_size = 1024 * 1024;
799 int subtitle_out_size, nb, i;
829 for (i = 0; i < nb; i++) {
830 unsigned save_num_rects = sub->
num_rects;
847 subtitle_out_max_size, sub);
850 if (subtitle_out_size < 0) {
857 pkt.
size = subtitle_out_size;
864 pkt.
pts += 90 * sub->start_display_time;
866 pkt.
pts += 90 * sub->end_display_time;
877 int ret, format_video_sync;
882 double sync_ipts,
delta;
893 sync_ipts = in_picture->
pts;
916 switch (format_video_sync) {
918 if (ost->
frame_number == 0 && delta - duration >= 0.5) {
927 else if (delta > 1.1)
928 nb_frames =
lrintf(delta);
933 else if (delta > 0.6)
945 if (nb_frames == 0) {
948 "*** dropping frame %d from stream %d at ts %"PRId64
"\n",
951 }
else if (nb_frames > 1) {
953 av_log(NULL,
AV_LOG_ERROR,
"%d frame duplication too large, skipping\n", nb_frames - 1);
962 for (i = 0; i < nb_frames; i++) {
994 int got_packet, forced_keyframe = 0;
1018 forced_keyframe = 1;
1024 av_dlog(NULL,
"force_key_frame: n:%f n_forced:%f prev_forced_n:%f t:%f prev_forced_t:%f -> res:%f\n",
1032 forced_keyframe = 1;
1043 if (forced_keyframe) {
1051 "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n",
1068 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
1080 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
1085 frame_size = pkt.
size;
1109 return -10.0 * log(d) / log(10.0);
1116 double ti1, bitrate, avg_bitrate;
1141 avg_bitrate = (double)(ost->
data_size * 8) / ti1 / 1000.0;
1142 fprintf(
vstats_file,
"s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
1143 (
double)ost->
data_size / 1024, ti1, bitrate, avg_bitrate);
1169 AVFrame *filtered_frame = NULL;
1196 "Error in av_buffersink_get_frame_flags(): %s\n",
av_err2str(ret));
1207 filtered_frame->
pts = frame_pts =
1216 filtered_frame->
pts = frame_pts;
1229 filtered_frame->
pts = frame_pts;
1233 "Audio filter graph output is not normalized and encoder does not support parameter changes\n");
1252 uint64_t video_size = 0, audio_size = 0, extra_size = 0, other_size = 0;
1253 uint64_t subtitle_size = 0;
1254 uint64_t data_size = 0;
1255 float percent = -1.0;
1264 default: other_size += ost->
data_size;
break;
1270 if (data_size && total_size>0 && total_size >= data_size)
1271 percent = 100.0 * (total_size - data_size) / data_size;
1274 av_log(NULL,
AV_LOG_INFO,
"video:%1.0fkB audio:%1.0fkB subtitle:%1.0fkB other streams:%1.0fkB global headers:%1.0fkB muxing overhead: ",
1275 video_size / 1024.0,
1276 audio_size / 1024.0,
1277 subtitle_size / 1024.0,
1278 other_size / 1024.0,
1279 extra_size / 1024.0);
1289 uint64_t total_packets = 0, total_size = 0;
1318 total_packets, total_size);
1323 uint64_t total_packets = 0, total_size = 0;
1352 total_packets, total_size);
1354 if(video_size + data_size + audio_size + subtitle_size + extra_size == 0){
1355 av_log(NULL,
AV_LOG_WARNING,
"Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)\n");
1367 int frame_number, vid, i;
1369 int64_t pts = INT64_MIN;
1370 static int64_t last_time = -1;
1371 static int qp_histogram[52];
1372 int hours, mins, secs, us;
1374 if (!
print_stats && !is_last_report && !progress_avio)
1377 if (!is_last_report) {
1378 if (last_time == -1) {
1382 if ((cur_time - last_time) < 500000)
1388 oc = output_files[0]->
ctx;
1391 if (total_size <= 0)
1399 ost = output_streams[i];
1404 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"q=%2.1f ", q);
1405 av_bprintf(&buf_script,
"stream_%d_%d_q=%.1f\n",
1409 float fps, t = (cur_time-timer_start) / 1000000.0;
1412 fps = t > 1 ? frame_number / t : 0;
1413 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"frame=%5d fps=%3.*f q=%3.1f ",
1414 frame_number, fps < 9.95, fps, q);
1415 av_bprintf(&buf_script,
"frame=%d\n", frame_number);
1417 av_bprintf(&buf_script,
"stream_%d_%d_q=%.1f\n",
1420 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"L");
1426 for (j = 0; j < 32; j++)
1427 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"%X", (
int)
lrintf(
log2(qp_histogram[j] + 1)));
1431 double error, error_sum = 0;
1432 double scale, scale_sum = 0;
1434 char type[3] = {
'Y',
'U',
'V' };
1435 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"PSNR=");
1436 for (j = 0; j < 3; j++) {
1437 if (is_last_report) {
1438 error = enc->
error[j];
1439 scale = enc->
width * enc->
height * 255.0 * 255.0 * frame_number;
1448 p =
psnr(error / scale);
1449 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"%c:%2.2f ", type[j], p);
1450 av_bprintf(&buf_script,
"stream_%d_%d_psnr_%c=%2.2f\n",
1453 p =
psnr(error_sum / scale_sum);
1454 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"*:%2.2f ",
psnr(error_sum / scale_sum));
1455 av_bprintf(&buf_script,
"stream_%d_%d_psnr_all=%2.2f\n",
1473 bitrate = pts && total_size >= 0 ? total_size * 8 / (pts / 1000.0) : -1;
1475 if (total_size < 0)
snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1477 else snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1478 "size=%8.0fkB time=", total_size / 1024.0);
1479 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1480 "%02d:%02d:%02d.%02d ", hours, mins, secs,
1482 if (bitrate < 0)
snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1484 else snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1485 "bitrate=%6.1fkbits/s", bitrate);
1486 if (total_size < 0)
av_bprintf(&buf_script,
"total_size=N/A\n");
1487 else av_bprintf(&buf_script,
"total_size=%"PRId64
"\n", total_size);
1488 av_bprintf(&buf_script,
"out_time_ms=%"PRId64
"\n", pts);
1489 av_bprintf(&buf_script,
"out_time=%02d:%02d:%02d.%06d\n",
1490 hours, mins, secs, us);
1493 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
" dup=%d drop=%d",
1500 fprintf(stderr,
"%s \r", buf);
1507 if (progress_avio) {
1509 is_last_report ?
"end" :
"continue");
1511 FFMIN(buf_script.len, buf_script.size - 1));
1514 if (is_last_report) {
1516 progress_avio = NULL;
1532 int stop_encoding = 0;
1568 ret = encode(enc, &pkt, NULL, &got_packet);
1586 pkt_size = pkt.
size;
1674 opkt.
dts -= ost_tb_start_time;
1695 &opkt.data, &opkt.size,
1710 avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height);
1724 char layout_name[256];
1743 int i,
ret, err = 0, resample_changed;
1761 if (*got_output || ret<0 || pkt->
size)
1764 if (!*got_output || ret < 0) {
1792 if (resample_changed) {
1793 char layout1[64], layout2[64];
1797 "layout for Input Stream #%d.%d\n", ist->
file_index,
1809 "Input stream #%d:%d frame changed from rate:%d fmt:%s ch:%d chl:%s to rate:%d fmt:%s ch:%d chl:%s\n",
1840 decoded_frame->
pts = pkt->
pts;
1843 decoded_frame->
pts = ist->
dts;
1851 for (i = 0; i < ist->nb_filters; i++) {
1852 if (i < ist->nb_filters - 1) {
1853 f = ist->filter_frame;
1870 return err < 0 ? err :
ret;
1876 int i,
ret = 0, err = 0, resample_changed;
1877 int64_t best_effort_timestamp;
1889 decoded_frame, got_output, pkt);
1900 "has_b_frames is larger in decoder than demuxer %d > %d ",
1906 if (*got_output || ret<0 || pkt->
size)
1909 if (!*got_output || ret < 0) {
1939 "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64
" best_effort_ts_time:%s keyframe:%d frame_type:%d time_base:%d/%d\n",
1942 best_effort_timestamp,
1956 if (resample_changed) {
1958 "Input stream #%d:%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s\n",
1978 if (!frame_sample_aspect->
num)
1981 if (i < ist->nb_filters - 1) {
1991 }
else if (ret < 0) {
1993 "Failed to inject frame into filter network: %s\n",
av_err2str(ret));
2001 return err < 0 ? err :
ret;
2008 &subtitle, got_output, pkt);
2010 if (*got_output || ret<0 || pkt->
size)
2013 if (ret < 0 || !*got_output) {
2024 if (end < ist->prev_sub.subtitle.end_display_time) {
2026 "Subtitle duration reduced from %d to %d%s\n",
2028 end <= 0 ?
", dropping it" :
"");
2113 "Multiple frames in a packet from stream %d\n", pkt->
stream_index);
2164 if (got_output && !pkt)
2216 avc[i] = output_files[i]->ctx;
2219 printf(
"SDP:\n%s\n", sdp);
2228 if (
hwaccels[i].pix_fmt == pix_fmt)
2239 for (p = pix_fmts; *p != -1; p++) {
2252 ret = hwaccel->
init(s);
2256 "%s hwaccel requested for input stream #%d:%d, "
2257 "but cannot be initialized.\n", hwaccel->
name,
2289 snprintf(error, error_len,
"Decoder (codec %s) not found for input stream #%d:%d",
2304 av_log(NULL,
AV_LOG_WARNING,
"Warning using DVB subtitles for filtering and output at the same time is not fully supported, also see -compute_edt [0|1]\n");
2314 "Error while opening decoder for input stream "
2337 int64_t va = *(int64_t *)a, vb = *(int64_t *)
b;
2338 return va < vb ? -1 : va > vb ? +1 : 0;
2348 for (p = kf; *p; p++)
2359 for (i = 0; i <
n; i++) {
2360 char *next = strchr(p,
',');
2365 if (!memcmp(p,
"chapters", 8)) {
2374 "Could not allocate forced key frames array.\n");
2406 InputFile *file = input_files[input_index];
2412 "New %s stream %d:%d at pos:%"PRId64
" and DTS:%ss\n",
2424 int encoder_string_len;
2425 int format_flags = 0;
2447 encoder_string =
av_mallocz(encoder_string_len);
2448 if (!encoder_string)
2454 av_strlcpy(encoder_string,
"Lavc ", encoder_string_len);
2462 int ret = 0, i, j, k;
2478 if (fg->
inputs[0]->
ist == input_streams[k])
2494 oc = output_files[i]->
ctx;
2511 ost = output_streams[i];
2539 uint64_t extra_size;
2545 if (extra_size > INT_MAX) {
2554 unsigned int codec_tag;
2601 if( copy_tb<0 && dec_ctx->time_base.den
2629 av_log(NULL,
AV_LOG_FATAL,
"-acodec copy and -vol are incompatible (frames are not decoded)\n");
2654 "with stream copy may produce invalid files\n");
2678 snprintf(error,
sizeof(error),
"Encoder (codec %s) not found for output stream #%d:%d",
2712 "about the input framerate is available. Falling "
2713 "back to a default value of 25fps for output stream #%d:%d. Use the -r option "
2714 "if you want a different framerate.\n",
2728 switch (enc_ctx->codec_type) {
2734 enc_ctx->time_base = (
AVRational){ 1, enc_ctx->sample_rate };
2738 if (ost->
filter && !(enc_ctx->time_base.num && enc_ctx->time_base.den))
2743 "Please consider specifying a lower framerate, a different muxer or -vsync 2\n");
2748 enc_ctx->time_base);
2756 if (!strncmp(ost->
enc->
name,
"libx264", 7) &&
2760 "No pixel format specified, %s for H.264 encoding chosen.\n"
2761 "Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
2763 if (!strncmp(ost->
enc->
name,
"mpeg2video", 10) &&
2767 "No pixel format specified, %s for MPEG-2 encoding chosen.\n"
2768 "Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
2801 if (!enc_ctx->width) {
2815 snprintf(logfilename,
sizeof(logfilename),
"%s-%d.log",
2819 if (!strcmp(ost->
enc->
name,
"libx264")) {
2824 size_t logbuffer_size;
2830 enc_ctx->stats_in = logbuffer;
2836 logfilename, strerror(errno));
2848 ost = output_streams[i];
2849 if (ost->encoding_needed) {
2858 if (!ost->enc_ctx->subtitle_header) {
2865 if (!
av_dict_get(ost->encoder_opts,
"threads", NULL, 0))
2866 av_dict_set(&ost->encoder_opts,
"threads",
"auto", 0);
2867 av_dict_set(&ost->encoder_opts,
"side_data_only_packets",
"1", 0);
2872 snprintf(error,
sizeof(error),
"Error while opening encoder for output stream #%d:%d - maybe incorrect parameters such as bit_rate, rate, width or height",
2873 ost->file_index, ost->index);
2879 ost->enc_ctx->frame_size);
2881 if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000)
2883 " It takes bits/s as argument, not kbits/s\n");
2887 "Error setting up codec context options.\n");
2895 "Error initializing the output stream codec context.\n");
2898 ost->st->codec->codec= ost->enc_ctx->codec;
2908 ost = output_streams[i];
2932 oc = output_files[i]->
ctx;
2936 "Could not write header for output file #%d "
2937 "(incorrect codec parameters ?): %s",
2943 if (strcmp(oc->oformat->name,
"rtp")) {
2952 av_dump_format(output_files[i]->ctx, i, output_files[i]->ctx->filename, 1);
2958 ist = input_streams[i];
2960 for (j = 0; j < ist->nb_filters; j++) {
2961 if (ist->filters[j]->graph->graph_desc) {
2963 ist->file_index, ist->st->index, ist->dec ? ist->dec->name :
"?",
2964 ist->filters[j]->name);
2973 ost = output_streams[i];
2975 if (ost->attachment_filename) {
2978 ost->attachment_filename, ost->file_index, ost->index);
2982 if (ost->filter && ost->filter->graph->graph_desc) {
2989 ost->index, ost->enc ? ost->enc->name :
"?");
2994 input_streams[ost->source_index]->
file_index,
2995 input_streams[ost->source_index]->
st->
index,
2998 if (ost->sync_ist != input_streams[ost->source_index])
3000 ost->sync_ist->file_index,
3001 ost->sync_ist->st->index);
3002 if (ost->stream_copy)
3005 const AVCodec *in_codec = input_streams[ost->source_index]->
dec;
3006 const AVCodec *out_codec = ost->enc;
3007 const char *decoder_name =
"?";
3008 const char *in_codec_name =
"?";
3009 const char *encoder_name =
"?";
3010 const char *out_codec_name =
"?";
3013 decoder_name = in_codec->
name;
3015 if (!strcmp(decoder_name, in_codec_name))
3016 decoder_name =
"native";
3020 encoder_name = out_codec->
name;
3022 if (!strcmp(encoder_name, out_codec_name))
3023 encoder_name =
"native";
3027 in_codec_name, decoder_name,
3028 out_codec_name, encoder_name);
3081 int64_t opts_min = INT64_MAX;
3099 static int64_t last_time;
3122 if (key ==
'c' || key ==
'C'){
3126 fprintf(stderr,
"\nEnter command: <target>|all <time>|-1 <command>[ <argument>]\n");
3128 while ((k =
read_key()) !=
'\n' && k !=
'\r' && i <
sizeof(buf)-1)
3133 (n = sscanf(buf,
"%63[^ ] %lf %255[^ ] %255[^\n]", target, &time, command, arg)) >= 3) {
3135 target, time, command, arg);
3142 fprintf(stderr,
"Command reply for stream %d: ret:%d res:\n%s", i, ret, buf);
3143 }
else if (key ==
'c') {
3144 fprintf(stderr,
"Queing commands only on filters supporting the specific command is unsupported\n");
3153 "Parse error, at least 3 arguments were expected, "
3154 "only %d given in string '%s'\n", n, buf);
3157 if (key ==
'd' || key ==
'D'){
3161 if(!debug) debug = 1;
3165 if(scanf(
"%d", &debug)!=1)
3166 fprintf(stderr,
"error parsing debug value\n");
3175 fprintf(stderr,
"debug=%d\n", debug);
3178 fprintf(stderr,
"key function\n"
3179 "? show this help\n"
3180 "+ increase verbosity\n"
3181 "- decrease verbosity\n"
3182 "c Send command to first matching filter supporting it\n"
3183 "C Send/Que command to all matching filters\n"
3184 "D cycle through available debug modes\n"
3185 "h dump packets/hex press to cycle through the 3 states\n"
3187 "s Show QP histogram\n"
3194 static void *input_thread(
void *
arg)
3216 "Unable to send packet to main thread: %s\n",
3235 if (!f->in_thread_queue)
3247 static int init_input_threads(
void)
3251 if (nb_input_files == 1)
3259 f->non_blocking = 1;
3266 av_log(NULL,
AV_LOG_ERROR,
"pthread_create failed: %s. Try to increase `ulimit -v` or decrease `ulimit -s`.\n", strerror(ret));
3296 if (nb_input_files > 1)
3297 return get_input_packet_mt(f, pkt);
3306 if (output_streams[i]->unavailable)
3315 input_files[i]->eagain = 0;
3317 output_streams[i]->unavailable = 0;
3329 InputFile *ifile = input_files[file_index];
3350 ist = input_streams[ifile->
ist_index + i];
3381 goto discard_packet;
3390 goto discard_packet;
3394 "next_dts:%s next_dts_time:%s next_pts:%s next_pts_time:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s off:%s off_time:%s\n",
3405 int64_t stime, stime2;
3412 int64_t new_start_time = INT64_MAX;
3454 memcpy(dst_data, src_sd->
data, src_sd->
size);
3477 "Inter stream timestamp discontinuity %"PRId64
", new offset= %"PRId64
"\n",
3496 "timestamp discontinuity %"PRId64
", new offset= %"PRId64
"\n",
3524 av_log(NULL,
AV_LOG_INFO,
"demuxer+ffmpeg -> ist_index:%d type:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s off:%s off_time:%s\n",
3558 int nb_requests, nb_requests_max = 0;
3576 for (i = 0; i < graph->
nb_inputs; i++) {
3577 ifilter = graph->
inputs[i];
3583 if (nb_requests > nb_requests_max) {
3584 nb_requests_max = nb_requests;
3649 int64_t timer_start;
3662 if ((ret = init_input_threads()) < 0)
3698 ist = input_streams[i];
3709 os = output_files[i]->
ctx;
3718 ost = output_streams[i];
3726 ist = input_streams[i];
3742 if (output_streams) {
3744 ost = output_streams[i];
3765 struct rusage rusage;
3767 getrusage(RUSAGE_SELF, &rusage);
3768 return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
3769 #elif HAVE_GETPROCESSTIMES
3771 FILETIME
c, e, k,
u;
3772 proc = GetCurrentProcess();
3773 GetProcessTimes(proc, &c, &e, &k, &u);
3774 return ((int64_t) u.dwHighDateTime << 32 | u.dwLowDateTime) / 10;
3782 #if HAVE_GETRUSAGE && HAVE_STRUCT_RUSAGE_RU_MAXRSS
3783 struct rusage rusage;
3784 getrusage(RUSAGE_SELF, &rusage);
3785 return (int64_t)rusage.ru_maxrss * 1024;
3786 #elif HAVE_GETPROCESSMEMORYINFO
3788 PROCESS_MEMORY_COUNTERS memcounters;
3789 proc = GetCurrentProcess();
3790 memcounters.cb =
sizeof(memcounters);
3791 GetProcessMemoryInfo(proc, &memcounters,
sizeof(memcounters));
3792 return memcounters.PeakPagefileUsage;
3809 setvbuf(stderr,NULL,_IONBF,0);
3814 if(argc>1 && !strcmp(argv[1],
"-d")){
3838 if (nb_output_files <= 0 && nb_input_files == 0) {
3845 if (nb_output_files <= 0) {
3860 printf(
"bench: utime=%0.3fs\n", ti / 1000000.0);
3862 av_log(NULL,
AV_LOG_DEBUG,
"%"PRIu64
" frames successfully decoded, %"PRIu64
" decoding errors\n",