vImageConverter_MustOperateOutOfPlace(_:_:_:_:)
Determines whether a converter is capable of operating in place.
Declaration
func vImageConverter_MustOperateOutOfPlace(_ converter: vImageConverter, _ srcs: UnsafePointer<vImage_Buffer>!, _ dests: UnsafePointer<vImage_Buffer>!, _ flags: vImage_Flags) -> vImage_ErrorParameters
- converter:
The converter to check to determine if it’s capable of operating in place.
- srcs:
The list of source buffers you plan to use with Vimageconvert_anytoany(_:_:_:_:_:). This parameter may be
NULL. - dests:
The list of destination buffers you plan to use with Vimageconvert_anytoany(_:_:_:_:_:). This parameter may be
NULL. - flags:
The flags you’ll pass to Vimageconvert_anytoany(_:_:_:_:_:).
Return Value
kvImageNoError if the conversion will work in place, kvImageOutOfPlaceOperationRequired if the conversion requires out of place operation; otherwise, one of the error codes that Data Types and Constants describes.
Discussion
Some conversions work if the source and destination image buffer scanlines start at the same address. Others don’t; for those cases, you need to allocate additional storage to hold the destination buffer.
In-place operation is considered to mean srcs[i].data = dests[i].data and srcs[i].rowBytes = dests[i].rowBytes. Other styles of partial buffer overlap produce undefined behavior.