diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-10-26 00:18:43 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-11-26 21:35:53 +0000 |
commit | 67e81d79ccfc6713c797ddb19a3b8aea476c947b (patch) | |
tree | 2e9791f724f1baadd939b595ef0dc447b826dffd /libavcodec/cuviddec.c | |
parent | 758fbc54fef2f31957b5c5f22e05e5fd9b04f631 (diff) | |
download | ffmpeg-67e81d79ccfc6713c797ddb19a3b8aea476c947b.tar.gz |
lavc: Use hardware config information in ff_get_format()
This removes the dependency that hardware pixel formats previously had on
AVHWAccel instances, meaning only those which actually do something need
exist after this patch.
Also updates avcodec_default_get_format() to be able to choose hardware
formats if either a matching device has been supplied or no additional
external configuration is required, and avcodec_get_hw_frames_parameters()
to use the hardware config rather than searching the old hwaccel list.
The FF_CODEC_CAP_HWACCEL_REQUIRE_CLASS mechanism is deleted because it
no longer does anything (the codec already contains the pointers to the
matching hwaccels).
Diffstat (limited to 'libavcodec/cuviddec.c')
-rw-r--r-- | libavcodec/cuviddec.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index 3bd2409ea2..33e9140f89 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -1120,7 +1120,6 @@ static const AVCodecHWConfigInternal *cuvid_hw_configs[] = { .type = AVMEDIA_TYPE_VIDEO, \ .id = AV_CODEC_ID_##X, \ .pix_fmt = AV_PIX_FMT_CUDA, \ - .decoder_class = &x##_cuvid_class, \ }; \ AVCodec ff_##x##_cuvid_decoder = { \ .name = #x "_cuvid", \ @@ -1135,7 +1134,6 @@ static const AVCodecHWConfigInternal *cuvid_hw_configs[] = { .receive_frame = cuvid_output_frame, \ .flush = cuvid_flush, \ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \ - .caps_internal = FF_CODEC_CAP_HWACCEL_REQUIRE_CLASS, \ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \ AV_PIX_FMT_NV12, \ AV_PIX_FMT_P010, \ |