On Mon, 29 May 2017 17:53:59 +0200 Steve Lhomme <[email protected]> wrote:
> LGTM. > > I haven't tested the patches so I'm not sure it works as expected. But > just looking at the code it seems to do the job. Thanks for reviewing. > There doesn't seem to be support for decoding to > DXGI_FORMAT_420_OPAQUE which is often available. But since it can't be > displayed or mapped to CPU I guess it's useless here. In some cases > that's the only available decoder though (some cellphones). Yes, that confuses me too. Texture formats need to have a 1:1 correspondence between the DXGI format, and the sw_format. The latter is always a AV_PIX_FMT_, but there are no hwaccel specific opaque pixfmts. (Only "wrapper" formats like AV_PIX_FMT_D3D11VA_VLD etc. exist.) We could randomly choose AV_PIX_FMT_YUV420P for this, because there is no non-opaque DXGI format for this anyway. But this could be confusing to the API user, because the apparent difference to NV12 will be that copying the data to CPU won't work. (Actually I'm not so sure about this. MSDN is quite confusing about this. MSDN also can't decide whether or not you can use this format in a shader.) Alternatively, we could make this a flag in AVD3D11VAFramesContext (maybe we could even allow the user to set the exact format?). Then the AVHWFramesContext.sw_format would be ignored. Does anyone have opinions about this? In any case, it seems possible to add. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
