[FFmpeg-devel] [PATCH 1/4] libavutil/hwcontext_d3d11va: Add nb_surfaces to AVD3D11VAFramesContext

Soft Works softworkz at hotmail.com
Wed Nov 10 10:12:34 EET 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Chen, Wenbin
> Sent: Wednesday, November 10, 2021 4:03 AM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 1/4] libavutil/hwcontext_d3d11va:
> Add nb_surfaces to AVD3D11VAFramesContext
> 
> > Adding nb_surfaces in AVD3D11VAFramesContext in the end of the
> structure
> > to support flexible size of this arrays and align to
> > AVDXVA2FramesContext and AVVAAPIFramesContext.

There is no flexibility in pool size for D3D11 frames contexts. The
surface count is always identical to initial_pool_size. There's no 
point in exposing it. nb_surfaces could even be removed here.

Also, this change doesn't align with AVVAAPIFramesContext.
In fact not even AVDXVA2FramesContext aligns with AVVAAPIFramesContext.
Both have an nb_surfaces field, but they have different semantics.

The corresponding field to AVVAAPIFramesContext->nb_surfaces is 
DXVA2FramesContext->nb_surfaces_used, not AVDXVA2FramesContext->nb_surfaces.

Kind regards,
softworkz







More information about the ffmpeg-devel mailing list