Media
public enum Media
Namespace for functions that relate to media encoding
-
Undocumented
Declaration
Swift
public static let repeatMarker: UInt64
-
Decode 10bit YUV to 8bit RGB
Declaration
Swift
public static func decodeRunLength(yuvData compressed: Data, uncompressedByteCount: Int? = nil) -> Data
Parameters
yuvData
array containing groups of (Alpha1 Blue Lum1 Alpha2 Red Lum2). With 10bits for each color channel. So one group is 8 bytes = 64 bits and describes two pixels
uncompressedByteCount
the size of the decompressed data
Return Value
array containing groups of (Red Green Blue Alpha) with 8 bits for each channel. So one group is 4 bytes = 32 bit and describes one pixel.
-
Encode to 8bit RGB to 10bit YUV
Declaration
Swift
public static func encodeRunLength(rgbData data: Data) -> Data
Parameters
rgbData
array containing groups of (Red Green Blue Alpha) with 8 bits for each channel. So one group is 4 bytes = 32 bit and describes one pixel.
Return Value
array containing groups of (Alpha1 Blue Lum1 Alpha2 Red Lum2). With 10bits for each color channel. So one group is 8 bytes = 64 bits and describes two pixels
-
Undocumented
Declaration
Swift
public static func decodeRunLength(rawData compressed: Data, uncompressedByteCount: Int? = nil) -> Data
-
Undocumented
Declaration
Swift
public static func encodeRunLength(rawData data: Data) -> Data