mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
lavc/amfenc: Add hardware config metadata
Without this metadata section the ffmpeg utility thinks that the AMF encoder does not support input from D3D11 and DXVA2 hardware surfaces, causing hardware pipelines to fail. Fixes #8953.
This commit is contained in:
parent
cd322794ee
commit
2fb764e1f3
@ -782,3 +782,15 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const AVCodecHWConfigInternal *const ff_amfenc_hw_configs[] = {
|
||||||
|
#if CONFIG_D3D11VA
|
||||||
|
HW_CONFIG_ENCODER_FRAMES(D3D11, D3D11VA),
|
||||||
|
HW_CONFIG_ENCODER_DEVICE(NONE, D3D11VA),
|
||||||
|
#endif
|
||||||
|
#if CONFIG_DXVA2
|
||||||
|
HW_CONFIG_ENCODER_FRAMES(DXVA2_VLD, DXVA2),
|
||||||
|
HW_CONFIG_ENCODER_DEVICE(NONE, DXVA2),
|
||||||
|
#endif
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "libavutil/fifo.h"
|
#include "libavutil/fifo.h"
|
||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
|
#include "hwconfig.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -117,6 +118,8 @@ typedef struct AmfContext {
|
|||||||
int tier;
|
int tier;
|
||||||
} AmfContext;
|
} AmfContext;
|
||||||
|
|
||||||
|
extern const AVCodecHWConfigInternal *const ff_amfenc_hw_configs[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common encoder initization function
|
* Common encoder initization function
|
||||||
*/
|
*/
|
||||||
|
@ -392,4 +392,5 @@ AVCodec ff_h264_amf_encoder = {
|
|||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.pix_fmts = ff_amf_pix_fmts,
|
.pix_fmts = ff_amf_pix_fmts,
|
||||||
.wrapper_name = "amf",
|
.wrapper_name = "amf",
|
||||||
|
.hw_configs = ff_amfenc_hw_configs,
|
||||||
};
|
};
|
||||||
|
@ -322,4 +322,5 @@ AVCodec ff_hevc_amf_encoder = {
|
|||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.pix_fmts = ff_amf_pix_fmts,
|
.pix_fmts = ff_amf_pix_fmts,
|
||||||
.wrapper_name = "amf",
|
.wrapper_name = "amf",
|
||||||
|
.hw_configs = ff_amfenc_hw_configs,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user