Lines Matching refs:time_base
252 AV_TIME_BASE_Q, ist->st->time_base);
254 AV_TIME_BASE_Q, ist->st->time_base);
296 pts2 = av_rescale_q(pts, ist->st->time_base, ist2->st->time_base) - 1;
705 AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base;
709 int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, time_base, AV_TIME_BASE_Q);
756 av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time,
778 AVRational tb = enc->time_base;
790 av_rescale_q(frame->pts, filter_tb, enc->time_base) -
791 av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base);
797 av_log(NULL, AV_LOG_INFO, "filter -> pts:%s pts_time:%s exact:%f time_base:%d/%d\n",
799 frame ? av_ts2timestr(frame->pts, &enc->time_base) : "NULL",
801 enc ? enc->time_base.num : -1,
802 enc ? enc->time_base.den : -1);
885 bitrate = (pkt->size * 8) / av_q2d(enc->time_base) / 1000.0;
905 "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n",
907 av_ts2str(frame->pts), av_ts2timestr(frame->pts, &enc->time_base),
908 enc->time_base.num, enc->time_base.den);
946 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &enc->time_base),
947 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &enc->time_base),
948 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &enc->time_base));
951 av_packet_rescale_ts(pkt, enc->time_base, ost->mux_timebase);
958 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &enc->time_base),
959 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &enc->time_base),
960 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &enc->time_base));
1036 ost->sync_opts = av_rescale_q(pts, AV_TIME_BASE_Q, enc->time_base);
1100 duration = 1/(av_q2d(frame_rate) * av_q2d(enc->time_base));
1103 duration = FFMIN(duration, 1/(av_q2d(ost->frame_rate) * av_q2d(enc->time_base)));
1110 lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) {
1111 duration = lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base));
1237 (in_picture->pts - ost->forced_kf_ref_pts) * av_q2d(enc->time_base) : NAN;
1297 AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base;
1302 int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, time_base, AV_TIME_BASE_Q);
1619 ost->st->time_base, AV_TIME_BASE_Q));
1836 pkt->pts < av_rescale_q(comp_start, AV_TIME_BASE_Q, ist->st->time_base))
1862 opkt->pts = av_rescale_q(pkt->pts, ist->st->time_base, ost->mux_timebase) - ost_tb_start_time;
1870 opkt->dts = av_rescale_delta(ist->st->time_base, pkt->dts,
1876 opkt->dts = av_rescale_q(pkt->dts, ist->st->time_base, ost->mux_timebase);
1879 opkt->duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->mux_timebase);
2124 decoded_frame_tb = ist->st->time_base;
2127 decoded_frame_tb = ist->st->time_base;
2163 dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ist->st->time_base);
2246 int64_t ts = av_rescale_q(decoded_frame->pts = best_effort_timestamp, ist->st->time_base, AV_TIME_BASE_Q);
2254 "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",
2256 av_ts2timestr(decoded_frame->pts, &ist->st->time_base),
2258 av_ts2timestr(best_effort_timestamp, &ist->st->time_base),
2260 ist->st->time_base.num, ist->st->time_base.den);
2352 int64_t pts = av_rescale_q_rnd(ist->pts, AV_TIME_BASE_Q, ist->st->time_base,
2378 ist->dts += av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q);
2397 ist->next_dts = ist->dts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
2423 duration_dts = av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
2439 ist->next_pts += av_rescale_q(duration_pts, ist->st->time_base, AV_TIME_BASE_Q);
2516 ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
2526 ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
2631 ist->dec_ctx->pkt_timebase = ist->st->time_base;
2690 ctx->time_base_in = ost->st->time_base;
2702 ost->st->time_base = ctx->time_base_out;
2762 if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0) {
2764 ost->st->time_base = av_inv_q(ost->frame_rate);
2766 ost->st->time_base = av_add_q(av_stream_get_codec_timebase(ost->st), (AVRational){0, 1});
2771 ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base);
2821 ost->mux_timebase = ist->st->time_base;
2904 t = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base);
2909 pts[index++] = av_rescale_q(c->start, c->time_base,
2910 avctx->time_base) + t;
2917 pts[index++] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base);
2937 enc_ctx->time_base = ost->enc_timebase;
2943 enc_ctx->time_base = ist->st->time_base;
2951 enc_ctx->time_base = default_time_base;
3018 if (!(enc_ctx->time_base.num && enc_ctx->time_base.den))
3019 enc_ctx->time_base = av_buffersink_get_time_base(ost->filter->filter);
3020 if ( av_q2d(enc_ctx->time_base) < 0.001 && ost->vsync_method != VSYNC_PASSTHROUGH
3099 enc_ctx->time_base = AV_TIME_BASE_Q;
3112 ost->mux_timebase = enc_ctx->time_base;
3233 if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0)
3234 ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1});
3238 ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base);
3272 pkt->pos, av_ts2timestr(pkt->dts, &st->time_base));
3497 av_rescale_q(ost->last_mux_dts, ost->st->time_base,
3809 // set duration to max(tmp, duration) in a proper time base and return duration's time_base
3811 AVRational time_base)
3820 ret = av_compare_ts(*duration, time_base, tmp, tmp_time_base);
3826 return time_base;
3859 duration = av_rescale_q(ist->nb_samples, sample_rate, ist->st->time_base);
3865 duration = av_rescale_q(1, av_inv_q(ist->framerate), ist->st->time_base);
3867 duration = av_rescale_q(1, av_inv_q(ist->st->avg_frame_rate), ist->st->time_base);
3873 ifile->time_base = ist->st->time_base;
3878 ifile->time_base = duration_max(duration, &ifile->duration, ist->st->time_base,
3879 ifile->time_base);
4007 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ist->st->time_base),
4008 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ist->st->time_base),
4009 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ist->st->time_base),
4027 new_start_time = FFMIN(new_start_time, av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q));
4035 stime = av_rescale_q(is->start_time, AV_TIME_BASE_Q, ist->st->time_base);
4070 pkt->dts += av_rescale_q(ifile->ts_offset, AV_TIME_BASE_Q, ist->st->time_base);
4072 pkt->pts += av_rescale_q(ifile->ts_offset, AV_TIME_BASE_Q, ist->st->time_base);
4079 pkt_dts = av_rescale_q_rnd(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
4091 pkt->dts -= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base);
4093 pkt->pts -= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base);
4097 duration = av_rescale_q(ifile->duration, ifile->time_base, ist->st->time_base);
4107 pkt_dts = av_rescale_q_rnd(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
4112 ist->st->time_base, AV_TIME_BASE_Q,
4134 pkt->dts -= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base);
4136 pkt->pts -= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base);
4145 int64_t pkt_pts = av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q);
4157 ifile->last_ts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
4162 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ist->st->time_base),
4163 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ist->st->time_base),
4164 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ist->st->time_base),