summaryrefslogtreecommitdiff
path: root/libavcodec/amfenc_h264.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-01-16 23:25:27 +0000
committerMark Thompson <sw@jkqxz.net>2018-01-16 23:25:27 +0000
commit3895fce26ec7f6d2b1642f96ecaddede6521228e (patch)
tree3987bb94bae98ce8b08d31237568d85d27f0993b /libavcodec/amfenc_h264.c
parent68de778ccc35bea885a989e47358089da006a8b6 (diff)
parent34c113335b53d83ed343de49741f0823aa1f8cc6 (diff)
Merge commit '34c113335b53d83ed343de49741f0823aa1f8cc6'
* commit '34c113335b53d83ed343de49741f0823aa1f8cc6': Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK Most of this was already present from 9ea6607d294526688ab1b1342cb36ee159683e88, this just applies some minor fixups and adds the general documentation. Merged-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/amfenc_h264.c')
-rw-r--r--libavcodec/amfenc_h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c
index 96e4e952da..2c082e93bd 100644
--- a/libavcodec/amfenc_h264.c
+++ b/libavcodec/amfenc_h264.c
@@ -361,7 +361,6 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx)
static const AVCodecDefault defaults[] = {
{ "refs", "-1" },
{ "aspect", "0" },
- { "sar", "0" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ "b", "2M" },
@@ -376,7 +375,7 @@ static const AVClass h264_amf_class = {
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
-//TODO declare as HW encoder when available
+
AVCodec ff_h264_amf_encoder = {
.name = "h264_amf",
.long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
@@ -389,7 +388,8 @@ AVCodec ff_h264_amf_encoder = {
.priv_data_size = sizeof(AmfContext),
.priv_class = &h264_amf_class,
.defaults = defaults,
- .capabilities = AV_CODEC_CAP_DELAY,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = ff_amf_pix_fmts,
+ .wrapper_name = "amf",
};