static int HapCodecYCoCgDXTEncoderEncode(HapCodecDXTEncoderRef encoder HAP_ATTR_UNUSED, const void *src, unsigned int src_bytes_per_row, OSType src_pixel_format, void *dst, unsigned int width, unsigned int height) { if (src_pixel_format != kHapCVPixelFormat_CoCgXY) return 1; CompressYCoCgDXT5((const byte *)src, (byte *)dst, width, height, src_bytes_per_row); return 0; }
static int HapCodecYCoCgDXTEncoderEncode(HapCodecDXTEncoderRef encoder, const void *src, unsigned int src_bytes_per_row, OSType src_pixel_format, void *dst, unsigned int width, unsigned int height) { #pragma unused(encoder) if (src_pixel_format != kHapCVPixelFormat_CoCgXY) return 1; CompressYCoCgDXT5(src, dst, width, height, src_bytes_per_row); return 0; }