Lines Matching defs:enc_ctx

593         avcodec_free_context(&ost->enc_ctx);
705 AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base;
756 av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time,
768 AVCodecContext *enc = ost->enc_ctx;
841 AVCodecContext *enc = ost->enc_ctx;
894 AVCodecContext *enc = ost->enc_ctx;
1011 enc = ost->enc_ctx;
1083 AVCodecContext *enc = ost->enc_ctx;
1297 AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base;
1323 AVCodecContext *enc = ost->enc_ctx;
1401 switch (ost->enc_ctx->codec_type) {
1407 extra_size += ost->enc_ctx->extradata_size;
1409 if ( (ost->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2))
1473 enum AVMediaType type = ost->enc_ctx->codec_type;
1554 enc = ost->enc_ctx;
1741 AVCodecContext *enc = ost->enc_ctx;
2719 ret = avcodec_parameters_to_context(ost->enc_ctx, ist->st->codecpar);
2721 ret = av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts);
2728 ret = avcodec_parameters_from_context(par_src, ost->enc_ctx);
2833 int codec_flags = ost->enc_ctx->flags;
2847 const AVOption *o = av_opt_find(ost->enc_ctx, "flags", NULL, 0, 0);
2850 av_opt_eval_flags(ost->enc_ctx, o, e->value, &codec_flags);
2933 AVCodecContext *enc_ctx = ost->enc_ctx;
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;
2957 AVCodecContext *enc_ctx = ost->enc_ctx;
2969 if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
2992 if (enc_ctx->codec_id == AV_CODEC_ID_MPEG4) {
2998 switch (enc_ctx->codec_type) {
3000 enc_ctx->sample_fmt = av_buffersink_get_format(ost->filter->filter);
3001 enc_ctx->sample_rate = av_buffersink_get_sample_rate(ost->filter->filter);
3002 ret = av_buffersink_get_ch_layout(ost->filter->filter, &enc_ctx->ch_layout);
3007 enc_ctx->bits_per_raw_sample = ost->bits_per_raw_sample;
3009 enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample,
3010 av_get_bytes_per_sample(enc_ctx->sample_fmt) << 3);
3012 init_encoder_time_base(ost, av_make_q(1, enc_ctx->sample_rate));
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
3028 enc_ctx->width = av_buffersink_get_w(ost->filter->filter);
3029 enc_ctx->height = av_buffersink_get_h(ost->filter->filter);
3030 enc_ctx->sample_aspect_ratio = ost->st->sample_aspect_ratio =
3032 av_mul_q(ost->frame_aspect_ratio, (AVRational){ enc_ctx->height, enc_ctx->width }) :
3035 enc_ctx->pix_fmt = av_buffersink_get_format(ost->filter->filter);
3038 enc_ctx->bits_per_raw_sample = ost->bits_per_raw_sample;
3040 enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample,
3041 av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth);
3044 enc_ctx->color_range = frame->color_range;
3045 enc_ctx->color_primaries = frame->color_primaries;
3046 enc_ctx->color_trc = frame->color_trc;
3047 enc_ctx->colorspace = frame->colorspace;
3048 enc_ctx->chroma_sample_location = frame->chroma_location;
3051 enc_ctx->framerate = ost->frame_rate;
3057 if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) &&
3062 if (enc_ctx->codec->id == AV_CODEC_ID_MJPEG)
3063 enc_ctx->field_order = frame->top_field_first ? AV_FIELD_TT:AV_FIELD_BB;
3065 enc_ctx->field_order = frame->top_field_first ? AV_FIELD_TB:AV_FIELD_BT;
3067 enc_ctx->field_order = AV_FIELD_PROGRESSIVE;
3072 enc_ctx->field_order = AV_FIELD_BB;
3074 enc_ctx->field_order = AV_FIELD_TT;
3094 parse_forced_key_frames(ost->forced_keyframes, ost, ost->enc_ctx);
3099 enc_ctx->time_base = AV_TIME_BASE_Q;
3100 if (!enc_ctx->width) {
3101 enc_ctx->width = input_streams[ost->source_index]->st->codecpar->width;
3102 enc_ctx->height = input_streams[ost->source_index]->st->codecpar->height;
3112 ost->mux_timebase = enc_ctx->time_base;
3135 ost->enc_ctx->subtitle_header = av_mallocz(dec->subtitle_header_size + 1);
3136 if (!ost->enc_ctx->subtitle_header)
3138 memcpy(ost->enc_ctx->subtitle_header, dec->subtitle_header, dec->subtitle_header_size);
3139 ost->enc_ctx->subtitle_header_size = dec->subtitle_header_size;
3157 avcodec_descriptor_get(ost->enc_ctx->codec_id);
3170 if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) < 0) {
3182 ost->enc_ctx->frame_size);
3184 if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000 &&
3185 ost->enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */)
3189 ret = avcodec_parameters_from_context(ost->st->codecpar, ost->enc_ctx);
3196 if (ost->enc_ctx->nb_coded_side_data) {
3199 for (i = 0; i < ost->enc_ctx->nb_coded_side_data; i++) {
3200 const AVPacketSideData *sd_src = &ost->enc_ctx->coded_side_data[i];
3234 ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1});
3312 avcodec_close(ost->enc_ctx);
3328 (output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO ||
3329 output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO))
3621 ost->enc_ctx->debug = debug;
4415 av_freep(&ost->enc_ctx->stats_in);