Added support for HDR10 video on Apple platforms

This commit is contained in:
Sam Lantinga committed 2024-02-06 15:40:47 -08:00
1 parent 2039c46d2c
commit 8afba41aef
9 files changed
+12433 -10240

No files matched your search

+5
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),