/third_party/ffmpeg/libavfilter/ |
H A D | settb.c | 78 AVRational time_base; in config_output_props() local 83 settb->var_values[VAR_INTB] = av_q2d(inlink->time_base); in config_output_props() 94 time_base = av_d2q(res, INT_MAX); in config_output_props() 95 if (time_base.num <= 0 || time_base.den <= 0) { in config_output_props() 98 time_base.num, time_base.den); in config_output_props() 102 outlink->time_base = time_base; in config_output_props() 104 inlink ->time_base in config_output_props() [all...] |
H A D | af_silencedetect.c | 46 AVRational time_base; ///< time_base member 50 AVRational time_base); 80 AVRational time_base) in update() 88 (AVRational){ 1, s->last_sample_rate }, time_base); in update() 90 av_ts2timestr(s->start[channel], &time_base)); in update() 94 av_ts2timestr(s->start[channel], &time_base)); in update() 100 (AVRational){ 1, s->last_sample_rate }, time_base) in update() 105 av_ts2timestr(end_pts, &time_base)); in update() 107 av_ts2timestr(duration_ts, &time_base)); in update() 78 update(SilenceDetectContext *s, AVFrame *insamples, int is_silence, int current_sample, int64_t nb_samples_notify, AVRational time_base) update() argument [all...] |
H A D | buffersrc.c | 45 AVRational time_base; ///< time_base to set in the output link member 72 c->w, c->h, c->pix_fmt, width, height, format, av_ts2timestr(pts, &s->outputs[0]->time_base));\ 81 av_get_sample_fmt_name(format), srate, layout.order == AV_CHANNEL_ORDER_NATIVE ? layout.u.mask : 0, layout.nb_channels, av_ts2timestr(pts, &s->outputs[0]->time_base));\ 101 if (param->time_base.num > 0 && param->time_base.den > 0) in av_buffersrc_parameters_set() 102 s->time_base = param->time_base; in av_buffersrc_parameters_set() 273 av_q2d(c->time_base) <= 0) { in init_video() 280 c->time_base in init_video() [all...] |
H A D | framesync.c | 142 if (!fs->time_base.num) { in ff_framesync_configure() 145 if (fs->time_base.num) { in ff_framesync_configure() 146 fs->time_base = av_gcd_q(fs->time_base, fs->in[i].time_base, in ff_framesync_configure() 149 fs->time_base = fs->in[i].time_base; in ff_framesync_configure() 153 if (!fs->time_base.num) { in ff_framesync_configure() 158 fs->time_base.num, fs->time_base in ff_framesync_configure() [all...] |
H A D | vf_threshold.c | 149 out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base); in process_frame() 214 in[0].time_base = base->time_base; in config_output() 215 in[1].time_base = threshold->time_base; in config_output() 216 in[2].time_base = min->time_base; in config_output() 217 in[3].time_base = max->time_base; in config_output() [all...] |
H A D | avf_aphasemeter.c | 56 AVRational time_base; member 186 add_metadata(insamples, "mono_start", av_ts2timestr(s->mono_idx[0], &s->time_base)); in update_mono_detection() 187 av_log(s, AV_LOG_INFO, "mono_start: %s\n", av_ts2timestr(s->mono_idx[0], &s->time_base)); in update_mono_detection() 196 add_metadata(insamples, "mono_end", av_ts2timestr(s->mono_idx[1], &s->time_base)); in update_mono_detection() 197 add_metadata(insamples, "mono_duration", av_ts2timestr(mono_duration, &s->time_base)); in update_mono_detection() 199 av_log(s, AV_LOG_INFO, "mono_end: %s | mono_duration: %s\n", av_ts2timestr(s->mono_idx[1], &s->time_base), av_ts2timestr(mono_duration, &s->time_base)); in update_mono_detection() 217 add_metadata(insamples, "out_phase_start", av_ts2timestr(s->out_phase_idx[0], &s->time_base)); in update_out_phase_detection() 218 av_log(s, AV_LOG_INFO, "out_phase_start: %s\n", av_ts2timestr(s->out_phase_idx[0], &s->time_base)); in update_out_phase_detection() 227 add_metadata(insamples, "out_phase_end", av_ts2timestr(s->out_phase_idx[1], &s->time_base)); in update_out_phase_detection() [all...] |
H A D | vf_blackdetect.c | 48 AVRational time_base; member 110 s->time_base = inlink->time_base; in config_input() 111 s->black_min_duration = s->black_min_duration_time / av_q2d(s->time_base); in config_input() 123 av_ts2timestr(s->black_min_duration, &s->time_base), in config_input() 136 av_ts2timestr(s->black_start, &s->time_base), in check_black_end() 137 av_ts2timestr(s->black_end, &s->time_base), in check_black_end() 138 av_ts2timestr(s->black_end - s->black_start, &s->time_base)); in check_black_end() 197 av_ts2str(picref->pts), av_ts2timestr(picref->pts, &s->time_base), in filter_frame() 206 av_ts2timestr(s->black_start, &s->time_base), in filter_frame() [all...] |
H A D | vf_framepack.c | 98 AVRational time_base = ctx->inputs[LEFT]->time_base; in config_output() local 109 } else if (av_cmp_q(time_base, ctx->inputs[RIGHT]->time_base) != 0) { in config_output() 112 time_base.num, time_base.den, in config_output() 113 ctx->inputs[RIGHT]->time_base.num, in config_output() 114 ctx->inputs[RIGHT]->time_base.den); in config_output() 133 time_base.den *= 2; in config_output() 151 outlink->time_base in config_output() [all...] |
H A D | vf_identity.c | 327 outlink->time_base = mainlink->time_base; in config_output() 333 outlink->time_base = s->fs.time_base; in config_output() 335 if (av_cmp_q(mainlink->time_base, outlink->time_base) || in config_output() 336 av_cmp_q(ctx->inputs[1]->time_base, outlink->time_base)) in config_output() 338 mainlink->time_base.num, mainlink->time_base in config_output() [all...] |
H A D | vf_xfade_opencl.c | 234 if (inlink0->time_base.num != inlink1->time_base.num || in xfade_opencl_config_output() 235 inlink0->time_base.den != inlink1->time_base.den) { in xfade_opencl_config_output() 239 avctx->input_pads[0].name, inlink0->time_base.num, inlink0->time_base.den, in xfade_opencl_config_output() 240 avctx->input_pads[1].name, inlink1->time_base.num, inlink1->time_base.den); in xfade_opencl_config_output() 246 outlink->time_base = inlink0->time_base; in xfade_opencl_config_output() [all...] |
/third_party/ffmpeg/libavcodec/ |
H A D | dv_profile.c | 80 .time_base = { 1001, 30000 }, 97 .time_base = { 1, 25 }, 114 .time_base = { 1, 25 }, 131 .time_base = { 1001, 30000 }, 148 .time_base = { 1, 25 }, 165 .time_base = { 1001, 30000 }, 182 .time_base = { 1, 25 }, 199 .time_base = { 1001, 60000 }, 216 .time_base = { 1, 50 }, 233 .time_base [all...] |
/third_party/ffmpeg/libavformat/ |
H A D | avformat.c | 640 enc_ctx->time_base = ist->time_base; in avformat_transfer_internal_stream_timing_info() 650 && 0.5/av_q2d(ist->r_frame_rate) > av_q2d(ist->time_base) in avformat_transfer_internal_stream_timing_info() 651 && 0.5/av_q2d(ist->r_frame_rate) > av_q2d(dec_ctx->time_base) in avformat_transfer_internal_stream_timing_info() 652 && av_q2d(ist->time_base) < 1.0/500 && av_q2d(dec_ctx->time_base) < 1.0/500 in avformat_transfer_internal_stream_timing_info() 654 enc_ctx->time_base.num = ist->r_frame_rate.den; in avformat_transfer_internal_stream_timing_info() 655 enc_ctx->time_base.den = 2*ist->r_frame_rate.num; in avformat_transfer_internal_stream_timing_info() 659 if (copy_tb == AVFMT_TBCF_AUTO && av_q2d(dec_ctx->time_base)*dec_ctx->ticks_per_frame > 2*av_q2d(ist->time_base) in avformat_transfer_internal_stream_timing_info() [all...] |
H A D | ivfdec.c | 38 AVRational time_base; in read_header() local 54 time_base.den = avio_rl32(s->pb); in read_header() 55 time_base.num = avio_rl32(s->pb); in read_header() 61 if (!time_base.den || !time_base.num) { in read_header() 66 avpriv_set_pts_info(st, 64, time_base.num, time_base.den); in read_header()
|
H A D | rtpenc_mpegts.c | 81 st->time_base = s->streams[i]->time_base; in rtp_mpegts_write_header() 97 s->streams[i]->time_base = mpegts_ctx->streams[i]->time_base; in rtp_mpegts_write_header() 113 st->time_base.num = 1; in rtp_mpegts_write_header() 114 st->time_base.den = 90000; in rtp_mpegts_write_header() 163 s->streams[pkt->stream_index]->time_base, in rtp_mpegts_write_packet() 164 chain->rtp_ctx->streams[0]->time_base); in rtp_mpegts_write_packet() 167 s->streams[pkt->stream_index]->time_base, in rtp_mpegts_write_packet() 168 chain->rtp_ctx->streams[0]->time_base); in rtp_mpegts_write_packet() [all...] |
H A D | nutenc.c | 49 AVRational q = st->time_base; in choose_timebase() 204 AVRational f = av_div_q(av_inv_q(s->streams[stream_id]->avg_frame_rate), *nut->stream[stream_id].time_base); in build_frame_code() 328 static void put_tt(NUTContext *nut, AVRational *time_base, AVIOContext *bc, uint64_t val) in put_tt() argument 331 val += time_base - nut->time_base; in put_tt() 385 put_v(bc, nut->time_base[i].num); in write_mainheader() 386 put_v(bc, nut->time_base[i].den); in write_mainheader() 473 put_v(bc, nut->stream[i].time_base - nut->time_base); in write_streamheader() 600 put_tt(nut, nut->chapter[id].time_base, b in write_chapter() 746 AVRational time_base; nut_write_header() local [all...] |
H A D | demux.c | 487 pts_wrap_reference = ref - av_rescale(60, st->time_base.den, st->time_base.num); in update_wrap_reference() 490 (ref < (1LL << st->pts_wrap_bits) - av_rescale(60, st->time_base.den, st->time_base.num)) ? in update_wrap_reference() 636 pkt->dts = pkt->pts = av_rescale_q(av_gettime(), AV_TIME_BASE_Q, st->time_base); in ff_read_packet() 673 } else if (st->time_base.num * 1000LL > st->time_base.den) { in compute_frame_duration() 674 *pnum = st->time_base.num; in compute_frame_duration() 675 *pden = st->time_base.den; in compute_frame_duration() 858 st->start_time = av_sat_add64(st->start_time, av_rescale_q(sti->skip_samples, (AVRational){1, st->codecpar->sample_rate}, st->time_base)); in update_initial_timestamps() [all...] |
H A D | mux.c | 215 if (!st->time_base.num) { in init_muxer() 373 den = (int64_t)st->time_base.num * st->codecpar->sample_rate; in init_pts() 376 den = (int64_t)st->time_base.num * st->time_base.den; in init_pts() 380 den = (int64_t)st->time_base.num * st->time_base.den; in init_pts() 580 frac_add(sti->priv_pts, (int64_t)st->time_base.den * frame_size); in compute_muxer_pkt_fields() 584 frac_add(sti->priv_pts, (int64_t)st->time_base.den * st->time_base.num); in compute_muxer_pkt_fields() 607 st->time_base); in guess_pkt_duration() 1360 AVRational time_base = pkt->time_base; ff_write_chained() local [all...] |
H A D | electronicarts.c | 71 AVRational time_base; member 323 video->time_base = (AVRational) { 1, 15 }; in process_video_header_mdec() 334 video->time_base.den = avio_rl32(pb); in process_video_header_vp6() 335 video->time_base.num = avio_rl32(pb); in process_video_header_vp6() 336 if (video->time_base.den <= 0 || video->time_base.num <= 0) { in process_video_header_vp6() 352 video->time_base = (AVRational) { 1, fps }; in process_video_header_cmv() 425 ea->video.time_base = (AVRational) { 1, 15 }; in process_ea_header() 430 ea->video.time_base = (AVRational) { 1, 15 }; in process_ea_header() 436 ea->video.time_base in process_ea_header() [all...] |
H A D | imfdec.c | 157 static int imf_time_to_ts(int64_t *ts, AVRational t, AVRational time_base) in imf_time_to_ts() argument 163 r = av_div_q(t, time_base); in imf_time_to_ts() 416 st->time_base)) in open_track_resource_context() 419 AVRATIONAL_ARG(st->time_base), AVRATIONAL_ARG(track->current_timestamp)); in open_track_resource_context() 590 first_resource_stream->time_base.num, in set_context_streams_from_tracks() 591 first_resource_stream->time_base.den); in set_context_streams_from_tracks() 593 av_inv_q(asset_stream->time_base))); in set_context_streams_from_tracks() 778 ", time_base=" AVRATIONAL_FORMAT "\n", pkt->pts, pkt->dts, pkt->duration, in imf_read_packet() 779 pkt->stream_index, pkt->pos, AVRATIONAL_ARG(pkt->time_base)); in imf_read_packet() 791 ret = imf_time_to_ts(&delta_ts, resource->ts_offset, st->time_base); in imf_read_packet() [all...] |
H A D | pcm.c | 76 st->time_base.num, in ff_pcm_read_seek() 77 st->time_base.den * (int64_t)block_align, in ff_pcm_read_seek() 82 ffstream(st)->cur_dts = av_rescale(pos, st->time_base.den, byte_rate * (int64_t)st->time_base.num); in ff_pcm_read_seek()
|
/third_party/ffmpeg/fftools/ |
H A D | ffmpeg.c | 252 AV_TIME_BASE_Q, ist->st->time_base); in sub2video_update() 254 AV_TIME_BASE_Q, ist->st->time_base); in sub2video_update() 296 pts2 = av_rescale_q(pts, ist->st->time_base, ist2->st->time_base) - 1; in sub2video_heartbeat() 705 AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base; in close_output_stream() local 709 int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, time_base, AV_TIME_BASE_Q); in close_output_stream() 756 av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time, in check_recording_time() 778 AVRational tb = enc->time_base; in adjust_frame_pts_to_encoder_tb() 790 av_rescale_q(frame->pts, filter_tb, enc->time_base) in adjust_frame_pts_to_encoder_tb() 1297 AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base; finish_output_stream() local 3810 duration_max(int64_t tmp, int64_t *duration, AVRational tmp_time_base, AVRational time_base) duration_max() argument [all...] |
/third_party/ffmpeg/doc/examples/ |
H A D | remuxing.c | 36 AVRational *time_base = &fmt_ctx->streams[pkt->stream_index]->time_base; in log_packet() local 40 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, time_base), in log_packet() 41 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, time_base), in log_packet() 42 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, time_base), in log_packet() 165 av_packet_rescale_ts(pkt, in_stream->time_base, out_stream->time_base); in main()
|
H A D | muxing.c | 75 AVRational *time_base = &fmt_ctx->streams[pkt->stream_index]->time_base; in log_packet() local 78 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, time_base), in log_packet() 79 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, time_base), in log_packet() 80 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, time_base), in log_packet() 107 av_packet_rescale_ts(pkt, c->time_base, st->time_base); in write_frame() 174 ost->st->time_base = (AVRational){ 1, c->sample_rate }; in add_stream() 188 ost->st->time_base = (AVRational){ 1, STREAM_FRAME_RATE }; in add_stream() 189 c->time_base in add_stream() [all...] |
H A D | transcoding.c | 174 /* video time_base can be set to whatever is handy and supported by encoder */ in open_output_file() 175 enc_ctx->time_base = av_inv_q(dec_ctx->framerate); in open_output_file() 183 enc_ctx->time_base = (AVRational){1, enc_ctx->sample_rate}; in open_output_file() 201 out_stream->time_base = enc_ctx->time_base; in open_output_file() 213 out_stream->time_base = in_stream->time_base; in open_output_file() 265 "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", in init_filter() 267 dec_ctx->time_base.num, dec_ctx->time_base in init_filter() [all...] |
H A D | filtering_video.c | 100 AVRational time_base = fmt_ctx->streams[video_stream_index]->time_base; in init_filters() local 111 "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", in init_filters() 113 time_base.num, time_base.den, in init_filters() 179 static void display_frame(const AVFrame *frame, AVRational time_base) in display_frame() argument 190 time_base, AV_TIME_BASE_Q); in display_frame() 271 display_frame(filt_frame, buffersink_ctx->inputs[0]->time_base); in main()
|