Commit Graph

10 Commits

Author SHA1 Message Date
Mark Thompson edecd723f3 amfenc: Remove spurious initialisations
Also minor cosmetics.
2018-04-15 16:46:17 +01:00
Alexander Kravchenko 2c6ca2b549 amfenc: Add DXVA2 hardware frame input support
Adds support for AMF initialisation from a DXVA2 (Direct3D9) device, and
then allows passing DXVA2 surfaces into an AMF encoder.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-04-15 16:46:17 +01:00
Alexander Kravchenko ab7eed13a7 amfenc: Ensure that the software format of hardware frames is valid
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-04-15 16:46:17 +01:00
Mark Thompson 73ed6fa9d7 amfenc: Do not automatically download/upload unknown hardware input frames
Supplying a hardware input frame which is not in the input hardware frames
context is not allowed by the API, so additional code to handle it is not
necessary.  Further, handling it automatically results in very low
performance - it is more appropriate to fail immediately so that the user
can fix their incorrect setup.
2018-04-15 16:46:12 +01:00
Mark Thompson ff1be6c9a6 amfenc: Fail to open if the user-supplied device is not usable
If the user supplies a device or frames context then it is an error
not to use it; this is consistent with other hardware components.

Also factorise out the D3D11 initialisation and improve error
messages.
2018-04-15 16:42:35 +01:00
Alexander Kravchenko 05f1a3face lavc/amfenc: Retain a reference to D3D frames used as input during the encoding process
Fixes ticket #6990.

Tested-by: James Almer <jamrial@gmail.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
2018-04-10 23:59:21 +01:00
Mark Thompson 3895fce26e 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 9ea6607d29,
this just applies some minor fixups and adds the general documentation.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 23:25:27 +00:00
Michael Wootton 34c113335b Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-04 18:15:56 +01:00
James Almer a198c1386a avcodec/amfenc: move config.h include where it's needed
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-29 14:24:08 -03:00
Mikhail Mironov 9ea6607d29 Add HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-11-28 22:14:42 +00:00