[FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK
Carl Eugen Hoyos
ceffmpeg at gmail.com
Tue Oct 31 00:19:28 EET 2017
2017-10-30 18:56 GMT+01:00 mmironov <mikhail.mironov at amd.com>:
[...]
> +const enum AVPixelFormat ff_amf_pix_fmts[] = {
> + AV_PIX_FMT_NV12,
> + AV_PIX_FMT_0RGB32,
> + AV_PIX_FMT_0BGR32,
> + AV_PIX_FMT_YUV420P,
> + AV_PIX_FMT_D3D11,
> + AV_PIX_FMT_NONE
> +};
> +
> +typedef struct FormatMap {
> + enum AVPixelFormat av_format;
> + enum AMF_SURFACE_FORMAT amf_format;
> +} FormatMap;
> +
> +static const FormatMap format_map[] =
> +{
> + { AV_PIX_FMT_NONE, AMF_SURFACE_UNKNOWN },
> + { AV_PIX_FMT_NV12, AMF_SURFACE_NV12 },
> + { AV_PIX_FMT_0BGR32, AMF_SURFACE_BGRA },
> + { AV_PIX_FMT_0RGB32, AMF_SURFACE_RGBA },
On little-endian, this is different from what you originally sent:
Which one is correct? (Visually)
> + { AV_PIX_FMT_GRAY8, AMF_SURFACE_GRAY8 },
> + { AV_PIX_FMT_BGR0, AMF_SURFACE_BGRA },
Please remove this line to reduce the confusion.
(Or fix above if this line is correct.)
> + { AV_PIX_FMT_YUV420P, AMF_SURFACE_YV12 },
> + { AV_PIX_FMT_YUV420P, AMF_SURFACE_YUV420P },
Do you agree that it is impossible that both lines are correct?
> + { AV_PIX_FMT_YUYV422, AMF_SURFACE_YUY2 },
> + { AV_PIX_FMT_D3D11, AMF_SURFACE_NV12 },
Carl Eugen
[...]
More information about the ffmpeg-devel
mailing list