[FFmpeg-devel] [PATCH] hwcontext_d3d11va: support bgr0 pixel format

Thomas Volkert silvo at gmx.net
Thu Aug 29 18:02:49 EEST 2019


On 24.08.2019 20:12, Carl Eugen Hoyos wrote:
> Am Do., 8. Aug. 2019 um 02:35 Uhr schrieb Thomas Volkert <silvo at gmx.net>:
>> From: Thomas Volkert <thomas.volkert at net-zeal.com>
>>
>> ---
>>  libavutil/hwcontext_d3d11va.c | 7 ++++---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
>> index 6670c47579..0204407330 100644
>> --- a/libavutil/hwcontext_d3d11va.c
>> +++ b/libavutil/hwcontext_d3d11va.c
>> @@ -82,11 +82,12 @@ static const struct {
>>      DXGI_FORMAT d3d_format;
>>      enum AVPixelFormat pix_fmt;
>>  } supported_formats[] = {
>> -    { DXGI_FORMAT_NV12,         AV_PIX_FMT_NV12 },
>> -    { DXGI_FORMAT_P010,         AV_PIX_FMT_P010 },
>> +    { DXGI_FORMAT_NV12,           AV_PIX_FMT_NV12 },
>> +    { DXGI_FORMAT_P010,           AV_PIX_FMT_P010 },
>> +    { DXGI_FORMAT_B8G8R8A8_UNORM, AV_PIX_FMT_BGR0 },
> The Microsoft documentation claims that this is BGRA,

Ah, yes, we only needed access to DXGI_FORMAT_B8G8R8A8_UNORM here.
BRG0/BGRA doesn't make a difference in this case here - so, it wasn't
obvious.

Thanks for the review.


Best regards,

Thomas.


More information about the ffmpeg-devel mailing list