feat: Add support for Buffer Compression for a more efficient Video Pipeline (enableBufferCompression) (#1828)

feat: Add support for Buffer Compression for more efficient Video Pipeline (`enableBufferCompression`)
This commit is contained in:
Marc Rousavy
2023-09-21 17:18:54 +02:00
committed by GitHub
parent aafffa60f6
commit fffefa9d12
9 changed files with 96 additions and 20 deletions

View File

@@ -50,11 +50,15 @@ enum PixelFormat {
init(mediaSubType: OSType) {
switch mediaSubType {
case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange:
case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange,
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange,
kCVPixelFormatType_420YpCbCr10BiPlanarFullRange,
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange,
kCVPixelFormatType_Lossless_420YpCbCr8BiPlanarFullRange,
kCVPixelFormatType_Lossless_420YpCbCr8BiPlanarVideoRange,
kCVPixelFormatType_Lossless_420YpCbCr10PackedBiPlanarVideoRange:
self = .yuv
case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange:
self = .yuv
case kCVPixelFormatType_32BGRA:
case kCVPixelFormatType_32BGRA, kCVPixelFormatType_Lossless_32BGRA:
self = .rgb
default:
self = .unknown