[FFmpeg-user] Current Git Pull fails building on OSX 10.11.6
Rens Dijkshoorn
rens at offlinemedia.nl
Sun Oct 3 21:37:48 EEST 2021
Hi,
current git pull fails on libavutil/hwcontext_videotoolbox.c when building on OSX 10.11.6 with errors below
---
libavutil/hwcontext_videotoolbox.c:378:13: error: use of unknown builtin '__builtin_available' [-Wimplicit-function-declaration]
if (__builtin_available(macOS 10.11, *))
^
libavutil/hwcontext_videotoolbox.c:378:33: error: use of undeclared identifier 'macOS'
if (__builtin_available(macOS 10.11, *))
^
libavutil/hwcontext_videotoolbox.c:401:33: error: use of undeclared identifier 'macOS'
if (__builtin_available(macOS 10.11, *))
^
libavutil/hwcontext_videotoolbox.c:423:33: error: use of undeclared identifier 'macOS'
if (__builtin_available(macOS 10.13, *))
^
libavutil/hwcontext_videotoolbox.c:424:24: error: use of undeclared identifier 'kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ'
colortrc = kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
^
libavutil/hwcontext_videotoolbox.c:430:33: error: use of undeclared identifier 'macOS'
if (__builtin_available(macOS 10.11, *))
^
libavutil/hwcontext_videotoolbox.c:442:33: error: use of undeclared identifier 'macOS'
if (__builtin_available(macOS 10.12, *))
^
CC libavutil/integer.o
libavutil/hwcontext_videotoolbox.c:443:24: error: use of undeclared identifier 'kCVImageBufferTransferFunction_SMPTE_ST_428_1'
colortrc = kCVImageBufferTransferFunction_SMPTE_ST_428_1;
^
libavutil/hwcontext_videotoolbox.c:448:33: error: use of undeclared identifier 'macOS'
if (__builtin_available(macOS 10.13, *))
^
libavutil/hwcontext_videotoolbox.c:449:24: error: use of undeclared identifier 'kCVImageBufferTransferFunction_ITU_R_2100_HLG'
colortrc = kCVImageBufferTransferFunction_ITU_R_2100_HLG;
^
10 errors generated.
make: *** [ffbuild/common.mak:70: libavutil/hwcontext_videotoolbox.o] Error 1
make: *** Waiting for unfinished jobs....
---
applying the patch below will build without any other errors but not sure of all
color spaces are handeld the way it should.
diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c
index 58095a1..f1ff429 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -375,9 +375,9 @@ static int vt_pixbuf_set_colorspace(AVHWFramesContext *hwfc,
switch (src->colorspace) {
case AVCOL_SPC_BT2020_CL:
case AVCOL_SPC_BT2020_NCL:
- if (__builtin_available(macOS 10.11, *))
- colormatrix = kCVImageBufferYCbCrMatrix_ITU_R_2020;
- else
+ //if (__builtin_available(macOS 10.11, *))
+ // colormatrix = kCVImageBufferYCbCrMatrix_ITU_R_2020;
+ //else
colormatrix = CFSTR("ITU_R_2020");
break;
case AVCOL_SPC_BT470BG:
@@ -398,9 +398,9 @@ static int vt_pixbuf_set_colorspace(AVHWFramesContext *hwfc,
switch (src->color_primaries) {
case AVCOL_PRI_BT2020:
- if (__builtin_available(macOS 10.11, *))
- colorpri = kCVImageBufferColorPrimaries_ITU_R_2020;
- else
+ //if (__builtin_available(macOS 10.11, *))
+ // colorpri = kCVImageBufferColorPrimaries_ITU_R_2020;
+ //else
colorpri = CFSTR("ITU_R_2020");
break;
case AVCOL_PRI_BT709:
@@ -420,16 +420,16 @@ static int vt_pixbuf_set_colorspace(AVHWFramesContext *hwfc,
switch (src->color_trc) {
case AVCOL_TRC_SMPTE2084:
- if (__builtin_available(macOS 10.13, *))
- colortrc = kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
- else
+ //if (__builtin_available(macOS 10.13, *))
+ // colortrc = kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
+ //else
colortrc = CFSTR("SMPTE_ST_2084_PQ");
break;
case AVCOL_TRC_BT2020_10:
case AVCOL_TRC_BT2020_12:
- if (__builtin_available(macOS 10.11, *))
- colortrc = kCVImageBufferTransferFunction_ITU_R_2020;
- else
+ //if (__builtin_available(macOS 10.11, *))
+ // colortrc = kCVImageBufferTransferFunction_ITU_R_2020;
+ //else
colortrc = CFSTR("ITU_R_2020");
break;
case AVCOL_TRC_BT709:
@@ -439,15 +439,15 @@ static int vt_pixbuf_set_colorspace(AVHWFramesContext *hwfc,
colortrc = kCVImageBufferTransferFunction_SMPTE_240M_1995;
break;
case AVCOL_TRC_SMPTE428:
- if (__builtin_available(macOS 10.12, *))
- colortrc = kCVImageBufferTransferFunction_SMPTE_ST_428_1;
- else
+ //if (__builtin_available(macOS 10.12, *))
+ // colortrc = kCVImageBufferTransferFunction_SMPTE_ST_428_1;
+ //else
colortrc = CFSTR("SMPTE_ST_428_1");
break;
case AVCOL_TRC_ARIB_STD_B67:
- if (__builtin_available(macOS 10.13, *))
- colortrc = kCVImageBufferTransferFunction_ITU_R_2100_HLG;
- else
+ //if (__builtin_available(macOS 10.13, *))
+ // colortrc = kCVImageBufferTransferFunction_ITU_R_2100_HLG;
+ //else
colortrc = CFSTR("ITU_R_2100_HLG");
break;
case AVCOL_TRC_GAMMA22:
Regards Rens
More information about the ffmpeg-user
mailing list