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

Soft Works softworkz at hotmail.com
Thu Nov 11 11:27:45 EET 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Chen, Wenbin
> Sent: Thursday, November 11, 2021 8:56 AM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 1/4] libavutil/hwcontext_d3d11va:
> Add nb_surfaces to AVD3D11VAFramesContext
> 
> > > -----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
> >
> >
> Yes, the nb_surface for d3d11 seems useless, I can use init_pool_size
> instead.
> The nb_surface in dxva works as the same as init_pool_size, and I can
> use
> init_pool_size instead as well. The original code is good I don't
> need to change it.
> Since I found the real cause for segmentation fault, I will resubmit
> the patches

Sounds good, thanks!
sw


More information about the ffmpeg-devel mailing list