Lines Matching defs:avctx
105 int ff_set_sar(AVCodecContext *avctx, AVRational sar)
107 int ret = av_image_check_sar(avctx->width, avctx->height, sar);
110 av_log(avctx, AV_LOG_WARNING, "ignoring invalid SAR: %d/%d\n",
112 avctx->sample_aspect_ratio = (AVRational){ 0, 1 };
115 avctx->sample_aspect_ratio = sar;
824 int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
826 int channels = avctx->ch_layout.nb_channels;
831 channels = avctx->channels;
834 duration = get_audio_frame_duration(avctx->codec_id, avctx->sample_rate,
835 channels, avctx->block_align,
836 avctx->codec_tag, avctx->bits_per_coded_sample,
837 avctx->bit_rate, avctx->extradata, avctx->frame_size,
925 enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
927 return ff_get_format(avctx, fmt);
930 int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags)
932 return ff_get_buffer(avctx, f, flags);
935 int ff_thread_get_ext_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
937 f->owner[0] = f->owner[1] = avctx;
938 return ff_get_buffer(avctx, f->f, flags);
941 void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
947 void ff_thread_release_ext_buffer(AVCodecContext *avctx, ThreadFrame *f)
954 void ff_thread_finish_setup(AVCodecContext *avctx)
966 int ff_thread_can_start_frame(AVCodecContext *avctx)
971 int ff_slice_thread_init_progress(AVCodecContext *avctx)
976 int ff_alloc_entries(AVCodecContext *avctx, int count)
981 void ff_reset_entries(AVCodecContext *avctx)
985 void ff_thread_await_progress2(AVCodecContext *avctx, int field, int thread, int shift)
989 void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n)
1042 AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx)
1049 for (i = 0; i < avctx->nb_coded_side_data; i++)
1050 if (avctx->coded_side_data[i].type == AV_PKT_DATA_CPB_PROPERTIES)
1051 return (AVCPBProperties *)avctx->coded_side_data[i].data;
1057 tmp = av_realloc_array(avctx->coded_side_data, avctx->nb_coded_side_data + 1, sizeof(*tmp));
1063 avctx->coded_side_data = tmp;
1064 avctx->nb_coded_side_data++;
1066 avctx->coded_side_data[avctx->nb_coded_side_data - 1].type = AV_PKT_DATA_CPB_PROPERTIES;
1067 avctx->coded_side_data[avctx->nb_coded_side_data - 1].data = (uint8_t*)props;
1068 avctx->coded_side_data[avctx->nb_coded_side_data - 1].size = size;
1146 int64_t ff_guess_coded_bitrate(AVCodecContext *avctx)
1148 AVRational framerate = avctx->framerate;
1149 int bits_per_coded_sample = avctx->bits_per_coded_sample;
1153 framerate = av_inv_q(avctx->time_base);
1158 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
1161 bitrate = (int64_t)bits_per_coded_sample * avctx->width * avctx->height *