Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Dec 2018 17:46:13 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r487606 - in head/multimedia/vlc3: . files
Message-ID:  <201812161746.wBGHkDnJ021223@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Dec 16 17:46:12 2018
New Revision: 487606
URL: https://svnweb.freebsd.org/changeset/ports/487606

Log:
  multimedia/vlc3: backport dav1d support

Added:
  head/multimedia/vlc3/files/patch-dav1d   (contents, props changed)
Modified:
  head/multimedia/vlc3/Makefile   (contents, props changed)

Modified: head/multimedia/vlc3/Makefile
==============================================================================
--- head/multimedia/vlc3/Makefile	Sun Dec 16 17:38:23 2018	(r487605)
+++ head/multimedia/vlc3/Makefile	Sun Dec 16 17:46:12 2018	(r487606)
@@ -66,7 +66,7 @@ CPPFLAGS+=	-I${LOCALBASE}/include
 CFLAGS_i386=	-fomit-frame-pointer
 LIBS+=		-L${LOCALBASE}/lib
 
-OPTIONS_DEFINE=	A52 AALIB AOM ASS AVAHI CACA CHROMECAST DBUS DCA DOCS DVDREAD \
+OPTIONS_DEFINE=	A52 AALIB AOM ASS AVAHI CACA CHROMECAST DAV1D DBUS DCA DOCS DVDREAD \
 		DVDNAV FAAD FLAC FLUID FREERDP FRIBIDI GME GNUTLS \
 		GOOM HARFBUZZ JACK KATE LIBBLURAY LIBRSVG2 LIBSSH2 LIRC \
 		LIVEMEDIA LUA MAD MODPLUG MPEG2 MTP MUSEPACK \
@@ -83,6 +83,7 @@ OPTIONS_SUB=	yes
 AOM_DESC=	AV1 video encoding/decoding via libaom
 ASS_DESC=	ASS/SSA subtitle rendering
 CHROMECAST_DESC=Streaming to Chromecast devices
+DAV1D_DESC=	AV1 video decoding via libdav1d
 DVDREAD_DESC=	DVD Playback support
 DVDNAV_DESC=	DVD menu navigation
 FLUID_DESC=	Fluidsynth MIDI support
@@ -122,6 +123,9 @@ CACA_CONFIGURE_ENABLE=	caca
 
 CHROMECAST_LIB_DEPENDS=	libprotobuf-lite.so:devel/protobuf
 CHROMECASE_CONFIGURE_ENABLE=	chromecast
+
+DAV1D_LIB_DEPENDS=	libdav1d.so:multimedia/dav1d
+DAV1D_CONFIGURE_ENABLE=	dav1d
 
 DBUS_LIB_DEPENDS=	libdbus-1.so:devel/dbus
 DBUS_CONFIGURE_ENABLE=	dbus

