Contents

vImageConvert_ARGB8888To422CbYpCrYp16(_:_:_:_:_:)

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

Declaration

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

Parameters

  • src:

    The source vImage buffer.

  • 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_argbtoypcbcr 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 to 4:2:2