[vlc-devel] [vlc-commits] directx_va: don't start the surface order at 0
Steve Lhomme
robux4 at gmail.com
Sun Oct 9 10:56:50 CEST 2016
The reason for this is that index 0 gets used too often. And since
CopyRegionSubresource is asynchronous, there's a chance we try to
reuse a surface while it's still being copie. After this we really use
the oldest used surface to minimize this case.
On Sun, Oct 9, 2016 at 10:46 AM, Steve Lhomme <git at videolan.org> wrote:
> vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Oct 3 17:21:44 2016 +0200| [ed702548ad4c29520272c03bd1d48990843d0303] | committer: Jean-Baptiste Kempf
>
> directx_va: don't start the surface order at 0
>
> Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed702548ad4c29520272c03bd1d48990843d0303
> ---
>
> modules/codec/avcodec/directx_va.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
> index 699fb22..e6f4f0e 100644
> --- a/modules/codec/avcodec/directx_va.c
> +++ b/modules/codec/avcodec/directx_va.c
> @@ -406,7 +406,7 @@ int directx_va_Get(vlc_va_t *va, directx_sys_t *dx_sys, picture_t *pic, uint8_t
> vlc_va_surface_t *surface = &dx_sys->surface[i];
>
> surface->refcount = 1;
> - surface->order = dx_sys->surface_order++;
> + surface->order = ++dx_sys->surface_order;
> *data = (void *)dx_sys->hw_surface[i];
> pic->context = surface;
>
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
More information about the vlc-devel
mailing list