Added: head/multimedia/vlc3/files/patch-dav1d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/vlc3/files/patch-dav1d	Sun Dec 16 17:46:12 2018	(r487606)
@@ -0,0 +1,865 @@
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=3f8eb17e49
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=059b9e563b
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=eda959e89a
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=3fda6ce5fb
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=e817a73ae8
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=1d6029cc75
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=8ff6e5b509
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=500fe27a07
+https://git.videolan.org/?p=vlc.git;a=commitdiff;h=9b35183b84
+
+--- configure.orig	2018-08-09 08:56:33 UTC
++++ configure
+@@ -1124,6 +1124,12 @@ CPPFLAGS_vpx
+ LTLIBvpx
+ VPX_LIBS
+ VPX_CFLAGS
++DAV1D_LIBS
++DAV1D_CFLAGS
++LIBS_dav1d
++CFLAGS_dav1d
++CPPFLAGS_dav1d
++LTLIBdav1d
+ AOM_LIBS
+ AOM_CFLAGS
+ LIBS_aom
+@@ -1730,6 +1736,7 @@ enable_swscale
+ enable_postproc
+ enable_faad
+ enable_aom
++enable_dav1d
+ enable_vpx
+ enable_twolame
+ enable_fdkaac
+@@ -1943,6 +1950,8 @@ POSTPROC_CFLAGS
+ POSTPROC_LIBS
+ AOM_CFLAGS
+ AOM_LIBS
++DAV1D_CFLAGS
++DAV1D_LIBS
+ VPX_CFLAGS
+ VPX_LIBS
+ TWOLAME_CFLAGS
+@@ -2867,6 +2876,7 @@ Codec plugins:
+   --enable-postproc       libpostproc image post-processing (default auto)
+   --enable-faad           faad codec (default auto)
+   --enable-aom            experimental AV1 codec (default auto) [default=auto]
++  --enable-dav1d          AV1 decoder (default auto) [default=auto]
+   --enable-vpx            libvpx VP8/VP9 encoder and decoder (default auto)
+   --enable-twolame        MPEG Audio Layer 2 encoder [default=auto]
+   --enable-fdkaac         FDK-AAC encoder [default=disabled]
+@@ -3167,6 +3177,9 @@ Some influential environment variables:
+               linker flags for POSTPROC, overriding pkg-config
+   AOM_CFLAGS  C compiler flags for AOM, overriding pkg-config
+   AOM_LIBS    linker flags for AOM, overriding pkg-config
++  DAV1D_CFLAGS
++              C compiler flags for DAV1D, overriding pkg-config
++  DAV1D_LIBS  linker flags for DAV1D, overriding pkg-config
+   VPX_CFLAGS  C compiler flags for VPX, overriding pkg-config
+   VPX_LIBS    linker flags for VPX, overriding pkg-config
+   TWOLAME_CFLAGS
+@@ -41023,6 +41036,251 @@ $as_echo "yes" >&6; }
+ 
+ 
+     eval "LIBS_aom="'"'"$AOM_LIBS  "'$'"{LIBS_aom}"'"'
++
++
++
++fi ;; #(
++  *) :
++     ;;
++esac
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++# Check whether --enable-dav1d was given.
++if test "${enable_dav1d+set}" = set; then :
++  enableval=$enable_dav1d;
++else
++  enable_dav1d=auto
++fi
++
++
++case $enable_dav1d in #(
++  yes) :
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAV1D" >&5
++$as_echo_n "checking for DAV1D... " >&6; }
++
++if test -n "$DAV1D_CFLAGS"; then
++    pkg_cv_DAV1D_CFLAGS="$DAV1D_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++    if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dav1d\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "dav1d") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_DAV1D_CFLAGS=`$PKG_CONFIG --cflags "dav1d" 2>/dev/null`
++		      test "x$?" != "x0" && pkg_failed=yes
++else
++  pkg_failed=yes
++fi
++ else
++    pkg_failed=untried
++fi
++if test -n "$DAV1D_LIBS"; then
++    pkg_cv_DAV1D_LIBS="$DAV1D_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++    if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dav1d\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "dav1d") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_DAV1D_LIBS=`$PKG_CONFIG --libs "dav1d" 2>/dev/null`
++		      test "x$?" != "x0" && pkg_failed=yes
++else
++  pkg_failed=yes
++fi
++ else
++    pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++        _pkg_short_errors_supported=yes
++else
++        _pkg_short_errors_supported=no
++fi
++        if test $_pkg_short_errors_supported = yes; then
++	        DAV1D_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dav1d" 2>&1`
++        else
++	        DAV1D_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dav1d" 2>&1`
++        fi
++	# Put the nasty error message in config.log where it belongs
++	echo "$DAV1D_PKG_ERRORS" >&5
++
++	if test x"$enable_dav1d" = "xyes"; then :
++  as_fn_error $? "Library dav1d needed for dav1d was not found" "$LINENO" 5
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Library dav1d needed for dav1d was not found" >&5
++$as_echo "$as_me: WARNING: Library dav1d needed for dav1d was not found" >&2;}
++
++fi
++elif test $pkg_failed = untried; then
++     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++	if test x"$enable_dav1d" = "xyes"; then :
++  as_fn_error $? "Library dav1d needed for dav1d was not found" "$LINENO" 5
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Library dav1d needed for dav1d was not found" >&5
++$as_echo "$as_me: WARNING: Library dav1d needed for dav1d was not found" >&2;}
++
++fi
++else
++	DAV1D_CFLAGS=$pkg_cv_DAV1D_CFLAGS
++	DAV1D_LIBS=$pkg_cv_DAV1D_LIBS
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++	LTLIBdav1d=libdav1d_plugin.la
++
++
++
++
++
++
++    eval "CFLAGS_dav1d="'"$'"{CFLAGS_dav1d} $DAV1D_CFLAGS "'"'
++
++
++
++
++
++    eval "LIBS_dav1d="'"'"$DAV1D_LIBS  "'$'"{LIBS_dav1d}"'"'
++
++
++
++fi ;; #(
++  auto) :
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAV1D" >&5
++$as_echo_n "checking for DAV1D... " >&6; }
++
++if test -n "$DAV1D_CFLAGS"; then
++    pkg_cv_DAV1D_CFLAGS="$DAV1D_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++    if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dav1d\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "dav1d") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_DAV1D_CFLAGS=`$PKG_CONFIG --cflags "dav1d" 2>/dev/null`
++		      test "x$?" != "x0" && pkg_failed=yes
++else
++  pkg_failed=yes
++fi
++ else
++    pkg_failed=untried
++fi
++if test -n "$DAV1D_LIBS"; then
++    pkg_cv_DAV1D_LIBS="$DAV1D_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++    if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dav1d\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "dav1d") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_DAV1D_LIBS=`$PKG_CONFIG --libs "dav1d" 2>/dev/null`
++		      test "x$?" != "x0" && pkg_failed=yes
++else
++  pkg_failed=yes
++fi
++ else
++    pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++        _pkg_short_errors_supported=yes
++else
++        _pkg_short_errors_supported=no
++fi
++        if test $_pkg_short_errors_supported = yes; then
++	        DAV1D_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dav1d" 2>&1`
++        else
++	        DAV1D_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dav1d" 2>&1`
++        fi
++	# Put the nasty error message in config.log where it belongs
++	echo "$DAV1D_PKG_ERRORS" >&5
++
++	enable_dav1d=no
++ if test x"$enable_dav1d" = "xyes"; then :
++  as_fn_error $? "Library dav1d needed for dav1d was not found" "$LINENO" 5
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Library dav1d needed for dav1d was not found" >&5
++$as_echo "$as_me: WARNING: Library dav1d needed for dav1d was not found" >&2;}
++
++fi
++elif test $pkg_failed = untried; then
++     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++	enable_dav1d=no
++ if test x"$enable_dav1d" = "xyes"; then :
++  as_fn_error $? "Library dav1d needed for dav1d was not found" "$LINENO" 5
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Library dav1d needed for dav1d was not found" >&5
++$as_echo "$as_me: WARNING: Library dav1d needed for dav1d was not found" >&2;}
++
++fi
++else
++	DAV1D_CFLAGS=$pkg_cv_DAV1D_CFLAGS
++	DAV1D_LIBS=$pkg_cv_DAV1D_LIBS
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++	enable_dav1d=yes
++
++
++    LTLIBdav1d=libdav1d_plugin.la
++
++
++
++
++
++
++    eval "CFLAGS_dav1d="'"$'"{CFLAGS_dav1d} $DAV1D_CFLAGS "'"'
++
++
++
++
++
++    eval "LIBS_dav1d="'"'"$DAV1D_LIBS  "'$'"{LIBS_dav1d}"'"'
+ 
+ 
+ 
+--- contrib/src/dav1d/rules.mak.orig	2018-12-16 15:16:32 UTC
++++ contrib/src/dav1d/rules.mak
+@@ -0,0 +1,33 @@
++# libdav1d
++
++DAV1D_VERSION := 0.1.0
++DAV1D_URL := $(VIDEOLAN)/dav1d/$(DAV1D_VERSION)/dav1d-$(DAV1D_VERSION).tar.xz
++#~ DAV1D_HASH := 8c95771dfa7a0bdb542eef8924bd0d3009e5efff
++#~ DAV1D_VERSION := git-$(DAV1D_HASH)
++#~ DAV1D_GITURL := https://code.videolan.org/videolan/dav1d.git
++
++PKGS += dav1d
++ifeq ($(call need_pkg,"dav1d"),)
++PKGS_FOUND += dav1d
++endif
++
++DAV1D_CONF = -D build_tests=false -D build_tools=false
++ifdef HAVE_WIN32
++DAV1D_CONF += -D win32_ver=false
++endif
++
++$(TARBALLS)/dav1d-$(DAV1D_VERSION).tar.xz:
++	$(call download_pkg,$(DAV1D_URL),dav1d)
++	#~ $(call download_git,$(DAV1D_URL),,$(DAV1D_HASH))
++
++.sum-dav1d: dav1d-$(DAV1D_VERSION).tar.xz
++
++dav1d: dav1d-$(DAV1D_VERSION).tar.xz .sum-dav1d
++	$(UNPACK)
++	$(MOVE)
++
++.dav1d: dav1d crossfile.meson
++	cd $< && rm -rf ./build
++	cd $< && $(HOSTVARS_MESON) $(MESON) $(DAV1D_CONF) build
++	cd $< && cd build && ninja install
++	touch $@
+--- contrib/src/ffmpeg/rules.mak.orig	2018-04-06 09:31:02 UTC
++++ contrib/src/ffmpeg/rules.mak
+@@ -5,7 +5,7 @@
+ #USE_FFMPEG ?= 1
+ 
+ ifndef USE_LIBAV
+-FFMPEG_HASH=eaff5fcb7cde8d1614755269773d471d3a3d1bfc
++FFMPEG_HASH=0e833f615b59cd7611374d1d77257eaf00635ad7
+ FFMPEG_SNAPURL := http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=$(FFMPEG_HASH);sf=tgz
+ FFMPEG_GITURL := http://git.videolan.org/git/ffmpeg.git
+ FFMPEG_LAVC_MIN := 57.37.100
+--- modules/Makefile.in.orig	2018-08-21 16:48:28 UTC
++++ modules/Makefile.in
+@@ -1389,6 +1389,13 @@ libdaala_plugin_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ 	$(libdaala_plugin_la_CFLAGS) $(CFLAGS) \
+ 	$(libdaala_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
++libdav1d_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++am_libdav1d_plugin_la_OBJECTS = codec/libdav1d_plugin_la-dav1d.lo
++libdav1d_plugin_la_OBJECTS = $(am_libdav1d_plugin_la_OBJECTS)
++libdav1d_plugin_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
++	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
++	$(libdav1d_plugin_la_CFLAGS) $(CFLAGS) \
++	$(libdav1d_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
+ libdbus_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_1)
+ am_libdbus_plugin_la_OBJECTS =  \
+@@ -5345,6 +5352,7 @@ am__depfiles_remade =  \
+ 	codec/$(DEPDIR)/libaom_plugin_la-aom.Plo \
+ 	codec/$(DEPDIR)/libcvpx_plugin_la-vt_utils.Plo \
+ 	codec/$(DEPDIR)/libdaala_plugin_la-daala.Plo \
++	codec/$(DEPDIR)/libdav1d_plugin_la-dav1d.Plo \
+ 	codec/$(DEPDIR)/libdca_plugin_la-dca.Plo \
+ 	codec/$(DEPDIR)/libfaad_plugin_la-faad.Plo \
+ 	codec/$(DEPDIR)/libfdkaac_plugin_la-fdkaac.Plo \
+@@ -6515,7 +6523,7 @@ SOURCES = $(liba52_plugin_la_SOURCES) $(libaa_plugin_l
+ 	$(libcvdsub_plugin_la_SOURCES) $(libcvpx_plugin_la_SOURCES) \
+ 	$(libd3d11_common_la_SOURCES) $(libd3d11va_plugin_la_SOURCES) \
+ 	$(libd3d9_common_la_SOURCES) $(libdaala_plugin_la_SOURCES) \
+-	$(libdbus_plugin_la_SOURCES) \
++	$(libdav1d_plugin_la_SOURCES) $(libdbus_plugin_la_SOURCES) \
+ 	$(libdbus_screensaver_plugin_la_SOURCES) \
+ 	$(libdc1394_plugin_la_SOURCES) $(libdca_plugin_la_SOURCES) \
+ 	$(libdcp_plugin_la_SOURCES) $(libddummy_plugin_la_SOURCES) \
+@@ -6908,7 +6916,7 @@ DIST_SOURCES = $(liba52_plugin_la_SOURCES) $(libaa_plu
+ 	$(libcvdsub_plugin_la_SOURCES) $(libcvpx_plugin_la_SOURCES) \
+ 	$(libd3d11_common_la_SOURCES) $(libd3d11va_plugin_la_SOURCES) \
+ 	$(libd3d9_common_la_SOURCES) $(libdaala_plugin_la_SOURCES) \
+-	$(libdbus_plugin_la_SOURCES) \
++	$(libdav1d_plugin_la_SOURCES) $(libdbus_plugin_la_SOURCES) \
+ 	$(libdbus_screensaver_plugin_la_SOURCES) \
+ 	$(libdc1394_plugin_la_SOURCES) $(libdca_plugin_la_SOURCES) \
+ 	$(libdcp_plugin_la_SOURCES) $(libddummy_plugin_la_SOURCES) \
+@@ -8078,6 +8086,7 @@ CFLAGS_avahi = @CFLAGS_avahi@
+ CFLAGS_caca = @CFLAGS_caca@
+ CFLAGS_cdda = @CFLAGS_cdda@
+ CFLAGS_daala = @CFLAGS_daala@
++CFLAGS_dav1d = @CFLAGS_dav1d@
+ CFLAGS_dc1394 = @CFLAGS_dc1394@
+ CFLAGS_dca = @CFLAGS_dca@
+ CFLAGS_deinterlace = @CFLAGS_deinterlace@
+@@ -8156,6 +8165,7 @@ CPPFLAGS_aribcam = @CPPFLAGS_aribcam@
+ CPPFLAGS_avahi = @CPPFLAGS_avahi@
+ CPPFLAGS_caca = @CPPFLAGS_caca@
+ CPPFLAGS_daala = @CPPFLAGS_daala@
++CPPFLAGS_dav1d = @CPPFLAGS_dav1d@
+ CPPFLAGS_dc1394 = @CPPFLAGS_dc1394@
+ CPPFLAGS_dca = @CPPFLAGS_dca@
+ CPPFLAGS_decklink = @CPPFLAGS_decklink@
+@@ -8217,6 +8227,8 @@ CXXFLAGS_mod = @CXXFLAGS_mod@
+ CYGPATH_W = @CYGPATH_W@
+ DAALA_CFLAGS = @DAALA_CFLAGS@
+ DAALA_LIBS = @DAALA_LIBS@
++DAV1D_CFLAGS = @DAV1D_CFLAGS@
++DAV1D_LIBS = @DAV1D_LIBS@
+ DBUS_CFLAGS = @DBUS_CFLAGS@
+ DBUS_LIBS = @DBUS_LIBS@
+ DC1394_CFLAGS = @DC1394_CFLAGS@
+@@ -8353,6 +8365,7 @@ LIBS_caca = @LIBS_caca@
+ LIBS_cdda = @LIBS_cdda@
+ LIBS_crystalhd = @LIBS_crystalhd@
+ LIBS_daala = @LIBS_daala@
++LIBS_dav1d = @LIBS_dav1d@
+ LIBS_dc1394 = @LIBS_dc1394@
+ LIBS_dca = @LIBS_dca@
+ LIBS_dsm = @LIBS_dsm@
+@@ -8464,6 +8477,7 @@ LTLIBcdda = @LTLIBcdda@
+ LTLIBcrystalhd = @LTLIBcrystalhd@
+ LTLIBcvpx = @LTLIBcvpx@
+ LTLIBdaala = @LTLIBdaala@
++LTLIBdav1d = @LTLIBdav1d@
+ LTLIBdc1394 = @LTLIBdc1394@
+ LTLIBdca = @LTLIBdca@
+ LTLIBdirect3d11 = @LTLIBdirect3d11@
+@@ -8892,17 +8906,18 @@ EXTRA_LTLIBRARIES = libaccess_qtsound_plugin.la libdc1
+ 	libomxil_plugin.la libomxil_vout_plugin.la libx265_plugin.la \
+ 	libx262_plugin.la libx264_plugin.la libx26410b_plugin.la \
+ 	libfdkaac_plugin.la libshine_plugin.la libvpx_plugin.la \
+-	libaom_plugin.la libtwolame_plugin.la libcrystalhd_plugin.la \
+-	libqsv_plugin.la libogg_plugin.la libmod_plugin.la \
+-	libmpc_plugin.la libgme_plugin.la libsid_plugin.la \
+-	libmkv_plugin.la libminimal_macosx_plugin.la $(am__append_140) \
+-	libdirect3d11_filters_plugin.la libsecret_plugin.la \
+-	libkwallet_plugin.la libtaglib_plugin.la libgnutls_plugin.la \
+-	libxml_plugin.la libosx_notifications_plugin.la \
+-	libnotify_plugin.la libavahi_plugin.la libmtp_plugin.la \
+-	libupnp_plugin.la libudev_plugin.la libmicrodns_plugin.la \
+-	libaribcam_plugin.la libarchive_plugin.la libsvg_plugin.la \
+-	libswscale_plugin.la libchroma_omx_plugin.la libcvpx_plugin.la \
++	libaom_plugin.la libtwolame_plugin.la libdav1d_plugin.la \
++	libcrystalhd_plugin.la libqsv_plugin.la libogg_plugin.la \
++	libmod_plugin.la libmpc_plugin.la libgme_plugin.la \
++	libsid_plugin.la libmkv_plugin.la libminimal_macosx_plugin.la \
++	$(am__append_140) libdirect3d11_filters_plugin.la \
++	libsecret_plugin.la libkwallet_plugin.la libtaglib_plugin.la \
++	libgnutls_plugin.la libxml_plugin.la \
++	libosx_notifications_plugin.la libnotify_plugin.la \
++	libavahi_plugin.la libmtp_plugin.la libupnp_plugin.la \
++	libudev_plugin.la libmicrodns_plugin.la libaribcam_plugin.la \
++	libarchive_plugin.la libsvg_plugin.la libswscale_plugin.la \
++	libchroma_omx_plugin.la libcvpx_plugin.la \
+ 	libopencv_wrapper_plugin.la libpostproc_plugin.la \
+ 	libopencv_example_plugin.la libgles2_plugin.la \
+ 	$(am__append_229) libdirect3d11_plugin.la $(am__append_234) \
+@@ -9483,8 +9498,8 @@ codec_LTLIBRARIES = libddummy_plugin.la $(am__append_6
+ 	$(am__append_90) $(LTLIBomxil) $(LTLIBomxil_vout) \
+ 	$(am__append_92) $(LTLIBx265) $(LTLIBx262) $(LTLIBx264) \
+ 	$(LTLIBx26410b) $(LTLIBfdkaac) $(LTLIBshine) $(LTLIBvpx) \
+-	$(LTLIBaom) $(LTLIBtwolame) $(LTLIBcrystalhd) $(LTLIBqsv) \
+-	$(am__append_94) $(am__append_95)
++	$(LTLIBaom) $(LTLIBtwolame) $(LTLIBdav1d) $(LTLIBcrystalhd) \
++	$(LTLIBqsv) $(am__append_94) $(am__append_95)
+ libddummy_plugin_la_SOURCES = codec/ddummy.c
+ libedummy_plugin_la_SOURCES = codec/edummy.c
+ 
+@@ -9806,6 +9821,11 @@ libtwolame_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DLIBTW
+ libtwolame_plugin_la_CFLAGS = $(AM_CFLAGS) $(TWOLAME_CFLAGS)
+ libtwolame_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
+ libtwolame_plugin_la_LIBADD = $(TWOLAME_LIBS) $(LIBM)
++libdav1d_plugin_la_SOURCES = codec/dav1d.c
++libdav1d_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(DAV1D_CFLAGS)
++libdav1d_plugin_la_CFLAGS = $(AM_CFLAGS)
++libdav1d_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
++libdav1d_plugin_la_LIBADD = $(DAV1D_LIBS)
+ 
+ ### Hardware encoders ###
+ libcrystalhd_plugin_la_SOURCES = codec/crystalhd.c packetizer/h264_nal.c packetizer/h264_nal.h
+@@ -14851,6 +14871,11 @@ codec/libdaala_plugin_la-daala.lo: codec/$(am__dirstam
+ 
+ libdaala_plugin.la: $(libdaala_plugin_la_OBJECTS) $(libdaala_plugin_la_DEPENDENCIES) $(EXTRA_libdaala_plugin_la_DEPENDENCIES) 
+ 	$(AM_V_CCLD)$(libdaala_plugin_la_LINK)  $(libdaala_plugin_la_OBJECTS) $(libdaala_plugin_la_LIBADD) $(LIBS)
++codec/libdav1d_plugin_la-dav1d.lo: codec/$(am__dirstamp) \
++	codec/$(DEPDIR)/$(am__dirstamp)
++
++libdav1d_plugin.la: $(libdav1d_plugin_la_OBJECTS) $(libdav1d_plugin_la_DEPENDENCIES) $(EXTRA_libdav1d_plugin_la_DEPENDENCIES) 
++	$(AM_V_CCLD)$(libdav1d_plugin_la_LINK)  $(libdav1d_plugin_la_OBJECTS) $(libdav1d_plugin_la_LIBADD) $(LIBS)
+ control/dbus/$(am__dirstamp):
+ 	@$(MKDIR_P) control/dbus
+ 	@: > control/dbus/$(am__dirstamp)
+@@ -19696,6 +19721,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@codec/$(DEPDIR)/libaom_plugin_la-aom.Plo@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@codec/$(DEPDIR)/libcvpx_plugin_la-vt_utils.Plo@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@codec/$(DEPDIR)/libdaala_plugin_la-daala.Plo@am__quote@ # am--include-marker
++@AMDEP_TRUE@@am__include@ @am__quote@codec/$(DEPDIR)/libdav1d_plugin_la-dav1d.Plo@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@codec/$(DEPDIR)/libdca_plugin_la-dca.Plo@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@codec/$(DEPDIR)/libfaad_plugin_la-faad.Plo@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@codec/$(DEPDIR)/libfdkaac_plugin_la-fdkaac.Plo@am__quote@ # am--include-marker
+@@ -21249,6 +21275,13 @@ codec/libdaala_plugin_la-daala.lo: codec/daala.c
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdaala_plugin_la_CFLAGS) $(CFLAGS) -c -o codec/libdaala_plugin_la-daala.lo `test -f 'codec/daala.c' || echo '$(srcdir)/'`codec/daala.c
+ 
++codec/libdav1d_plugin_la-dav1d.lo: codec/dav1d.c
++@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdav1d_plugin_la_CPPFLAGS) $(CPPFLAGS) $(libdav1d_plugin_la_CFLAGS) $(CFLAGS) -MT codec/libdav1d_plugin_la-dav1d.lo -MD -MP -MF codec/$(DEPDIR)/libdav1d_plugin_la-dav1d.Tpo -c -o codec/libdav1d_plugin_la-dav1d.lo `test -f 'codec/dav1d.c' || echo '$(srcdir)/'`codec/dav1d.c
++@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) codec/$(DEPDIR)/libdav1d_plugin_la-dav1d.Tpo codec/$(DEPDIR)/libdav1d_plugin_la-dav1d.Plo
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='codec/dav1d.c' object='codec/libdav1d_plugin_la-dav1d.lo' libtool=yes @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdav1d_plugin_la_CPPFLAGS) $(CPPFLAGS) $(libdav1d_plugin_la_CFLAGS) $(CFLAGS) -c -o codec/libdav1d_plugin_la-dav1d.lo `test -f 'codec/dav1d.c' || echo '$(srcdir)/'`codec/dav1d.c
++
+ control/dbus/libdbus_plugin_la-dbus_root.lo: control/dbus/dbus_root.c
+ @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbus_plugin_la_CFLAGS) $(CFLAGS) -MT control/dbus/libdbus_plugin_la-dbus_root.lo -MD -MP -MF control/dbus/$(DEPDIR)/libdbus_plugin_la-dbus_root.Tpo -c -o control/dbus/libdbus_plugin_la-dbus_root.lo `test -f 'control/dbus/dbus_root.c' || echo '$(srcdir)/'`control/dbus/dbus_root.c
+ @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) control/dbus/$(DEPDIR)/libdbus_plugin_la-dbus_root.Tpo control/dbus/$(DEPDIR)/libdbus_plugin_la-dbus_root.Plo
+@@ -28313,6 +28346,7 @@ distclean: distclean-recursive
+ 	-rm -f codec/$(DEPDIR)/libaom_plugin_la-aom.Plo
+ 	-rm -f codec/$(DEPDIR)/libcvpx_plugin_la-vt_utils.Plo
+ 	-rm -f codec/$(DEPDIR)/libdaala_plugin_la-daala.Plo
++	-rm -f codec/$(DEPDIR)/libdav1d_plugin_la-dav1d.Plo
+ 	-rm -f codec/$(DEPDIR)/libdca_plugin_la-dca.Plo
+ 	-rm -f codec/$(DEPDIR)/libfaad_plugin_la-faad.Plo
+ 	-rm -f codec/$(DEPDIR)/libfdkaac_plugin_la-fdkaac.Plo
+@@ -29667,6 +29701,7 @@ maintainer-clean: maintainer-clean-recursive
+ 	-rm -f codec/$(DEPDIR)/libaom_plugin_la-aom.Plo
+ 	-rm -f codec/$(DEPDIR)/libcvpx_plugin_la-vt_utils.Plo
+ 	-rm -f codec/$(DEPDIR)/libdaala_plugin_la-daala.Plo
++	-rm -f codec/$(DEPDIR)/libdav1d_plugin_la-dav1d.Plo
+ 	-rm -f codec/$(DEPDIR)/libdca_plugin_la-dca.Plo
+ 	-rm -f codec/$(DEPDIR)/libfaad_plugin_la-faad.Plo
+ 	-rm -f codec/$(DEPDIR)/libfdkaac_plugin_la-fdkaac.Plo
+--- modules/codec/dav1d.c.orig	2018-12-16 15:16:32 UTC
++++ modules/codec/dav1d.c
+@@ -0,0 +1,317 @@
++/*****************************************************************************
++ * dav1d.c: dav1d decoder (AV1) module
++ *****************************************************************************
++ * Copyright (C) 2016 VLC authors and VideoLAN
++ *
++ * Authors: Adrien Maglo <magsoft@videolan.org>
++ * Based on aom.c by: Tristan Matthews <tmatth@videolan.org>
++ *
++ * This program 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.
++ *
++ * This program 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 this program; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
++ *****************************************************************************/
++
++/*****************************************************************************
++ * Preamble
++ *****************************************************************************/
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++
++#include <vlc_common.h>
++#include <vlc_plugin.h>
++#include <vlc_codec.h>
++#include <vlc_timestamp_helper.h>
++
++#include <errno.h>
++#include <dav1d/dav1d.h>
++
++#include "../demux/mp4/color_config.h"
++
++/****************************************************************************
++ * Local prototypes
++ ****************************************************************************/
++static int OpenDecoder(vlc_object_t *);
++static void CloseDecoder(vlc_object_t *);
++
++/*****************************************************************************
++ * Module descriptor
++ *****************************************************************************/
++
++#define THREAD_FRAMES_TEXT N_("Frames Threads")
++#define THREAD_FRAMES_LONGTEXT N_( "Max number of threads used for frame decoding, default 0=auto" )
++#define THREAD_TILES_TEXT N_("Tiles Threads")
++#define THREAD_TILES_LONGTEXT N_( "Max number of threads used for tile decoding, default 0=auto" )
++
++
++vlc_module_begin ()
++    set_shortname("dav1d")
++    set_description(N_("Dav1d video decoder"))
++    set_capability("video decoder", 10000)
++    set_callbacks(OpenDecoder, CloseDecoder)
++    set_category(CAT_INPUT)
++    set_subcategory(SUBCAT_INPUT_VCODEC)
++
++    add_integer("dav1d-thread-frames", 0,
++                THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false)
++    add_integer("dav1d-thread-tiles", 0,
++                THREAD_TILES_TEXT, THREAD_TILES_LONGTEXT, false)
++vlc_module_end ()
++
++/*****************************************************************************
++ * decoder_sys_t: libaom decoder descriptor
++ *****************************************************************************/
++struct decoder_sys_t
++{
++    Dav1dSettings s;
++    Dav1dContext *c;
++};
++
++static const struct
++{
++    vlc_fourcc_t          i_chroma;
++    enum Dav1dPixelLayout i_chroma_id;
++    uint8_t               i_bitdepth;
++} chroma_table[] =
++{
++    {VLC_CODEC_GREY, DAV1D_PIXEL_LAYOUT_I400, 8},
++    {VLC_CODEC_I420, DAV1D_PIXEL_LAYOUT_I420, 8},
++    {VLC_CODEC_I422, DAV1D_PIXEL_LAYOUT_I422, 8},
++    {VLC_CODEC_I444, DAV1D_PIXEL_LAYOUT_I444, 8},
++
++    {VLC_CODEC_I420_10L, DAV1D_PIXEL_LAYOUT_I420, 10},
++    {VLC_CODEC_I422_10L, DAV1D_PIXEL_LAYOUT_I422, 10},
++    {VLC_CODEC_I444_10L, DAV1D_PIXEL_LAYOUT_I444, 10},
++};
++
++static vlc_fourcc_t FindVlcChroma(const Dav1dPicture *img)
++{
++    for (unsigned int i = 0; i < ARRAY_SIZE(chroma_table); i++)
++        if (chroma_table[i].i_chroma_id == img->p.layout &&
++            chroma_table[i].i_bitdepth == img->p.bpc)
++            return chroma_table[i].i_chroma;
++
++    return 0;
++}
++
++static int NewPicture(Dav1dPicture *img, void *cookie)
++{
++    decoder_t *dec = cookie;
++
++    video_format_t *v = &dec->fmt_out.video;
++
++    v->i_visible_width  = img->p.w;
++    v->i_visible_height = img->p.h;
++    v->i_width  = (img->p.w + 0x7F) & ~0x7F;
++    v->i_height = (img->p.h + 0x7F) & ~0x7F;
++
++    if( !v->i_sar_num || !v->i_sar_den )
++    {
++        v->i_sar_num = 1;
++        v->i_sar_den = 1;
++    }
++
++    if(dec->fmt_in.video.primaries == COLOR_PRIMARIES_UNDEF && img->seq_hdr)
++    {
++        v->primaries = iso_23001_8_cp_to_vlc_primaries(img->seq_hdr->pri);
++        v->transfer = iso_23001_8_tc_to_vlc_xfer(img->seq_hdr->trc);
++        v->space = iso_23001_8_mc_to_vlc_coeffs(img->seq_hdr->mtrx);
++        v->b_color_range_full = img->seq_hdr->color_range;
++    }
++
++    v->projection_mode = dec->fmt_in.video.projection_mode;
++    v->multiview_mode = dec->fmt_in.video.multiview_mode;
++    v->pose = dec->fmt_in.video.pose;
++    dec->fmt_out.video.i_chroma = dec->fmt_out.i_codec = FindVlcChroma(img);
++
++    if (decoder_UpdateVideoFormat(dec) == VLC_SUCCESS)
++    {
++        picture_t *pic = decoder_NewPicture(dec);
++        if (likely(pic != NULL))
++        {
++            img->data[0] = pic->p[0].p_pixels;
++            img->stride[0] = pic->p[0].i_pitch;
++            img->data[1] = pic->p[1].p_pixels;
++            img->data[2] = pic->p[2].p_pixels;
++            assert(pic->p[1].i_pitch == pic->p[2].i_pitch);
++            img->stride[1] = pic->p[1].i_pitch;
++            img->allocator_data = pic;
++
++            return 0;
++        }
++    }
++    return -1;
++}
++
++static void FreePicture(Dav1dPicture *data, void *cookie)
++{
++    picture_t *pic = data->allocator_data;
++    decoder_t *dec = cookie;
++    VLC_UNUSED(dec);
++    picture_Release(pic);
++}
++
++/****************************************************************************
++ * Flush: clears decoder between seeks
++ ****************************************************************************/
++
++static void FlushDecoder(decoder_t *dec)
++{
++    decoder_sys_t *p_sys = dec->p_sys;
++    dav1d_flush(p_sys->c);
++}
++
++static void release_block(const uint8_t *buf, void *b)
++{
++    VLC_UNUSED(buf);
++    block_t *block = b;
++    block_Release(block);
++}
++
++/****************************************************************************
++ * Decode: the whole thing
++ ****************************************************************************/
++static int Decode(decoder_t *dec, block_t *block)
++{
++    decoder_sys_t *p_sys = dec->p_sys;
++
++    if (block && block->i_flags & (BLOCK_FLAG_CORRUPTED))
++    {
++        block_Release(block);
++        return VLCDEC_SUCCESS;
++    }
++
++    Dav1dData data;
++    Dav1dData *p_data = NULL;
++
++    if (block)
++    {
++        p_data = &data;
++        if (unlikely(dav1d_data_wrap(&data, block->p_buffer, block->i_buffer,
++                                     release_block, block) != 0))
++        {
++            block_Release(block);
++            return VLCDEC_ECRITICAL;
++        }
++        mtime_t pts = block->i_pts == VLC_TS_INVALID ? block->i_dts : block->i_pts;
++        p_data->m.timestamp = pts;
++    }
++
++    Dav1dPicture img = { 0 };
++
++    int i_ret = VLCDEC_SUCCESS;
++    int res;
++    do {
++        res = dav1d_send_data(p_sys->c, p_data);
++        if (res < 0 && res != -EAGAIN)
++        {
++            msg_Err(dec, "Decoder feed error %d!", res);
++            i_ret = VLC_EGENERIC;
++            break;
++        }
++
++        res = dav1d_get_picture(p_sys->c, &img);
++        if (res == 0)
++        {
++            picture_t *_pic = img.allocator_data;
++            picture_t *pic = picture_Clone(_pic);
++            if (unlikely(pic == NULL))
++            {
++                i_ret = VLC_EGENERIC;
++                picture_Release(_pic);
++                break;
++            }
++            pic->b_progressive = true; /* codec does not support interlacing */
++            pic->date = img.m.timestamp;
++            /* TODO udpate the color primaries and such */
++            decoder_QueueVideo(dec, pic);
++            dav1d_picture_unref(&img);
++        }
++        else if (res != -EAGAIN)
++        {
++            msg_Err(dec, "Decoder error %d!", res);
++            i_ret = VLC_EGENERIC;
++            break;
++        }
++    } while (res == 0 || (p_data && p_data->sz != 0));
++
++
++    return i_ret;
++}
++
++/*****************************************************************************
++ * OpenDecoder: probe the decoder
++ *****************************************************************************/
++static int OpenDecoder(vlc_object_t *p_this)
++{
++    decoder_t *dec = (decoder_t *)p_this;
++
++    if (dec->fmt_in.i_codec != VLC_CODEC_AV1)
++        return VLC_EGENERIC;
++
++    decoder_sys_t *p_sys = vlc_obj_malloc(p_this, sizeof(*p_sys));
++    if (!p_sys)
++        return VLC_ENOMEM;
++
++    dav1d_default_settings(&p_sys->s);
++    p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles");
++    if (p_sys->s.n_tile_threads == 0)
++        p_sys->s.n_tile_threads = VLC_CLIP(vlc_GetCPUCount(), 1, 4);
++    p_sys->s.n_frame_threads = var_InheritInteger(p_this, "dav1d-thread-frames");
++    if (p_sys->s.n_frame_threads == 0)
++        p_sys->s.n_frame_threads = __MAX(1, vlc_GetCPUCount());
++    p_sys->s.allocator.cookie = dec;
++    p_sys->s.allocator.alloc_picture_callback = NewPicture;
++    p_sys->s.allocator.release_picture_callback = FreePicture;
++
++    if (dav1d_open(&p_sys->c, &p_sys->s) < 0)
++    {
++        msg_Err(p_this, "Could not open the Dav1d decoder");
++        return VLC_EGENERIC;
++    }
++
++    msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads",
++            dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads);
++
++    dec->pf_decode = Decode;
++    dec->pf_flush = FlushDecoder;
++    dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1);
++
++    dec->fmt_out.video.i_width = dec->fmt_in.video.i_width;
++    dec->fmt_out.video.i_height = dec->fmt_in.video.i_height;
++    dec->fmt_out.i_codec = VLC_CODEC_I420;
++    dec->p_sys = p_sys;
++
++    if (dec->fmt_in.video.i_sar_num > 0 && dec->fmt_in.video.i_sar_den > 0) {
++        dec->fmt_out.video.i_sar_num = dec->fmt_in.video.i_sar_num;
++        dec->fmt_out.video.i_sar_den = dec->fmt_in.video.i_sar_den;
++    }
++
++    return VLC_SUCCESS;
++}
++
++/*****************************************************************************
++ * CloseDecoder: decoder destruction
++ *****************************************************************************/
++static void CloseDecoder(vlc_object_t *p_this)
++{
++    decoder_t *dec = (decoder_t *)p_this;
++    decoder_sys_t *p_sys = dec->p_sys;
++
++    /* Flush decoder */
++    FlushDecoder(dec);
++
++    dav1d_close(&p_sys->c);
++}
++



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812161746.wBGHkDnJ021223>