History

avcodec: add metadata to identify wrappers and hardware decoders

Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>.

wm4 committed 8 years ago

Commit 47687a21 parent 508378547 files · +96 −15Browse files

Showing the changes to libavcodec/vaapi_encode_mpeg2.c (1 of 47 files). Show all

Unified · Split

libavcodec/vaapi_encode_mpeg2.c+2−1
@@ -669,10 +669,11 @@ AVCodec ff_mpeg2_vaapi_encoder = { · 668 unmodified lines
669 .init = &vaapi_encode_mpeg2_init,669 .init = &vaapi_encode_mpeg2_init,
670 .encode2 = &ff_vaapi_encode2,670 .encode2 = &ff_vaapi_encode2,
671 .close = &vaapi_encode_mpeg2_close,671 .close = &vaapi_encode_mpeg2_close,
672 .capabilities = AV_CODEC_CAP_DELAY,672 .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
673 .defaults = vaapi_encode_mpeg2_defaults,673 .defaults = vaapi_encode_mpeg2_defaults,
674 .pix_fmts = (const enum AVPixelFormat[]) {674 .pix_fmts = (const enum AVPixelFormat[]) {
675 AV_PIX_FMT_VAAPI,675 AV_PIX_FMT_VAAPI,
676 AV_PIX_FMT_NONE,676 AV_PIX_FMT_NONE,
677 },677 },
678 .wrapper_name = "vaapi",
678};679};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t