[vlc-devel] [vlc-commits] d3d11va: do not use the external if there's not enough pictures

Hugo Beauzée-Luyssen hugo at beauzee.fr
Sun Feb 25 17:21:54 CET 2018


On Sun, Feb 25, 2018, at 5:14 PM, Steve Lhomme wrote:
> vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sat Feb 
> 24 13:46:53 2018 +0100| [c32f34878df6519d45d69af874f5e48a9ebb8b8c] | 
> committer: VideoLAN Buildbot
> 
> d3d11va: do not use the external if there's not enough pictures
> 
> Do the detection earlier and avoid fetching pictures from the pool for nothing.
> 
> (cherry picked from commit b6095a8abbb2205939c829dc2ecb842ee9d16e6e)
> Signed-off-by: VideoLAN Buildbot <buildbot at videolan.org>
> 
> > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=c32f34878df6519d45d69af874f5e48a9ebb8b8c
> ---
> 
>  modules/codec/avcodec/d3d11va.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/
> d3d11va.c
> index 539abc824b..0b88530f5c 100644
> --- a/modules/codec/avcodec/d3d11va.c
> +++ b/modules/codec/avcodec/d3d11va.c
> @@ -712,6 +712,12 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, 
> int codec_id,
>          sys->textureWidth  = fmt->i_width;
>          sys->textureHeight = fmt->i_height;
>      }
> +    if (sys->totalTextureSlices && sys->totalTextureSlices < 
> surface_count)
> +    {
> +        msg_Warn(va, "not enough decoding slices in the texture (%d/
> %d)",
> +                 sys->totalTextureSlices, surface_count);
> +        dx_sys->can_extern_pool = false;
> +    }
>  #if VLC_WINSTORE_APP
>      /* On the Xbox 1/S, any decoding of H264 with one dimension over 
> 2304
>       * crashes totally the device */
> @@ -763,13 +769,6 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, 
> int codec_id,
>  
>              D3D11_TEXTURE2D_DESC texDesc;
>              ID3D11Texture2D_GetDesc(pic->p_sys-
> >texture[KNOWN_DXGI_INDEX], &texDesc);
> -            if (unlikely(texDesc.ArraySize < surface_count))
> -            {
> -                msg_Warn(va, "not enough decoding slices in the texture 
> (%d/%d)",
> -                         texDesc.ArraySize, surface_count);
> -                dx_sys->can_extern_pool = false;
> -                break;
> -            }
>              assert(texDesc.Format == sys->render);
>              assert(texDesc.BindFlags & D3D11_BIND_DECODER);
>  
> 

Sorry about that, it seems I screwed up my git config. I pushed forced with the correct signoff.

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list