[FFmpeg-devel] [PATCH] lavc/amfenc: DXVA2 textures support implementation by AMF encoder

Hendrik Leppkes h.leppkes at gmail.com
Fri Apr 13 10:00:11 EEST 2018


On Fri, Apr 13, 2018 at 12:24 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 2018-04-13 0:11 GMT+02:00, Alexander Kravchenko <akravchenko188 at gmail.com>:
>>
>>
>>> -----Original Message-----
>>> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
>>> Carl Eugen Hoyos
>>> Sent: Friday, April 13, 2018 12:48 AM
>>> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/amfenc: DXVA2 textures support
>>> implementation by AMF encoder
>>>
>>> 2018-04-12 23:42 GMT+02:00, Alexander Kravchenko
>>> <akravchenko188 at gmail.com>:
>>> >
>>> > This patch contains DXVA2 textures support implementation by AMF
>>> > encoder (in addition of D3D11 textures)
>>>
>>> > +            if (frames_ctx->device_ctx->hwctx) { #if CONFIG_D3D11VA
>
> (There is a linebreak in your original and my mail afaict.)
>
>>> > +                if (frames_ctx->device_ctx->type ==
>>> > AV_HWDEVICE_TYPE_D3D11VA) {
>>>
>>> if (CONFIG_D3D11VA && frames_ctx->device_ctx->type ==...
>>>
>>> same below.
>>>
>>
>> Hi Carl, thanks for your feedback
>>
>> Could you explain the reason replacing
>> if (frames_ctx->device_ctx->type ==
>> to
>> if (CONFIG_D3D11VA && frames_ctx->device_ctx->type ==
>
> The code gets more readable / less ugly.
>

The code needs to be under an actual preprocessor check though, as the
types referenced in there may not be valid when D3D11 is not available
on the system.

- Hendrik


More information about the ffmpeg-devel mailing list