Added support for HDR10 video on Apple platforms

This commit is contained in:
Sam Lantinga
2024-02-06 15:25:05 -08:00
parent 2039c46d2c
commit 8afba41aef
9 changed files with 12433 additions and 10240 deletions

View File

@@ -759,6 +759,11 @@ static SDL_bool GetTextureForVideoToolboxFrame(AVFrame *frame, SDL_Texture **tex
case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange:
format = SDL_PIXELFORMAT_NV12;
break;
case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange:
case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange:
format = SDL_PIXELFORMAT_P010;
HDR_video = SDL_TRUE;
break;
default:
SDL_SetError("Unsupported texture format %c%c%c%c",
(char)((nPixelBufferType >> 24) & 0xFF),