Index: head/multimedia/ffmpeg/Makefile =================================================================== --- head/multimedia/ffmpeg/Makefile (revision 539349) +++ head/multimedia/ffmpeg/Makefile (revision 539350) @@ -1,636 +1,656 @@ # Created by: Martin Matuska # $FreeBSD$ PORTNAME= ffmpeg -PORTVERSION= 4.2.3 +PORTVERSION= 4.3 PORTEPOCH= 1 CATEGORIES= multimedia audio net MASTER_SITES= https://ffmpeg.org/releases/ PATCH_SITES= ${SVTHEVC_PATCH_SITES_} ${SVTAV1_PATCH_SITES_} ${SVTVP9_PATCH_SITES_} PATCHFILES= ${SVTHEVC_PATCHFILES_} ${SVTAV1_PATCHFILES_} ${SVTVP9_PATCHFILES_} MAINTAINER= multimedia@FreeBSD.org COMMENT= Realtime audio/video encoder/converter and streaming server LICENSE= GPLv2+ LGPL21+ LICENSE_COMB= multi BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}} BUILD_DEPENDS_aarch64= as:devel/binutils BUILD_DEPENDS_amd64= nasm:devel/nasm BUILD_DEPENDS_armv6= as:devel/binutils BUILD_DEPENDS_armv7= as:devel/binutils BUILD_DEPENDS_i386= nasm:devel/nasm BUILD_DEPENDS_powerpc64=as:devel/binutils BUILD_DEPENDS_powerpc= as:devel/binutils HAS_CONFIGURE= yes CONFIGURE_LOG= ffbuild/config.log USES= compiler:c11 cpe gmake localbase:ldflags perl5 \ pkgconfig shebangfix tar:xz USE_LDCONFIG= yes USE_PERL5= build SHEBANG_FILES= doc/texi2pod.pl NOPRECIOUSMAKEVARS= yes # ARCH PORTSCOUT= limit:^4\. # Option CHROMAPRINT disabled, it cannot work and people are baffled. OPTIONS_DEFINE= ALSA AMR_NB AMR_WB AOM ARIBB24 ASS BS2B CACA CDIO CELT \ CODEC2 DAV1D DAVS2 DC1394 DEBUG DOCS DRM FDK_AAC FLITE \ - FONTCONFIG FREETYPE FREI0R FRIBIDI GME GSM ICONV ILBC JACK \ + FONTCONFIG FREETYPE FREI0R FRIBIDI GLSLANG GME GSM ICONV ILBC JACK \ KLVANC KVAZAAR LADSPA LAME LENSFUN LIBBLURAY LIBRSVG2 LIBXML2 \ LTO LV2 MFX MODPLUG MYSOFA OPENAL OPENCL OPENCV OPENGL OPENH264 \ OPENJPEG OPENMPT OPTIMIZED_CFLAGS OPUS POCKETSPHINX PULSEAUDIO \ - RAV1E RTCPU RUBBERBAND SDL SMB SNAPPY SNDIO SOXR SPEEX SRT SSH \ + RAV1E RABBITMQ RTCPU RUBBERBAND SDL SMB SNAPPY SNDIO SOXR SPEEX SRT SSH \ SVTAV1 SVTHEVC SVTVP9 TENSORFLOW TESSERACT THEORA TWOLAME V4L \ - VAAPI VAPOURSYNTH VDPAU VIDSTAB VMAF VO_AMRWBENC VORBIS VPX \ + VAAPI VAPOURSYNTH VDPAU VIDSTAB VMAF VO_AMRWBENC VORBIS VPX VULKAN \ WAVPACK WEBP X264 X265 XAVS2 XCB XVID XVIDEO ZIMG ZMQ ZVBI -OPTIONS_DEFAULT= AOM ASS DAV1D FONTCONFIG FREETYPE FREI0R GMP GNUTLS ICONV \ - OPENCV OPTIMIZED_CFLAGS OPUS RTCPU THEORA V4L VAAPI VDPAU \ +OPTIONS_DEFAULT= AOM ASS DAV1D DRM FONTCONFIG FREETYPE FREI0R GMP GNUTLS ICONV \ + LIBXML2 OPENCV OPTIMIZED_CFLAGS OPUS RTCPU THEORA V4L VAAPI VDPAU \ VORBIS VPX X264 X265 XCB XVID .if !exists(${.CURDIR:H:H}/multimedia/aribb24) # https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/100bfac6d6ec OPTIONS_EXCLUDE+= ARIBB24 .endif .if !exists(${.CURDIR:H:H}/multimedia/davs2) # https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/5985a1bf7233 OPTIONS_EXCLUDE+= DAVS2 .endif .if !exists(${.CURDIR:H:H}/multimedia/xavs2) # https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/85a921f4618 OPTIONS_EXCLUDE+= XAVS2 .endif .if !exists(${.CURDIR:H:H}/multimedia/klvanc) # https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/8732dfa9954 OPTIONS_EXCLUDE+= KLVANC .endif .if !exists(${.CURDIR:H:H}/net/srt) # https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a2fc8dbae853 OPTIONS_EXCLUDE+= SRT .endif .if !exists(${.CURDIR:H:H}/science/tensorflow) # https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d8c0bbb0aa4 OPTIONS_EXCLUDE+= TENSORFLOW .endif OPTIONS_RADIO= RTMP SSL OPTIONS_RADIO_RTMP= GCRYPT GMP LIBRTMP OPTIONS_RADIO_SSL= GNUTLS MBEDTLS OPENSSL OPTIONS_GROUP= LICENSE OPTIONS_GROUP_LICENSE= GPL3 NONFREE OPTIONS_DEFINE_amd64= MMX SSE OPTIONS_DEFINE_armv6= VFP NEON OPTIONS_DEFINE_i386= MMX SSE OPTIONS_DEFAULT_amd64= MMX SSE OPTIONS_DEFAULT_i386= MMX SSE ASS_DESC= Subtitles rendering via libass AOM_DESC= AV1 video encoding/decoding via libaom ARIBB24_DESC= ARIB text and caption decoding via libaribb24 BS2B_DESC= Bauer Stereophonic-to-Binaural filter CHROMAPRINT_DESC= Audio fingerprinting with chromaprint CODEC2_DESC= Codec 2 audio encoding/decoding via libcodec2 DAV1D_DESC= AV1 video decoding via libdav1d DAVS2_DESC= AVS2 decoding via libdavs2 DC1394_DESC= IIDC-1394 grabbing using libdc1394 DRM_DESC= KMS grabbing using libdrm FDK_AAC_DESC= AAC audio encoding via Fraunhofer FDK FLITE_DESC= Voice synthesis support via libflite +GLSLANG_DESC= GLSL->SPIRV compilation via libglslang GME_DESC= Game Music Emu demuxer GPL3_DESC= Allow (L)GPL version 3 code(cs) ILBC_DESC= Internet Low Bit Rate codec KLVANC_DESC= Kernel Labs VANC processing KVAZAAR_DESC= H.265 video codec support via Kvazaar LICENSE_DESC= Licensing options LTO_DESC= Use Link-Time Optimization LV2_DESC= LV2 audio filtering MFX_DESC= Intel MediaSDK (aka Quick Sync Video) MYSOFA_DESC= SOFAlizer binaural filter NEON_DESC= Media Processing Engine instructions NONFREE_DESC= Allow use of nonfree code OPENMPT_DESC= Decoding tracked files via libopenmpt OPENH264_DESC= H.264 video codec support via OpenH264 POCKETSPHINX_DESC= Automatic Speech Recognition via PocketSphinx RAV1E_DESC= AV1 encoding via librav1e +RABBITMQ_DESC= AMQP 0-9-1 protocol via RabbitMQ RUBBERBAND_DESC=Time-stretching and pitch-shifting with librubberband RTCPU_DESC= Detect CPU capabilities at runtime RTMP_DESC= RTMP(T)E protocol support SRT_DESC= Haivision SRT protocol via libsrt SVTAV1_DESC= AV1 encoding via SVT-AV1 SVTHEVC_DESC= HEVC encoding via SVT-HEVC SVTVP9_DESC= VP9 encoding via SVT-VP9 LIBRTMP_DESC= ${RTMP_DESC} via librtmp TENSORFLOW_DESC=TensorFlow as a DNN module backend for DNN based filters like sr TESSERACT_DESC= Optical Character Recognition via Tesseract VAPOURSYNTH_DESC= VapourSynth demuxer VFP_DESC= Vector Floating Point instructions VIDSTAB_DESC= Video stabilization filter VMAF_DESC= VMAF filter via libvmaf +VULKAN_DESC= Vulkan filters XAVS2_DESC= AVS2 encoding via libxavs2 XCB_DESC= X11 grabbing using XCB ZIMG_DESC= "z" library video scaling filter ZMQ_DESC= Message passing via libzmq${ZMQ_VERSION} ZVBI_DESC= Teletext support via libzvbi OPTIONS_SUB= yes # alsa ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_CONFIGURE_ENABLE= alsa # Opencore AMR NB AMR_NB_LIB_DEPENDS= libopencore-amrnb.so:audio/opencore-amr AMR_NB_CONFIGURE_ENABLE= libopencore-amrnb AMR_NB_IMPLIES= GPL3 # Opencore AMR WB AMR_WB_LIB_DEPENDS= libopencore-amrwb.so:audio/opencore-amr AMR_WB_CONFIGURE_ENABLE= libopencore-amrwb AMR_WB_IMPLIES= GPL3 # aom AOM_LIB_DEPENDS= libaom.so:multimedia/aom AOM_CONFIGURE_ENABLE= libaom # arib ARIBB24_LIB_DEPENDS= libaribb24.so:multimedia/aribb24 ARIBB24_CONFIGURE_ENABLE= libaribb24 # ass ASS_LIB_DEPENDS= libass.so:multimedia/libass ASS_CONFIGURE_ENABLE= libass # bs2b BS2B_LIB_DEPENDS= libbs2b.so:audio/libbs2b BS2B_CONFIGURE_ENABLE= libbs2b # caca CACA_LIB_DEPENDS= libcaca.so:graphics/libcaca CACA_CONFIGURE_ENABLE= libcaca # cdio CDIO_LIB_DEPENDS= libcdio_paranoia.so:sysutils/libcdio-paranoia CDIO_CONFIGURE_ENABLE= libcdio # celt CELT_LIB_DEPENDS= libcelt0.so:audio/celt CELT_CONFIGURE_ENABLE= libcelt # chromaprint CHROMAPRINT_BROKEN= Dependency loop CHROMAPRINT_LIB_DEPENDS= libchromaprint.so:audio/chromaprint CHROMAPRINT_CONFIGURE_ENABLE= chromaprint # codec2 CODEC2_LIB_DEPENDS= libcodec2.so:audio/codec2 CODEC2_CONFIGURE_ENABLE= libcodec2 # dav1d DAV1D_LIB_DEPENDS= libdav1d.so:multimedia/dav1d DAV1D_CONFIGURE_ENABLE= libdav1d # davs2 DAVS2_LIB_DEPENDS= libdavs2.so:multimedia/davs2 DAVS2_CONFIGURE_ENABLE= libdavs2 # dc1394 DC1394_LIB_DEPENDS= libdc1394.so:multimedia/libdc1394 DC1394_CONFIGURE_ENABLE= libdc1394 # debugging DEBUG_CONFIGURE_ON= --disable-stripping DEBUG_CONFIGURE_OFF= --disable-debug # docs DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html DOCS_CONFIGURE_ENABLE= htmlpages # drm DRM_LIB_DEPENDS= libdrm.so:graphics/libdrm DRM_CONFIGURE_ENABLE= libdrm # fdk_aac FDK_AAC_LIB_DEPENDS= libfdk-aac.so:audio/fdk-aac FDK_AAC_CONFIGURE_ENABLE= libfdk-aac FDK_AAC_IMPLIES= NONFREE # flite FLITE_LIB_DEPENDS= libflite.so:audio/flite FLITE_CONFIGURE_ENABLE= libflite .if exists(/usr/bin/ld.lld) && (${/usr/bin/ld:L:tA} != /usr/bin/ld.lld) FLITE_LDFLAGS= -fuse-ld=lld .endif # fontconfig FONTCONFIG_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig FONTCONFIG_CONFIGURE_ENABLE= fontconfig # freetype FREETYPE_LIB_DEPENDS= libfreetype.so:print/freetype2 FREETYPE_CONFIGURE_ENABLE= libfreetype # frei0r FREI0R_BUILD_DEPENDS= ${LOCALBASE}/include/frei0r.h:graphics/frei0r FREI0R_CONFIGURE_ENABLE= frei0r # fribidi FRIBIDI_LIB_DEPENDS= libfribidi.so:converters/fribidi FRIBIDI_CONFIGURE_ENABLE= libfribidi # gcrypt GCRYPT_LIB_DEPENDS= libgcrypt.so:security/libgcrypt GCRYPT_CONFIGURE_ENABLE= gcrypt +# glslang +GLSLANG_BUILD_DEPENDS= glslang>0:devel/glslang \ + spirv-tools>0:devel/spirv-tools +GLSLANG_CONFIGURE_ENABLE= libglslang +GLSLANG_LDFLAGS= -lm + # gnutls GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CONFIGURE_ENABLE= gnutls # gme GME_LIB_DEPENDS= libgme.so:audio/libgme GME_CONFIGURE_ENABLE= libgme # gmp GMP_LIB_DEPENDS= libgmp.so:math/gmp GMP_CONFIGURE_ENABLE= gmp GMP_IMPLIES= GPL3 # gsm GSM_LIB_DEPENDS= libgsm.so:audio/gsm GSM_CONFIGURE_ENABLE= libgsm # iconv ICONV_USES= iconv ICONV_CONFIGURE_ENABLE= iconv # ilbc ILBC_LIB_DEPENDS= libilbc.so:net/libilbc ILBC_CONFIGURE_ENABLE= libilbc # jack JACK_LIB_DEPENDS= libjack.so:audio/jack JACK_CONFIGURE_ENABLE= libjack # klvanc KLVANC_LIB_DEPENDS= libklvanc.so:multimedia/libklvanc KLVANC_CONFIGURE_ENABLE= libklvanc # kvazaar KVAZAAR_LIB_DEPENDS= libkvazaar.so:multimedia/kvazaar KVAZAAR_CONFIGURE_ENABLE= libkvazaar # ladspa LADSPA_BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:audio/ladspa LADSPA_RUN_DEPENDS= ${LOCALBASE}/lib/ladspa/amp.so:audio/ladspa LADSPA_CONFIGURE_ENABLE= ladspa # lame LAME_LIB_DEPENDS= libmp3lame.so:audio/lame LAME_CONFIGURE_ENABLE= libmp3lame # lensfun LENSFUN_LIB_DEPENDS= liblensfun.so:graphics/lensfun LENSFUN_CONFIGURE_ENABLE= liblensfun # libbluray LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray LIBBLURAY_CONFIGURE_ENABLE= libbluray # librsvg LIBRSVG2_USES= gnome LIBRSVG2_USE= GNOME=cairo,librsvg2 LIBRSVG2_CONFIGURE_ENABLE= librsvg # libxml LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2 LIBXML2_CONFIGURE_ENABLE= libxml2 # lto LTO_CONFIGURE_ENABLE= lto # lv2 LV2_BUILD_DEPENDS= lv2>0:audio/lv2 LV2_LIB_DEPENDS= liblilv-0.so:audio/lilv LV2_CONFIGURE_ENABLE= lv2 # libv4l V4L_BUILD_DEPENDS= v4l_compat>0:multimedia/v4l_compat V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l V4L_CONFIGURE_ENABLE= libv4l2 V4L_CONFIGURE_OFF= --disable-indev=v4l2 \ --disable-outdev=v4l2 # mbedtls MBEDTLS_LIB_DEPENDS= libmbedtls.so:security/mbedtls MBEDTLS_CONFIGURE_ENABLE= mbedtls # mfx MFX_LIB_DEPENDS= libmfx.so:multimedia/intel-media-sdk MFX_CONFIGURE_ENABLE= libmfx # mmx support MMX_CONFIGURE_ENABLE= mmx # modplug MODPLUG_LIB_DEPENDS= libmodplug.so:audio/libmodplug MODPLUG_CONFIGURE_ENABLE= libmodplug # mysofa MYSOFA_LIB_DEPENDS= libmysofa.so:audio/libmysofa MYSOFA_CONFIGURE_ENABLE= libmysofa # OpenAL OPENAL_LIB_DEPENDS= libopenal.so:audio/openal-soft OPENAL_CONFIGURE_ENABLE= openal # opencl OPENCL_BUILD_DEPENDS= ${LOCALBASE}/include/CL/opencl.h:devel/opencl OPENCL_LIB_DEPENDS= libOpenCL.so:devel/ocl-icd OPENCL_CONFIGURE_ENABLE= opencl # opencv OPENCV_LIB_DEPENDS= libopencv_imgproc.so:graphics/opencv-core OPENCV_CONFIGURE_ENABLE= libopencv # opengl OPENGL_USES= gl OPENGL_USE= GL=gl OPENGL_CONFIGURE_ENABLE= opengl # openh264 OPENH264_LIB_DEPENDS= libopenh264.so:multimedia/openh264 OPENH264_CONFIGURE_ENABLE= libopenh264 # openjpeg OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg OPENJPEG_CONFIGURE_ENABLE= libopenjpeg # openmpt OPENMPT_LIB_DEPENDS= libopenmpt.so:audio/libopenmpt OPENMPT_CONFIGURE_ENABLE= libopenmpt # openssl/libtls OPENSSL_USES= ssl OPENSSL_CONFIGURE_ENABLE= ${"${SSL_DEFAULT:Mlibressl*}"!="":?libtls:openssl} OPENSSL_IMPLIES= NONFREE # optimizations OPTIMIZED_CFLAGS_CONFIGURE_ENABLE= optimizations # opus OPUS_LIB_DEPENDS= libopus.so:audio/opus OPUS_CONFIGURE_ENABLE= libopus # pocketsphinx POCKETSPHINX_LIB_DEPENDS= libpocketsphinx.so:audio/pocketsphinx POCKETSPHINX_CONFIGURE_ENABLE= pocketsphinx POCKETSPHINX_BROKEN= pocketsphinx < 5prealpha is not supported # pulseaudio PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CONFIGURE_ENABLE= libpulse # rav1e RAV1E_LIB_DEPENDS= librav1e.so:multimedia/librav1e RAV1E_CONFIGURE_ENABLE= librav1e +# rabbitmq +RABBITMQ_LIB_DEPENDS= librabbitmq.so:net/rabbitmq-c +RABBITMQ_CONFIGURE_ENABLE= librabbitmq + # rubberband RUBBERBAND_LIB_DEPENDS= librubberband.so:audio/rubberband RUBBERBAND_CONFIGURE_ENABLE= librubberband # rtcpu RTCPU_CONFIGURE_ENABLE= runtime-cpudetect # rtmp LIBRTMP_LIB_DEPENDS= librtmp.so:multimedia/librtmp LIBRTMP_CONFIGURE_ENABLE= librtmp # sdl SDL_USES= sdl SDL_USE= SDL=sdl2 SDL_CONFIGURE_ENABLE= sdl2 # smbclient SMB_USES= samba:lib SMB_CONFIGURE_ENABLE= libsmbclient SMB_IMPLIES= GPL3 # snappy SNAPPY_LIB_DEPENDS= libsnappy.so:archivers/snappy SNAPPY_CONFIGURE_ENABLE= libsnappy # sndio SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_CONFIGURE_ENABLE= sndio # soxr SOXR_LIB_DEPENDS= libsoxr.so:audio/libsoxr SOXR_CONFIGURE_ENABLE= libsoxr # speex SPEEX_LIB_DEPENDS= libspeex.so:audio/speex SPEEX_CONFIGURE_ENABLE= libspeex # sse support SSE_CONFIGURE_ENABLE= sse SSE_IMPLIES= MMX # ssh SSH_LIB_DEPENDS= libssh.so:security/libssh SSH_CONFIGURE_ENABLE= libssh # srt SRT_LIB_DEPENDS= libsrt.so:net/srt SRT_CONFIGURE_ENABLE= libsrt # svt-av1 SVTAV1_LIB_DEPENDS= libSvtAv1Enc.so:multimedia/svt-av1 SVTAV1_CONFIGURE_ENABLE= libsvtav1 -SVTAV1_PATCH_SITES_= https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.3/ffmpeg_plugin/:svtav1 +SVTAV1_PATCH_SITES_= https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.3-52-gc40ee2492/ffmpeg_plugin/:svtav1 SVTAV1_PATCHFILES_= 0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch:-p1:svtav1 .if exists(/usr/bin/ld.lld) && (${/usr/bin/ld:L:tA} != /usr/bin/ld.lld) # https://github.com/OpenVisualCloud/SVT-AV1/issues/691 SVTAV1_LDFLAGS= -fuse-ld=lld .endif # svt-hevc SVTHEVC_LIB_DEPENDS= libSvtHevcEnc.so:multimedia/svt-hevc SVTHEVC_CONFIGURE_ENABLE= libsvthevc SVTHEVC_PATCH_SITES_= https://github.com/Intel/SVT-HEVC/raw/v1.4.3/ffmpeg_plugin/:svthevc SVTHEVC_PATCHFILES_= 0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch:-p1:svthevc \ 0002-doc-Add-libsvt_hevc-encoder-docs.patch:-p1:svthevc .if exists(/usr/bin/ld.lld) && (${/usr/bin/ld:L:tA} != /usr/bin/ld.lld) SVTHEVC_LDFLAGS= -fuse-ld=lld .endif # svt-vp9 SVTVP9_LIB_DEPENDS= libSvtVp9Enc.so:multimedia/svt-vp9 SVTVP9_CONFIGURE_ENABLE= libsvtvp9 SVTVP9_PATCH_SITES_= https://github.com/OpenVisualCloud/SVT-VP9/raw/v0.2.0-2-gefe9c5a/ffmpeg_plugin/:svtvp9 -SVTVP9_PATCHFILES_= n4.2.3-0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch:-p1:svtvp9 +SVTVP9_PATCHFILES_= master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch:-p1:svtvp9 .if exists(/usr/bin/ld.lld) && (${/usr/bin/ld:L:tA} != /usr/bin/ld.lld) SVTVP9_LDFLAGS= -fuse-ld=lld .endif # tensorflow TENSORFLOW_LIB_DEPENDS= libtensorflow.so:science/tensorflow TENSORFLOW_CONFIGURE_ENABLE= libtensorflow # tesseract TESSERACT_LIB_DEPENDS= libtesseract.so:graphics/tesseract TESSERACT_CONFIGURE_ENABLE= libtesseract # theora THEORA_LIB_DEPENDS= libtheora.so:multimedia/libtheora THEORA_CONFIGURE_ENABLE= libtheora # twolame TWOLAME_LIB_DEPENDS= libtwolame.so:audio/twolame TWOLAME_CONFIGURE_ENABLE= libtwolame # vaapi VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_CONFIGURE_ENABLE= vaapi # vapoursynth VAPOURSYNTH_LIB_DEPENDS= libvapoursynth-script.so:multimedia/vapoursynth VAPOURSYNTH_CONFIGURE_ENABLE= vapoursynth # vdpau VDPAU_USES= xorg VDPAU_USE= XORG=x11 VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau VDPAU_CONFIGURE_ENABLE= vdpau # vmaf VMAF_LIB_DEPENDS= libvmaf.so:multimedia/vmaf VMAF_CONFIGURE_ENABLE= libvmaf # armv6/armv7 VFP_CONFIGURE_ENABLE= vfp NEON_CONFIGURE_ENABLE= neon .if ! ${CFLAGS:M-march*} NEON_CONFIGURE_ON= --cpu=armv7-a .endif # vo-amrwbenc VO_AMRWBENC_LIB_DEPENDS= libvo-amrwbenc.so:audio/vo-amrwbenc VO_AMRWBENC_CONFIGURE_ENABLE= libvo-amrwbenc VO_AMRWBENC_IMPLIES= GPL3 # vid.stab VIDSTAB_LIB_DEPENDS= libvidstab.so:multimedia/vid.stab VIDSTAB_CONFIGURE_ENABLE= libvidstab # vorbis VORBIS_LIB_DEPENDS= libvorbisenc.so:audio/libvorbis VORBIS_CONFIGURE_ENABLE= libvorbis # vp8 VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx VPX_CONFIGURE_ENABLE= libvpx +# vulkan +VULKAN_BUILD_DEPENDS= vulkan-headers>0:devel/vulkan-headers +VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader +VULKAN_CONFIGURE_ENABLE= vulkan +VULKAN_IMPLIES= GLSLANG + # wavpack WAVPACK_LIB_DEPENDS= libwavpack.so:audio/wavpack WAVPACK_CONFIGURE_ENABLE= libwavpack # webp WEBP_LIB_DEPENDS= libwebp.so:graphics/webp WEBP_CONFIGURE_ENABLE= libwebp # x264 X264_LIB_DEPENDS= libx264.so:multimedia/libx264 X264_CONFIGURE_ENABLE= libx264 # x265 X265_LIB_DEPENDS= libx265.so:multimedia/x265 X265_CONFIGURE_ENABLE= libx265 # xavs2 XAVS2_LIB_DEPENDS= libxavs2.so:multimedia/xavs2 XAVS2_CONFIGURE_ENABLE= libxavs2 # xcb XCB_USES= xorg XCB_USE= XORG=xcb XCB_CONFIGURE_ENABLE= libxcb # xvid XVID_LIB_DEPENDS= libxvidcore.so:multimedia/xvid XVID_CONFIGURE_ENABLE= libxvid # xv XVIDEO_USES= xorg XVIDEO_USE= XORG=x11,xext,xv XVIDEO_CONFIGURE_OFF= --disable-outdev=xv # zimg ZIMG_LIB_DEPENDS= libzimg.so:graphics/sekrit-twc-zimg ZIMG_CONFIGURE_ENABLE= libzimg # zmq ZMQ_LIB_DEPENDS= libzmq.so:net/libzmq${ZMQ_VERSION} ZMQ_CONFIGURE_ENABLE= libzmq ZMQ_VERSION?= 4 # zvbi ZVBI_LIB_DEPENDS= libzvbi.so:devel/libzvbi ZVBI_CONFIGURE_ENABLE= libzvbi # License knobs GPL3_CONFIGURE_ENABLE= version3 GPL3_VARS= LICENSE="GPLv3+ LGPL3+" LICENSE_FILE_GPLv3+ = ${WRKSRC}/COPYING.GPLv3 LICENSE_FILE_LGPL3+ = ${WRKSRC}/COPYING.LGPLv3 NONFREE_CONFIGURE_ENABLE=nonfree NONFREE_VARS= RESTRICTED="enabling OPENSSL or FDK_AAC restricts redistribution" INSTALL_TARGET= install-progs install-doc install-data \ install-libs install-headers install-examples DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX} DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} MAKE_ENV+= V=1 LDFLAGS_aarch64=-Wl,-z,notext LDFLAGS_armv6= -Wl,-z,notext LDFLAGS_armv7= -Wl,-z,notext LDFLAGS_i386= -Wl,-z,notext CONFIGURE_ARGS+=--prefix="${PREFIX}" \ --mandir="${PREFIX}/man" \ --datadir="${DATADIR}" \ --pkgconfigdir="${PREFIX}/libdata/pkgconfig" \ --enable-shared \ --enable-pic \ --enable-gpl \ --enable-avresample \ - --cc="${CC}" + --cc="${CC}" \ + --cxx="${CXX}" DOC_FILES= Changelog CREDITS INSTALL.md LICENSE.md MAINTAINERS \ README.md RELEASE_NOTES # under doc subdirectory DOC_DOCFILES= APIchanges *.txt PORTDOCS= * post-patch: # {C,LD}FLAGS safeness @${REINPLACE_CMD} -E \ -e 's|require_pkg_config opencv|require_pkg_config opencv-core|g' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} post-install: (cd ${WRKSRC} && ${COPYTREE_SHARE} \ "${DOC_FILES}" ${STAGEDIR}${DOCSDIR}) (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \ "${DOC_DOCFILES}" ${STAGEDIR}${DOCSDIR}) .include Index: head/multimedia/ffmpeg/distinfo =================================================================== --- head/multimedia/ffmpeg/distinfo (revision 539349) +++ head/multimedia/ffmpeg/distinfo (revision 539350) @@ -1,11 +1,11 @@ -TIMESTAMP = 1592065594 -SHA256 (ffmpeg-4.2.3.tar.xz) = 9df6c90aed1337634c1fb026fb01c154c29c82a64ea71291ff2da9aacb9aad31 -SIZE (ffmpeg-4.2.3.tar.xz) = 9101192 +TIMESTAMP = 1592247266 +SHA256 (ffmpeg-4.3.tar.xz) = 1d0ad06484f44bcb97eba5e93c40bcb893890f9f64aeb43e46cd9bb4cbd6795d +SIZE (ffmpeg-4.3.tar.xz) = 9378360 SHA256 (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 878757eb6d7072521caaeb71f1453ec3fc0f91a12936ef302e1625184787c6a6 SIZE (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 22103 SHA256 (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = 1499e419dda72b1604dc5e3959668f3843292ff56bfba78734e31510ba576de0 SIZE (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = 5332 -SHA256 (0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch) = cbcf51f37b17355b228b62862cfde141b0701f260d8bc3502a922f0f91303f9e -SIZE (0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch) = 23636 -SHA256 (n4.2.3-0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch) = 7edb8d617d96e7582b307a341419b283943ea07da42d78033c79d6e3b3052295 -SIZE (n4.2.3-0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch) = 33904 +SHA256 (0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch) = 69e0456b56429a422977d24a914e7e167a38397b2ab40aec575eee332b0e739c +SIZE (0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch) = 23728 +SHA256 (master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch) = 526f3eba71ff1a2d74e537d8ef777370d9b305a1458799121114b60f7e5a48df +SIZE (master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch) = 34177 Index: head/multimedia/ffmpeg/files/patch-vdpau_vp9 =================================================================== --- head/multimedia/ffmpeg/files/patch-vdpau_vp9 (revision 539349) +++ head/multimedia/ffmpeg/files/patch-vdpau_vp9 (nonexistent) @@ -1,330 +0,0 @@ -https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1054752c563c - ---- configure.orig 2019-12-18 11:42:25 UTC -+++ configure -@@ -2976,6 +2976,8 @@ vp9_nvdec_hwaccel_deps="nvdec" - vp9_nvdec_hwaccel_select="vp9_decoder" - vp9_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferVP9_bit_depth" - vp9_vaapi_hwaccel_select="vp9_decoder" -+vp9_vdpau_hwaccel_deps="vdpau VdpPictureInfoVP9" -+vp9_vdpau_hwaccel_select="vp9_decoder" - wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel" - wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel" - wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel" -@@ -6083,6 +6085,7 @@ check_type "windows.h d3d11.h" "ID3D11VideoContext" - check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602 - - check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC" -+check_type "vdpau/vdpau.h" "VdpPictureInfoVP9" - - if [ -z "$nvccflags" ]; then - nvccflags=$nvccflags_default ---- libavcodec/Makefile.orig 2019-12-18 11:42:25 UTC -+++ libavcodec/Makefile -@@ -910,6 +910,7 @@ OBJS-$(CONFIG_VP9_D3D11VA_HWACCEL) += dxva2_vp9 - OBJS-$(CONFIG_VP9_DXVA2_HWACCEL) += dxva2_vp9.o - OBJS-$(CONFIG_VP9_NVDEC_HWACCEL) += nvdec_vp9.o - OBJS-$(CONFIG_VP9_VAAPI_HWACCEL) += vaapi_vp9.o -+OBJS-$(CONFIG_VP9_VDPAU_HWACCEL) += vdpau_vp9.o - OBJS-$(CONFIG_VP8_QSV_HWACCEL) += qsvdec_other.o - - # libavformat dependencies ---- libavcodec/hwaccels.h.orig 2019-07-08 17:45:25 UTC -+++ libavcodec/hwaccels.h -@@ -68,6 +68,7 @@ extern const AVHWAccel ff_vp9_d3d11va2_hwaccel; - extern const AVHWAccel ff_vp9_dxva2_hwaccel; - extern const AVHWAccel ff_vp9_nvdec_hwaccel; - extern const AVHWAccel ff_vp9_vaapi_hwaccel; -+extern const AVHWAccel ff_vp9_vdpau_hwaccel; - extern const AVHWAccel ff_wmv3_d3d11va_hwaccel; - extern const AVHWAccel ff_wmv3_d3d11va2_hwaccel; - extern const AVHWAccel ff_wmv3_dxva2_hwaccel; ---- libavcodec/vdpau_internal.h.orig 2019-08-05 20:52:21 UTC -+++ libavcodec/vdpau_internal.h -@@ -54,6 +54,9 @@ union VDPAUPictureInfo { - #ifdef VDP_YCBCR_FORMAT_Y_U_V_444 - VdpPictureInfoHEVC444 hevc_444; - #endif -+#ifdef VDP_DECODER_PROFILE_VP9_PROFILE_0 -+ VdpPictureInfoVP9 vp9; -+#endif - }; - - typedef struct VDPAUHWContext { ---- libavcodec/vdpau_vp9.c.orig 2019-12-18 11:42:25 UTC -+++ libavcodec/vdpau_vp9.c -@@ -0,0 +1,242 @@ -+/* -+ * VP9 HW decode acceleration through VDPAU -+ * -+ * Copyright (c) 2019 Manoj Gupta Bonda -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include -+#include "libavutil/pixdesc.h" -+#include "avcodec.h" -+#include "internal.h" -+#include "vp9data.h" -+#include "vp9dec.h" -+#include "hwaccel.h" -+#include "vdpau.h" -+#include "vdpau_internal.h" -+ -+static int vdpau_vp9_start_frame(AVCodecContext *avctx, -+ const uint8_t *buffer, uint32_t size) -+{ -+ VP9Context *s = avctx->priv_data; -+ VP9SharedContext *h = &(s->s); -+ const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(avctx->sw_pix_fmt); -+ if (!pixdesc) { -+ return AV_PIX_FMT_NONE; -+ } -+ -+ VP9Frame pic = h->frames[CUR_FRAME]; -+ struct vdpau_picture_context *pic_ctx = pic.hwaccel_picture_private; -+ int i; -+ -+ VdpPictureInfoVP9 *info = &pic_ctx->info.vp9; -+ -+ info->width = avctx->width; -+ info->height = avctx->height; -+ /* fill LvPictureInfoVP9 struct */ -+ info->lastReference = VDP_INVALID_HANDLE; -+ info->goldenReference = VDP_INVALID_HANDLE; -+ info->altReference = VDP_INVALID_HANDLE; -+ -+ if (h->refs[h->h.refidx[0]].f && h->refs[h->h.refidx[0]].f->private_ref) { -+ info->lastReference = ff_vdpau_get_surface_id(h->refs[h->h.refidx[0]].f); -+ } -+ if (h->refs[h->h.refidx[1]].f && h->refs[h->h.refidx[1]].f->private_ref) { -+ info->goldenReference = ff_vdpau_get_surface_id(h->refs[h->h.refidx[1]].f); -+ } -+ if (h->refs[h->h.refidx[2]].f && h->refs[h->h.refidx[2]].f->private_ref) { -+ info->altReference = ff_vdpau_get_surface_id(h->refs[h->h.refidx[2]].f); -+ } -+ -+ info->profile = h->h.profile; -+ info->frameContextIdx = h->h.framectxid; -+ info->keyFrame = h->h.keyframe; -+ info->showFrame = !h->h.invisible; -+ info->errorResilient = h->h.errorres; -+ info->frameParallelDecoding = h->h.parallelmode; -+ -+ info->subSamplingX = pixdesc->log2_chroma_w; -+ info->subSamplingY = pixdesc->log2_chroma_h; -+ -+ info->intraOnly = h->h.intraonly; -+ info->allowHighPrecisionMv = h->h.keyframe ? 0 : h->h.highprecisionmvs; -+ info->refreshEntropyProbs = h->h.refreshctx; -+ -+ info->bitDepthMinus8Luma = pixdesc->comp[0].depth - 8; -+ info->bitDepthMinus8Chroma = pixdesc->comp[1].depth - 8; -+ -+ info->loopFilterLevel = h->h.filter.level; -+ info->loopFilterSharpness = h->h.filter.sharpness; -+ info->modeRefLfEnabled = h->h.lf_delta.enabled; -+ -+ info->log2TileColumns = h->h.tiling.log2_tile_cols; -+ info->log2TileRows = h->h.tiling.log2_tile_rows; -+ -+ info->segmentEnabled = h->h.segmentation.enabled; -+ info->segmentMapUpdate = h->h.segmentation.update_map; -+ info->segmentMapTemporalUpdate = h->h.segmentation.temporal; -+ info->segmentFeatureMode = h->h.segmentation.absolute_vals; -+ -+ info->qpYAc = h->h.yac_qi; -+ info->qpYDc = h->h.ydc_qdelta; -+ info->qpChDc = h->h.uvdc_qdelta; -+ info->qpChAc = h->h.uvac_qdelta; -+ -+ info->resetFrameContext = h->h.resetctx; -+ info->mcompFilterType = h->h.filtermode ^ (h->h.filtermode <= 1); -+ info->uncompressedHeaderSize = h->h.uncompressed_header_size; -+ info->compressedHeaderSize = h->h.compressed_header_size; -+ info->refFrameSignBias[0] = 0; -+ -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(info->mbModeLfDelta); i++) -+ info->mbModeLfDelta[i] = h->h.lf_delta.mode[i]; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(info->mbRefLfDelta); i++) -+ info->mbRefLfDelta[i] = h->h.lf_delta.ref[i]; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(info->mbSegmentTreeProbs); i++) -+ info->mbSegmentTreeProbs[i] = h->h.segmentation.prob[i]; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(info->activeRefIdx); i++) { -+ info->activeRefIdx[i] = h->h.refidx[i]; -+ info->segmentPredProbs[i] = h->h.segmentation.pred_prob[i]; -+ info->refFrameSignBias[i + 1] = h->h.signbias[i]; -+ } -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(info->segmentFeatureEnable); i++) { -+ info->segmentFeatureEnable[i][0] = h->h.segmentation.feat[i].q_enabled; -+ info->segmentFeatureEnable[i][1] = h->h.segmentation.feat[i].lf_enabled; -+ info->segmentFeatureEnable[i][2] = h->h.segmentation.feat[i].ref_enabled; -+ info->segmentFeatureEnable[i][3] = h->h.segmentation.feat[i].skip_enabled; -+ -+ info->segmentFeatureData[i][0] = h->h.segmentation.feat[i].q_val; -+ info->segmentFeatureData[i][1] = h->h.segmentation.feat[i].lf_val; -+ info->segmentFeatureData[i][2] = h->h.segmentation.feat[i].ref_val; -+ info->segmentFeatureData[i][3] = 0; -+ } -+ -+ switch (avctx->colorspace) { -+ default: -+ case AVCOL_SPC_UNSPECIFIED: -+ info->colorSpace = 0; -+ break; -+ case AVCOL_SPC_BT470BG: -+ info->colorSpace = 1; -+ break; -+ case AVCOL_SPC_BT709: -+ info->colorSpace = 2; -+ break; -+ case AVCOL_SPC_SMPTE170M: -+ info->colorSpace = 3; -+ break; -+ case AVCOL_SPC_SMPTE240M: -+ info->colorSpace = 4; -+ break; -+ case AVCOL_SPC_BT2020_NCL: -+ info->colorSpace = 5; -+ break; -+ case AVCOL_SPC_RESERVED: -+ info->colorSpace = 6; -+ break; -+ case AVCOL_SPC_RGB: -+ info->colorSpace = 7; -+ break; -+ } -+ -+ return ff_vdpau_common_start_frame(pic_ctx, buffer, size); -+ -+} -+ -+static const uint8_t start_code_prefix[3] = { 0x00, 0x00, 0x01 }; -+ -+static int vdpau_vp9_decode_slice(AVCodecContext *avctx, -+ const uint8_t *buffer, uint32_t size) -+{ -+ VP9SharedContext *h = avctx->priv_data; -+ VP9Frame pic = h->frames[CUR_FRAME]; -+ struct vdpau_picture_context *pic_ctx = pic.hwaccel_picture_private; -+ -+ int val; -+ -+ val = ff_vdpau_add_buffer(pic_ctx, start_code_prefix, 3); -+ if (val) -+ return val; -+ -+ val = ff_vdpau_add_buffer(pic_ctx, buffer, size); -+ if (val) -+ return val; -+ -+ return 0; -+} -+ -+static int vdpau_vp9_end_frame(AVCodecContext *avctx) -+{ -+ VP9SharedContext *h = avctx->priv_data; -+ VP9Frame pic = h->frames[CUR_FRAME]; -+ struct vdpau_picture_context *pic_ctx = pic.hwaccel_picture_private; -+ -+ int val; -+ -+ val = ff_vdpau_common_end_frame(avctx, pic.tf.f, pic_ctx); -+ if (val < 0) -+ return val; -+ -+ return 0; -+} -+ -+static int vdpau_vp9_init(AVCodecContext *avctx) -+{ -+ VdpDecoderProfile profile; -+ uint32_t level = avctx->level; -+ -+ switch (avctx->profile) { -+ case FF_PROFILE_VP9_0: -+ profile = VDP_DECODER_PROFILE_VP9_PROFILE_0; -+ break; -+ case FF_PROFILE_VP9_1: -+ profile = VDP_DECODER_PROFILE_VP9_PROFILE_1; -+ break; -+ case FF_PROFILE_VP9_2: -+ profile = VDP_DECODER_PROFILE_VP9_PROFILE_2; -+ break; -+ case FF_PROFILE_VP9_3: -+ profile = VDP_DECODER_PROFILE_VP9_PROFILE_3; -+ break; -+ default: -+ return AVERROR(ENOTSUP); -+ } -+ -+ return ff_vdpau_common_init(avctx, profile, level); -+} -+ -+const AVHWAccel ff_vp9_vdpau_hwaccel = { -+ .name = "vp9_vdpau", -+ .type = AVMEDIA_TYPE_VIDEO, -+ .id = AV_CODEC_ID_VP9, -+ .pix_fmt = AV_PIX_FMT_VDPAU, -+ .start_frame = vdpau_vp9_start_frame, -+ .end_frame = vdpau_vp9_end_frame, -+ .decode_slice = vdpau_vp9_decode_slice, -+ .frame_priv_data_size = sizeof(struct vdpau_picture_context), -+ .init = vdpau_vp9_init, -+ .uninit = ff_vdpau_common_uninit, -+ .frame_params = ff_vdpau_common_frame_params, -+ .priv_data_size = sizeof(VDPAUContext), -+ .caps_internal = HWACCEL_CAP_ASYNC_SAFE, -+}; ---- libavcodec/vp9.c.orig 2019-08-05 20:52:21 UTC -+++ libavcodec/vp9.c -@@ -173,7 +173,8 @@ static int update_size(AVCodecContext *avctx, int w, i - #define HWACCEL_MAX (CONFIG_VP9_DXVA2_HWACCEL + \ - CONFIG_VP9_D3D11VA_HWACCEL * 2 + \ - CONFIG_VP9_NVDEC_HWACCEL + \ -- CONFIG_VP9_VAAPI_HWACCEL) -+ CONFIG_VP9_VAAPI_HWACCEL + \ -+ CONFIG_VP9_VDPAU_HWACCEL) - enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts; - VP9Context *s = avctx->priv_data; - uint8_t *p; -@@ -188,6 +189,9 @@ static int update_size(AVCodecContext *avctx, int w, i - - switch (s->pix_fmt) { - case AV_PIX_FMT_YUV420P: -+#if CONFIG_VP9_VDPAU_HWACCEL -+ *fmtp++ = AV_PIX_FMT_VDPAU; -+#endif - case AV_PIX_FMT_YUV420P10: - #if CONFIG_VP9_DXVA2_HWACCEL - *fmtp++ = AV_PIX_FMT_DXVA2_VLD; -@@ -1816,6 +1820,9 @@ AVCodec ff_vp9_decoder = { - #endif - #if CONFIG_VP9_VAAPI_HWACCEL - HWACCEL_VAAPI(vp9), -+#endif -+#if CONFIG_VP9_VDPAU_HWACCEL -+ HWACCEL_VDPAU(vp9), - #endif - NULL - }, Property changes on: head/multimedia/ffmpeg/files/patch-vdpau_vp9 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/ffmpeg/files/patch-rav1e =================================================================== --- head/multimedia/ffmpeg/files/patch-rav1e (revision 539349) +++ head/multimedia/ffmpeg/files/patch-rav1e (nonexistent) @@ -1,723 +0,0 @@ -https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d8bf24459b69 -https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3a84081cbd98 -https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1354c39c78e5 - ---- configure.orig 2019-11-11 11:47:47 UTC -+++ configure -@@ -254,6 +254,7 @@ External library support: - --enable-libopenmpt enable decoding tracked files via libopenmpt [no] - --enable-libopus enable Opus de/encoding via libopus [no] - --enable-libpulse enable Pulseaudio input via libpulse [no] -+ --enable-librav1e enable AV1 encoding via rav1e [no] - --enable-librsvg enable SVG rasterization via librsvg [no] - --enable-librubberband enable rubberband needed for rubberband filter [no] - --enable-librtmp enable RTMP[E] support via librtmp [no] -@@ -1785,6 +1786,7 @@ EXTERNAL_LIBRARY_LIST=" - libopenmpt - libopus - libpulse -+ librav1e - librsvg - librtmp - libshine -@@ -3187,6 +3189,8 @@ libopenmpt_demuxer_deps="libopenmpt" - libopus_decoder_deps="libopus" - libopus_encoder_deps="libopus" - libopus_encoder_select="audio_frame_queue" -+librav1e_encoder_deps="librav1e" -+librav1e_encoder_select="extract_extradata_bsf" - librsvg_decoder_deps="librsvg" - libshine_encoder_deps="libshine" - libshine_encoder_select="audio_frame_queue" -@@ -6255,6 +6259,7 @@ enabled libopus && { - } - } - enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new -+enabled librav1e && require_pkg_config librav1e "rav1e >= 0.1.0" rav1e.h rav1e_context_new - enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo - enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket - enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++" ---- doc/encoders.texi.orig 2019-08-05 20:52:21 UTC -+++ doc/encoders.texi -@@ -1378,6 +1378,49 @@ makes it possible to store non-rgb pix_fmts. - - @end table - -+@section librav1e -+ -+rav1e AV1 encoder wrapper. -+ -+Requires the presence of the rav1e headers and library during configuration. -+You need to explicitly configure the build with @code{--enable-librav1e}. -+ -+@subsection Options -+ -+@table @option -+@item qmax -+Sets the maximum quantizer to use when using bitrate mode. -+ -+@item qmin -+Sets the minimum quantizer to use when using bitrate mode. -+ -+@item qp -+Uses quantizer mode to encode at the given quantizer. -+ -+@item speed -+Selects the speed preset (0-10) to encode with. -+ -+@item tiles -+Selects how many tiles to encode with. -+ -+@item tile-rows -+Selects how many rows of tiles to encode with. -+ -+@item tile-columns -+Selects how many columns of tiles to encode with. -+ -+@item rav1e-params -+Set rav1e options using a list of @var{key}=@var{value} pairs separated -+by ":". See @command{rav1e --help} for a list of options. -+ -+For example to specify librav1e encoding options with @option{-rav1e-params}: -+ -+@example -+ffmpeg -i input -c:v librav1e -b:v 500K -rav1e-params speed=5:low_latency=true output.mp4 -+@end example -+ -+@end table -+ - @section libaom-av1 - - libaom AV1 encoder wrapper. ---- doc/general.texi.orig 2019-08-05 20:52:21 UTC -+++ doc/general.texi -@@ -243,6 +243,13 @@ FFmpeg can use the OpenJPEG libraries for decoding/enc - instructions. To enable using OpenJPEG in FFmpeg, pass @code{--enable-libopenjpeg} to - @file{./configure}. - -+@section rav1e -+ -+FFmpeg can make use of rav1e (Rust AV1 Encoder) via its C bindings to encode videos. -+Go to @url{https://github.com/xiph/rav1e/} and follow the instructions to build -+the C library. To enable using rav1e in FFmpeg, pass @code{--enable-librav1e} -+to @file{./configure}. -+ - @section TwoLAME - - FFmpeg can make use of the TwoLAME library for MP2 encoding. ---- libavcodec/Makefile.orig 2019-11-11 11:47:47 UTC -+++ libavcodec/Makefile -@@ -988,6 +988,7 @@ OBJS-$(CONFIG_LIBOPUS_DECODER) += libopusde - vorbis_data.o - OBJS-$(CONFIG_LIBOPUS_ENCODER) += libopusenc.o libopus.o \ - vorbis_data.o -+OBJS-$(CONFIG_LIBRAV1E_ENCODER) += librav1e.o - OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o - OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o - OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o ---- libavcodec/allcodecs.c.orig 2019-11-11 11:47:47 UTC -+++ libavcodec/allcodecs.c -@@ -703,6 +703,7 @@ extern AVCodec ff_libopenjpeg_encoder; - extern AVCodec ff_libopenjpeg_decoder; - extern AVCodec ff_libopus_encoder; - extern AVCodec ff_libopus_decoder; -+extern AVCodec ff_librav1e_encoder; - extern AVCodec ff_librsvg_decoder; - extern AVCodec ff_libshine_encoder; - extern AVCodec ff_libspeex_encoder; ---- libavcodec/librav1e.c.orig 2019-11-11 11:47:47 UTC -+++ libavcodec/librav1e.c -@@ -0,0 +1,593 @@ -+/* -+ * librav1e encoder -+ * -+ * Copyright (c) 2019 Derek Buitenhuis -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include -+ -+#include "libavutil/internal.h" -+#include "libavutil/avassert.h" -+#include "libavutil/base64.h" -+#include "libavutil/common.h" -+#include "libavutil/mathematics.h" -+#include "libavutil/opt.h" -+#include "libavutil/pixdesc.h" -+#include "avcodec.h" -+#include "internal.h" -+ -+typedef struct librav1eContext { -+ const AVClass *class; -+ -+ RaContext *ctx; -+ AVBSFContext *bsf; -+ -+ uint8_t *pass_data; -+ size_t pass_pos; -+ int pass_size; -+ -+ char *rav1e_opts; -+ int quantizer; -+ int speed; -+ int tiles; -+ int tile_rows; -+ int tile_cols; -+} librav1eContext; -+ -+static inline RaPixelRange range_map(enum AVPixelFormat pix_fmt, enum AVColorRange range) -+{ -+ switch (pix_fmt) { -+ case AV_PIX_FMT_YUVJ420P: -+ case AV_PIX_FMT_YUVJ422P: -+ case AV_PIX_FMT_YUVJ444P: -+ return RA_PIXEL_RANGE_FULL; -+ } -+ -+ switch (range) { -+ case AVCOL_RANGE_JPEG: -+ return RA_PIXEL_RANGE_FULL; -+ case AVCOL_RANGE_MPEG: -+ default: -+ return RA_PIXEL_RANGE_LIMITED; -+ } -+} -+ -+static inline RaChromaSampling pix_fmt_map(enum AVPixelFormat pix_fmt) -+{ -+ switch (pix_fmt) { -+ case AV_PIX_FMT_YUV420P: -+ case AV_PIX_FMT_YUVJ420P: -+ case AV_PIX_FMT_YUV420P10: -+ case AV_PIX_FMT_YUV420P12: -+ return RA_CHROMA_SAMPLING_CS420; -+ case AV_PIX_FMT_YUV422P: -+ case AV_PIX_FMT_YUVJ422P: -+ case AV_PIX_FMT_YUV422P10: -+ case AV_PIX_FMT_YUV422P12: -+ return RA_CHROMA_SAMPLING_CS422; -+ case AV_PIX_FMT_YUV444P: -+ case AV_PIX_FMT_YUVJ444P: -+ case AV_PIX_FMT_YUV444P10: -+ case AV_PIX_FMT_YUV444P12: -+ return RA_CHROMA_SAMPLING_CS444; -+ default: -+ av_assert0(0); -+ } -+} -+ -+static inline RaChromaSamplePosition chroma_loc_map(enum AVChromaLocation chroma_loc) -+{ -+ switch (chroma_loc) { -+ case AVCHROMA_LOC_LEFT: -+ return RA_CHROMA_SAMPLE_POSITION_VERTICAL; -+ case AVCHROMA_LOC_TOPLEFT: -+ return RA_CHROMA_SAMPLE_POSITION_COLOCATED; -+ default: -+ return RA_CHROMA_SAMPLE_POSITION_UNKNOWN; -+ } -+} -+ -+static int get_stats(AVCodecContext *avctx, int eos) -+{ -+ librav1eContext *ctx = avctx->priv_data; -+ RaData* buf = rav1e_twopass_out(ctx->ctx); -+ if (!buf) -+ return 0; -+ -+ if (!eos) { -+ uint8_t *tmp = av_fast_realloc(ctx->pass_data, &ctx->pass_size, -+ ctx->pass_pos + buf->len); -+ if (!tmp) { -+ rav1e_data_unref(buf); -+ return AVERROR(ENOMEM); -+ } -+ -+ ctx->pass_data = tmp; -+ memcpy(ctx->pass_data + ctx->pass_pos, buf->data, buf->len); -+ ctx->pass_pos += buf->len; -+ } else { -+ size_t b64_size = AV_BASE64_SIZE(ctx->pass_pos); -+ -+ memcpy(ctx->pass_data, buf->data, buf->len); -+ -+ avctx->stats_out = av_malloc(b64_size); -+ if (!avctx->stats_out) { -+ rav1e_data_unref(buf); -+ return AVERROR(ENOMEM); -+ } -+ -+ av_base64_encode(avctx->stats_out, b64_size, ctx->pass_data, ctx->pass_pos); -+ -+ av_freep(&ctx->pass_data); -+ } -+ -+ rav1e_data_unref(buf); -+ -+ return 0; -+} -+ -+static int set_stats(AVCodecContext *avctx) -+{ -+ librav1eContext *ctx = avctx->priv_data; -+ int ret = 1; -+ -+ while (ret > 0 && ctx->pass_size - ctx->pass_pos > 0) { -+ ret = rav1e_twopass_in(ctx->ctx, ctx->pass_data + ctx->pass_pos, ctx->pass_size); -+ if (ret < 0) -+ return AVERROR_EXTERNAL; -+ ctx->pass_pos += ret; -+ } -+ -+ return 0; -+} -+ -+static av_cold int librav1e_encode_close(AVCodecContext *avctx) -+{ -+ librav1eContext *ctx = avctx->priv_data; -+ -+ if (ctx->ctx) { -+ rav1e_context_unref(ctx->ctx); -+ ctx->ctx = NULL; -+ } -+ -+ av_bsf_free(&ctx->bsf); -+ av_freep(&ctx->pass_data); -+ -+ return 0; -+} -+ -+static av_cold int librav1e_encode_init(AVCodecContext *avctx) -+{ -+ librav1eContext *ctx = avctx->priv_data; -+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); -+ RaConfig *cfg = NULL; -+ int rret; -+ int ret = 0; -+ -+ cfg = rav1e_config_default(); -+ if (!cfg) { -+ av_log(avctx, AV_LOG_ERROR, "Could not allocate rav1e config.\n"); -+ return AVERROR_EXTERNAL; -+ } -+ -+ rav1e_config_set_time_base(cfg, (RaRational) { -+ avctx->time_base.num * avctx->ticks_per_frame, -+ avctx->time_base.den -+ }); -+ -+ if (avctx->flags & AV_CODEC_FLAG_PASS2) { -+ if (!avctx->stats_in) { -+ av_log(avctx, AV_LOG_ERROR, "No stats file provided for second pass.\n"); -+ ret = AVERROR(EINVAL); -+ goto end; -+ } -+ -+ ctx->pass_size = (strlen(avctx->stats_in) * 3) / 4; -+ ctx->pass_data = av_malloc(ctx->pass_size); -+ if (!ctx->pass_data) { -+ av_log(avctx, AV_LOG_ERROR, "Could not allocate stats buffer.\n"); -+ ret = AVERROR(ENOMEM); -+ goto end; -+ } -+ -+ ctx->pass_size = av_base64_decode(ctx->pass_data, avctx->stats_in, ctx->pass_size); -+ if (ctx->pass_size < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid pass file.\n"); -+ ret = AVERROR(EINVAL); -+ goto end; -+ } -+ } -+ -+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { -+ const AVBitStreamFilter *filter = av_bsf_get_by_name("extract_extradata"); -+ int bret; -+ -+ if (!filter) { -+ av_log(avctx, AV_LOG_ERROR, "extract_extradata bitstream filter " -+ "not found. This is a bug, please report it.\n"); -+ ret = AVERROR_BUG; -+ goto end; -+ } -+ -+ bret = av_bsf_alloc(filter, &ctx->bsf); -+ if (bret < 0) { -+ ret = bret; -+ goto end; -+ } -+ -+ bret = avcodec_parameters_from_context(ctx->bsf->par_in, avctx); -+ if (bret < 0) { -+ ret = bret; -+ goto end; -+ } -+ -+ bret = av_bsf_init(ctx->bsf); -+ if (bret < 0) { -+ ret = bret; -+ goto end; -+ } -+ } -+ -+ if (ctx->rav1e_opts) { -+ AVDictionary *dict = NULL; -+ AVDictionaryEntry *en = NULL; -+ -+ if (!av_dict_parse_string(&dict, ctx->rav1e_opts, "=", ":", 0)) { -+ while (en = av_dict_get(dict, "", en, AV_DICT_IGNORE_SUFFIX)) { -+ int parse_ret = rav1e_config_parse(cfg, en->key, en->value); -+ if (parse_ret < 0) -+ av_log(avctx, AV_LOG_WARNING, "Invalid value for %s: %s.\n", en->key, en->value); -+ } -+ av_dict_free(&dict); -+ } -+ } -+ -+ rret = rav1e_config_parse_int(cfg, "width", avctx->width); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid width passed to rav1e.\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto end; -+ } -+ -+ rret = rav1e_config_parse_int(cfg, "height", avctx->height); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid height passed to rav1e.\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto end; -+ } -+ -+ rret = rav1e_config_parse_int(cfg, "threads", avctx->thread_count); -+ if (rret < 0) -+ av_log(avctx, AV_LOG_WARNING, "Invalid number of threads, defaulting to auto.\n"); -+ -+ if (ctx->speed >= 0) { -+ rret = rav1e_config_parse_int(cfg, "speed", ctx->speed); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set speed preset.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ -+ /* rav1e handles precedence between 'tiles' and cols/rows for us. */ -+ if (ctx->tiles > 0) { -+ rret = rav1e_config_parse_int(cfg, "tiles", ctx->tiles); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set number of tiles to encode with.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ if (ctx->tile_rows > 0) { -+ rret = rav1e_config_parse_int(cfg, "tile_rows", ctx->tile_rows); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set number of tile rows to encode with.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ if (ctx->tile_cols > 0) { -+ rret = rav1e_config_parse_int(cfg, "tile_cols", ctx->tile_cols); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set number of tile cols to encode with.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ -+ if (avctx->gop_size > 0) { -+ rret = rav1e_config_parse_int(cfg, "key_frame_interval", avctx->gop_size); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set max keyint.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ -+ if (avctx->keyint_min > 0) { -+ rret = rav1e_config_parse_int(cfg, "min_key_frame_interval", avctx->keyint_min); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set min keyint.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ -+ if (avctx->bit_rate && ctx->quantizer < 0) { -+ int max_quantizer = avctx->qmax >= 0 ? avctx->qmax : 255; -+ -+ rret = rav1e_config_parse_int(cfg, "quantizer", max_quantizer); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set max quantizer.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ -+ if (avctx->qmin >= 0) { -+ rret = rav1e_config_parse_int(cfg, "min_quantizer", avctx->qmin); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set min quantizer.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ -+ rret = rav1e_config_parse_int(cfg, "bitrate", avctx->bit_rate); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set bitrate.\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto end; -+ } -+ } else if (ctx->quantizer >= 0) { -+ if (avctx->bit_rate) -+ av_log(avctx, AV_LOG_WARNING, "Both bitrate and quantizer specified. Using quantizer mode."); -+ -+ rret = rav1e_config_parse_int(cfg, "quantizer", ctx->quantizer); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not set quantizer.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ } -+ -+ rret = rav1e_config_set_pixel_format(cfg, desc->comp[0].depth, -+ pix_fmt_map(avctx->pix_fmt), -+ chroma_loc_map(avctx->chroma_sample_location), -+ range_map(avctx->pix_fmt, avctx->color_range)); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to set pixel format properties.\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto end; -+ } -+ -+ /* rav1e's colorspace enums match standard values. */ -+ rret = rav1e_config_set_color_description(cfg, (RaMatrixCoefficients) avctx->colorspace, -+ (RaColorPrimaries) avctx->color_primaries, -+ (RaTransferCharacteristics) avctx->color_trc); -+ if (rret < 0) { -+ av_log(avctx, AV_LOG_WARNING, "Failed to set color properties.\n"); -+ if (avctx->err_recognition & AV_EF_EXPLODE) { -+ ret = AVERROR_INVALIDDATA; -+ goto end; -+ } -+ } -+ -+ ctx->ctx = rav1e_context_new(cfg); -+ if (!ctx->ctx) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to create rav1e encode context.\n"); -+ ret = AVERROR_EXTERNAL; -+ goto end; -+ } -+ -+ ret = 0; -+ -+end: -+ -+ rav1e_config_unref(cfg); -+ -+ return ret; -+} -+ -+static int librav1e_send_frame(AVCodecContext *avctx, const AVFrame *frame) -+{ -+ librav1eContext *ctx = avctx->priv_data; -+ RaFrame *rframe = NULL; -+ int ret; -+ -+ if (frame) { -+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); -+ -+ rframe = rav1e_frame_new(ctx->ctx); -+ if (!rframe) { -+ av_log(avctx, AV_LOG_ERROR, "Could not allocate new rav1e frame.\n"); -+ return AVERROR(ENOMEM); -+ } -+ -+ for (int i = 0; i < desc->nb_components; i++) { -+ int shift = i ? desc->log2_chroma_h : 0; -+ int bytes = desc->comp[0].depth == 8 ? 1 : 2; -+ rav1e_frame_fill_plane(rframe, i, frame->data[i], -+ (frame->height >> shift) * frame->linesize[i], -+ frame->linesize[i], bytes); -+ } -+ } -+ -+ ret = rav1e_send_frame(ctx->ctx, rframe); -+ if (rframe) -+ rav1e_frame_unref(rframe); /* No need to unref if flushing. */ -+ -+ switch (ret) { -+ case RA_ENCODER_STATUS_SUCCESS: -+ break; -+ case RA_ENCODER_STATUS_ENOUGH_DATA: -+ return AVERROR(EAGAIN); -+ case RA_ENCODER_STATUS_FAILURE: -+ av_log(avctx, AV_LOG_ERROR, "Could not send frame: %s\n", rav1e_status_to_str(ret)); -+ return AVERROR_EXTERNAL; -+ default: -+ av_log(avctx, AV_LOG_ERROR, "Unknown return code %d from rav1e_send_frame: %s\n", ret, rav1e_status_to_str(ret)); -+ return AVERROR_UNKNOWN; -+ } -+ -+ return 0; -+} -+ -+static int librav1e_receive_packet(AVCodecContext *avctx, AVPacket *pkt) -+{ -+ librav1eContext *ctx = avctx->priv_data; -+ RaPacket *rpkt = NULL; -+ int ret; -+ -+retry: -+ -+ if (avctx->flags & AV_CODEC_FLAG_PASS1) { -+ int sret = get_stats(avctx, 0); -+ if (sret < 0) -+ return sret; -+ } else if (avctx->flags & AV_CODEC_FLAG_PASS2) { -+ int sret = set_stats(avctx); -+ if (sret < 0) -+ return sret; -+ } -+ -+ ret = rav1e_receive_packet(ctx->ctx, &rpkt); -+ switch (ret) { -+ case RA_ENCODER_STATUS_SUCCESS: -+ break; -+ case RA_ENCODER_STATUS_LIMIT_REACHED: -+ if (avctx->flags & AV_CODEC_FLAG_PASS1) { -+ int sret = get_stats(avctx, 1); -+ if (sret < 0) -+ return sret; -+ } -+ return AVERROR_EOF; -+ case RA_ENCODER_STATUS_ENCODED: -+ if (avctx->internal->draining) -+ goto retry; -+ return AVERROR(EAGAIN); -+ case RA_ENCODER_STATUS_NEED_MORE_DATA: -+ if (avctx->internal->draining) { -+ av_log(avctx, AV_LOG_ERROR, "Unexpected error when receiving packet after EOF.\n"); -+ return AVERROR_EXTERNAL; -+ } -+ return AVERROR(EAGAIN); -+ case RA_ENCODER_STATUS_FAILURE: -+ av_log(avctx, AV_LOG_ERROR, "Could not encode frame: %s\n", rav1e_status_to_str(ret)); -+ return AVERROR_EXTERNAL; -+ default: -+ av_log(avctx, AV_LOG_ERROR, "Unknown return code %d from rav1e_receive_packet: %s\n", ret, rav1e_status_to_str(ret)); -+ return AVERROR_UNKNOWN; -+ } -+ -+ ret = av_new_packet(pkt, rpkt->len); -+ if (ret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Could not allocate packet.\n"); -+ rav1e_packet_unref(rpkt); -+ return ret; -+ } -+ -+ memcpy(pkt->data, rpkt->data, rpkt->len); -+ -+ if (rpkt->frame_type == RA_FRAME_TYPE_KEY) -+ pkt->flags |= AV_PKT_FLAG_KEY; -+ -+ pkt->pts = pkt->dts = rpkt->input_frameno * avctx->ticks_per_frame; -+ rav1e_packet_unref(rpkt); -+ -+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { -+ int ret = av_bsf_send_packet(ctx->bsf, pkt); -+ if (ret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "extradata extraction send failed.\n"); -+ av_packet_unref(pkt); -+ return ret; -+ } -+ -+ ret = av_bsf_receive_packet(ctx->bsf, pkt); -+ if (ret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "extradata extraction receive failed.\n"); -+ av_packet_unref(pkt); -+ return ret; -+ } -+ } -+ -+ return 0; -+} -+ -+#define OFFSET(x) offsetof(librav1eContext, x) -+#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM -+ -+static const AVOption options[] = { -+ { "qp", "use constant quantizer mode", OFFSET(quantizer), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 255, VE }, -+ { "speed", "what speed preset to use", OFFSET(speed), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 10, VE }, -+ { "tiles", "number of tiles encode with", OFFSET(tiles), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, INT64_MAX, VE }, -+ { "tile-rows", "number of tiles rows to encode with", OFFSET(tile_rows), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, INT64_MAX, VE }, -+ { "tile-columns", "number of tiles columns to encode with", OFFSET(tile_cols), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, INT64_MAX, VE }, -+ { "rav1e-params", "set the rav1e configuration using a :-separated list of key=value parameters", OFFSET(rav1e_opts), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, -+ { NULL } -+}; -+ -+static const AVCodecDefault librav1e_defaults[] = { -+ { "b", "0" }, -+ { "g", "0" }, -+ { "keyint_min", "0" }, -+ { "qmax", "-1" }, -+ { "qmin", "-1" }, -+ { NULL } -+}; -+ -+const enum AVPixelFormat librav1e_pix_fmts[] = { -+ AV_PIX_FMT_YUV420P, -+ AV_PIX_FMT_YUVJ420P, -+ AV_PIX_FMT_YUV420P10, -+ AV_PIX_FMT_YUV420P12, -+ AV_PIX_FMT_YUV422P, -+ AV_PIX_FMT_YUVJ422P, -+ AV_PIX_FMT_YUV422P10, -+ AV_PIX_FMT_YUV422P12, -+ AV_PIX_FMT_YUV444P, -+ AV_PIX_FMT_YUVJ444P, -+ AV_PIX_FMT_YUV444P10, -+ AV_PIX_FMT_YUV444P12, -+ AV_PIX_FMT_NONE -+}; -+ -+static const AVClass class = { -+ .class_name = "librav1e", -+ .item_name = av_default_item_name, -+ .option = options, -+ .version = LIBAVUTIL_VERSION_INT, -+}; -+ -+AVCodec ff_librav1e_encoder = { -+ .name = "librav1e", -+ .long_name = NULL_IF_CONFIG_SMALL("librav1e AV1"), -+ .type = AVMEDIA_TYPE_VIDEO, -+ .id = AV_CODEC_ID_AV1, -+ .init = librav1e_encode_init, -+ .send_frame = librav1e_send_frame, -+ .receive_packet = librav1e_receive_packet, -+ .close = librav1e_encode_close, -+ .priv_data_size = sizeof(librav1eContext), -+ .priv_class = &class, -+ .defaults = librav1e_defaults, -+ .pix_fmts = librav1e_pix_fmts, -+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS, -+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, -+ .wrapper_name = "librav1e", -+}; Property changes on: head/multimedia/ffmpeg/files/patch-rav1e ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/ffmpeg/files/patch-libavcodec_allcodecs.c =================================================================== --- head/multimedia/ffmpeg/files/patch-libavcodec_allcodecs.c (revision 539349) +++ head/multimedia/ffmpeg/files/patch-libavcodec_allcodecs.c (nonexistent) @@ -1,20 +0,0 @@ -https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/dc0806dd2588 - ---- libavcodec/allcodecs.c.orig 2018-11-05 23:22:25 UTC -+++ libavcodec/allcodecs.c -@@ -679,7 +679,6 @@ extern AVCodec ff_pcm_mulaw_at_encoder; - extern AVCodec ff_pcm_mulaw_at_decoder; - extern AVCodec ff_qdmc_at_decoder; - extern AVCodec ff_qdm2_at_decoder; --extern AVCodec ff_libaom_av1_decoder; - extern AVCodec ff_libaom_av1_encoder; - extern AVCodec ff_libaribb24_decoder; - extern AVCodec ff_libcelt_decoder; -@@ -738,6 +737,7 @@ extern AVCodec ff_idf_decoder; - /* external libraries, that shouldn't be used by default if one of the - * above is available */ - extern AVCodec ff_h263_v4l2m2m_encoder; -+extern AVCodec ff_libaom_av1_decoder; - extern AVCodec ff_libopenh264_encoder; - extern AVCodec ff_libopenh264_decoder; - extern AVCodec ff_h264_amf_encoder; Property changes on: head/multimedia/ffmpeg/files/patch-libavcodec_allcodecs.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/ffmpeg/files/patch-libswscale_ppc_swscale__altivec.c =================================================================== --- head/multimedia/ffmpeg/files/patch-libswscale_ppc_swscale__altivec.c (revision 539349) +++ head/multimedia/ffmpeg/files/patch-libswscale_ppc_swscale__altivec.c (nonexistent) @@ -1,55 +0,0 @@ ---- libswscale/ppc/swscale_altivec.c.orig 2019-08-11 20:06:32 UTC -+++ libswscale/ppc/swscale_altivec.c -@@ -153,13 +153,13 @@ static void yuv2plane1_float_altivec(const int32_t *sr - const int add = (1 << (shift - 1)); - const int clip = (1 << 16) - 1; - const float fmult = 1.0f / 65535.0f; -- const vector uint32_t vadd = (vector uint32_t) {add, add, add, add}; -- const vector uint32_t vshift = (vector uint32_t) vec_splat_u32(shift); -- const vector uint32_t vlargest = (vector uint32_t) {clip, clip, clip, clip}; -- const vector float vmul = (vector float) {fmult, fmult, fmult, fmult}; -- const vector float vzero = (vector float) {0, 0, 0, 0}; -- vector uint32_t v; -- vector float vd; -+ const vec_u32 vadd = (vec_u32) {add, add, add, add}; -+ const vec_u32 vshift = (vec_u32) vec_splat_u32(shift); -+ const vec_u32 vlargest = (vec_u32) {clip, clip, clip, clip}; -+ const vec_f vmul = (vec_f) {fmult, fmult, fmult, fmult}; -+ const vec_f vzero = (vec_f) {0, 0, 0, 0}; -+ vec_u32 v; -+ vec_f vd; - int i; - - yuv2plane1_float_u(src, dest, dst_u, 0); -@@ -186,14 +186,14 @@ static void yuv2plane1_float_bswap_altivec(const int32 - const int add = (1 << (shift - 1)); - const int clip = (1 << 16) - 1; - const float fmult = 1.0f / 65535.0f; -- const vector uint32_t vadd = (vector uint32_t) {add, add, add, add}; -- const vector uint32_t vshift = (vector uint32_t) vec_splat_u32(shift); -- const vector uint32_t vlargest = (vector uint32_t) {clip, clip, clip, clip}; -+ const vec_u32 vadd = (vec_u32) {add, add, add, add}; -+ const vec_u32 vshift = (vec_u32) vec_splat_u32(shift); -+ const vec_u32 vlargest = (vec_u32) {clip, clip, clip, clip}; - const vector float vmul = (vector float) {fmult, fmult, fmult, fmult}; - const vector float vzero = (vector float) {0, 0, 0, 0}; -- const vector uint32_t vswapbig = (vector uint32_t) {16, 16, 16, 16}; -- const vector uint16_t vswapsmall = vec_splat_u16(8); -- vector uint32_t v; -+ const vec_u32 vswapbig = (vec_u32) {16, 16, 16, 16}; -+ const vec_u16 vswapsmall = vec_splat_u16(8); -+ vec_u32 v; - vector float vd; - int i; - -@@ -208,8 +208,8 @@ static void yuv2plane1_float_bswap_altivec(const int32 - vd = vec_ctf(v, 0); - vd = vec_madd(vd, vmul, vzero); - -- vd = (vector float) vec_rl((vector uint32_t) vd, vswapbig); -- vd = (vector float) vec_rl((vector uint16_t) vd, vswapsmall); -+ vd = (vector float) vec_rl((vec_u32) vd, vswapbig); -+ vd = (vector float) vec_rl((vec_u16) vd, vswapsmall); - - vec_st(vd, 0, (float *) &dest[i]); - } Property changes on: head/multimedia/ffmpeg/files/patch-libswscale_ppc_swscale__altivec.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/ffmpeg/files/patch-configure =================================================================== --- head/multimedia/ffmpeg/files/patch-configure (revision 539349) +++ head/multimedia/ffmpeg/files/patch-configure (revision 539350) @@ -1,37 +1,17 @@ ---- configure.orig 2018-04-20 10:02:55 UTC +--- configure.orig 2020-06-15 18:54:23 UTC +++ configure -@@ -3516,13 +3516,7 @@ target_os_default=$(tolower $(uname -s)) +@@ -3744,13 +3744,7 @@ target_os_default=$(tolower $(uname -s)) host_os=$target_os_default # machine -if test "$target_os_default" = aix; then - arch_default=$(uname -p) - strip_default="strip -X32_64" - nm_default="nm -g -X32_64" -else - arch_default=$(uname -m) -fi +arch_default=$(uname -p) cpu="generic" intrinsics="none" -@@ -6122,6 +6117,7 @@ - die "ERROR: OpenMAX IL headers not found"; } && enable omx - enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || - check_pkg_config openssl openssl openssl/ssl.h SSL_library_init || -+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto || - check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || - check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || - check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || -@@ -6234,8 +6229,10 @@ else - EOF - fi - --enabled alsa && check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimestamp || -+if enabled alsa; then -+ check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimestamp || - check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound -+fi - - enabled libjack && - require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range Index: head/multimedia/ffmpeg/files/patch-libavcodec_libsvt__vp9.c =================================================================== --- head/multimedia/ffmpeg/files/patch-libavcodec_libsvt__vp9.c (nonexistent) +++ head/multimedia/ffmpeg/files/patch-libavcodec_libsvt__vp9.c (revision 539350) @@ -0,0 +1,14 @@ +https://github.com/OpenVisualCloud/SVT-VP9/issues/116 + +--- libavcodec/libsvt_vp9.c.orig 2020-06-15 18:54:23 UTC ++++ libavcodec/libsvt_vp9.c +@@ -188,9 +188,6 @@ static int config_enc_params(EbSvtVp9EncConfiguration + param->min_qp_allowed = avctx->qmin; + } + +- param->intra_refresh_type = +- !!(avctx->flags & AV_CODEC_FLAG_CLOSED_GOP) + 1; +- + if (ten_bits) { + param->encoder_bit_depth = 10; + } Property changes on: head/multimedia/ffmpeg/files/patch-libavcodec_libsvt__vp9.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/multimedia/ffmpeg/pkg-plist =================================================================== --- head/multimedia/ffmpeg/pkg-plist (revision 539349) +++ head/multimedia/ffmpeg/pkg-plist (revision 539350) @@ -1,218 +1,228 @@ bin/ffmpeg %%SDL%%bin/ffplay bin/ffprobe include/libavcodec/ac3_parser.h include/libavcodec/adts_parser.h include/libavcodec/avcodec.h include/libavcodec/avdct.h include/libavcodec/avfft.h +include/libavcodec/bsf.h +include/libavcodec/codec.h +include/libavcodec/codec_desc.h +include/libavcodec/codec_id.h +include/libavcodec/codec_par.h include/libavcodec/d3d11va.h include/libavcodec/dirac.h include/libavcodec/dv_profile.h include/libavcodec/dxva2.h include/libavcodec/jni.h include/libavcodec/mediacodec.h +include/libavcodec/packet.h include/libavcodec/qsv.h include/libavcodec/vaapi.h include/libavcodec/vdpau.h include/libavcodec/version.h include/libavcodec/videotoolbox.h include/libavcodec/vorbis_parser.h include/libavcodec/xvmc.h include/libavdevice/avdevice.h include/libavdevice/version.h include/libavfilter/avfilter.h include/libavfilter/buffersink.h include/libavfilter/buffersrc.h include/libavfilter/version.h include/libavformat/avformat.h include/libavformat/avio.h include/libavformat/version.h include/libavresample/avresample.h include/libavresample/version.h include/libavutil/adler32.h include/libavutil/aes.h include/libavutil/aes_ctr.h include/libavutil/attributes.h include/libavutil/audio_fifo.h include/libavutil/avassert.h include/libavutil/avconfig.h include/libavutil/avstring.h include/libavutil/avutil.h include/libavutil/base64.h include/libavutil/blowfish.h include/libavutil/bprint.h include/libavutil/bswap.h include/libavutil/buffer.h include/libavutil/camellia.h include/libavutil/cast5.h include/libavutil/channel_layout.h include/libavutil/common.h include/libavutil/cpu.h include/libavutil/crc.h include/libavutil/des.h include/libavutil/dict.h include/libavutil/display.h +include/libavutil/dovi_meta.h include/libavutil/downmix_info.h include/libavutil/encryption_info.h include/libavutil/error.h include/libavutil/eval.h include/libavutil/ffversion.h include/libavutil/fifo.h include/libavutil/file.h include/libavutil/frame.h include/libavutil/hash.h include/libavutil/hdr_dynamic_metadata.h include/libavutil/hmac.h include/libavutil/hwcontext.h include/libavutil/hwcontext_cuda.h include/libavutil/hwcontext_d3d11va.h include/libavutil/hwcontext_drm.h include/libavutil/hwcontext_dxva2.h include/libavutil/hwcontext_mediacodec.h +include/libavutil/hwcontext_opencl.h include/libavutil/hwcontext_qsv.h include/libavutil/hwcontext_vaapi.h include/libavutil/hwcontext_vdpau.h include/libavutil/hwcontext_videotoolbox.h +include/libavutil/hwcontext_vulkan.h include/libavutil/imgutils.h include/libavutil/intfloat.h include/libavutil/intreadwrite.h include/libavutil/lfg.h include/libavutil/log.h include/libavutil/lzo.h include/libavutil/macros.h include/libavutil/mastering_display_metadata.h include/libavutil/mathematics.h include/libavutil/md5.h include/libavutil/mem.h include/libavutil/motion_vector.h include/libavutil/murmur3.h include/libavutil/opt.h include/libavutil/parseutils.h include/libavutil/pixdesc.h include/libavutil/pixelutils.h include/libavutil/pixfmt.h include/libavutil/random_seed.h include/libavutil/rational.h include/libavutil/rc4.h include/libavutil/replaygain.h include/libavutil/ripemd.h include/libavutil/samplefmt.h include/libavutil/sha.h include/libavutil/sha512.h include/libavutil/spherical.h include/libavutil/stereo3d.h include/libavutil/tea.h include/libavutil/threadmessage.h include/libavutil/time.h include/libavutil/timecode.h include/libavutil/timestamp.h include/libavutil/tree.h include/libavutil/twofish.h include/libavutil/tx.h include/libavutil/version.h +include/libavutil/video_enc_params.h include/libavutil/xtea.h include/libpostproc/postprocess.h include/libpostproc/version.h include/libswresample/swresample.h include/libswresample/version.h include/libswscale/swscale.h include/libswscale/version.h lib/libavcodec.a lib/libavcodec.so lib/libavcodec.so.58 -lib/libavcodec.so.58.54.100 +lib/libavcodec.so.58.91.100 lib/libavdevice.a lib/libavdevice.so lib/libavdevice.so.58 -lib/libavdevice.so.58.8.100 +lib/libavdevice.so.58.10.100 lib/libavfilter.a lib/libavfilter.so lib/libavfilter.so.7 -lib/libavfilter.so.7.57.100 +lib/libavfilter.so.7.85.100 lib/libavformat.a lib/libavformat.so lib/libavformat.so.58 -lib/libavformat.so.58.29.100 +lib/libavformat.so.58.45.100 lib/libavresample.a lib/libavresample.so lib/libavresample.so.4 lib/libavresample.so.4.0.0 lib/libavutil.a lib/libavutil.so lib/libavutil.so.56 -lib/libavutil.so.56.31.100 +lib/libavutil.so.56.51.100 lib/libpostproc.a lib/libpostproc.so lib/libpostproc.so.55 -lib/libpostproc.so.55.5.100 +lib/libpostproc.so.55.7.100 lib/libswresample.a lib/libswresample.so lib/libswresample.so.3 -lib/libswresample.so.3.5.100 +lib/libswresample.so.3.7.100 lib/libswscale.a lib/libswscale.so lib/libswscale.so.5 -lib/libswscale.so.5.5.100 +lib/libswscale.so.5.7.100 libdata/pkgconfig/libavcodec.pc libdata/pkgconfig/libavdevice.pc libdata/pkgconfig/libavfilter.pc libdata/pkgconfig/libavformat.pc libdata/pkgconfig/libavresample.pc libdata/pkgconfig/libavutil.pc libdata/pkgconfig/libpostproc.pc libdata/pkgconfig/libswresample.pc libdata/pkgconfig/libswscale.pc man/man1/ffmpeg-all.1.gz man/man1/ffmpeg-bitstream-filters.1.gz man/man1/ffmpeg-codecs.1.gz man/man1/ffmpeg-devices.1.gz man/man1/ffmpeg-filters.1.gz man/man1/ffmpeg-formats.1.gz man/man1/ffmpeg-protocols.1.gz man/man1/ffmpeg-resampler.1.gz man/man1/ffmpeg-scaler.1.gz man/man1/ffmpeg-utils.1.gz man/man1/ffmpeg.1.gz %%SDL%%man/man1/ffplay-all.1.gz %%SDL%%man/man1/ffplay.1.gz man/man1/ffprobe-all.1.gz man/man1/ffprobe.1.gz man/man3/libavcodec.3.gz man/man3/libavdevice.3.gz man/man3/libavfilter.3.gz man/man3/libavformat.3.gz man/man3/libavutil.3.gz man/man3/libswresample.3.gz man/man3/libswscale.3.gz %%DATADIR%%/examples/Makefile %%DATADIR%%/examples/README -%%DATADIR%%/examples/avio_dir_cmd.c +%%DATADIR%%/examples/avio_list_dir.c %%DATADIR%%/examples/avio_reading.c %%DATADIR%%/examples/decode_audio.c %%DATADIR%%/examples/decode_video.c %%DATADIR%%/examples/demuxing_decoding.c %%DATADIR%%/examples/encode_audio.c %%DATADIR%%/examples/encode_video.c %%DATADIR%%/examples/extract_mvs.c %%DATADIR%%/examples/filter_audio.c %%DATADIR%%/examples/filtering_audio.c %%DATADIR%%/examples/filtering_video.c %%DATADIR%%/examples/http_multiclient.c %%DATADIR%%/examples/hw_decode.c %%DATADIR%%/examples/metadata.c %%DATADIR%%/examples/muxing.c %%DATADIR%%/examples/qsvdec.c %%DATADIR%%/examples/remuxing.c %%DATADIR%%/examples/resampling_audio.c %%DATADIR%%/examples/scaling_video.c %%DATADIR%%/examples/transcode_aac.c %%DATADIR%%/examples/transcoding.c %%DATADIR%%/examples/vaapi_encode.c %%DATADIR%%/examples/vaapi_transcode.c %%DATADIR%%/ffprobe.xsd %%DATADIR%%/libvpx-1080p.ffpreset %%DATADIR%%/libvpx-1080p50_60.ffpreset %%DATADIR%%/libvpx-360p.ffpreset %%DATADIR%%/libvpx-720p.ffpreset %%DATADIR%%/libvpx-720p50_60.ffpreset