/third_party/ffmpeg/fftools/ |
D | ffmpeg_qsv.c | 75 AVHWFramesContext *frames_ctx; in qsv_init() local 90 frames_ctx = (AVHWFramesContext*)ist->hw_frames_ctx->data; in qsv_init() 91 frames_hwctx = frames_ctx->hwctx; in qsv_init() 93 frames_ctx->width = FFALIGN(s->coded_width, 32); in qsv_init() 94 frames_ctx->height = FFALIGN(s->coded_height, 32); in qsv_init() 95 frames_ctx->format = AV_PIX_FMT_QSV; in qsv_init() 96 frames_ctx->sw_format = s->sw_pix_fmt; in qsv_init() 97 frames_ctx->initial_pool_size = 64 + s->extra_hw_frames; in qsv_init()
|
/third_party/ffmpeg/libavfilter/ |
D | vf_sharpen_npp.c | 44 AVBufferRef* frames_ctx; member 84 s->frames_ctx = av_hwframe_ctx_alloc(in_ctx->device_ref); in nppsharpen_config() 85 if (!s->frames_ctx) in nppsharpen_config() 88 out_ctx = (AVHWFramesContext*)s->frames_ctx->data; in nppsharpen_config() 106 ret = av_hwframe_ctx_init(s->frames_ctx); in nppsharpen_config() 110 ret = av_hwframe_get_buffer(s->frames_ctx, s->own_frame, 0); in nppsharpen_config() 114 ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(s->frames_ctx); in nppsharpen_config() 121 av_buffer_unref(&s->frames_ctx); in nppsharpen_config() 129 av_buffer_unref(&s->frames_ctx); in nppsharpen_uninit() 182 AVHWFramesContext* frames_ctx = in nppsharpen_filter_frame() local [all …]
|
D | vf_scale_cuda.c | 84 AVBufferRef *frames_ctx; member 144 av_buffer_unref(&s->frames_ctx); in cudascale_uninit() 176 av_buffer_unref(&s->frames_ctx); in init_hwframe_ctx() 177 s->frames_ctx = out_ref; in init_hwframe_ctx() 255 s->frames_ctx = av_buffer_ref(ctx->inputs[0]->hw_frames_ctx); in init_processing_chain() 256 if (!s->frames_ctx) in init_processing_chain() 270 ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(s->frames_ctx); in init_processing_chain() 353 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)inlink->hw_frames_ctx->data; in cudascale_config_props() local 354 AVCUDADeviceContext *device_hwctx = frames_ctx->device_ctx->hwctx; in cudascale_config_props()
|
D | vf_transpose_npp.c | 70 AVBufferRef *frames_ctx; member 108 av_buffer_unref(&s->stages[i].frames_ctx); in npptranspose_uninit() 157 av_buffer_unref(&stage->frames_ctx); in init_stage() 158 stage->frames_ctx = out_ref; in init_stage() 238 ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(s->stages[last_stage].frames_ctx); in init_processing_chain() 390 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)outlink->hw_frames_ctx->data; in npptranspose_filter_frame() local 391 AVCUDADeviceContext *device_hwctx = frames_ctx->device_ctx->hwctx; in npptranspose_filter_frame()
|
D | vf_chromakey_cuda.c | 68 AVBufferRef *frames_ctx; member 110 av_buffer_unref(&s->frames_ctx); in cudachromakey_uninit() 139 av_buffer_unref(&s->frames_ctx); in init_hwframe_ctx() 140 s->frames_ctx = out_ref; in init_hwframe_ctx() 211 ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(s->frames_ctx); in init_processing_chain() 266 AVHWFramesContext *frames_ctx = (AVHWFramesContext *)inlink->hw_frames_ctx->data; in cudachromakey_config_props() local 267 AVCUDADeviceContext *device_hwctx = frames_ctx->device_ctx->hwctx; in cudachromakey_config_props()
|
D | vf_overlay_cuda.c | 430 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)inlink->hw_frames_ctx->data; in overlay_cuda_config_output() local 440 if (!frames_ctx) { in overlay_cuda_config_output() 445 ctx->in_format_main = frames_ctx->sw_format; in overlay_cuda_config_output() 476 ctx->hw_device_ctx = av_buffer_ref(frames_ctx->device_ref); in overlay_cuda_config_output()
|
D | qsvvpp.c | 267 AVHWFramesContext *frames_ctx; in fill_frameinfo_by_link() local 275 frames_ctx = (AVHWFramesContext *)link->hw_frames_ctx->data; in fill_frameinfo_by_link() 276 frames_hwctx = frames_ctx->hwctx; in fill_frameinfo_by_link() 500 AVHWFramesContext *frames_ctx = (AVHWFramesContext *)inlink->hw_frames_ctx->data; in init_vpp_session() local 502 device_ref = frames_ctx->device_ref; in init_vpp_session() 503 in_frames_hwctx = frames_ctx->hwctx; in init_vpp_session()
|
D | vf_scale_npp.c | 73 AVBufferRef *frames_ctx; member 426 av_buffer_unref(&s->stages[i].frames_ctx); in nppscale_uninit() 485 av_buffer_unref(&stage->frames_ctx); in init_stage() 486 stage->frames_ctx = out_ref; in init_stage() 615 ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(s->stages[last_stage].frames_ctx); in init_processing_chain() 871 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)outlink->hw_frames_ctx->data; in nppscale_filter_frame() local 872 AVCUDADeviceContext *device_hwctx = frames_ctx->device_ctx->hwctx; in nppscale_filter_frame()
|
D | vf_vpp_qsv.c | 301 AVHWFramesContext *frames_ctx = (AVHWFramesContext *)inlink->hw_frames_ctx->data; in get_mfx_version() local 302 device_ref = frames_ctx->device_ref; in get_mfx_version()
|
/third_party/ffmpeg/libavcodec/ |
D | nvdec.c | 294 AVHWFramesContext *frames_ctx; in nvdec_init_hwframes() local 304 frames_ctx = (AVHWFramesContext*)(*out_frames_ref)->data; in nvdec_init_hwframes() 308 frames_ctx->initial_pool_size += 3; in nvdec_init_hwframes() 310 frames_ctx->free = nvdec_free_dummy; in nvdec_init_hwframes() 311 frames_ctx->pool = av_buffer_pool_init(0, nvdec_alloc_dummy); in nvdec_init_hwframes() 313 if (!frames_ctx->pool) { in nvdec_init_hwframes() 319 frames_ctx->initial_pool_size = 0; in nvdec_init_hwframes() 338 AVHWFramesContext *frames_ctx; in ff_nvdec_decode_init() local 394 frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in ff_nvdec_decode_init() 404 params.ulNumDecodeSurfaces = frames_ctx->initial_pool_size; in ff_nvdec_decode_init() [all …]
|
D | dxva2.c | 355 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in dxva2_create_decoder() local 356 AVDXVA2FramesContext *frames_hwctx = frames_ctx->hwctx; in dxva2_create_decoder() 357 AVDXVA2DeviceContext *device_hwctx = frames_ctx->device_ctx->hwctx; in dxva2_create_decoder() 473 AVHWFramesContext *frames_ctx = (AVHWFramesContext *)avctx->hw_frames_ctx->data; in d3d11va_create_decoder() local 474 AVD3D11VADeviceContext *device_hwctx = frames_ctx->device_ctx->hwctx; in d3d11va_create_decoder() 475 AVD3D11VAFramesContext *frames_hwctx = frames_ctx->hwctx; in d3d11va_create_decoder() 476 DXGI_FORMAT surface_format = d3d11va_map_sw_to_hw_format(frames_ctx->sw_format); in d3d11va_create_decoder() 595 AVHWFramesContext *frames_ctx = (AVHWFramesContext *)hw_frames_ctx->data; in ff_dxva2_common_frame_params() local 596 AVHWDeviceContext *device_ctx = frames_ctx->device_ctx; in ff_dxva2_common_frame_params() 600 frames_ctx->format = AV_PIX_FMT_DXVA2_VLD; in ff_dxva2_common_frame_params() [all …]
|
D | qsv.c | 476 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)hw_frames_ref->data; in qsv_create_mids() local 477 AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx; in qsv_create_mids() 514 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)hw_frames_ref->data; in qsv_setup_mids() local 515 AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx; in qsv_setup_mids() 562 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)ctx->hw_frames_ctx->data; in qsv_frame_alloc() local 563 AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx; in qsv_frame_alloc() 588 AVHWFramesContext *frames_ctx; in qsv_frame_alloc() local 595 frames_ctx = (AVHWFramesContext*)frames_ref->data; in qsv_frame_alloc() 596 frames_hwctx = frames_ctx->hwctx; in qsv_frame_alloc() 598 frames_ctx->format = AV_PIX_FMT_QSV; in qsv_frame_alloc() [all …]
|
D | qsvdec.c | 77 QSVFramesContext frames_ctx; member 182 av_buffer_unref(&q->frames_ctx.hw_frames_ctx); in qsv_init_session() 184 q->frames_ctx.hw_frames_ctx = av_buffer_ref(hw_frames_ref); in qsv_init_session() 185 if (!q->frames_ctx.hw_frames_ctx) in qsv_init_session() 189 &q->frames_ctx, q->load_plugins, in qsv_init_session() 193 av_buffer_unref(&q->frames_ctx.hw_frames_ctx); in qsv_init_session() 299 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in qsv_decode_preinit() local 300 AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx; in qsv_decode_preinit() 444 if (q->frames_ctx.mids) { in alloc_frame() 445 ret = ff_qsv_find_surface_idx(&q->frames_ctx, frame); in alloc_frame() [all …]
|
D | amfenc.c | 245 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in amf_init_context() local 247 if (amf_av_to_amf_format(frames_ctx->sw_format) == AMF_SURFACE_UNKNOWN) { in amf_init_context() 249 av_get_pix_fmt_name(frames_ctx->sw_format)); in amf_init_context() 253 switch (frames_ctx->device_ctx->type) { in amf_init_context() 256 ret = amf_init_from_d3d11_device(avctx, frames_ctx->device_ctx->hwctx); in amf_init_context() 263 ret = amf_init_from_dxva2_device(avctx, frames_ctx->device_ctx->hwctx); in amf_init_context() 270 av_hwdevice_get_type_name(frames_ctx->device_ctx->type)); in amf_init_context() 278 if (frames_ctx->initial_pool_size > 0) in amf_init_context() 279 ctx->hwsurfaces_in_queue_max = frames_ctx->initial_pool_size - 1; in amf_init_context()
|
D | qsvenc.c | 573 AVHWFramesContext *frames_ctx = (AVHWFramesContext *)avctx->hw_frames_ctx->data; in init_video_param_jpeg() local 574 AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx; in init_video_param_jpeg() 691 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in init_video_param() local 692 AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx; in init_video_param() 1220 q->frames_ctx.hw_frames_ctx = av_buffer_ref(avctx->hw_frames_ctx); in qsvenc_init_session() 1221 if (!q->frames_ctx.hw_frames_ctx) in qsvenc_init_session() 1225 &q->frames_ctx, q->load_plugins, in qsvenc_init_session() 1229 av_buffer_unref(&q->frames_ctx.hw_frames_ctx); in qsvenc_init_session() 1274 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in ff_qsv_enc_init() local 1275 AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx; in ff_qsv_enc_init() [all …]
|
D | encode.c | 457 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in encode_preinit_video() local 458 if (frames_ctx->format != avctx->pix_fmt) { in encode_preinit_video() 464 avctx->sw_pix_fmt != frames_ctx->sw_format) { in encode_preinit_video() 469 av_get_pix_fmt_name(frames_ctx->sw_format)); in encode_preinit_video() 472 avctx->sw_pix_fmt = frames_ctx->sw_format; in encode_preinit_video()
|
D | decode.c | 955 AVHWFramesContext *frames_ctx; in ff_decode_get_hw_frames_ctx() local 984 frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in ff_decode_get_hw_frames_ctx() 987 if (frames_ctx->initial_pool_size) { in ff_decode_get_hw_frames_ctx() 990 frames_ctx->initial_pool_size += 3; in ff_decode_get_hw_frames_ctx() 1030 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)frames_ref->data; in avcodec_get_hw_frames_parameters() local 1032 if (frames_ctx->initial_pool_size) { in avcodec_get_hw_frames_parameters() 1036 frames_ctx->initial_pool_size += avctx->extra_hw_frames; in avcodec_get_hw_frames_parameters() 1041 frames_ctx->initial_pool_size += avctx->thread_count; in avcodec_get_hw_frames_parameters() 1179 const AVHWFramesContext *frames_ctx = in ff_get_format() local 1181 if (frames_ctx->format != user_choice) { in ff_get_format()
|
D | nvenc.c | 671 AVHWFramesContext *frames_ctx; in nvenc_setup_device() local 680 frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in nvenc_setup_device() 681 if (frames_ctx->format == AV_PIX_FMT_CUDA) in nvenc_setup_device() 682 cuda_device_hwctx = frames_ctx->device_ctx->hwctx; in nvenc_setup_device() 684 else if (frames_ctx->format == AV_PIX_FMT_D3D11) in nvenc_setup_device() 685 d3d11_device_hwctx = frames_ctx->device_ctx->hwctx; in nvenc_setup_device() 1747 AVHWFramesContext *frames_ctx; in ff_nvenc_encode_init() local 1753 frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in ff_nvenc_encode_init() 1754 if (frames_ctx->format != avctx->pix_fmt) { in ff_nvenc_encode_init() 1759 ctx->data_pix_fmt = frames_ctx->sw_format; in ff_nvenc_encode_init() [all …]
|
D | vdpau.c | 187 AVHWFramesContext *frames_ctx; in ff_vdpau_common_init() local 194 frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; in ff_vdpau_common_init() 195 dev_ctx = frames_ctx->device_ctx->hwctx; in ff_vdpau_common_init()
|
D | videotoolbox.c | 1257 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)hw_frames_ctx->data; in ff_videotoolbox_frame_params() local 1259 frames_ctx->format = AV_PIX_FMT_VIDEOTOOLBOX; in ff_videotoolbox_frame_params() 1260 frames_ctx->width = avctx->coded_width; in ff_videotoolbox_frame_params() 1261 frames_ctx->height = avctx->coded_height; in ff_videotoolbox_frame_params() 1262 frames_ctx->sw_format = videotoolbox_best_pixel_format(avctx); in ff_videotoolbox_frame_params()
|
D | qsvenc.h | 153 QSVFramesContext frames_ctx; member
|
/third_party/ffmpeg/doc/examples/ |
D | vaapi_encode.c | 47 AVHWFramesContext *frames_ctx = NULL; in set_hwframe_ctx() local 54 frames_ctx = (AVHWFramesContext *)(hw_frames_ref->data); in set_hwframe_ctx() 55 frames_ctx->format = AV_PIX_FMT_VAAPI; in set_hwframe_ctx() 56 frames_ctx->sw_format = AV_PIX_FMT_NV12; in set_hwframe_ctx() 57 frames_ctx->width = width; in set_hwframe_ctx() 58 frames_ctx->height = height; in set_hwframe_ctx() 59 frames_ctx->initial_pool_size = 20; in set_hwframe_ctx()
|