Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 1 | ################################################################################ |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 2 | # |
| 3 | # ffmpeg |
| 4 | # |
Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 5 | ################################################################################ |
Gustavo Zacarias | 1b269dd | 2011-03-01 13:20:00 -0300 | [diff] [blame] | 6 | |
Bernd Kuhls | 480e8f7 | 2018-02-12 17:51:06 +0100 | [diff] [blame] | 7 | FFMPEG_VERSION = 3.4.2 |
Jerzy Grzegorek | 0a854ce | 2015-10-14 12:34:22 +0200 | [diff] [blame] | 8 | FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz |
Gustavo Zacarias | 1b269dd | 2011-03-01 13:20:00 -0300 | [diff] [blame] | 9 | FFMPEG_SITE = http://ffmpeg.org/releases |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 10 | FFMPEG_INSTALL_STAGING = YES |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 11 | |
Rahul Bedarkar | 30a3e8d | 2017-03-30 19:13:34 +0530 | [diff] [blame] | 12 | FFMPEG_LICENSE = LGPL-2.1+, libjpeg license |
Luca Ceresoli | a20aae6 | 2014-10-02 12:11:01 +0200 | [diff] [blame] | 13 | FFMPEG_LICENSE_FILES = LICENSE.md COPYING.LGPLv2.1 |
Luca Ceresoli | a17d894 | 2013-02-07 11:02:33 +0000 | [diff] [blame] | 14 | ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) |
Rahul Bedarkar | af31c30 | 2017-03-30 19:13:32 +0530 | [diff] [blame] | 15 | FFMPEG_LICENSE += and GPL-2.0+ |
Luca Ceresoli | a17d894 | 2013-02-07 11:02:33 +0000 | [diff] [blame] | 16 | FFMPEG_LICENSE_FILES += COPYING.GPLv2 |
| 17 | endif |
| 18 | |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 19 | FFMPEG_CONF_OPTS = \ |
Bernd Kuhls | 79449c2 | 2014-10-03 11:50:46 +0200 | [diff] [blame] | 20 | --prefix=/usr \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 21 | --enable-avfilter \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 22 | --disable-version3 \ |
| 23 | --enable-logging \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 24 | --enable-optimizations \ |
| 25 | --disable-extra-warnings \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 26 | --enable-avdevice \ |
| 27 | --enable-avcodec \ |
| 28 | --enable-avformat \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 29 | --enable-network \ |
| 30 | --disable-gray \ |
| 31 | --enable-swscale-alpha \ |
| 32 | --disable-small \ |
| 33 | --enable-dct \ |
| 34 | --enable-fft \ |
| 35 | --enable-mdct \ |
| 36 | --enable-rdft \ |
| 37 | --disable-crystalhd \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 38 | --disable-dxva2 \ |
| 39 | --enable-runtime-cpudetect \ |
| 40 | --disable-hardcoded-tables \ |
Vicente Olivert Riera | 2893d2f | 2016-08-15 17:03:36 +0200 | [diff] [blame] | 41 | --disable-mipsdsp \ |
Vicente Olivert Riera | b090dcb | 2015-10-14 16:58:22 +0100 | [diff] [blame] | 42 | --disable-mipsdspr2 \ |
Bernd Kuhls | 1ca32ad | 2015-07-24 20:13:47 +0200 | [diff] [blame] | 43 | --disable-msa \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 44 | --enable-hwaccels \ |
Bernd Kuhls | 3b6fa45 | 2017-07-22 17:13:06 +0200 | [diff] [blame] | 45 | --disable-cuda \ |
| 46 | --disable-cuvid \ |
| 47 | --disable-nvenc \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 48 | --disable-avisynth \ |
| 49 | --disable-frei0r \ |
| 50 | --disable-libopencore-amrnb \ |
| 51 | --disable-libopencore-amrwb \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 52 | --disable-libdc1394 \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 53 | --disable-libgsm \ |
Bernd Kuhls | 632df1d | 2015-10-17 14:31:58 +0200 | [diff] [blame] | 54 | --disable-libilbc \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 55 | --disable-libvo-amrwbenc \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 56 | --disable-symver \ |
Thomas De Schampheleire | 7164a32 | 2014-02-05 14:50:56 +0100 | [diff] [blame] | 57 | --disable-doc |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 58 | |
Bernd Kuhls | f6695c4 | 2017-12-18 07:29:10 +0100 | [diff] [blame] | 59 | FFMPEG_DEPENDENCIES += host-pkgconf |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 60 | |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 61 | ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 62 | FFMPEG_CONF_OPTS += --enable-gpl |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 63 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 64 | FFMPEG_CONF_OPTS += --disable-gpl |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 65 | endif |
| 66 | |
| 67 | ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 68 | FFMPEG_CONF_OPTS += --enable-nonfree |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 69 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 70 | FFMPEG_CONF_OPTS += --disable-nonfree |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 71 | endif |
| 72 | |
Luca Ceresoli | 5253efa | 2010-06-14 21:41:43 +0200 | [diff] [blame] | 73 | ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 74 | FFMPEG_CONF_OPTS += --enable-ffmpeg |
Luca Ceresoli | 5253efa | 2010-06-14 21:41:43 +0200 | [diff] [blame] | 75 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 76 | FFMPEG_CONF_OPTS += --disable-ffmpeg |
Luca Ceresoli | 5253efa | 2010-06-14 21:41:43 +0200 | [diff] [blame] | 77 | endif |
| 78 | |
| 79 | ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y) |
Phil Eichinger | d767ff8 | 2016-12-06 15:32:37 +0100 | [diff] [blame] | 80 | FFMPEG_DEPENDENCIES += sdl2 |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 81 | FFMPEG_CONF_OPTS += --enable-ffplay |
Phil Eichinger | d767ff8 | 2016-12-06 15:32:37 +0100 | [diff] [blame] | 82 | FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl2-config |
Luca Ceresoli | 5253efa | 2010-06-14 21:41:43 +0200 | [diff] [blame] | 83 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 84 | FFMPEG_CONF_OPTS += --disable-ffplay |
Luca Ceresoli | 5253efa | 2010-06-14 21:41:43 +0200 | [diff] [blame] | 85 | endif |
| 86 | |
| 87 | ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 88 | FFMPEG_CONF_OPTS += --enable-ffserver |
Luca Ceresoli | 5253efa | 2010-06-14 21:41:43 +0200 | [diff] [blame] | 89 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 90 | FFMPEG_CONF_OPTS += --disable-ffserver |
Luca Ceresoli | 5253efa | 2010-06-14 21:41:43 +0200 | [diff] [blame] | 91 | endif |
| 92 | |
Bernd Kuhls | f376585 | 2014-10-14 20:28:24 +0200 | [diff] [blame] | 93 | ifeq ($(BR2_PACKAGE_FFMPEG_AVRESAMPLE),y) |
| 94 | FFMPEG_CONF_OPTS += --enable-avresample |
| 95 | else |
| 96 | FFMPEG_CONF_OPTS += --disable-avresample |
| 97 | endif |
| 98 | |
Steve Kenton | 3b3b4f2 | 2014-12-01 18:55:35 -0600 | [diff] [blame] | 99 | ifeq ($(BR2_PACKAGE_FFMPEG_FFPROBE),y) |
| 100 | FFMPEG_CONF_OPTS += --enable-ffprobe |
| 101 | else |
| 102 | FFMPEG_CONF_OPTS += --disable-ffprobe |
| 103 | endif |
| 104 | |
Peter Korsgaard | 4ff3455 | 2010-10-07 09:54:00 +0200 | [diff] [blame] | 105 | ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 106 | FFMPEG_CONF_OPTS += --enable-postproc |
Peter Korsgaard | 4ff3455 | 2010-10-07 09:54:00 +0200 | [diff] [blame] | 107 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 108 | FFMPEG_CONF_OPTS += --disable-postproc |
Peter Korsgaard | 4ff3455 | 2010-10-07 09:54:00 +0200 | [diff] [blame] | 109 | endif |
| 110 | |
| 111 | ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 112 | FFMPEG_CONF_OPTS += --enable-swscale |
Peter Korsgaard | 4ff3455 | 2010-10-07 09:54:00 +0200 | [diff] [blame] | 113 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 114 | FFMPEG_CONF_OPTS += --disable-swscale |
Peter Korsgaard | 4ff3455 | 2010-10-07 09:54:00 +0200 | [diff] [blame] | 115 | endif |
| 116 | |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 117 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 118 | FFMPEG_CONF_OPTS += --disable-encoders \ |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 119 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x)) |
| 120 | endif |
| 121 | |
| 122 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 123 | FFMPEG_CONF_OPTS += --disable-decoders \ |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 124 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x)) |
| 125 | endif |
| 126 | |
| 127 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 128 | FFMPEG_CONF_OPTS += --disable-muxers \ |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 129 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x)) |
| 130 | endif |
| 131 | |
| 132 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 133 | FFMPEG_CONF_OPTS += --disable-demuxers \ |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 134 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x)) |
| 135 | endif |
| 136 | |
| 137 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 138 | FFMPEG_CONF_OPTS += --disable-parsers \ |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 139 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x)) |
| 140 | endif |
| 141 | |
| 142 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 143 | FFMPEG_CONF_OPTS += --disable-bsfs \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 144 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsfs=$(x)) |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 145 | endif |
| 146 | |
| 147 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 148 | FFMPEG_CONF_OPTS += --disable-protocols \ |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 149 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x)) |
| 150 | endif |
| 151 | |
| 152 | ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 153 | FFMPEG_CONF_OPTS += --disable-filters \ |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 154 | $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x)) |
| 155 | endif |
| 156 | |
| 157 | ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 158 | FFMPEG_CONF_OPTS += --enable-indevs |
Bernd Kuhls | ca06ba2 | 2017-06-01 22:39:29 +0200 | [diff] [blame] | 159 | ifeq ($(BR2_PACKAGE_ALSA_LIB),y) |
Bernd Kuhls | f6695c4 | 2017-12-18 07:29:10 +0100 | [diff] [blame] | 160 | FFMPEG_CONF_OPTS += --enable-alsa |
Bernd Kuhls | ca06ba2 | 2017-06-01 22:39:29 +0200 | [diff] [blame] | 161 | FFMPEG_DEPENDENCIES += alsa-lib |
Bernd Kuhls | f6695c4 | 2017-12-18 07:29:10 +0100 | [diff] [blame] | 162 | else |
| 163 | FFMPEG_CONF_OPTS += --disable-alsa |
Bernd Kuhls | ca06ba2 | 2017-06-01 22:39:29 +0200 | [diff] [blame] | 164 | endif |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 165 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 166 | FFMPEG_CONF_OPTS += --disable-indevs |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 167 | endif |
| 168 | |
| 169 | ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 170 | FFMPEG_CONF_OPTS += --enable-outdevs |
Bernd Kuhls | ca06ba2 | 2017-06-01 22:39:29 +0200 | [diff] [blame] | 171 | ifeq ($(BR2_PACKAGE_ALSA_LIB),y) |
| 172 | FFMPEG_DEPENDENCIES += alsa-lib |
| 173 | endif |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 174 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 175 | FFMPEG_CONF_OPTS += --disable-outdevs |
Luca Ceresoli | 56e4d69 | 2010-06-14 21:41:44 +0200 | [diff] [blame] | 176 | endif |
| 177 | |
Thomas Petazzoni | 9eaad20 | 2010-12-13 17:27:44 +0100 | [diff] [blame] | 178 | ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 179 | FFMPEG_CONF_OPTS += --enable-pthreads |
Thomas Petazzoni | 9eaad20 | 2010-12-13 17:27:44 +0100 | [diff] [blame] | 180 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 181 | FFMPEG_CONF_OPTS += --disable-pthreads |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 182 | endif |
| 183 | |
| 184 | ifeq ($(BR2_PACKAGE_ZLIB),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 185 | FFMPEG_CONF_OPTS += --enable-zlib |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 186 | FFMPEG_DEPENDENCIES += zlib |
| 187 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 188 | FFMPEG_CONF_OPTS += --disable-zlib |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 189 | endif |
| 190 | |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 191 | ifeq ($(BR2_PACKAGE_BZIP2),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 192 | FFMPEG_CONF_OPTS += --enable-bzlib |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 193 | FFMPEG_DEPENDENCIES += bzip2 |
Arnout Vandecappelle (Essensium/Mind) | 4e20ad1 | 2012-01-22 13:04:16 +0100 | [diff] [blame] | 194 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 195 | FFMPEG_CONF_OPTS += --disable-bzlib |
Arnout Vandecappelle (Essensium/Mind) | 4e20ad1 | 2012-01-22 13:04:16 +0100 | [diff] [blame] | 196 | endif |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 197 | |
Bernd Kuhls | 632df1d | 2015-10-17 14:31:58 +0200 | [diff] [blame] | 198 | ifeq ($(BR2_PACKAGE_FDK_AAC)$(BR2_PACKAGE_FFMPEG_NONFREE),yy) |
| 199 | FFMPEG_CONF_OPTS += --enable-libfdk-aac |
| 200 | FFMPEG_DEPENDENCIES += fdk-aac |
| 201 | else |
| 202 | FFMPEG_CONF_OPTS += --disable-libfdk-aac |
| 203 | endif |
| 204 | |
Fabrice Fontaine | f66bd48 | 2018-04-02 10:46:17 +0200 | [diff] [blame] | 205 | ifeq ($(BR2_PACKAGE_FFMPEG_GPL)$(BR2_PACKAGE_LIBCDIO_PARANOIA),yy) |
| 206 | FFMPEG_CONF_OPTS += --enable-libcdio |
| 207 | FFMPEG_DEPENDENCIES += libcdio-paranoia |
| 208 | else |
| 209 | FFMPEG_CONF_OPTS += --disable-libcdio |
| 210 | endif |
| 211 | |
Bernd Kuhls | 5f7411e | 2015-10-17 21:38:56 +0200 | [diff] [blame] | 212 | ifeq ($(BR2_PACKAGE_GNUTLS),y) |
| 213 | FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl |
| 214 | FFMPEG_DEPENDENCIES += gnutls |
| 215 | else |
| 216 | FFMPEG_CONF_OPTS += --disable-gnutls |
Bernd Kuhls | 158eab1 | 2018-04-02 13:58:26 +0200 | [diff] [blame] | 217 | ifeq ($(BR2_PACKAGE_OPENSSL),y) |
Peter Korsgaard | 457b646 | 2014-01-13 13:11:39 +0100 | [diff] [blame] | 218 | # openssl isn't license compatible with GPL |
| 219 | ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 220 | FFMPEG_CONF_OPTS += --disable-openssl |
Peter Korsgaard | 457b646 | 2014-01-13 13:11:39 +0100 | [diff] [blame] | 221 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 222 | FFMPEG_CONF_OPTS += --enable-openssl |
Bernd Kuhls | 158eab1 | 2018-04-02 13:58:26 +0200 | [diff] [blame] | 223 | FFMPEG_DEPENDENCIES += openssl |
Peter Korsgaard | 457b646 | 2014-01-13 13:11:39 +0100 | [diff] [blame] | 224 | endif |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 225 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 226 | FFMPEG_CONF_OPTS += --disable-openssl |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 227 | endif |
Bernd Kuhls | 5f7411e | 2015-10-17 21:38:56 +0200 | [diff] [blame] | 228 | endif |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 229 | |
Bernd Kuhls | af127a6 | 2016-07-24 17:53:18 +0200 | [diff] [blame] | 230 | ifeq ($(BR2_PACKAGE_FFMPEG_GPL)$(BR2_PACKAGE_LIBEBUR128),yy) |
| 231 | FFMPEG_DEPENDENCIES += libebur128 |
| 232 | endif |
| 233 | |
Bernd Kuhls | 632df1d | 2015-10-17 14:31:58 +0200 | [diff] [blame] | 234 | ifeq ($(BR2_PACKAGE_LIBOPENH264),y) |
| 235 | FFMPEG_CONF_OPTS += --enable-libopenh264 |
| 236 | FFMPEG_DEPENDENCIES += libopenh264 |
| 237 | else |
| 238 | FFMPEG_CONF_OPTS += --disable-libopenh264 |
| 239 | endif |
| 240 | |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 241 | ifeq ($(BR2_PACKAGE_LIBVORBIS),y) |
| 242 | FFMPEG_DEPENDENCIES += libvorbis |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 243 | FFMPEG_CONF_OPTS += \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 244 | --enable-libvorbis \ |
| 245 | --enable-muxer=ogg \ |
| 246 | --enable-encoder=libvorbis |
| 247 | endif |
| 248 | |
Bernd Kuhls | 17240db | 2014-07-15 21:19:03 +0200 | [diff] [blame] | 249 | ifeq ($(BR2_PACKAGE_LIBVA),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 250 | FFMPEG_CONF_OPTS += --enable-vaapi |
Bernd Kuhls | 17240db | 2014-07-15 21:19:03 +0200 | [diff] [blame] | 251 | FFMPEG_DEPENDENCIES += libva |
| 252 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 253 | FFMPEG_CONF_OPTS += --disable-vaapi |
Bernd Kuhls | 17240db | 2014-07-15 21:19:03 +0200 | [diff] [blame] | 254 | endif |
| 255 | |
Bernd Kuhls | c26132c | 2016-07-07 22:49:14 +0200 | [diff] [blame] | 256 | ifeq ($(BR2_PACKAGE_LIBVDPAU),y) |
| 257 | FFMPEG_CONF_OPTS += --enable-vdpau |
| 258 | FFMPEG_DEPENDENCIES += libvdpau |
| 259 | else |
| 260 | FFMPEG_CONF_OPTS += --disable-vdpau |
| 261 | endif |
| 262 | |
Thomas Petazzoni | ba2b411 | 2018-01-01 13:44:28 +0100 | [diff] [blame] | 263 | ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) |
Mahyar Koshkouei | e66936e | 2017-09-14 16:01:56 +0100 | [diff] [blame] | 264 | FFMPEG_CONF_OPTS += --enable-mmal --enable-omx --enable-omx-rpi \ |
| 265 | --extra-cflags=-I$(STAGING_DIR)/usr/include/IL |
Thomas Petazzoni | ba2b411 | 2018-01-01 13:44:28 +0100 | [diff] [blame] | 266 | FFMPEG_DEPENDENCIES += rpi-userland |
Mahyar Koshkouei | e66936e | 2017-09-14 16:01:56 +0100 | [diff] [blame] | 267 | else |
| 268 | FFMPEG_CONF_OPTS += --disable-mmal --disable-omx --disable-omx-rpi |
| 269 | endif |
| 270 | |
Bernd Kuhls | d9ea464 | 2016-08-15 17:03:39 +0200 | [diff] [blame] | 271 | # To avoid a circular dependency only use opencv if opencv itself does |
| 272 | # not depend on ffmpeg. |
| 273 | ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx) |
| 274 | FFMPEG_CONF_OPTS += --enable-libopencv |
| 275 | FFMPEG_DEPENDENCIES += opencv |
Bernd Kuhls | 1b69855 | 2016-09-05 16:51:20 +0200 | [diff] [blame] | 276 | else ifeq ($(BR2_PACKAGE_OPENCV3_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV3_WITH_FFMPEG),yx) |
| 277 | FFMPEG_CONF_OPTS += --enable-libopencv |
| 278 | FFMPEG_DEPENDENCIES += opencv3 |
Bernd Kuhls | d9ea464 | 2016-08-15 17:03:39 +0200 | [diff] [blame] | 279 | else |
| 280 | FFMPEG_CONF_OPTS += --disable-libopencv |
| 281 | endif |
| 282 | |
David du Colombier | ad58c88 | 2014-09-30 15:28:05 +0200 | [diff] [blame] | 283 | ifeq ($(BR2_PACKAGE_OPUS),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 284 | FFMPEG_CONF_OPTS += --enable-libopus |
David du Colombier | ad58c88 | 2014-09-30 15:28:05 +0200 | [diff] [blame] | 285 | FFMPEG_DEPENDENCIES += opus |
| 286 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 287 | FFMPEG_CONF_OPTS += --disable-libopus |
David du Colombier | ad58c88 | 2014-09-30 15:28:05 +0200 | [diff] [blame] | 288 | endif |
| 289 | |
David du Colombier | 8a966c8 | 2014-09-30 15:28:04 +0200 | [diff] [blame] | 290 | ifeq ($(BR2_PACKAGE_LIBVPX),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 291 | FFMPEG_CONF_OPTS += --enable-libvpx |
David du Colombier | 8a966c8 | 2014-09-30 15:28:04 +0200 | [diff] [blame] | 292 | FFMPEG_DEPENDENCIES += libvpx |
| 293 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 294 | FFMPEG_CONF_OPTS += --disable-libvpx |
David du Colombier | 8a966c8 | 2014-09-30 15:28:04 +0200 | [diff] [blame] | 295 | endif |
| 296 | |
Bernd Kuhls | 0c14259 | 2015-08-01 16:20:41 +0200 | [diff] [blame] | 297 | ifeq ($(BR2_PACKAGE_LIBASS),y) |
| 298 | FFMPEG_CONF_OPTS += --enable-libass |
| 299 | FFMPEG_DEPENDENCIES += libass |
| 300 | else |
| 301 | FFMPEG_CONF_OPTS += --disable-libass |
| 302 | endif |
| 303 | |
| 304 | ifeq ($(BR2_PACKAGE_LIBBLURAY),y) |
| 305 | FFMPEG_CONF_OPTS += --enable-libbluray |
| 306 | FFMPEG_DEPENDENCIES += libbluray |
| 307 | else |
| 308 | FFMPEG_CONF_OPTS += --disable-libbluray |
| 309 | endif |
| 310 | |
| 311 | ifeq ($(BR2_PACKAGE_RTMPDUMP),y) |
| 312 | FFMPEG_CONF_OPTS += --enable-librtmp |
| 313 | FFMPEG_DEPENDENCIES += rtmpdump |
| 314 | else |
| 315 | FFMPEG_CONF_OPTS += --disable-librtmp |
| 316 | endif |
| 317 | |
| 318 | ifeq ($(BR2_PACKAGE_LAME),y) |
| 319 | FFMPEG_CONF_OPTS += --enable-libmp3lame |
| 320 | FFMPEG_DEPENDENCIES += lame |
| 321 | else |
| 322 | FFMPEG_CONF_OPTS += --disable-libmp3lame |
| 323 | endif |
| 324 | |
| 325 | ifeq ($(BR2_PACKAGE_LIBMODPLUG),y) |
| 326 | FFMPEG_CONF_OPTS += --enable-libmodplug |
| 327 | FFMPEG_DEPENDENCIES += libmodplug |
| 328 | else |
| 329 | FFMPEG_CONF_OPTS += --disable-libmodplug |
| 330 | endif |
| 331 | |
| 332 | ifeq ($(BR2_PACKAGE_SPEEX),y) |
| 333 | FFMPEG_CONF_OPTS += --enable-libspeex |
| 334 | FFMPEG_DEPENDENCIES += speex |
| 335 | else |
| 336 | FFMPEG_CONF_OPTS += --disable-libspeex |
| 337 | endif |
| 338 | |
| 339 | ifeq ($(BR2_PACKAGE_LIBTHEORA),y) |
| 340 | FFMPEG_CONF_OPTS += --enable-libtheora |
| 341 | FFMPEG_DEPENDENCIES += libtheora |
| 342 | else |
| 343 | FFMPEG_CONF_OPTS += --disable-libtheora |
| 344 | endif |
| 345 | |
| 346 | ifeq ($(BR2_PACKAGE_WAVPACK),y) |
| 347 | FFMPEG_CONF_OPTS += --enable-libwavpack |
| 348 | FFMPEG_DEPENDENCIES += wavpack |
| 349 | else |
| 350 | FFMPEG_CONF_OPTS += --disable-libwavpack |
| 351 | endif |
| 352 | |
Bernd Kuhls | f6695c4 | 2017-12-18 07:29:10 +0100 | [diff] [blame] | 353 | ifeq ($(BR2_PACKAGE_LIBICONV),y) |
| 354 | FFMPEG_CONF_OPTS += --enable-iconv |
| 355 | FFMPEG_DEPENDENCIES += libiconv |
| 356 | else |
| 357 | FFMPEG_CONF_OPTS += --disable-iconv |
| 358 | endif |
| 359 | |
Steve Kenton | 0ff42f1 | 2015-01-26 19:22:35 -0600 | [diff] [blame] | 360 | # ffmpeg freetype support require fenv.h which is only |
Peter Korsgaard | 64a4980 | 2015-01-31 08:18:30 +0100 | [diff] [blame] | 361 | # available/working on glibc. |
| 362 | # The microblaze variant doesn't provide the needed exceptions |
| 363 | ifeq ($(BR2_PACKAGE_FREETYPE)$(BR2_TOOLCHAIN_USES_GLIBC)x$(BR2_microblaze),yyx) |
Steve Kenton | 0ff42f1 | 2015-01-26 19:22:35 -0600 | [diff] [blame] | 364 | FFMPEG_CONF_OPTS += --enable-libfreetype |
| 365 | FFMPEG_DEPENDENCIES += freetype |
| 366 | else |
| 367 | FFMPEG_CONF_OPTS += --disable-libfreetype |
| 368 | endif |
| 369 | |
| 370 | ifeq ($(BR2_PACKAGE_FONTCONFIG),y) |
| 371 | FFMPEG_CONF_OPTS += --enable-fontconfig |
| 372 | FFMPEG_DEPENDENCIES += fontconfig |
| 373 | else |
| 374 | FFMPEG_CONF_OPTS += --disable-fontconfig |
| 375 | endif |
| 376 | |
Bernd Kuhls | ee4d8c6 | 2017-12-18 07:29:11 +0100 | [diff] [blame] | 377 | ifeq ($(BR2_PACKAGE_OPENJPEG),y) |
| 378 | FFMPEG_CONF_OPTS += --enable-libopenjpeg |
| 379 | FFMPEG_DEPENDENCIES += openjpeg |
| 380 | else |
| 381 | FFMPEG_CONF_OPTS += --disable-libopenjpeg |
| 382 | endif |
| 383 | |
David du Colombier | 3182056 | 2014-10-05 18:29:57 +0200 | [diff] [blame] | 384 | ifeq ($(BR2_PACKAGE_X264)$(BR2_PACKAGE_FFMPEG_GPL),yy) |
| 385 | FFMPEG_CONF_OPTS += --enable-libx264 |
| 386 | FFMPEG_DEPENDENCIES += x264 |
| 387 | else |
| 388 | FFMPEG_CONF_OPTS += --disable-libx264 |
| 389 | endif |
| 390 | |
Bernd Kuhls | d6a6958 | 2015-11-01 19:47:29 +0100 | [diff] [blame] | 391 | ifeq ($(BR2_PACKAGE_X265)$(BR2_PACKAGE_FFMPEG_GPL),yy) |
| 392 | FFMPEG_CONF_OPTS += --enable-libx265 |
| 393 | FFMPEG_DEPENDENCIES += x265 |
| 394 | else |
| 395 | FFMPEG_CONF_OPTS += --disable-libx265 |
| 396 | endif |
| 397 | |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 398 | ifeq ($(BR2_X86_CPU_HAS_MMX),y) |
Bernd Kuhls | f6695c4 | 2017-12-18 07:29:10 +0100 | [diff] [blame] | 399 | FFMPEG_CONF_OPTS += --enable-x86asm |
| 400 | FFMPEG_DEPENDENCIES += host-nasm |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 401 | else |
Bernd Kuhls | f6695c4 | 2017-12-18 07:29:10 +0100 | [diff] [blame] | 402 | FFMPEG_CONF_OPTS += --disable-x86asm |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 403 | FFMPEG_CONF_OPTS += --disable-mmx |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 404 | endif |
| 405 | |
| 406 | ifeq ($(BR2_X86_CPU_HAS_SSE),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 407 | FFMPEG_CONF_OPTS += --enable-sse |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 408 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 409 | FFMPEG_CONF_OPTS += --disable-sse |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 410 | endif |
| 411 | |
| 412 | ifeq ($(BR2_X86_CPU_HAS_SSE2),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 413 | FFMPEG_CONF_OPTS += --enable-sse2 |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 414 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 415 | FFMPEG_CONF_OPTS += --disable-sse2 |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 416 | endif |
| 417 | |
| 418 | ifeq ($(BR2_X86_CPU_HAS_SSE3),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 419 | FFMPEG_CONF_OPTS += --enable-sse3 |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 420 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 421 | FFMPEG_CONF_OPTS += --disable-sse3 |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 422 | endif |
| 423 | |
| 424 | ifeq ($(BR2_X86_CPU_HAS_SSSE3),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 425 | FFMPEG_CONF_OPTS += --enable-ssse3 |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 426 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 427 | FFMPEG_CONF_OPTS += --disable-ssse3 |
Gustavo Zacarias | 3f6aa3e | 2011-02-28 11:18:21 -0300 | [diff] [blame] | 428 | endif |
| 429 | |
Bernd Kuhls | 0e8e3c2 | 2014-01-02 18:59:45 +0100 | [diff] [blame] | 430 | ifeq ($(BR2_X86_CPU_HAS_SSE4),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 431 | FFMPEG_CONF_OPTS += --enable-sse4 |
Bernd Kuhls | 0e8e3c2 | 2014-01-02 18:59:45 +0100 | [diff] [blame] | 432 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 433 | FFMPEG_CONF_OPTS += --disable-sse4 |
Bernd Kuhls | 0e8e3c2 | 2014-01-02 18:59:45 +0100 | [diff] [blame] | 434 | endif |
| 435 | |
| 436 | ifeq ($(BR2_X86_CPU_HAS_SSE42),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 437 | FFMPEG_CONF_OPTS += --enable-sse42 |
Bernd Kuhls | 0e8e3c2 | 2014-01-02 18:59:45 +0100 | [diff] [blame] | 438 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 439 | FFMPEG_CONF_OPTS += --disable-sse42 |
Bernd Kuhls | 0e8e3c2 | 2014-01-02 18:59:45 +0100 | [diff] [blame] | 440 | endif |
| 441 | |
Steven Noonan | 1cd92d2 | 2015-03-18 15:01:11 -0700 | [diff] [blame] | 442 | ifeq ($(BR2_X86_CPU_HAS_AVX),y) |
| 443 | FFMPEG_CONF_OPTS += --enable-avx |
| 444 | else |
| 445 | FFMPEG_CONF_OPTS += --disable-avx |
| 446 | endif |
| 447 | |
| 448 | ifeq ($(BR2_X86_CPU_HAS_AVX2),y) |
| 449 | FFMPEG_CONF_OPTS += --enable-avx2 |
| 450 | else |
| 451 | FFMPEG_CONF_OPTS += --disable-avx2 |
| 452 | endif |
| 453 | |
Gustavo Zacarias | 9e77eaf | 2012-12-21 02:40:31 +0000 | [diff] [blame] | 454 | # Explicitly disable everything that doesn't match for ARM |
| 455 | # FFMPEG "autodetects" by compiling an extended instruction via AS |
| 456 | # This works on compilers that aren't built for generic by default |
Thomas Petazzoni | 0ac115d | 2014-10-21 22:26:49 +0200 | [diff] [blame] | 457 | ifeq ($(BR2_ARM_CPU_ARMV4),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 458 | FFMPEG_CONF_OPTS += --disable-armv5te |
Gustavo Zacarias | 1b269dd | 2011-03-01 13:20:00 -0300 | [diff] [blame] | 459 | endif |
Thomas Petazzoni | 0ac115d | 2014-10-21 22:26:49 +0200 | [diff] [blame] | 460 | ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 461 | FFMPEG_CONF_OPTS += --enable-armv6 |
Gustavo Zacarias | 9e77eaf | 2012-12-21 02:40:31 +0000 | [diff] [blame] | 462 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 463 | FFMPEG_CONF_OPTS += --disable-armv6 --disable-armv6t2 |
Gustavo Zacarias | 1b269dd | 2011-03-01 13:20:00 -0300 | [diff] [blame] | 464 | endif |
Thomas Petazzoni | 3300e00 | 2014-10-21 22:26:50 +0200 | [diff] [blame] | 465 | ifeq ($(BR2_ARM_CPU_HAS_VFPV2),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 466 | FFMPEG_CONF_OPTS += --enable-vfp |
Gustavo Zacarias | 9e77eaf | 2012-12-21 02:40:31 +0000 | [diff] [blame] | 467 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 468 | FFMPEG_CONF_OPTS += --disable-vfp |
Gustavo Zacarias | 1b269dd | 2011-03-01 13:20:00 -0300 | [diff] [blame] | 469 | endif |
Peter Korsgaard | ce8a7d5 | 2012-12-13 23:25:30 +0100 | [diff] [blame] | 470 | ifeq ($(BR2_ARM_CPU_HAS_NEON),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 471 | FFMPEG_CONF_OPTS += --enable-neon |
Bernd Kuhls | 9de0100 | 2017-04-14 11:30:26 +0200 | [diff] [blame] | 472 | else ifeq ($(BR2_aarch64),y) |
| 473 | FFMPEG_CONF_OPTS += --enable-neon |
Thomas Petazzoni | ae7becf | 2016-08-10 23:29:03 +0200 | [diff] [blame] | 474 | else |
| 475 | FFMPEG_CONF_OPTS += --disable-neon |
Gustavo Zacarias | 1b269dd | 2011-03-01 13:20:00 -0300 | [diff] [blame] | 476 | endif |
Gustavo Zacarias | 9e77eaf | 2012-12-21 02:40:31 +0000 | [diff] [blame] | 477 | |
Thomas Petazzoni | fdd0f8d | 2016-08-10 23:29:04 +0200 | [diff] [blame] | 478 | ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) |
Bernd Kuhls | 0fff250 | 2014-01-13 22:23:06 +0100 | [diff] [blame] | 479 | ifeq ($(BR2_MIPS_SOFT_FLOAT),y) |
Vicente Olivert Riera | 9aee557 | 2016-07-02 15:32:15 +0200 | [diff] [blame] | 480 | FFMPEG_CONF_OPTS += --disable-mipsfpu |
Bernd Kuhls | 0fff250 | 2014-01-13 22:23:06 +0100 | [diff] [blame] | 481 | else |
Vicente Olivert Riera | 9aee557 | 2016-07-02 15:32:15 +0200 | [diff] [blame] | 482 | FFMPEG_CONF_OPTS += --enable-mipsfpu |
Bernd Kuhls | 0fff250 | 2014-01-13 22:23:06 +0100 | [diff] [blame] | 483 | endif |
Thomas Petazzoni | fdd0f8d | 2016-08-10 23:29:04 +0200 | [diff] [blame] | 484 | endif # MIPS |
Bernd Kuhls | 0fff250 | 2014-01-13 22:23:06 +0100 | [diff] [blame] | 485 | |
Cody P Schafer | 40e58da | 2014-05-12 22:28:17 -0700 | [diff] [blame] | 486 | ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 487 | FFMPEG_CONF_OPTS += --enable-altivec |
Mike Williams | 29a0768 | 2011-05-12 16:12:40 -0400 | [diff] [blame] | 488 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 489 | FFMPEG_CONF_OPTS += --disable-altivec |
Mike Williams | 29a0768 | 2011-05-12 16:12:40 -0400 | [diff] [blame] | 490 | endif |
Gustavo Zacarias | 1b269dd | 2011-03-01 13:20:00 -0300 | [diff] [blame] | 491 | |
Bernd Kuhls | fc87981 | 2017-04-15 12:22:36 +0200 | [diff] [blame] | 492 | # Uses __atomic_fetch_add_4 |
| 493 | ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) |
| 494 | FFMPEG_CONF_OPTS += --extra-libs=-latomic |
| 495 | endif |
| 496 | |
Thomas Petazzoni | 665e13c | 2014-12-03 22:41:29 +0100 | [diff] [blame] | 497 | ifeq ($(BR2_STATIC_LIBS),) |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 498 | FFMPEG_CONF_OPTS += --enable-pic |
Danomi Manchego | 255aab7 | 2014-09-08 22:06:44 -0400 | [diff] [blame] | 499 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 500 | FFMPEG_CONF_OPTS += --disable-pic |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 501 | endif |
| 502 | |
Vicente Olivert Riera | 30a87d3 | 2016-08-15 17:03:37 +0200 | [diff] [blame] | 503 | # Default to --cpu=generic for MIPS architecture, in order to avoid a |
| 504 | # warning from ffmpeg's configure script. |
| 505 | ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) |
| 506 | FFMPEG_CONF_OPTS += --cpu=generic |
| 507 | else ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) |
Thomas Petazzoni | ae2850b | 2014-10-21 22:27:10 +0200 | [diff] [blame] | 508 | FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_CPU) |
Karoly Kasza | d402daa | 2014-11-07 09:44:16 +0100 | [diff] [blame] | 509 | else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) |
Thomas Petazzoni | ae2850b | 2014-10-21 22:27:10 +0200 | [diff] [blame] | 510 | FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) |
| 511 | endif |
| 512 | |
Vicente Olivert Riera | 8849e80 | 2015-10-15 13:22:55 +0100 | [diff] [blame] | 513 | FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) |
| 514 | |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 515 | # Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others |
| 516 | define FFMPEG_CONFIGURE_CMDS |
| 517 | (cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \ |
| 518 | $(TARGET_CONFIGURE_OPTS) \ |
| 519 | $(TARGET_CONFIGURE_ARGS) \ |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 520 | $(FFMPEG_CONF_ENV) \ |
| 521 | ./configure \ |
Bernd Kuhls | 79449c2 | 2014-10-03 11:50:46 +0200 | [diff] [blame] | 522 | --enable-cross-compile \ |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 523 | --cross-prefix=$(TARGET_CROSS) \ |
| 524 | --sysroot=$(STAGING_DIR) \ |
Peter Korsgaard | e18087a | 2011-01-01 11:49:01 +0100 | [diff] [blame] | 525 | --host-cc="$(HOSTCC)" \ |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 526 | --arch=$(BR2_ARCH) \ |
Bernd Kuhls | 62ab07e | 2014-01-02 18:59:44 +0100 | [diff] [blame] | 527 | --target-os="linux" \ |
Bernd Kuhls | 12a3ecf | 2014-08-10 14:46:46 +0200 | [diff] [blame] | 528 | --disable-stripping \ |
Danomi Manchego | a9a5a81 | 2014-09-08 22:06:46 -0400 | [diff] [blame] | 529 | --pkg-config="$(PKG_CONFIG_HOST_BINARY)" \ |
Luca Ceresoli | 97a4296 | 2011-06-20 17:59:54 +0200 | [diff] [blame] | 530 | $(SHARED_STATIC_LIBS_OPTS) \ |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 531 | $(FFMPEG_CONF_OPTS) \ |
Luca Ceresoli | 1329340 | 2010-06-14 21:41:42 +0200 | [diff] [blame] | 532 | ) |
| 533 | endef |
| 534 | |
Danomi Manchego | 194cb3f | 2017-02-15 22:13:29 -0500 | [diff] [blame] | 535 | define FFMPEG_REMOVE_EXAMPLE_SRC_FILES |
| 536 | rm -rf $(TARGET_DIR)/usr/share/ffmpeg/examples |
| 537 | endef |
| 538 | FFMPEG_POST_INSTALL_TARGET_HOOKS += FFMPEG_REMOVE_EXAMPLE_SRC_FILES |
| 539 | |
Arnout Vandecappelle (Essensium/Mind) | e1502eb | 2012-07-03 00:07:32 +0200 | [diff] [blame] | 540 | $(eval $(autotools-package)) |