in AmazonChimeSDK/AmazonChimeSDKTests/audiovideo/video/backgroundfilter/BackgroundFilterTest.swift [338:350]
func getRGBMatch(
offset: Int,
expectedImageBytes: UnsafePointer<UInt8>,
gotImageBytes: UnsafePointer<UInt8>
) -> Bool {
let rDiff = Int32(expectedImageBytes[offset]) - Int32(gotImageBytes[offset])
let gDiff = Int32(expectedImageBytes[offset+1]) - Int32(gotImageBytes[offset+1])
let bDiff = Int32(expectedImageBytes[offset+2]) - Int32(gotImageBytes[offset+2])
let rMatch = abs(rDiff) < expectedPixelMatchThreshold
let gMatch = abs(gDiff) < expectedPixelMatchThreshold
let bMatch = abs(bDiff) < expectedPixelMatchThreshold
return rMatch && gMatch && bMatch
}