}
quotes='""'
+if test -t 1 && which tput >/dev/null; then
+ ncolors=$(tput colors)
+ if test -n "$ncolors" && test $ncolors -ge 8; then
+ bold_color=$(tput bold)
+ warn_color=$(tput setaf 3)
+ reset_color=$(tput sgr0)
+ fi
+fi
log(){
echo "$@" >> $logfile
EOF
}
-apply(){
- file=$1
- shift
- "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
-}
-
cp_if_changed(){
cmp -s "$1" "$2" && echo "$2 is unchanged" && return
mkdir -p "$(dirname $2)"
llauddsp
llviddsp
lpc
+ lzf
me_cmp
mpeg_er
mpegaudio
dvvideo_decoder_select="dvprofile idctdsp"
dvvideo_encoder_select="dvprofile fdctdsp me_cmp pixblockdsp"
dxa_decoder_select="zlib"
+dxv_decoder_select="lzf texturedsp"
eac3_decoder_select="ac3_decoder"
eac3_encoder_select="ac3_encoder"
eamad_decoder_select="aandcttables blockdsp bswapdsp idctdsp mpegvideo"
hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
hevc_dxva2_hwaccel_select="hevc_decoder"
hevc_qsv_hwaccel_deps="libmfx"
+hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC"
+hevc_vaapi_hwaccel_select="hevc_decoder"
hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC"
hevc_vdpau_hwaccel_select="hevc_decoder"
mpeg_vdpau_decoder_deps="vdpau"
source_path=.
else
source_path=$(cd $(dirname "$0"); pwd)
- echo "$source_path" | grep -q '[[:blank:]]' &&
- die "Out of tree builds are impossible with whitespace in source path."
+ case "$source_path" in
+ *[[:blank:]]*) die "Out of tree builds are impossible with whitespace in source path." ;;
+ esac
test -e "$source_path/config.h" &&
die "Out of tree builds are impossible with config.h in source dir."
fi
probe_cc(){
pfx=$1
_cc=$2
+ first=$3
unset _type _ident _cc_c _cc_e _cc_o _flags _cflags
unset _ld_o _ldflags _ld_lib _ld_path
case $gcc_basever in
2*) _depflags='-MMD -MF $(@:.o=.d) -MT $@' ;;
esac
+ if [ "$first" = true ]; then
+ case $gcc_basever in
+ 4.2*)
+ warn "gcc 4.2 is outdated and may miscompile FFmpeg. Please use a newer compiler." ;;
+ esac
+ fi
_cflags_speed='-O3'
_cflags_size='-Os'
elif $_cc --version 2>/dev/null | grep -q ^icc; then
fi
}
-probe_cc cc "$cc"
+probe_cc cc "$cc" "true"
cflags_filter=$_flags_filter
cflags_speed=$_cflags_speed
cflags_size=$_cflags_size
check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
+check_type "va/va.h" "VAPictureParameterBufferHEVC"
+
check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
if ! disabled w32threads && ! enabled pthreads; then
-Wl,--wrap,avcodec_decode_video2 \
-Wl,--wrap,avcodec_decode_subtitle2 \
-Wl,--wrap,avcodec_encode_audio2 \
- -Wl,--wrap,avcodec_encode_video \
-Wl,--wrap,avcodec_encode_video2 \
-Wl,--wrap,avcodec_encode_subtitle \
-Wl,--wrap,swr_convert \
echo "random seed ${random_seed}"
echo
+echo "Enabled programs:"
+print_enabled '' $PROGRAM_LIST | print_3_columns
+echo
+
echo "External libraries:"
print_enabled '' $EXTERNAL_LIBRARY_LIST | print_3_columns
echo
cp_if_changed $TMPH libavutil/avconfig.h
if test -n "$WARNINGS"; then
- printf "\n$WARNINGS"
+ printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color"
enabled fatal_warnings && exit 1
fi