Index: configure
===================================================================
--- configure	(revision 38140)
+++ configure	(working copy)
@@ -797,6 +797,7 @@
 _joystick=no
 crystalhd=auto
 _xvid=auto
+_libdav1d=auto
 _xvid_lavc=auto
 _x264=auto
 _x264_lavc=auto
@@ -1249,6 +1250,8 @@
   --disable-xvid)       _xvid=no        ;;
   --enable-xvid-lavc)   _xvid_lavc=yes  ;;
   --disable-xvid-lavc)  _xvid_lavc=no   ;;
+  --enable-libdav1d)   _libdav1d=yes  ;;
+  --disable-libdav1d)  _libdav1d=no   ;;
   --enable-x264)        _x264=yes       ;;
   --disable-x264)       _x264=no        ;;
   --enable-x264-lavc)   _x264_lavc=yes  ;;
@@ -7405,6 +7408,25 @@
 fi
 echores "$_xvid"
 
+echocheck "libdav1d"
+if test "$_libdav1d" = auto && test "$ffmpeg_a" = yes ; then
+  _libdav1d=no
+  header_check dav1d/dav1d.h -ldav1d $ld_dl $ld_pthread && _libdav1d=yes
+fi
+
+if test "$_libdav1d" = yes && test "$ffmpeg_a" = yes; then
+  def_libdav1d='#define CONFIG_LIBDAV1D 1'
+  libavdecoders="$libavdecoders LIBDAV1D_DECODER"
+  extra_ldflags="$extra_ldflags -ldav1d"
+else
+  def_libdav1d='#undef CONFIG_LIBDAV1D'
+  #nocodecmodules="libdav1d $nocodecmodules"
+fi
+echores "$_libdav1d"
+
+
+
+
 echocheck "Xvid two pass plugin"
 if test "$_mencoder" = yes && test "$_xvid" = yes && test "$_xvid_lavc" = auto ; then
   statement_check xvid.h 'xvid_plugin_2pass2_t s; s.vbv_size = 0' && _xvid_lavc=yes
Index: etc/codecs.conf
===================================================================
--- etc/codecs.conf	(revision 38140)
+++ etc/codecs.conf	(working copy)
@@ -8,6 +8,14 @@
 ;=============================================================================
 ;                   VIDEO CODECS
 ;=============================================================================
+videocodec av1
+  info "AV1"
+  status working
+  driver ffmpeg
+  dll libdav1d
+  format 0x31305641
+  format 0x31307661
+  out YV12
 
 videocodec ffiff
   info "FFmpeg IFF ANIM/ILBM/PBM/RGB8/RGBN"
