Contents

vImageConvert_422CbYpCrYp8_AA8ToARGB8888(_:_:_:_:_:_:)

Converts an 8-bit-per-channel 4:2:2 CbYpCrYp buffer and an 8-bit alpha buffer to an 8-bit-per-channel, 4-channel ARGB buffer.

Declaration

func vImageConvert_422CbYpCrYp8_AA8ToARGB8888(_ src: UnsafePointer<vImage_Buffer>, _ srcA: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ info: UnsafePointer<vImage_YpCbCrToARGB>, _ permuteMap: UnsafePointer<UInt8>!, _ flags: vImage_Flags) -> vImage_Error

Parameters

  • src:

    The source vImage buffer that contains the CbYpCrYp channels.

  • srcA:

    The source vImage buffer that contains the alpha channel.

  • dest:

    A pointer to the destination vImage buffer structure. You’re responsible for filling out the Height, Width, and Rowbytes fields of this structure, and for allocating a data buffer of the appropriate size. On return, the data buffer this structure points to contains the destination image data. When you no longer need the data buffer, deallocate the memory to prevent memory leaks.

  • info:

    A Vimage_ypcbcrtoargb structure that describes the conversion matrix, the range of the input and output pixels from the matrix, and clamping information.

  • permuteMap:

    An array of four 8-bit integers with the values 0, 1, 2, and 3, in some order. Each value specifies the channel from the source image that the function copies to the destination channel at the corresponding index.

  • flags:

    The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass Kvimagedonottile; otherwise, pass Kvimagenoflags.

Return Value

kvImageNoError; otherwise, one of the error codes in Data Types and Constants.

See Also

Converting from 4:2:2