import { AVColorPrimaries, AVColorRange, AVColorSpace, AVColorTransferCharacteristic } from "@libmedia/avutil"; import { Matrix4 } from "@libmedia/common/math"; export default class ColorSpace { private matrixId; private primaryId; private transferId; private rangeId; constructor(matrixId: AVColorSpace, primaryId: AVColorPrimaries, transferId: AVColorTransferCharacteristic, rangeId: AVColorRange); getMatrixId(): AVColorSpace; getPrimaryId(): AVColorPrimaries; getTransferId(): AVColorTransferCharacteristic; getRangeId(): AVColorRange; isWide(): boolean; isHDR(): boolean; isToneMappedByDefault(): boolean; isAffectedBySDRWhiteLevel(): boolean; fullRangeEncodedValues(): boolean; /** * yuv -> rgb 转换矩阵 * * @param bitDepth * @returns */ getTransformMatrix(bitDepth: number): Matrix4; getRangeAdjustMatrix(bitDepth: number): Matrix4; private getTransferFunction_; getTransferFunction(sdrWhiteLevel?: float): { g: number; a: number; b: number; c: number; d: number; e: number; f: number; }; getInverseTransferFunction(sdrWhiteLevel?: float): { a: number; b: number; c: number; d: number; e: number; f: number; g: number; }; hasExtendedSkTransferFn(): boolean; isValid(): boolean; private getColorSpacePrimaries; /** * rgb -> xyz 转换矩阵 * * @returns */ getPrimaryMatrix(): Matrix4; }