From 8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 26 Apr 2018 16:49:15 -0500 Subject: [ffvpx] Update ffvp9/ffvp8 to 3.4.2-release Structure of code was slightly modified so that it should be no longer necessary to re-generate the config_*.h files, greatly simplifying the resync process in the future. --- media/ffvpx/libavcodec/allcodecs.c | 81 +++++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 14 deletions(-) (limited to 'media/ffvpx/libavcodec/allcodecs.c') diff --git a/media/ffvpx/libavcodec/allcodecs.c b/media/ffvpx/libavcodec/allcodecs.c index b592aa3b2..4f34312e6 100644 --- a/media/ffvpx/libavcodec/allcodecs.c +++ b/media/ffvpx/libavcodec/allcodecs.c @@ -25,6 +25,7 @@ */ #include "config.h" +#include "libavutil/thread.h" #include "avcodec.h" #include "version.h" @@ -58,20 +59,14 @@ av_register_codec_parser(&ff_##x##_parser); \ } -void avcodec_register_all(void) +static void register_all(void) { - static int initialized; - - if (initialized) - return; - initialized = 1; - /* hardware accelerators */ - REGISTER_HWACCEL(H263_CUVID, h263_cuvid); REGISTER_HWACCEL(H263_VAAPI, h263_vaapi); REGISTER_HWACCEL(H263_VIDEOTOOLBOX, h263_videotoolbox); REGISTER_HWACCEL(H264_CUVID, h264_cuvid); REGISTER_HWACCEL(H264_D3D11VA, h264_d3d11va); + REGISTER_HWACCEL(H264_D3D11VA2, h264_d3d11va2); REGISTER_HWACCEL(H264_DXVA2, h264_dxva2); REGISTER_HWACCEL(H264_MEDIACODEC, h264_mediacodec); REGISTER_HWACCEL(H264_MMAL, h264_mmal); @@ -83,11 +78,13 @@ void avcodec_register_all(void) REGISTER_HWACCEL(H264_VIDEOTOOLBOX, h264_videotoolbox); REGISTER_HWACCEL(HEVC_CUVID, hevc_cuvid); REGISTER_HWACCEL(HEVC_D3D11VA, hevc_d3d11va); + REGISTER_HWACCEL(HEVC_D3D11VA2, hevc_d3d11va2); REGISTER_HWACCEL(HEVC_DXVA2, hevc_dxva2); REGISTER_HWACCEL(HEVC_MEDIACODEC, hevc_mediacodec); REGISTER_HWACCEL(HEVC_QSV, hevc_qsv); REGISTER_HWACCEL(HEVC_VAAPI, hevc_vaapi); REGISTER_HWACCEL(HEVC_VDPAU, hevc_vdpau); + REGISTER_HWACCEL(HEVC_VIDEOTOOLBOX, hevc_videotoolbox); REGISTER_HWACCEL(MJPEG_CUVID, mjpeg_cuvid); REGISTER_HWACCEL(MPEG1_CUVID, mpeg1_cuvid); REGISTER_HWACCEL(MPEG1_XVMC, mpeg1_xvmc); @@ -96,12 +93,14 @@ void avcodec_register_all(void) REGISTER_HWACCEL(MPEG2_CUVID, mpeg2_cuvid); REGISTER_HWACCEL(MPEG2_XVMC, mpeg2_xvmc); REGISTER_HWACCEL(MPEG2_D3D11VA, mpeg2_d3d11va); + REGISTER_HWACCEL(MPEG2_D3D11VA2, mpeg2_d3d11va2); REGISTER_HWACCEL(MPEG2_DXVA2, mpeg2_dxva2); REGISTER_HWACCEL(MPEG2_MMAL, mpeg2_mmal); REGISTER_HWACCEL(MPEG2_QSV, mpeg2_qsv); REGISTER_HWACCEL(MPEG2_VAAPI, mpeg2_vaapi); REGISTER_HWACCEL(MPEG2_VDPAU, mpeg2_vdpau); REGISTER_HWACCEL(MPEG2_VIDEOTOOLBOX, mpeg2_videotoolbox); + REGISTER_HWACCEL(MPEG2_MEDIACODEC, mpeg2_mediacodec); REGISTER_HWACCEL(MPEG4_CUVID, mpeg4_cuvid); REGISTER_HWACCEL(MPEG4_MEDIACODEC, mpeg4_mediacodec); REGISTER_HWACCEL(MPEG4_MMAL, mpeg4_mmal); @@ -110,6 +109,7 @@ void avcodec_register_all(void) REGISTER_HWACCEL(MPEG4_VIDEOTOOLBOX, mpeg4_videotoolbox); REGISTER_HWACCEL(VC1_CUVID, vc1_cuvid); REGISTER_HWACCEL(VC1_D3D11VA, vc1_d3d11va); + REGISTER_HWACCEL(VC1_D3D11VA2, vc1_d3d11va2); REGISTER_HWACCEL(VC1_DXVA2, vc1_dxva2); REGISTER_HWACCEL(VC1_VAAPI, vc1_vaapi); REGISTER_HWACCEL(VC1_VDPAU, vc1_vdpau); @@ -117,12 +117,15 @@ void avcodec_register_all(void) REGISTER_HWACCEL(VC1_QSV, vc1_qsv); REGISTER_HWACCEL(VP8_CUVID, vp8_cuvid); REGISTER_HWACCEL(VP8_MEDIACODEC, vp8_mediacodec); + REGISTER_HWACCEL(VP8_QSV, vp8_qsv); REGISTER_HWACCEL(VP9_CUVID, vp9_cuvid); REGISTER_HWACCEL(VP9_D3D11VA, vp9_d3d11va); + REGISTER_HWACCEL(VP9_D3D11VA2, vp9_d3d11va2); REGISTER_HWACCEL(VP9_DXVA2, vp9_dxva2); REGISTER_HWACCEL(VP9_MEDIACODEC, vp9_mediacodec); REGISTER_HWACCEL(VP9_VAAPI, vp9_vaapi); REGISTER_HWACCEL(WMV3_D3D11VA, wmv3_d3d11va); + REGISTER_HWACCEL(WMV3_D3D11VA2, wmv3_d3d11va2); REGISTER_HWACCEL(WMV3_DXVA2, wmv3_dxva2); REGISTER_HWACCEL(WMV3_VAAPI, wmv3_vaapi); REGISTER_HWACCEL(WMV3_VDPAU, wmv3_vdpau); @@ -158,6 +161,7 @@ void avcodec_register_all(void) REGISTER_DECODER(CDXL, cdxl); REGISTER_DECODER(CFHD, cfhd); REGISTER_ENCDEC (CINEPAK, cinepak); + REGISTER_DECODER(CLEARVIDEO, clearvideo); REGISTER_ENCDEC (CLJR, cljr); REGISTER_DECODER(CLLC, cllc); REGISTER_ENCDEC (COMFORTNOISE, comfortnoise); @@ -189,24 +193,30 @@ void avcodec_register_all(void) REGISTER_ENCDEC (FFV1, ffv1); REGISTER_ENCDEC (FFVHUFF, ffvhuff); REGISTER_DECODER(FIC, fic); + REGISTER_ENCDEC (FITS, fits); REGISTER_ENCDEC (FLASHSV, flashsv); REGISTER_ENCDEC (FLASHSV2, flashsv2); REGISTER_DECODER(FLIC, flic); REGISTER_ENCDEC (FLV, flv); + REGISTER_DECODER(FMVC, fmvc); REGISTER_DECODER(FOURXM, fourxm); REGISTER_DECODER(FRAPS, fraps); REGISTER_DECODER(FRWU, frwu); REGISTER_DECODER(G2M, g2m); + REGISTER_DECODER(GDV, gdv); REGISTER_ENCDEC (GIF, gif); REGISTER_ENCDEC (H261, h261); REGISTER_ENCDEC (H263, h263); REGISTER_DECODER(H263I, h263i); REGISTER_ENCDEC (H263P, h263p); + REGISTER_DECODER(H263_V4L2M2M, h263_v4l2m2m); REGISTER_DECODER(H264, h264); REGISTER_DECODER(H264_CRYSTALHD, h264_crystalhd); + REGISTER_DECODER(H264_V4L2M2M, h264_v4l2m2m); REGISTER_DECODER(H264_MEDIACODEC, h264_mediacodec); REGISTER_DECODER(H264_MMAL, h264_mmal); REGISTER_DECODER(H264_QSV, h264_qsv); + REGISTER_DECODER(H264_RKMPP, h264_rkmpp); REGISTER_DECODER(H264_VDA, h264_vda); #if FF_API_VDPAU REGISTER_DECODER(H264_VDPAU, h264_vdpau); @@ -214,6 +224,8 @@ void avcodec_register_all(void) REGISTER_ENCDEC (HAP, hap); REGISTER_DECODER(HEVC, hevc); REGISTER_DECODER(HEVC_QSV, hevc_qsv); + REGISTER_DECODER(HEVC_RKMPP, hevc_rkmpp); + REGISTER_DECODER(HEVC_V4L2M2M, hevc_v4l2m2m); REGISTER_DECODER(HNM4_VIDEO, hnm4_video); REGISTER_DECODER(HQ_HQA, hq_hqa); REGISTER_DECODER(HQX, hqx); @@ -248,6 +260,7 @@ void avcodec_register_all(void) REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); REGISTER_ENCDEC (MPEG4, mpeg4); REGISTER_DECODER(MPEG4_CRYSTALHD, mpeg4_crystalhd); + REGISTER_DECODER(MPEG4_V4L2M2M, mpeg4_v4l2m2m); REGISTER_DECODER(MPEG4_MMAL, mpeg4_mmal); #if FF_API_VDPAU REGISTER_DECODER(MPEG4_VDPAU, mpeg4_vdpau); @@ -257,14 +270,18 @@ void avcodec_register_all(void) REGISTER_DECODER(MPEG_VDPAU, mpeg_vdpau); REGISTER_DECODER(MPEG1_VDPAU, mpeg1_vdpau); #endif + REGISTER_DECODER(MPEG1_V4L2M2M, mpeg1_v4l2m2m); REGISTER_DECODER(MPEG2_MMAL, mpeg2_mmal); REGISTER_DECODER(MPEG2_CRYSTALHD, mpeg2_crystalhd); + REGISTER_DECODER(MPEG2_V4L2M2M, mpeg2_v4l2m2m); REGISTER_DECODER(MPEG2_QSV, mpeg2_qsv); + REGISTER_DECODER(MPEG2_MEDIACODEC, mpeg2_mediacodec); REGISTER_DECODER(MSA1, msa1); - REGISTER_DECODER(MSMPEG4_CRYSTALHD, msmpeg4_crystalhd); + REGISTER_DECODER(MSCC, mscc); REGISTER_DECODER(MSMPEG4V1, msmpeg4v1); REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2); REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3); + REGISTER_DECODER(MSMPEG4_CRYSTALHD, msmpeg4_crystalhd); REGISTER_DECODER(MSRLE, msrle); REGISTER_DECODER(MSS1, mss1); REGISTER_DECODER(MSS2, mss2); @@ -282,12 +299,14 @@ void avcodec_register_all(void) REGISTER_ENCDEC (PGM, pgm); REGISTER_ENCDEC (PGMYUV, pgmyuv); REGISTER_DECODER(PICTOR, pictor); + REGISTER_DECODER(PIXLET, pixlet); REGISTER_ENCDEC (PNG, png); REGISTER_ENCDEC (PPM, ppm); REGISTER_ENCDEC (PRORES, prores); REGISTER_ENCODER(PRORES_AW, prores_aw); REGISTER_ENCODER(PRORES_KS, prores_ks); REGISTER_DECODER(PRORES_LGPL, prores_lgpl); + REGISTER_DECODER(PSD, psd); REGISTER_DECODER(PTX, ptx); REGISTER_DECODER(QDRAW, qdraw); REGISTER_DECODER(QPEG, qpeg); @@ -305,6 +324,7 @@ void avcodec_register_all(void) REGISTER_DECODER(RV40, rv40); REGISTER_ENCDEC (S302M, s302m); REGISTER_DECODER(SANM, sanm); + REGISTER_DECODER(SCPR, scpr); REGISTER_DECODER(SCREENPRESSO, screenpresso); REGISTER_DECODER(SDX2_DPCM, sdx2_dpcm); REGISTER_ENCDEC (SGI, sgi); @@ -315,6 +335,8 @@ void avcodec_register_all(void) REGISTER_DECODER(SMVJPEG, smvjpeg); REGISTER_ENCDEC (SNOW, snow); REGISTER_DECODER(SP5X, sp5x); + REGISTER_DECODER(SPEEDHQ, speedhq); + REGISTER_DECODER(SRGC, srgc); REGISTER_ENCDEC (SUNRAST, sunrast); REGISTER_ENCDEC (SVQ1, svq1); REGISTER_DECODER(SVQ3, svq3); @@ -349,6 +371,7 @@ void avcodec_register_all(void) REGISTER_DECODER(VC1IMAGE, vc1image); REGISTER_DECODER(VC1_MMAL, vc1_mmal); REGISTER_DECODER(VC1_QSV, vc1_qsv); + REGISTER_DECODER(VC1_V4L2M2M, vc1_v4l2m2m); REGISTER_ENCODER(VC2, vc2); REGISTER_DECODER(VCR1, vcr1); REGISTER_DECODER(VMDVIDEO, vmdvideo); @@ -360,10 +383,15 @@ void avcodec_register_all(void) REGISTER_DECODER(VP6F, vp6f); REGISTER_DECODER(VP7, vp7); REGISTER_DECODER(VP8, vp8); + REGISTER_DECODER(VP8_RKMPP, vp8_rkmpp); + REGISTER_DECODER(VP8_V4L2M2M, vp8_v4l2m2m); REGISTER_DECODER(VP9, vp9); + REGISTER_DECODER(VP9_RKMPP, vp9_rkmpp); + REGISTER_DECODER(VP9_V4L2M2M, vp9_v4l2m2m); REGISTER_DECODER(VQA, vqa); + REGISTER_DECODER(BITPACKED, bitpacked); REGISTER_DECODER(WEBP, webp); - REGISTER_ENCODER(WRAPPED_AVFRAME, wrapped_avframe); + REGISTER_ENCDEC (WRAPPED_AVFRAME, wrapped_avframe); REGISTER_ENCDEC (WMV1, wmv1); REGISTER_ENCDEC (WMV2, wmv2); REGISTER_DECODER(WMV3, wmv3); @@ -378,6 +406,7 @@ void avcodec_register_all(void) REGISTER_ENCDEC (XBM, xbm); REGISTER_ENCDEC (XFACE, xface); REGISTER_DECODER(XL, xl); + REGISTER_DECODER(XPM, xpm); REGISTER_ENCDEC (XWD, xwd); REGISTER_ENCDEC (Y41P, y41p); REGISTER_DECODER(YLC, ylc); @@ -401,12 +430,15 @@ void avcodec_register_all(void) REGISTER_DECODER(APE, ape); REGISTER_DECODER(ATRAC1, atrac1); REGISTER_DECODER(ATRAC3, atrac3); + REGISTER_DECODER(ATRAC3AL, atrac3al); REGISTER_DECODER(ATRAC3P, atrac3p); + REGISTER_DECODER(ATRAC3PAL, atrac3pal); REGISTER_DECODER(BINKAUDIO_DCT, binkaudio_dct); REGISTER_DECODER(BINKAUDIO_RDFT, binkaudio_rdft); REGISTER_DECODER(BMV_AUDIO, bmv_audio); REGISTER_DECODER(COOK, cook); REGISTER_ENCDEC (DCA, dca); + REGISTER_DECODER(DOLBY_E, dolby_e); REGISTER_DECODER(DSD_LSBF, dsd_lsbf); REGISTER_DECODER(DSD_MSBF, dsd_msbf); REGISTER_DECODER(DSD_LSBF_PLANAR, dsd_lsbf_planar); @@ -444,10 +476,11 @@ void avcodec_register_all(void) REGISTER_DECODER(MPC8, mpc8); REGISTER_ENCDEC (NELLYMOSER, nellymoser); REGISTER_DECODER(ON2AVC, on2avc); - REGISTER_DECODER(OPUS, opus); + REGISTER_ENCDEC (OPUS, opus); REGISTER_DECODER(PAF_AUDIO, paf_audio); REGISTER_DECODER(QCELP, qcelp); REGISTER_DECODER(QDM2, qdm2); + REGISTER_DECODER(QDMC, qdmc); REGISTER_ENCDEC (RA_144, ra_144); REGISTER_DECODER(RA_288, ra_288); REGISTER_DECODER(RALF, ralf); @@ -477,6 +510,8 @@ void avcodec_register_all(void) REGISTER_ENCDEC (PCM_ALAW, pcm_alaw); REGISTER_DECODER(PCM_BLURAY, pcm_bluray); REGISTER_DECODER(PCM_DVD, pcm_dvd); + REGISTER_DECODER(PCM_F16LE, pcm_f16le); + REGISTER_DECODER(PCM_F24LE, pcm_f24le); REGISTER_ENCDEC (PCM_F32BE, pcm_f32be); REGISTER_ENCDEC (PCM_F32LE, pcm_f32le); REGISTER_ENCDEC (PCM_F64BE, pcm_f64be); @@ -508,6 +543,7 @@ void avcodec_register_all(void) REGISTER_DECODER(PCM_ZORK, pcm_zork); /* DPCM codecs */ + REGISTER_DECODER(GREMLIN_DPCM, gremlin_dpcm); REGISTER_DECODER(INTERPLAY_DPCM, interplay_dpcm); REGISTER_ENCDEC (ROQ_DPCM, roq_dpcm); REGISTER_DECODER(SOL_DPCM, sol_dpcm); @@ -528,7 +564,7 @@ void avcodec_register_all(void) REGISTER_DECODER(ADPCM_EA_XAS, adpcm_ea_xas); REGISTER_ENCDEC (ADPCM_G722, adpcm_g722); REGISTER_ENCDEC (ADPCM_G726, adpcm_g726); - REGISTER_DECODER(ADPCM_G726LE, adpcm_g726le); + REGISTER_ENCDEC (ADPCM_G726LE, adpcm_g726le); REGISTER_DECODER(ADPCM_IMA_AMV, adpcm_ima_amv); REGISTER_DECODER(ADPCM_IMA_APC, adpcm_ima_apc); REGISTER_DECODER(ADPCM_IMA_DAT4, adpcm_ima_dat4); @@ -606,7 +642,7 @@ void avcodec_register_all(void) REGISTER_DECODER(LIBOPENCORE_AMRWB, libopencore_amrwb); REGISTER_ENCDEC (LIBOPENJPEG, libopenjpeg); REGISTER_ENCDEC (LIBOPUS, libopus); - REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger); + REGISTER_DECODER(LIBRSVG, librsvg); REGISTER_ENCODER(LIBSHINE, libshine); REGISTER_ENCDEC (LIBSPEEX, libspeex); REGISTER_ENCODER(LIBTHEORA, libtheora); @@ -633,12 +669,13 @@ void avcodec_register_all(void) /* external libraries, that shouldn't be used by default if one of the * above is available */ + REGISTER_ENCODER(H263_V4L2M2M, h263_v4l2m2m); REGISTER_ENCDEC (LIBOPENH264, libopenh264); - REGISTER_DECODER(H263_CUVID, h263_cuvid); REGISTER_DECODER(H264_CUVID, h264_cuvid); REGISTER_ENCODER(H264_NVENC, h264_nvenc); REGISTER_ENCODER(H264_OMX, h264_omx); REGISTER_ENCODER(H264_QSV, h264_qsv); + REGISTER_ENCODER(H264_V4L2M2M, h264_v4l2m2m); REGISTER_ENCODER(H264_VAAPI, h264_vaapi); REGISTER_ENCODER(H264_VIDEOTOOLBOX, h264_videotoolbox); #if FF_API_NVENC_OLD_NAME @@ -650,6 +687,7 @@ void avcodec_register_all(void) REGISTER_DECODER(HEVC_MEDIACODEC, hevc_mediacodec); REGISTER_ENCODER(HEVC_NVENC, hevc_nvenc); REGISTER_ENCODER(HEVC_QSV, hevc_qsv); + REGISTER_ENCODER(HEVC_V4L2M2M, hevc_v4l2m2m); REGISTER_ENCODER(HEVC_VAAPI, hevc_vaapi); REGISTER_ENCODER(LIBKVAZAAR, libkvazaar); REGISTER_DECODER(MJPEG_CUVID, mjpeg_cuvid); @@ -657,13 +695,19 @@ void avcodec_register_all(void) REGISTER_DECODER(MPEG1_CUVID, mpeg1_cuvid); REGISTER_DECODER(MPEG2_CUVID, mpeg2_cuvid); REGISTER_ENCODER(MPEG2_QSV, mpeg2_qsv); + REGISTER_ENCODER(MPEG2_VAAPI, mpeg2_vaapi); REGISTER_DECODER(MPEG4_CUVID, mpeg4_cuvid); REGISTER_DECODER(MPEG4_MEDIACODEC, mpeg4_mediacodec); + REGISTER_ENCODER(MPEG4_V4L2M2M, mpeg4_v4l2m2m); REGISTER_DECODER(VC1_CUVID, vc1_cuvid); REGISTER_DECODER(VP8_CUVID, vp8_cuvid); REGISTER_DECODER(VP8_MEDIACODEC, vp8_mediacodec); + REGISTER_DECODER(VP8_QSV, vp8_qsv); + REGISTER_ENCODER(VP8_V4L2M2M, vp8_v4l2m2m); + REGISTER_ENCODER(VP8_VAAPI, vp8_vaapi); REGISTER_DECODER(VP9_CUVID, vp9_cuvid); REGISTER_DECODER(VP9_MEDIACODEC, vp9_mediacodec); + REGISTER_ENCODER(VP9_VAAPI, vp9_vaapi); /* parsers */ REGISTER_PARSER(AAC, aac); @@ -698,10 +742,19 @@ void avcodec_register_all(void) REGISTER_PARSER(PNM, pnm); REGISTER_PARSER(RV30, rv30); REGISTER_PARSER(RV40, rv40); + REGISTER_PARSER(SIPR, sipr); REGISTER_PARSER(TAK, tak); REGISTER_PARSER(VC1, vc1); REGISTER_PARSER(VORBIS, vorbis); REGISTER_PARSER(VP3, vp3); REGISTER_PARSER(VP8, vp8); REGISTER_PARSER(VP9, vp9); + REGISTER_PARSER(XMA, xma); +} + +void avcodec_register_all(void) +{ + static AVOnce control = AV_ONCE_INIT; + + ff_thread_once(&control, register_all); } -- cgit v1.2.3