diff --git a/config/external/gkcodecs/gkcodecs.symbols b/config/external/gkcodecs/gkcodecs.symbols index 406bd4fe24ba..b30f6a958abd 100644 --- a/config/external/gkcodecs/gkcodecs.symbols +++ b/config/external/gkcodecs/gkcodecs.symbols @@ -75,6 +75,7 @@ vorbis_synthesis_pcmout vorbis_synthesis_read vorbis_synthesis_restart #ifndef MOZ_SYSTEM_LIBVPX +vpx_codec_build_config vpx_codec_control_ vpx_codec_dec_init_ver vpx_codec_decode @@ -91,6 +92,8 @@ vpx_codec_get_caps vpx_codec_get_cx_data vpx_codec_get_frame vpx_codec_set_frame_buffer_functions +vpx_codec_version +vpx_codec_version_str vpx_codec_vp8_cx vpx_codec_vp8_dx vpx_codec_vp9_cx diff --git a/media/ffvpx/config_components_audio_video.h b/media/ffvpx/config_components_audio_video.h index e7691ef4a67a..d83eccbf848b 100644 --- a/media/ffvpx/config_components_audio_video.h +++ b/media/ffvpx/config_components_audio_video.h @@ -588,8 +588,8 @@ #define CONFIG_LIBSPEEX_DECODER 0 #define CONFIG_LIBUAVS3D_DECODER 0 #define CONFIG_LIBVORBIS_DECODER 1 -#define CONFIG_LIBVPX_VP8_DECODER 0 -#define CONFIG_LIBVPX_VP9_DECODER 0 +#define CONFIG_LIBVPX_VP8_DECODER 1 +#define CONFIG_LIBVPX_VP9_DECODER 1 #define CONFIG_LIBZVBI_TELETEXT_DECODER 0 #define CONFIG_BINTEXT_DECODER 0 #define CONFIG_XBIN_DECODER 0 @@ -819,8 +819,8 @@ #define CONFIG_LIBTWOLAME_ENCODER 0 #define CONFIG_LIBVO_AMRWBENC_ENCODER 0 #define CONFIG_LIBVORBIS_ENCODER 0 -#define CONFIG_LIBVPX_VP8_ENCODER 0 -#define CONFIG_LIBVPX_VP9_ENCODER 0 +#define CONFIG_LIBVPX_VP8_ENCODER 1 +#define CONFIG_LIBVPX_VP9_ENCODER 1 #define CONFIG_LIBWEBP_ANIM_ENCODER 0 #define CONFIG_LIBWEBP_ENCODER 0 #define CONFIG_LIBX262_ENCODER 0 diff --git a/media/ffvpx/config_unix64.h b/media/ffvpx/config_unix64.h index dce3ed7f0885..7d63f4740918 100644 --- a/media/ffvpx/config_unix64.h +++ b/media/ffvpx/config_unix64.h @@ -1,7 +1,7 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -#define FFMPEG_CONFIGURATION "--disable-all --enable-avcodec --enable-decoder='vp8,vp9,mp3,flac,av1' --enable-parser='vp8,vp9' --disable-static --enable-shared --disable-autodetect --disable-iconv --enable-vaapi --enable-hwaccel='vp9_vaapi,vp8_vaapi,av1_vaapi' --enable-libdav1d" +#define FFMPEG_CONFIGURATION "--disable-all --enable-avcodec --enable-decoder='vp8,vp9,mp3,flac,av1' --enable-parser='vp8,vp9' --disable-static --enable-shared --disable-autodetect --disable-iconv --enable-vaapi --enable-hwaccel='vp9_vaapi,vp8_vaapi,av1_vaapi' --enable-libdav1d --enable-libvpx" #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2022 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" @@ -10,7 +10,7 @@ #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" -#define EXTERN_ASM +#define EXTERN_ASM #define BUILDSUF "" #define SLIBSUF ".so" #define HAVE_MMX2 HAVE_MMXEXT @@ -523,7 +523,7 @@ #define CONFIG_LIBV4L2 0 #define CONFIG_LIBVMAF 0 #define CONFIG_LIBVORBIS 0 -#define CONFIG_LIBVPX 0 +#define CONFIG_LIBVPX 1 #define CONFIG_LIBWEBP 0 #define CONFIG_LIBXML2 0 #define CONFIG_LIBZIMG 0 diff --git a/media/ffvpx/libavcodec/codec_list.c b/media/ffvpx/libavcodec/codec_list.c index 60df66a4b759..f1dc87528a71 100644 --- a/media/ffvpx/libavcodec/codec_list.c +++ b/media/ffvpx/libavcodec/codec_list.c @@ -43,5 +43,17 @@ static const FFCodec * const codec_list[] = { #endif #if CONFIG_LIBOPUS_DECODER &ff_libopus_decoder, +#endif +#if CONFIG_LIBVPX_VP8_DECODER + &ff_libvpx_vp8_decoder, +#endif +#if CONFIG_LIBVPX_VP9_DECODER + &ff_libvpx_vp9_decoder, +#endif +#if CONFIG_LIBVPX_VP8_ENCODER + &ff_libvpx_vp8_encoder, +#endif +#if CONFIG_LIBVPX_VP9_ENCODER + &ff_libvpx_vp9_encoder, #endif NULL }; diff --git a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build index 845d0030229c..a289771c96fe 100644 --- a/media/ffvpx/libavcodec/moz.build +++ b/media/ffvpx/libavcodec/moz.build @@ -51,6 +51,8 @@ SOURCES += [ 'libopus.c', 'libopusdec.c', 'libvorbisdec.c', + 'libvpxdec.c', + 'libvpxenc.c', 'log2_tab.c', 'mpegaudio.c', 'mpegaudiodata.c', @@ -139,6 +141,12 @@ LOCAL_INCLUDES += [ '/media/libvorbis', ] +if not CONFIG["MOZ_SYSTEM_LIBVPX"]: + LOCAL_INCLUDES += ['/media/libvpx'] +else: + CXXFLAGS += CONFIG["MOZ_LIBVPX_CFLAGS"] + OS_LIBS += CONFIG["MOZ_LIBVPX_LIBS"] + if CONFIG['MOZ_LIBAV_FFT']: SOURCES += [ 'avfft.c', diff --git a/media/ffvpx/libavutil/avutil.symbols b/media/ffvpx/libavutil/avutil.symbols index 4d4be3affa14..e07ca3cc57ce 100644 --- a/media/ffvpx/libavutil/avutil.symbols +++ b/media/ffvpx/libavutil/avutil.symbols @@ -3,6 +3,10 @@ av_add_stable av_append_path_component av_asprintf av_basename +#ifndef MOZ_FFVPX_AUDIOONLY +av_base64_decode +av_base64_encode +#endif av_bprint_append_data av_bprint_channel_layout av_bprint_chars @@ -89,6 +93,7 @@ av_fifo_alloc2 av_fifo_alloc_array av_fifo_can_read av_fifo_drain +av_fifo_drain2 av_fifo_free av_fifo_freep av_fifo_freep2 @@ -96,6 +101,7 @@ av_fifo_generic_peek av_fifo_generic_read av_fifo_generic_write av_fifo_grow +av_fifo_peek av_fifo_realloc2 av_fifo_read av_fifo_reset