/* * sppe_apple_support.h — the two C helpers the Swift backend needs. * * Everything else in the Apple backend is Swift. These two live in C because * they touch FFmpeg's pixel-format tables and swscale, which are not exposed * through the core's public header and are wasteful to mirror in Swift. * * SPDX-License-Identifier: MIT */ #ifndef SPPE_APPLE_SUPPORT_H #define SPPE_APPLE_SUPPORT_H #include #include "sppe.h" #ifdef __cplusplus extern "C" { #endif /* FFmpeg pixel-format name for a format code the engine handed us, or "" . */ int sppe_apple_pixfmt_name(int ff_pix_fmt, char *buf, int bufsz); /* 1 if the format is > 8 bits per component (HDR / Main10 material). */ int sppe_apple_pixfmt_is_10bit(int ff_pix_fmt); /* * Convert one engine software frame to tightly packed BGRA. * dst must hold dst_stride * height bytes with dst_stride >= width*4. * Returns SPPE_OK on success. */ int sppe_apple_sw_to_bgra(const sppe_sw_frame *f, uint8_t *dst, int dst_stride, int *out_w, int *out_h); #ifdef __cplusplus } #endif #endif /* SPPE_APPLE_SUPPORT_H */