Home
last modified time | relevance | path

Searched refs:dec_ctx (Results 1 - 18 of 18) sorted by relevance

/third_party/ffmpeg/doc/examples/
H A Dtranscoding.c52 AVCodecContext *dec_ctx; member
110 stream_ctx[i].dec_ctx = codec_ctx; in open_input_file()
125 AVCodecContext *dec_ctx, *enc_ctx; in open_output_file() local
146 dec_ctx = stream_ctx[i].dec_ctx; in open_output_file()
148 if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO in open_output_file()
149 || dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) { in open_output_file()
151 encoder = avcodec_find_encoder(dec_ctx->codec_id); in open_output_file()
165 if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO) { in open_output_file()
166 enc_ctx->height = dec_ctx in open_output_file()
237 init_filter(FilteringContext* fctx, AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, const char *filter_spec) init_filter() argument
[all...]
H A Dfiltering_audio.c44 static AVCodecContext *dec_ctx; variable
74 dec_ctx = avcodec_alloc_context3(dec); in open_input_file()
75 if (!dec_ctx) in open_input_file()
77 avcodec_parameters_to_context(dec_ctx, fmt_ctx->streams[audio_stream_index]->codecpar); in open_input_file()
80 if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) { in open_input_file()
108 if (dec_ctx->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) in init_filters()
109 av_channel_layout_default(&dec_ctx->ch_layout, dec_ctx->ch_layout.nb_channels); in init_filters()
112 time_base.num, time_base.den, dec_ctx->sample_rate, in init_filters()
113 av_get_sample_fmt_name(dec_ctx in init_filters()
[all...]
H A Dfiltering_video.c47 static AVCodecContext *dec_ctx; variable
78 dec_ctx = avcodec_alloc_context3(dec); in open_input_file()
79 if (!dec_ctx) in open_input_file()
81 avcodec_parameters_to_context(dec_ctx, fmt_ctx->streams[video_stream_index]->codecpar); in open_input_file()
84 if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) { in open_input_file()
112 dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, in init_filters()
114 dec_ctx->sample_aspect_ratio.num, dec_ctx in init_filters()
[all...]
H A Dextract_mvs.c81 AVCodecContext *dec_ctx = NULL; in open_codec_context() local
94 dec_ctx = avcodec_alloc_context3(dec); in open_codec_context()
95 if (!dec_ctx) { in open_codec_context()
100 ret = avcodec_parameters_to_context(dec_ctx, st->codecpar); in open_codec_context()
108 ret = avcodec_open2(dec_ctx, dec, &opts); in open_codec_context()
118 video_dec_ctx = dec_ctx; in open_codec_context()
H A Ddecode_video.c51 static void decode(AVCodecContext *dec_ctx, AVFrame *frame, AVPacket *pkt, in decode() argument
57 ret = avcodec_send_packet(dec_ctx, pkt); in decode()
64 ret = avcodec_receive_frame(dec_ctx, frame); in decode()
72 printf("saving frame %3d\n", dec_ctx->frame_number); in decode()
77 snprintf(buf, sizeof(buf), "%s-%d", filename, dec_ctx->frame_number); in decode()
H A Ddecode_audio.c71 static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, in decode() argument
78 ret = avcodec_send_packet(dec_ctx, pkt); in decode()
86 ret = avcodec_receive_frame(dec_ctx, frame); in decode()
93 data_size = av_get_bytes_per_sample(dec_ctx->sample_fmt); in decode()
100 for (ch = 0; ch < dec_ctx->ch_layout.nb_channels; ch++) in decode()
H A Ddemuxing_decoding.c149 AVCodecContext **dec_ctx, AVFormatContext *fmt_ctx, enum AVMediaType type) in open_codec_context()
173 *dec_ctx = avcodec_alloc_context3(dec); in open_codec_context()
174 if (!*dec_ctx) { in open_codec_context()
181 if ((ret = avcodec_parameters_to_context(*dec_ctx, st->codecpar)) < 0) { in open_codec_context()
188 if ((ret = avcodec_open2(*dec_ctx, dec, NULL)) < 0) { in open_codec_context()
148 open_codec_context(int *stream_idx, AVCodecContext **dec_ctx, AVFormatContext *fmt_ctx, enum AVMediaType type) open_codec_context() argument
/third_party/ffmpeg/libavcodec/
H A Dmpeg4video_parser.c37 Mpeg4DecContext dec_ctx; member
94 Mpeg4DecContext *dec_ctx = &pc->dec_ctx; in mpeg4_decode_header() local
95 MpegEncContext *s = &dec_ctx->m; in mpeg4_decode_header()
104 ret = ff_mpeg4_decode_picture_header(dec_ctx, gb, 1, 1); in mpeg4_decode_header()
110 ret = ff_mpeg4_decode_picture_header(dec_ctx, gb, 0, 1); in mpeg4_decode_header()
134 pc->dec_ctx.m.quant_precision = 5; in mpeg4video_parse_init()
135 pc->dec_ctx.m.slice_context_count = 1; in mpeg4video_parse_init()
136 pc->dec_ctx.showed_packed_warning = 1; in mpeg4video_parse_init()
/third_party/ffmpeg/tests/api/
H A Dapi-flac-test.c82 static int init_decoder(const AVCodec *dec, AVCodecContext **dec_ctx, in init_decoder() argument
103 *dec_ctx = ctx; in init_decoder()
108 AVCodecContext *enc_ctx, AVCodecContext *dec_ctx) in run_test()
188 result = avcodec_send_packet(dec_ctx, enc_pkt); in run_test()
195 result = avcodec_receive_frame(dec_ctx, out_frame); in run_test()
249 AVCodecContext *enc_ctx = NULL, *dec_ctx = NULL; in main() local
273 if (init_decoder(dec, &dec_ctx, &channel_layouts[cl]) != 0) in main()
275 if (run_test(enc, dec, enc_ctx, dec_ctx) != 0) in main()
278 avcodec_free_context(&dec_ctx); in main()
107 run_test(const AVCodec *enc, const AVCodec *dec, AVCodecContext *enc_ctx, AVCodecContext *dec_ctx) run_test() argument
H A Dapi-h264-slice-test.c48 static int decode(AVCodecContext *dec_ctx, AVFrame *frame, in decode() argument
54 ret = avcodec_send_packet(dec_ctx, pkt); in decode()
65 ret = avcodec_receive_frame(dec_ctx, frame); in decode()
86 desc = av_pix_fmt_desc_get(dec_ctx->pix_fmt); in decode()
/third_party/ffmpeg/libavformat/
H A Davformat.c637 const AVCodecContext *const dec_ctx = cffstream(ist)->avctx; in avformat_transfer_internal_stream_timing_info() local
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()
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()
662 enc_ctx->time_base = dec_ctx->time_base; in avformat_transfer_internal_stream_timing_info()
663 enc_ctx->time_base.num *= dec_ctx->ticks_per_frame; in avformat_transfer_internal_stream_timing_info()
669 if (copy_tb == AVFMT_TBCF_AUTO && dec_ctx->time_base.den in avformat_transfer_internal_stream_timing_info()
670 && av_q2d(dec_ctx->time_base)*dec_ctx in avformat_transfer_internal_stream_timing_info()
[all...]
/third_party/ffmpeg/libavfilter/
H A Dvf_subtitles.c315 AVCodecContext *dec_ctx = NULL; in init_subtitles() local
411 dec_ctx = avcodec_alloc_context3(dec); in init_subtitles()
412 if (!dec_ctx) { in init_subtitles()
417 ret = avcodec_parameters_to_context(dec_ctx, st->codecpar); in init_subtitles()
429 dec_ctx->pkt_timebase = st->time_base; in init_subtitles()
431 ret = avcodec_open2(dec_ctx, NULL, &codec_opts); in init_subtitles()
457 if (dec_ctx->subtitle_header) in init_subtitles()
459 dec_ctx->subtitle_header, in init_subtitles()
460 dec_ctx->subtitle_header_size); in init_subtitles()
466 ret = avcodec_decode_subtitle2(dec_ctx, in init_subtitles()
[all...]
/third_party/ffmpeg/fftools/
H A Dffmpeg.c182 ist->sub2video.frame->width = ist->dec_ctx->width ? ist->dec_ctx->width : ist->sub2video.w; in sub2video_get_blank_frame()
183 ist->sub2video.frame->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h; in sub2video_get_blank_frame()
267 av_log(ist->dec_ctx, AV_LOG_ERROR, in sub2video_update()
625 avcodec_free_context(&ist->dec_ctx); in ffmpeg_cleanup()
1439 enum AVMediaType type = ist->dec_ctx->codec_type; in print_final_stats()
1867 int duration = av_get_audio_frame_duration(ist->dec_ctx, pkt->size); in do_streamcopy()
1869 duration = ist->dec_ctx->frame_size; in do_streamcopy()
1871 (AVRational){1, ist->dec_ctx in do_streamcopy()
2958 AVCodecContext *dec_ctx = NULL; init_output_stream_encode() local
[all...]
H A Dffmpeg_hw.c342 av_log(ist->dec_ctx, AV_LOG_ERROR, "Invalid hwaccel device " in hw_device_setup_for_decode()
393 av_log(ist->dec_ctx, AV_LOG_INFO, "Using auto " in hw_device_setup_for_decode()
411 av_log(ist->dec_ctx, AV_LOG_INFO, "Using auto " in hw_device_setup_for_decode()
416 av_log(ist->dec_ctx, AV_LOG_INFO, "Using auto " in hw_device_setup_for_decode()
424 av_log(ist->dec_ctx, AV_LOG_INFO, "Auto hwaccel " in hw_device_setup_for_decode()
432 av_log(ist->dec_ctx, AV_LOG_ERROR, "No device available " in hw_device_setup_for_decode()
438 ist->dec_ctx->hw_device_ctx = av_buffer_ref(dev->device_ref); in hw_device_setup_for_decode()
439 if (!ist->dec_ctx->hw_device_ctx) in hw_device_setup_for_decode()
H A Dffprobe.c83 AVCodecContext *dec_ctx; member
2710 AVCodecContext *dec_ctx = ifile->streams[pkt->stream_index].dec_ctx; in process_frame() local
2716 if (dec_ctx) { in process_frame()
2721 ret = avcodec_send_packet(dec_ctx, pkt); in process_frame()
2730 ret = avcodec_receive_frame(dec_ctx, frame); in process_frame()
2741 ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_frame, pkt); in process_frame()
2887 if (ifile->streams[i].dec_ctx) in read_interval_packets()
2888 avcodec_flush_buffers(ifile->streams[i].dec_ctx); in read_interval_packets()
2926 AVCodecContext *dec_ctx; in show_stream() local
[all...]
H A Dffmpeg_filter.c283 if (ist->dec_ctx->codec_type == type && ist->discard) in init_input_filter()
686 ifilter->width = ist->dec_ctx->width ? ist->dec_ctx->width : ist->sub2video.w; in sub2video_prepare()
687 ifilter->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h; in sub2video_prepare()
730 if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) { in configure_input_video_filter()
739 if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_SUBTITLE) { in configure_input_video_filter()
844 if (ist->dec_ctx->codec_type != AVMEDIA_TYPE_AUDIO) { in configure_input_audio_filter()
H A Dffmpeg.h316 AVCodecContext *dec_ctx; member
H A Dffmpeg_opt.c933 ist->dec_ctx = avcodec_alloc_context3(ist->dec); in add_input_streams()
934 if (!ist->dec_ctx) { in add_input_streams()
939 ret = avcodec_parameters_to_context(ist->dec_ctx, par); in add_input_streams()
954 ist->dec_ctx->flags |= AV_CODEC_FLAG_BITEXACT; in add_input_streams()
962 ist->dec_ctx->framerate = st->avg_frame_rate; in add_input_streams()
1055 av_parse_video_size(&ist->dec_ctx->width, &ist->dec_ctx->height, canvas_size) < 0) { in add_input_streams()
1068 ret = avcodec_parameters_from_context(par, ist->dec_ctx); in add_input_streams()

Completed in 29 milliseconds