Lines Matching defs:avctx

79 int av_vdpau_get_surface_parameters(AVCodecContext *avctx,
84 uint32_t w = avctx->coded_width;
85 uint32_t h = avctx->coded_height;
88 switch (avctx->sw_pix_fmt) {
123 int ff_vdpau_common_frame_params(AVCodecContext *avctx,
131 if (av_vdpau_get_surface_parameters(avctx, &type, &width, &height))
135 hw_frames->sw_format = avctx->sw_pix_fmt;
142 int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
145 VDPAUHWContext *hwctx = avctx->hwaccel_context;
146 VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
164 if (av_vdpau_get_surface_parameters(avctx, &type, &width, &height))
190 ret = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_VDPAU);
194 frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
200 if (avctx->hwaccel_flags & AV_HWACCEL_FLAG_IGNORE_LEVEL)
218 if (avctx->codec_id == AV_CODEC_ID_HEVC && strncmp(info_string, "NVIDIA ", 7) == 0 &&
219 !(avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH)) {
223 av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.\n");
283 status = create(vdctx->device, profile, width, height, avctx->refs,
286 vdctx->width = avctx->coded_width;
287 vdctx->height = avctx->coded_height;
293 int ff_vdpau_common_uninit(AVCodecContext *avctx)
295 VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
316 static int ff_vdpau_common_reinit(AVCodecContext *avctx)
318 VDPAUHWContext *hwctx = avctx->hwaccel_context;
319 VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
323 if (avctx->coded_width == vdctx->width &&
324 avctx->coded_height == vdctx->height && (!hwctx || !hwctx->reset))
327 avctx->hwaccel->uninit(avctx);
328 return avctx->hwaccel->init(avctx);
341 int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
344 VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
345 AVVDPAUContext *hwctx = avctx->hwaccel_context;
350 val = ff_vdpau_common_reinit(avctx);
355 status = hwctx->render2(avctx, frame, (void *)&pic_ctx->info,
370 int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
372 MpegEncContext *s = avctx->priv_data;
377 val = ff_vdpau_common_end_frame(avctx, pic->f, pic_ctx);
381 ff_mpeg_draw_horiz_band(s, 0, s->avctx->height);
410 int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
418 if (av_reallocp(&avctx->hwaccel_context, sizeof(*hwctx)))
421 hwctx = avctx->hwaccel_context;