[vlc-devel] [PATCH] videotoolbox: rework >= 10bit output handling

Marvin Scholz epirat07 at gmail.com
Tue Sep 29 22:52:51 CEST 2020


LGTM, little nitpick below

On 29 Sep 2020, at 10:24, Thomas Guillem wrote:

>  - Force BGRA on macbooks not handling HEVC. This was done 
> automatically
>    before but it will likely change in the future like iOS.
>
>  - Also force BGRA for 12 and 16bits since the openGL* implementation
>    can't handle it.
> ---
>  modules/codec/videotoolbox.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/modules/codec/videotoolbox.c 
> b/modules/codec/videotoolbox.c
> index 707ac04f9c8..cda49c6c020 100644
> --- a/modules/codec/videotoolbox.c
> +++ b/modules/codec/videotoolbox.c
> @@ -185,12 +185,18 @@ static void HXXXGetBestChroma(decoder_t *p_dec)
>  #if !TARGET_OS_IPHONE
>              if (deviceSupportsHEVC()) /* 42010bit went with HEVC on 
> macOS */
>                  p_sys->i_cvpx_format = 
> kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange;
> -#else
> -            /* Force BGRA output (and let VT handle the tone mapping) 
> on iOS
> -             * since the apple openGLES implementation can't handle 
> 16 bit
> -             * textures. */
> -            p_sys->i_cvpx_format = kCVPixelFormatType_32BGRA;
> +            else
>  #endif
> +            /* Force BGRA output (and let VT handle the tone mapping) 
> since the
> +             * apple openGL* implementation can't handle 16 bit 
> textures (this
> +             * is the case for iOS and mac book not handled HEVC). */

This comment is really hard to understand, how does OpenGL relates to 
HEVC?
And you say iOS and mac book, not sure what you mean by that.

> +            p_sys->i_cvpx_format = kCVPixelFormatType_32BGRA;
> +        }
> +        else if (i_depth_luma > 10 && i_depth_chroma > 10)
> +        {
> +            /* XXX: The apple openGL implementation doesn't support 
> 12 or 16
> +             * bit rendering */
> +            p_sys->i_cvpx_format = kCVPixelFormatType_32BGRA;
>          }
>      }
>  }
> -- 
> 2.28.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list