diff options
author | rcombs <rcombs@rcombs.me> | 2021-12-18 04:59:13 -0600 |
---|---|---|
committer | rcombs <rcombs@rcombs.me> | 2021-12-22 18:42:51 -0600 |
commit | 69bd95dcd8d09ecc04f994a239c1d3da62ec38d6 (patch) | |
tree | dba814d83be9f0f7f74e15514d64886bc51f0290 /libavutil/hwcontext_videotoolbox.h | |
parent | 9a890e49b66d611c1c97347c9529ae85920bd5a1 (diff) | |
download | ffmpeg-69bd95dcd8d09ecc04f994a239c1d3da62ec38d6.tar.gz |
lavu/videotoolbox: expose conversion routines for color parameters
Also fixes symbol lookup errors on older macOS when built with a newer SDK,
introduced in 6cab5206b0ad94990c435cb7c5cf3b29675e0231
Diffstat (limited to 'libavutil/hwcontext_videotoolbox.h')
-rw-r--r-- | libavutil/hwcontext_videotoolbox.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libavutil/hwcontext_videotoolbox.h b/libavutil/hwcontext_videotoolbox.h index 62cde07c51..916899e97d 100644 --- a/libavutil/hwcontext_videotoolbox.h +++ b/libavutil/hwcontext_videotoolbox.h @@ -60,4 +60,29 @@ uint32_t av_map_videotoolbox_format_from_pixfmt(enum AVPixelFormat pix_fmt); */ uint32_t av_map_videotoolbox_format_from_pixfmt2(enum AVPixelFormat pix_fmt, bool full_range); +/** + * Convert an AVChromaLocation to a VideoToolbox/CoreVideo chroma location string. + * Returns 0 if no known equivalent was found. + */ +CFStringRef av_map_videotoolbox_chroma_loc_from_av(enum AVChromaLocation loc); + +/** + * Convert an AVColorSpace to a VideoToolbox/CoreVideo color matrix string. + * Returns 0 if no known equivalent was found. + */ +CFStringRef av_map_videotoolbox_color_matrix_from_av(enum AVColorSpace space); + +/** + * Convert an AVColorPrimaries to a VideoToolbox/CoreVideo color primaries string. + * Returns 0 if no known equivalent was found. + */ +CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pri); + +/** + * Convert an AVColorTransferCharacteristic to a VideoToolbox/CoreVideo color transfer + * function string. + * Returns 0 if no known equivalent was found. + */ +CFStringRef av_map_videotoolbox_color_trc_from_av(enum AVColorTransferCharacteristic trc); + #endif /* AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H */ |