• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/

Lines Matching refs:enc_ctx

486         avcodec_free_context(&ost->enc_ctx);
682 av_get_media_type_string(ost->enc_ctx->codec_type),
704 int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, AV_TIME_BASE_Q);
714 av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time,
725 AVCodecContext *enc = ost->enc_ctx;
789 enc = ost->enc_ctx;
857 AVCodecContext *enc = ost->enc_ctx;
1105 enc = ost->enc_ctx;
1156 AVCodecContext *enc = ost->enc_ctx;
1238 switch (ost->enc_ctx->codec_type) {
1244 extra_size += ost->enc_ctx->extradata_size;
1308 enum AVMediaType type = ost->enc_ctx->codec_type;
1378 enc = ost->enc_ctx;
1508 AVCodecContext *enc = ost->enc_ctx;
1566 if (ost->enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename) {
1640 if (ost->enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO)
1667 if ( ost->enc_ctx->codec_id != AV_CODEC_ID_H264
1668 && ost->enc_ctx->codec_id != AV_CODEC_ID_MPEG1VIDEO
1669 && ost->enc_ctx->codec_id != AV_CODEC_ID_MPEG2VIDEO
1670 && ost->enc_ctx->codec_id != AV_CODEC_ID_VC1
2414 const AVOption *o = av_opt_find(ost->enc_ctx, "flags", NULL, 0, 0);
2417 av_opt_eval_flags(ost->enc_ctx, o, e->value, &codec_flags);
2483 AVCodecContext *enc_ctx;
2492 enc_ctx = ost->enc_ctx;
2498 enc_ctx->bits_per_raw_sample = dec_ctx->bits_per_raw_sample;
2499 enc_ctx->chroma_sample_location = dec_ctx->chroma_sample_location;
2503 if (st != ost->st && st->codec->codec_type == enc_ctx->codec_type)
2507 if (enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO || enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO)
2524 enc_ctx->codec_id = dec_ctx->codec_id;
2525 enc_ctx->codec_type = dec_ctx->codec_type;
2527 if (!enc_ctx->codec_tag) {
2530 av_codec_get_id (oc->oformat->codec_tag, dec_ctx->codec_tag) == enc_ctx->codec_id ||
2532 enc_ctx->codec_tag = dec_ctx->codec_tag;
2535 enc_ctx->bit_rate = dec_ctx->bit_rate;
2536 enc_ctx->rc_max_rate = dec_ctx->rc_max_rate;
2537 enc_ctx->rc_buffer_size = dec_ctx->rc_buffer_size;
2538 enc_ctx->field_order = dec_ctx->field_order;
2539 enc_ctx->extradata = av_mallocz(extra_size);
2540 if (!enc_ctx->extradata) {
2543 memcpy(enc_ctx->extradata, dec_ctx->extradata, dec_ctx->extradata_size);
2544 enc_ctx->extradata_size= dec_ctx->extradata_size;
2545 enc_ctx->bits_per_coded_sample = dec_ctx->bits_per_coded_sample;
2547 enc_ctx->time_base = ist->st->time_base;
2559 enc_ctx->time_base.num = ist->st->r_frame_rate.den;
2560 enc_ctx->time_base.den = 2*ist->st->r_frame_rate.num;
2561 enc_ctx->ticks_per_frame = 2;
2565 enc_ctx->time_base = dec_ctx->time_base;
2566 enc_ctx->time_base.num *= dec_ctx->ticks_per_frame;
2567 enc_ctx->time_base.den *= 2;
2568 enc_ctx->ticks_per_frame = 2;
2579 enc_ctx->time_base = dec_ctx->time_base;
2580 enc_ctx->time_base.num *= dec_ctx->ticks_per_frame;
2583 if ( enc_ctx->codec_tag == AV_RL32("tmcd")
2587 enc_ctx->time_base = dec_ctx->time_base;
2593 enc_ctx->time_base = av_inv_q(ost->frame_rate);
2595 av_reduce(&enc_ctx->time_base.num, &enc_ctx->time_base.den,
2596 enc_ctx->time_base.num, enc_ctx->time_base.den, INT_MAX);
2598 ost->parser = av_parser_init(enc_ctx->codec_id);
2600 switch (enc_ctx->codec_type) {
2606 enc_ctx->channel_layout = dec_ctx->channel_layout;
2607 enc_ctx->sample_rate = dec_ctx->sample_rate;
2608 enc_ctx->channels = dec_ctx->channels;
2609 enc_ctx->frame_size = dec_ctx->frame_size;
2610 enc_ctx->audio_service_type = dec_ctx->audio_service_type;
2611 enc_ctx->block_align = dec_ctx->block_align;
2612 enc_ctx->delay = dec_ctx->delay;
2613 if((enc_ctx->block_align == 1 || enc_ctx->block_align == 1152 || enc_ctx->block_align == 576) && enc_ctx->codec_id == AV_CODEC_ID_MP3)
2614 enc_ctx->block_align= 0;
2615 if(enc_ctx->codec_id == AV_CODEC_ID_AC3)
2616 enc_ctx->block_align= 0;
2619 enc_ctx->pix_fmt = dec_ctx->pix_fmt;
2620 enc_ctx->width = dec_ctx->width;
2621 enc_ctx->height = dec_ctx->height;
2622 enc_ctx->has_b_frames = dec_ctx->has_b_frames;
2626 (AVRational){ enc_ctx->height, enc_ctx->width });
2634 ost->st->sample_aspect_ratio = enc_ctx->sample_aspect_ratio = sar;
2638 enc_ctx->width = dec_ctx->width;
2639 enc_ctx->height = dec_ctx->height;
2649 ost->enc = avcodec_find_encoder(enc_ctx->codec_id);
2665 (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO ||
2666 enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO)) {
2675 if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
2696 if (enc_ctx->codec_id == AV_CODEC_ID_MPEG4) {
2702 switch (enc_ctx->codec_type) {
2704 enc_ctx->sample_fmt = ost->filter->filter->inputs[0]->format;
2705 enc_ctx->sample_rate = ost->filter->filter->inputs[0]->sample_rate;
2706 enc_ctx->channel_layout = ost->filter->filter->inputs[0]->channel_layout;
2707 enc_ctx->channels = avfilter_link_get_channels(ost->filter->filter->inputs[0]);
2708 enc_ctx->time_base = (AVRational){ 1, enc_ctx->sample_rate };
2711 enc_ctx->time_base = av_inv_q(ost->frame_rate);
2712 if (ost->filter && !(enc_ctx->time_base.num && enc_ctx->time_base.den))
2713 enc_ctx->time_base = ost->filter->filter->inputs[0]->time_base;
2714 if ( av_q2d(enc_ctx->time_base) < 0.001 && video_sync_method != VSYNC_PASSTHROUGH
2722 enc_ctx->time_base);
2724 enc_ctx->width = ost->filter->filter->inputs[0]->w;
2725 enc_ctx->height = ost->filter->filter->inputs[0]->h;
2726 enc_ctx->sample_aspect_ratio = ost->st->sample_aspect_ratio =
2728 av_mul_q(ost->frame_aspect_ratio, (AVRational){ enc_ctx->height, enc_ctx->width }) :
2731 enc_ctx->pix_fmt == AV_PIX_FMT_NONE &&
2738 enc_ctx->pix_fmt == AV_PIX_FMT_NONE &&
2744 enc_ctx->pix_fmt = ost->filter->filter->inputs[0]->format;
2749 enc_ctx->width != dec_ctx->width ||
2750 enc_ctx->height != dec_ctx->height ||
2751 enc_ctx->pix_fmt != dec_ctx->pix_fmt) {
2752 enc_ctx->bits_per_raw_sample = frame_bits_per_raw_sample;
2769 parse_forced_key_frames(ost->forced_keyframes, ost, ost->enc_ctx);
2774 enc_ctx->time_base = (AVRational){1, 1000};
2775 if (!enc_ctx->width) {
2776 enc_ctx->width = input_streams[ost->source_index]->st->codec->width;
2777 enc_ctx->height = input_streams[ost->source_index]->st->codec->height;
2785 if (enc_ctx->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2)) {
2796 if (enc_ctx->flags & CODEC_FLAG_PASS2) {
2804 enc_ctx->stats_in = logbuffer;
2806 if (enc_ctx->flags & CODEC_FLAG_PASS1) {
2831 ost->enc_ctx->subtitle_header = av_mallocz(dec->subtitle_header_size + 1);
2832 if (!ost->enc_ctx->subtitle_header) {
2836 memcpy(ost->enc_ctx->subtitle_header, dec->subtitle_header, dec->subtitle_header_size);
2837 ost->enc_ctx->subtitle_header_size = dec->subtitle_header_size;
2843 if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) < 0) {
2853 ost->enc_ctx->frame_size);
2855 if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000)
2859 if (av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts) < 0) {
2866 ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
2872 ost->st->codec->codec= ost->enc_ctx->codec;
2875 ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1});
2883 avcodec_close(ost->enc_ctx);
3146 ost->enc_ctx->debug = debug;
3694 av_freep(&ost->enc_ctx->stats_in);