forked from pool/ffmpeg-4
- Update to FFmpeg 4.2 "Ada"
* tpad filter * AV1 decoding support through libdav1d * dedot filter * chromashift and rgbashift filters * freezedetect filter * truehd_core bitstream filter * dhav demuxer * PCM-DVD encoder * GIF parser * vividas demuxer * hymt decoder * anlmdn filter * maskfun filter * hcom demuxer and decoder * ARBC decoder * libaribb24 based ARIB STD-B24 caption support (profiles A and C) * Support decoding of HEVC 4:4:4 content in nvdec and cuviddec * removed libndi-newtek * agm decoder * KUX demuxer * AV1 frame split bitstream filter * lscr decoder * lagfun filter * asoftclip filter * Support decoding of HEVC 4:4:4 content in vdpau * colorhold filter * xmedian filter * asr filter * showspatial multimedia filter OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=79
This commit is contained in:
parent
b16c4df73c
commit
75def20b77
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f1f049a82fcfbf156564e73a3935d7e750891fab2abf302e735104fd4050a7e1
|
|
||||||
size 8896056
|
|
@ -1,11 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1
|
|
||||||
|
|
||||||
iQEcBAABAgAGBQJdI4g3AAoJELQyLwTWdljYYCsH/Az8GoYNVbtqJBI2tJhwhVBt
|
|
||||||
lwTbKST1ONBBZlP9FNI2V7r/OAvEfw/r+hKi8SS/ody7fyPMijDJxSIhiG9dfPEa
|
|
||||||
647x1Pq6/tzmvMeKztrPnPSih3zdJ0VC1q826TnSgnziZ6VNjHOzVjnt2oagJ4Cz
|
|
||||||
S+KblJiIW0+zI1AZoOdZU3NlYnwXZ4FcZPAcRjA1RHvrLp2LhtnL6sIO+0fpps7T
|
|
||||||
TXJKy9BywcFi8pBNLC781BGvPpVWA4rtwf7waMMw6kEyeVHH1qkn9pKGFIA5sMAf
|
|
||||||
mZTDv63rJUtHdG8uqXJ5sPcrLUYzoQ4oqbGIagLH0TZLmnqidxYlOSycB0c5/OA=
|
|
||||||
=wTin
|
|
||||||
-----END PGP SIGNATURE-----
|
|
@ -1,8 +1,8 @@
|
|||||||
Index: ffmpeg-4.1.3/configure
|
Index: ffmpeg-4.2/configure
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/configure
|
--- ffmpeg-4.2.orig/configure
|
||||||
+++ ffmpeg-4.1.3/configure
|
+++ ffmpeg-4.2/configure
|
||||||
@@ -231,6 +231,7 @@ External library support:
|
@@ -232,6 +232,7 @@ External library support:
|
||||||
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
|
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
|
||||||
and libraw1394 [no]
|
and libraw1394 [no]
|
||||||
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
|
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
|
||||||
@ -10,7 +10,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
--enable-libflite enable flite (voice synthesis) support via libflite [no]
|
--enable-libflite enable flite (voice synthesis) support via libflite [no]
|
||||||
--enable-libfontconfig enable libfontconfig, useful for drawtext filter [no]
|
--enable-libfontconfig enable libfontconfig, useful for drawtext filter [no]
|
||||||
--enable-libfreetype enable libfreetype, needed for drawtext filter [no]
|
--enable-libfreetype enable libfreetype, needed for drawtext filter [no]
|
||||||
@@ -245,8 +246,11 @@ External library support:
|
@@ -246,8 +247,11 @@ External library support:
|
||||||
--enable-liblensfun enable lensfun lens correction [no]
|
--enable-liblensfun enable lensfun lens correction [no]
|
||||||
--enable-libmodplug enable ModPlug via libmodplug [no]
|
--enable-libmodplug enable ModPlug via libmodplug [no]
|
||||||
--enable-libmp3lame enable MP3 encoding via libmp3lame [no]
|
--enable-libmp3lame enable MP3 encoding via libmp3lame [no]
|
||||||
@ -22,7 +22,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
--enable-libopencv enable video filtering via libopencv [no]
|
--enable-libopencv enable video filtering via libopencv [no]
|
||||||
--enable-libopenh264 enable H.264 encoding via OpenH264 [no]
|
--enable-libopenh264 enable H.264 encoding via OpenH264 [no]
|
||||||
--enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
|
--enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
|
||||||
@@ -280,7 +284,9 @@ External library support:
|
@@ -281,7 +285,9 @@ External library support:
|
||||||
--enable-libwavpack enable wavpack encoding via libwavpack [no]
|
--enable-libwavpack enable wavpack encoding via libwavpack [no]
|
||||||
--enable-libwebp enable WebP encoding via libwebp [no]
|
--enable-libwebp enable WebP encoding via libwebp [no]
|
||||||
--enable-libx264 enable H.264 encoding via x264 [no]
|
--enable-libx264 enable H.264 encoding via x264 [no]
|
||||||
@ -32,7 +32,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
--enable-libxavs enable AVS encoding via xavs [no]
|
--enable-libxavs enable AVS encoding via xavs [no]
|
||||||
--enable-libxavs2 enable AVS2 encoding via xavs2 [no]
|
--enable-libxavs2 enable AVS2 encoding via xavs2 [no]
|
||||||
--enable-libxcb enable X11 grabbing using XCB [autodetect]
|
--enable-libxcb enable X11 grabbing using XCB [autodetect]
|
||||||
@@ -289,6 +295,7 @@ External library support:
|
@@ -290,6 +296,7 @@ External library support:
|
||||||
--enable-libxcb-shape enable X11 grabbing shape rendering [autodetect]
|
--enable-libxcb-shape enable X11 grabbing shape rendering [autodetect]
|
||||||
--enable-libxvid enable Xvid encoding via xvidcore,
|
--enable-libxvid enable Xvid encoding via xvidcore,
|
||||||
native MPEG-4/Xvid encoder exists [no]
|
native MPEG-4/Xvid encoder exists [no]
|
||||||
@ -40,7 +40,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
--enable-libxml2 enable XML parsing using the C library libxml2, needed
|
--enable-libxml2 enable XML parsing using the C library libxml2, needed
|
||||||
for dash demuxing support [no]
|
for dash demuxing support [no]
|
||||||
--enable-libzimg enable z.lib, needed for zscale filter [no]
|
--enable-libzimg enable z.lib, needed for zscale filter [no]
|
||||||
@@ -1667,16 +1674,20 @@ EXTERNAL_LIBRARY_GPL_LIST="
|
@@ -1715,15 +1722,19 @@ EXTERNAL_LIBRARY_GPL_LIST="
|
||||||
librubberband
|
librubberband
|
||||||
libvidstab
|
libvidstab
|
||||||
libx264
|
libx264
|
||||||
@ -55,14 +55,13 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
|
|
||||||
EXTERNAL_LIBRARY_NONFREE_LIST="
|
EXTERNAL_LIBRARY_NONFREE_LIST="
|
||||||
decklink
|
decklink
|
||||||
libndi_newtek
|
|
||||||
libfdk_aac
|
libfdk_aac
|
||||||
+ libfdk_aac_dlopen
|
+ libfdk_aac_dlopen
|
||||||
openssl
|
openssl
|
||||||
libtls
|
libtls
|
||||||
"
|
"
|
||||||
@@ -1685,7 +1696,9 @@ EXTERNAL_LIBRARY_VERSION3_LIST="
|
@@ -1733,7 +1744,9 @@ EXTERNAL_LIBRARY_VERSION3_LIST="
|
||||||
gmp
|
libaribb24
|
||||||
liblensfun
|
liblensfun
|
||||||
libopencore_amrnb
|
libopencore_amrnb
|
||||||
+ libopencore_amrnb_dlopen
|
+ libopencore_amrnb_dlopen
|
||||||
@ -71,7 +70,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
libvmaf
|
libvmaf
|
||||||
libvo_amrwbenc
|
libvo_amrwbenc
|
||||||
mbedtls
|
mbedtls
|
||||||
@@ -1729,6 +1742,7 @@ EXTERNAL_LIBRARY_LIST="
|
@@ -1777,6 +1790,7 @@ EXTERNAL_LIBRARY_LIST="
|
||||||
libkvazaar
|
libkvazaar
|
||||||
libmodplug
|
libmodplug
|
||||||
libmp3lame
|
libmp3lame
|
||||||
@ -79,7 +78,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
libmysofa
|
libmysofa
|
||||||
libopencv
|
libopencv
|
||||||
libopenh264
|
libopenh264
|
||||||
@@ -6079,6 +6093,7 @@ enabled libdrm && require_pkg
|
@@ -6203,6 +6217,7 @@ enabled libdrm && require_pkg
|
||||||
enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
|
enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
|
||||||
{ require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
|
{ require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
|
||||||
warn "using libfdk without pkg-config"; } }
|
warn "using libfdk without pkg-config"; } }
|
||||||
@ -87,7 +86,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
|
flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
|
||||||
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
|
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
|
||||||
enabled fontconfig && enable libfontconfig
|
enabled fontconfig && enable libfontconfig
|
||||||
@@ -6104,13 +6119,16 @@ enabled libmfx && { check_pkg
|
@@ -6228,13 +6243,16 @@ enabled libmfx && { check_pkg
|
||||||
{ require libmfx "mfx/mfxvideo.h" MFXInit "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } }
|
{ require libmfx "mfx/mfxvideo.h" MFXInit "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } }
|
||||||
enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
|
enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
|
||||||
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
|
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
|
||||||
@ -104,7 +103,7 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
enabled libopencv && { check_headers opencv2/core/core_c.h &&
|
enabled libopencv && { check_headers opencv2/core/core_c.h &&
|
||||||
{ check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
|
{ check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
|
||||||
require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
|
require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
|
||||||
@@ -6186,11 +6204,14 @@ enabled libx264 && { check_pkg
|
@@ -6308,11 +6326,14 @@ enabled libx264 && { check_pkg
|
||||||
warn "using libx264 without pkg-config"; } } &&
|
warn "using libx264 without pkg-config"; } } &&
|
||||||
require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
|
require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
|
||||||
check_cpp_condition libx262 x264.h "X264_MPEG2"
|
check_cpp_condition libx262 x264.h "X264_MPEG2"
|
||||||
@ -113,16 +112,16 @@ Index: ffmpeg-4.1.3/configure
|
|||||||
require_cpp_condition libx265 x265.h "X265_BUILD >= 68"
|
require_cpp_condition libx265 x265.h "X265_BUILD >= 68"
|
||||||
+enabled libx265_dlopen && enable libx265
|
+enabled libx265_dlopen && enable libx265
|
||||||
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
|
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
|
||||||
enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.2.77" "stdint.h xavs2.h" xavs2_api_get
|
enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get
|
||||||
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
|
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
|
||||||
+enabled libxvid_dlopen && enable libxvid
|
+enabled libxvid_dlopen && enable libxvid
|
||||||
enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version
|
enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version
|
||||||
enabled libzmq && require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
|
enabled libzmq && require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
|
||||||
enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
|
enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
|
||||||
Index: ffmpeg-4.1.3/libavcodec/dlopen.h
|
Index: ffmpeg-4.2/libavcodec/dlopen.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ ffmpeg-4.1.3/libavcodec/dlopen.h
|
+++ ffmpeg-4.2/libavcodec/dlopen.h
|
||||||
@@ -0,0 +1,13 @@
|
@@ -0,0 +1,13 @@
|
||||||
+#ifndef LOCALINC_DLOPEN_H
|
+#ifndef LOCALINC_DLOPEN_H
|
||||||
+#define LOCALINC_DLOPEN_H
|
+#define LOCALINC_DLOPEN_H
|
||||||
@ -137,11 +136,11 @@ Index: ffmpeg-4.1.3/libavcodec/dlopen.h
|
|||||||
+ goto error;
|
+ goto error;
|
||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libfdk-aacdec.c
|
Index: ffmpeg-4.2/libavcodec/libfdk-aacdec.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/libfdk-aacdec.c
|
--- ffmpeg-4.2.orig/libavcodec/libfdk-aacdec.c
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libfdk-aacdec.c
|
+++ ffmpeg-4.2/libavcodec/libfdk-aacdec.c
|
||||||
@@ -37,6 +39,54 @@
|
@@ -37,6 +37,54 @@
|
||||||
#define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
|
#define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -196,7 +195,7 @@ Index: ffmpeg-4.1.3/libavcodec/libfdk-aacdec.c
|
|||||||
enum ConcealMethod {
|
enum ConcealMethod {
|
||||||
CONCEAL_METHOD_SPECTRAL_MUTING = 0,
|
CONCEAL_METHOD_SPECTRAL_MUTING = 0,
|
||||||
CONCEAL_METHOD_NOISE_SUBSTITUTION = 1,
|
CONCEAL_METHOD_NOISE_SUBSTITUTION = 1,
|
||||||
@@ -224,6 +274,11 @@ static av_cold int fdk_aac_decode_init(A
|
@@ -224,6 +272,11 @@ static av_cold int fdk_aac_decode_init(A
|
||||||
FDKAACDecContext *s = avctx->priv_data;
|
FDKAACDecContext *s = avctx->priv_data;
|
||||||
AAC_DECODER_ERROR err;
|
AAC_DECODER_ERROR err;
|
||||||
|
|
||||||
@ -208,10 +207,10 @@ Index: ffmpeg-4.1.3/libavcodec/libfdk-aacdec.c
|
|||||||
s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1);
|
s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1);
|
||||||
if (!s->handle) {
|
if (!s->handle) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n");
|
av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n");
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libfdk-aacenc.c
|
Index: ffmpeg-4.2/libavcodec/libfdk-aacenc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/libfdk-aacenc.c
|
--- ffmpeg-4.2.orig/libavcodec/libfdk-aacenc.c
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libfdk-aacenc.c
|
+++ ffmpeg-4.2/libavcodec/libfdk-aacenc.c
|
||||||
@@ -34,6 +34,48 @@
|
@@ -34,6 +34,48 @@
|
||||||
#define FDKENC_VER_AT_LEAST(vl0, vl1) 0
|
#define FDKENC_VER_AT_LEAST(vl0, vl1) 0
|
||||||
#endif
|
#endif
|
||||||
@ -273,10 +272,10 @@ Index: ffmpeg-4.1.3/libavcodec/libfdk-aacenc.c
|
|||||||
if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
|
if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
|
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
|
||||||
aac_get_error(err));
|
aac_get_error(err));
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libmp3lame.c
|
Index: ffmpeg-4.2/libavcodec/libmp3lame.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/libmp3lame.c
|
--- ffmpeg-4.2.orig/libavcodec/libmp3lame.c
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libmp3lame.c
|
+++ ffmpeg-4.2/libavcodec/libmp3lame.c
|
||||||
@@ -38,6 +38,145 @@
|
@@ -38,6 +38,145 @@
|
||||||
#include "mpegaudio.h"
|
#include "mpegaudio.h"
|
||||||
#include "mpegaudiodecheader.h"
|
#include "mpegaudiodecheader.h"
|
||||||
@ -435,10 +434,10 @@ Index: ffmpeg-4.1.3/libavcodec/libmp3lame.c
|
|||||||
s->avctx = avctx;
|
s->avctx = avctx;
|
||||||
|
|
||||||
/* initialize LAME and get defaults */
|
/* initialize LAME and get defaults */
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libopencore-amr.c
|
Index: ffmpeg-4.2/libavcodec/libopencore-amr.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/libopencore-amr.c
|
--- ffmpeg-4.2.orig/libavcodec/libopencore-amr.c
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libopencore-amr.c
|
+++ ffmpeg-4.2/libavcodec/libopencore-amr.c
|
||||||
@@ -29,6 +29,108 @@
|
@@ -29,6 +29,108 @@
|
||||||
#include "audio_frame_queue.h"
|
#include "audio_frame_queue.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
@ -593,13 +592,13 @@ Index: ffmpeg-4.1.3/libavcodec/libopencore-amr.c
|
|||||||
s->state = D_IF_init();
|
s->state = D_IF_init();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libx264.c
|
Index: ffmpeg-4.2/libavcodec/libx264.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/libx264.c
|
--- ffmpeg-4.2.orig/libavcodec/libx264.c
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libx264.c
|
+++ ffmpeg-4.2/libavcodec/libx264.c
|
||||||
@@ -40,6 +40,120 @@
|
@@ -44,6 +44,120 @@
|
||||||
#include <stdlib.h>
|
// blocks of pixels (with respect to the luma plane)
|
||||||
#include <string.h>
|
#define MB_SIZE 16
|
||||||
|
|
||||||
+#ifdef CONFIG_LIBX264_DLOPEN
|
+#ifdef CONFIG_LIBX264_DLOPEN
|
||||||
+#include "dlopen.h"
|
+#include "dlopen.h"
|
||||||
@ -718,7 +717,7 @@ Index: ffmpeg-4.1.3/libavcodec/libx264.c
|
|||||||
typedef struct X264Context {
|
typedef struct X264Context {
|
||||||
AVClass *class;
|
AVClass *class;
|
||||||
x264_param_t params;
|
x264_param_t params;
|
||||||
@@ -468,6 +582,11 @@ static av_cold int X264_init(AVCodecCont
|
@@ -555,6 +669,11 @@ static av_cold int X264_init(AVCodecCont
|
||||||
if (avctx->global_quality > 0)
|
if (avctx->global_quality > 0)
|
||||||
av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is recommended.\n");
|
av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is recommended.\n");
|
||||||
|
|
||||||
@ -730,10 +729,10 @@ Index: ffmpeg-4.1.3/libavcodec/libx264.c
|
|||||||
#if CONFIG_LIBX262_ENCODER
|
#if CONFIG_LIBX262_ENCODER
|
||||||
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
|
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
|
||||||
x4->params.b_mpeg2 = 1;
|
x4->params.b_mpeg2 = 1;
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libx265.c
|
Index: ffmpeg-4.2/libavcodec/libx265.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/libx265.c
|
--- ffmpeg-4.2.orig/libavcodec/libx265.c
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libx265.c
|
+++ ffmpeg-4.2/libavcodec/libx265.c
|
||||||
@@ -34,6 +34,39 @@
|
@@ -34,6 +34,39 @@
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
@ -774,7 +773,7 @@ Index: ffmpeg-4.1.3/libavcodec/libx265.c
|
|||||||
typedef struct libx265Context {
|
typedef struct libx265Context {
|
||||||
const AVClass *class;
|
const AVClass *class;
|
||||||
|
|
||||||
@@ -417,6 +450,10 @@ static const enum AVPixelFormat x265_csp
|
@@ -514,6 +547,10 @@ static const enum AVPixelFormat x265_csp
|
||||||
|
|
||||||
static av_cold void libx265_encode_init_csp(AVCodec *codec)
|
static av_cold void libx265_encode_init_csp(AVCodec *codec)
|
||||||
{
|
{
|
||||||
@ -785,10 +784,10 @@ Index: ffmpeg-4.1.3/libavcodec/libx265.c
|
|||||||
if (x265_api_get(12))
|
if (x265_api_get(12))
|
||||||
codec->pix_fmts = x265_csp_twelve;
|
codec->pix_fmts = x265_csp_twelve;
|
||||||
else if (x265_api_get(10))
|
else if (x265_api_get(10))
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libxvid.c
|
Index: ffmpeg-4.2/libavcodec/libxvid.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/libxvid.c
|
--- ffmpeg-4.2.orig/libavcodec/libxvid.c
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libxvid.c
|
+++ ffmpeg-4.2/libavcodec/libxvid.c
|
||||||
@@ -51,6 +51,61 @@
|
@@ -51,6 +51,61 @@
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
3
ffmpeg-4.2.tar.xz
Normal file
3
ffmpeg-4.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:023f10831a97ad93d798f53a3640e55cd564abfeba807ecbe8524dac4fedecd5
|
||||||
|
size 9088756
|
11
ffmpeg-4.2.tar.xz.asc
Normal file
11
ffmpeg-4.2.tar.xz.asc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1
|
||||||
|
|
||||||
|
iQEcBAABAgAGBQJdSJwGAAoJELQyLwTWdljYHXsIAJ5pXCQtJTZGBWDnIAqEiuJl
|
||||||
|
tk9UIFhptnHkQzAXLy1BxDa76MkI0MV9zvy5rl6BPyfWNhUPcvtgptQFTMLiCiub
|
||||||
|
FdIHwsTEgjRX1YqD8zwS4zsULXxGzXj3uR15zr5eJKueEjpq1NJtujUY88CkHGx3
|
||||||
|
hjR8y6oGxCM/SMNctD1HCZNoT2E3g3/wyW+M6+OcYAkRSI8Igf6XTFqvQHefQoUW
|
||||||
|
D227cAqJ1a9Ld1EwG30rZct4V22Wo4dUcfgNWU5eLu4xDaYiIeqRnsgqVH2kutXU
|
||||||
|
94vAFNLqj67D1atMzOyVRJf09XIpqeYTzJuOqyDdRLrM5GCO1a+7zEqx3ms+Jfk=
|
||||||
|
=3kLA
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +1,52 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 6 15:35:35 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
|
||||||
|
|
||||||
|
- Update to FFmpeg 4.2 "Ada"
|
||||||
|
* tpad filter
|
||||||
|
* AV1 decoding support through libdav1d
|
||||||
|
* dedot filter
|
||||||
|
* chromashift and rgbashift filters
|
||||||
|
* freezedetect filter
|
||||||
|
* truehd_core bitstream filter
|
||||||
|
* dhav demuxer
|
||||||
|
* PCM-DVD encoder
|
||||||
|
* GIF parser
|
||||||
|
* vividas demuxer
|
||||||
|
* hymt decoder
|
||||||
|
* anlmdn filter
|
||||||
|
* maskfun filter
|
||||||
|
* hcom demuxer and decoder
|
||||||
|
* ARBC decoder
|
||||||
|
* libaribb24 based ARIB STD-B24 caption support (profiles A and C)
|
||||||
|
* Support decoding of HEVC 4:4:4 content in nvdec and cuviddec
|
||||||
|
* removed libndi-newtek
|
||||||
|
* agm decoder
|
||||||
|
* KUX demuxer
|
||||||
|
* AV1 frame split bitstream filter
|
||||||
|
* lscr decoder
|
||||||
|
* lagfun filter
|
||||||
|
* asoftclip filter
|
||||||
|
* Support decoding of HEVC 4:4:4 content in vdpau
|
||||||
|
* colorhold filter
|
||||||
|
* xmedian filter
|
||||||
|
* asr filter
|
||||||
|
* showspatial multimedia filter
|
||||||
|
* VP4 video decoder
|
||||||
|
* IFV demuxer
|
||||||
|
* derain filter
|
||||||
|
* deesser filter
|
||||||
|
* mov muxer writes tracks with unspecified language instead
|
||||||
|
of English by default
|
||||||
|
* added support for using clang to compile CUDA kernels
|
||||||
|
- Drop ffmpeg-avcodec-libdav1d-AV1-decoder-wrapper.patch, merged
|
||||||
|
upstream.
|
||||||
|
- Rebase and rename
|
||||||
|
ffmpeg-4.1-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch
|
||||||
|
to
|
||||||
|
ffmpeg-4.2-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch
|
||||||
|
- See /usr/share/doc/packages/ffmpeg-4/Changelog for the complete
|
||||||
|
changelog.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 31 13:27:44 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
|
Wed Jul 31 13:27:44 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
%define _major_version 4
|
%define _major_version 4
|
||||||
%define _major_expected 5
|
%define _major_expected 5
|
||||||
Name: ffmpeg-4
|
Name: ffmpeg-4
|
||||||
Version: 4.1.4
|
Version: 4.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Library for working with various multimedia formats
|
Summary: Library for working with various multimedia formats
|
||||||
License: LGPL-2.1-or-later AND GPL-2.0-or-later
|
License: LGPL-2.1-or-later AND GPL-2.0-or-later
|
||||||
@ -115,10 +115,8 @@ Source99: baselibs.conf
|
|||||||
Patch2: ffmpeg-arm6l.diff
|
Patch2: ffmpeg-arm6l.diff
|
||||||
Patch3: ffmpeg-new-coder-errors.diff
|
Patch3: ffmpeg-new-coder-errors.diff
|
||||||
Patch4: ffmpeg-codec-choice.diff
|
Patch4: ffmpeg-codec-choice.diff
|
||||||
# dav1d added https://patchwork.ffmpeg.org/patch/10843/
|
|
||||||
Patch6: ffmpeg-avcodec-libdav1d-AV1-decoder-wrapper.patch
|
|
||||||
# https://github.com/OpenMandrivaAssociation/ffmpeg/blob/master/ffmpeg-4.1-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch
|
# https://github.com/OpenMandrivaAssociation/ffmpeg/blob/master/ffmpeg-4.1-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch
|
||||||
Patch7: ffmpeg-4.1-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch
|
Patch6: ffmpeg-4.1-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch
|
||||||
BuildRequires: ladspa-devel
|
BuildRequires: ladspa-devel
|
||||||
BuildRequires: libgsm-devel
|
BuildRequires: libgsm-devel
|
||||||
BuildRequires: libmp3lame-devel
|
BuildRequires: libmp3lame-devel
|
||||||
|
@ -1,317 +0,0 @@
|
|||||||
Index: ffmpeg-4.1.3/configure
|
|
||||||
===================================================================
|
|
||||||
--- ffmpeg-4.1.3.orig/configure
|
|
||||||
+++ ffmpeg-4.1.3/configure
|
|
||||||
@@ -226,6 +226,7 @@ External library support:
|
|
||||||
--enable-libcelt enable CELT decoding via libcelt [no]
|
|
||||||
--enable-libcdio enable audio CD grabbing with libcdio [no]
|
|
||||||
--enable-libcodec2 enable codec2 en/decoding using libcodec2 [no]
|
|
||||||
+ --enable-libdav1d enable AV1 decoding via libdav1d [no]
|
|
||||||
--enable-libdavs2 enable AVS2 decoding via libdavs2 [no]
|
|
||||||
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
|
|
||||||
and libraw1394 [no]
|
|
||||||
@@ -1712,6 +1713,7 @@ EXTERNAL_LIBRARY_LIST="
|
|
||||||
libcaca
|
|
||||||
libcelt
|
|
||||||
libcodec2
|
|
||||||
+ libdav1d
|
|
||||||
libdc1394
|
|
||||||
libdrm
|
|
||||||
libflite
|
|
||||||
@@ -3091,6 +3093,7 @@ libaom_av1_encoder_select="extract_extra
|
|
||||||
libcelt_decoder_deps="libcelt"
|
|
||||||
libcodec2_decoder_deps="libcodec2"
|
|
||||||
libcodec2_encoder_deps="libcodec2"
|
|
||||||
+libdav1d_decoder_deps="libdav1d"
|
|
||||||
libdavs2_decoder_deps="libdavs2"
|
|
||||||
libfdk_aac_decoder_deps="libfdk_aac"
|
|
||||||
libfdk_aac_encoder_deps="libfdk_aac"
|
|
||||||
@@ -6069,6 +6072,7 @@ enabled libcelt && require lib
|
|
||||||
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
|
|
||||||
enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
|
|
||||||
enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
|
|
||||||
+enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.0.1" "dav1d/dav1d.h" dav1d_version
|
|
||||||
enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.5.115" davs2.h davs2_decoder_open
|
|
||||||
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
|
|
||||||
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
|
|
||||||
Index: ffmpeg-4.1.3/libavcodec/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/Makefile
|
|
||||||
+++ ffmpeg-4.1.3/libavcodec/Makefile
|
|
||||||
@@ -956,6 +956,7 @@ OBJS-$(CONFIG_LIBAOM_AV1_ENCODER)
|
|
||||||
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
|
|
||||||
OBJS-$(CONFIG_LIBCODEC2_DECODER) += libcodec2.o codec2utils.o
|
|
||||||
OBJS-$(CONFIG_LIBCODEC2_ENCODER) += libcodec2.o codec2utils.o
|
|
||||||
+OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o
|
|
||||||
OBJS-$(CONFIG_LIBDAVS2_DECODER) += libdavs2.o
|
|
||||||
OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o
|
|
||||||
OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o
|
|
||||||
Index: ffmpeg-4.1.3/libavcodec/libdav1d.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ ffmpeg-4.1.3/libavcodec/libdav1d.c
|
|
||||||
@@ -0,0 +1,252 @@
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) 2018 Ronald S. Bultje <rsbultje gmail com>
|
|
||||||
+ * Copyright (c) 2018 James Almer <jamrial gmail com>
|
|
||||||
+ *
|
|
||||||
+ * 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 <dav1d/dav1d.h>
|
|
||||||
+
|
|
||||||
+#include "libavutil/avassert.h"
|
|
||||||
+#include "libavutil/opt.h"
|
|
||||||
+
|
|
||||||
+#include "avcodec.h"
|
|
||||||
+#include "decode.h"
|
|
||||||
+#include "internal.h"
|
|
||||||
+
|
|
||||||
+typedef struct Libdav1dContext {
|
|
||||||
+ AVClass *class;
|
|
||||||
+ Dav1dContext *c;
|
|
||||||
+
|
|
||||||
+ Dav1dData data;
|
|
||||||
+ int tile_threads;
|
|
||||||
+} Libdav1dContext;
|
|
||||||
+
|
|
||||||
+static av_cold int libdav1d_init(AVCodecContext *c)
|
|
||||||
+{
|
|
||||||
+ Libdav1dContext *dav1d = c->priv_data;
|
|
||||||
+ Dav1dSettings s;
|
|
||||||
+ int res;
|
|
||||||
+
|
|
||||||
+ av_log(c, AV_LOG_INFO, "libdav1d %s\n", dav1d_version());
|
|
||||||
+
|
|
||||||
+ dav1d_default_settings(&s);
|
|
||||||
+ s.n_tile_threads = dav1d->tile_threads;
|
|
||||||
+ s.n_frame_threads = FFMIN(c->thread_count ? c->thread_count : av_cpu_count(), 256);
|
|
||||||
+
|
|
||||||
+ res = dav1d_open(&dav1d->c, &s);
|
|
||||||
+ if (res < 0)
|
|
||||||
+ return AVERROR(ENOMEM);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void libdav1d_flush(AVCodecContext *c)
|
|
||||||
+{
|
|
||||||
+ Libdav1dContext *dav1d = c->priv_data;
|
|
||||||
+
|
|
||||||
+ dav1d_data_unref(&dav1d->data);
|
|
||||||
+ dav1d_flush(dav1d->c);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void libdav1d_data_free(const uint8_t *data, void *opaque) {
|
|
||||||
+ AVBufferRef *buf = opaque;
|
|
||||||
+
|
|
||||||
+ av_buffer_unref(&buf);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void libdav1d_frame_free(void *opaque, uint8_t *data) {
|
|
||||||
+ Dav1dPicture p = { 0 };
|
|
||||||
+
|
|
||||||
+ p.ref = opaque;
|
|
||||||
+ p.data[0] = (void *) 0x1; // this has to be non-NULL
|
|
||||||
+ dav1d_picture_unref(&p);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const enum AVPixelFormat pix_fmt[][2] = {
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I400] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10 },
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I420] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P10 },
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I422] = { AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P10 },
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I444] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P10 },
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+// TODO: Update once 12bit support is added.
|
|
||||||
+static const int profile[] = {
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I400] = FF_PROFILE_AV1_MAIN,
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I420] = FF_PROFILE_AV1_MAIN,
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I422] = FF_PROFILE_AV1_PROFESSIONAL,
|
|
||||||
+ [DAV1D_PIXEL_LAYOUT_I444] = FF_PROFILE_AV1_HIGH,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
|
|
||||||
+{
|
|
||||||
+ Libdav1dContext *dav1d = c->priv_data;
|
|
||||||
+ Dav1dData *data = &dav1d->data;
|
|
||||||
+ Dav1dPicture p = { 0 };
|
|
||||||
+ int res;
|
|
||||||
+
|
|
||||||
+ if (!data->sz) {
|
|
||||||
+ AVPacket pkt = { 0 };
|
|
||||||
+
|
|
||||||
+ res = ff_decode_get_packet(c, &pkt);
|
|
||||||
+ if (res < 0 && res != AVERROR_EOF)
|
|
||||||
+ return res;
|
|
||||||
+
|
|
||||||
+ if (pkt.size) {
|
|
||||||
+ res = dav1d_data_wrap(data, pkt.data, pkt.size, libdav1d_data_free, pkt.buf);
|
|
||||||
+ if (res < 0) {
|
|
||||||
+ av_packet_unref(&pkt);
|
|
||||||
+ return res;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ data->m.timestamp = pkt.pts;
|
|
||||||
+ data->m.offset = pkt.pos;
|
|
||||||
+ data->m.duration = pkt.duration;
|
|
||||||
+
|
|
||||||
+ pkt.buf = NULL;
|
|
||||||
+ av_packet_unref(&pkt);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ res = dav1d_send_data(dav1d->c, data);
|
|
||||||
+ if (res < 0) {
|
|
||||||
+ if (res == -EINVAL)
|
|
||||||
+ res = AVERROR_INVALIDDATA;
|
|
||||||
+ if (res != -EAGAIN)
|
|
||||||
+ return res;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ res = dav1d_get_picture(dav1d->c, &p);
|
|
||||||
+ if (res < 0) {
|
|
||||||
+ if (res == -EINVAL)
|
|
||||||
+ res = AVERROR_INVALIDDATA;
|
|
||||||
+ else if (res == -EAGAIN && c->internal->draining)
|
|
||||||
+ res = AVERROR_EOF;
|
|
||||||
+
|
|
||||||
+ return res;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ av_assert0(p.data[0] != NULL);
|
|
||||||
+
|
|
||||||
+ frame->buf[0] = av_buffer_create(NULL, 0, libdav1d_frame_free,
|
|
||||||
+ p.ref, AV_BUFFER_FLAG_READONLY);
|
|
||||||
+ if (!frame->buf[0]) {
|
|
||||||
+ dav1d_picture_unref(&p);
|
|
||||||
+ return AVERROR(ENOMEM);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ frame->data[0] = p.data[0];
|
|
||||||
+ frame->data[1] = p.data[1];
|
|
||||||
+ frame->data[2] = p.data[2];
|
|
||||||
+ frame->linesize[0] = p.stride[0];
|
|
||||||
+ frame->linesize[1] = p.stride[1];
|
|
||||||
+ frame->linesize[2] = p.stride[1];
|
|
||||||
+
|
|
||||||
+ c->profile = profile[p.p.layout];
|
|
||||||
+ frame->format = c->pix_fmt = pix_fmt[p.p.layout][p.p.bpc == 10];
|
|
||||||
+ frame->width = p.p.w;
|
|
||||||
+ frame->height = p.p.h;
|
|
||||||
+ if (c->width != p.p.w || c->height != p.p.h) {
|
|
||||||
+ res = ff_set_dimensions(c, p.p.w, p.p.h);
|
|
||||||
+ if (res < 0)
|
|
||||||
+ return res;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ switch (p.seq_hdr->chr) {
|
|
||||||
+ case DAV1D_CHR_VERTICAL:
|
|
||||||
+ frame->chroma_location = c->chroma_sample_location = AVCHROMA_LOC_LEFT;
|
|
||||||
+ break;
|
|
||||||
+ case DAV1D_CHR_COLOCATED:
|
|
||||||
+ frame->chroma_location = c->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ frame->colorspace = c->colorspace = (enum AVColorSpace) p.seq_hdr->mtrx;
|
|
||||||
+ frame->color_primaries = c->color_primaries = (enum AVColorPrimaries) p.seq_hdr->pri;
|
|
||||||
+ frame->color_trc = c->color_trc = (enum AVColorTransferCharacteristic) p.seq_hdr->trc;
|
|
||||||
+ frame->color_range = c->color_range = p.seq_hdr->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
|
|
||||||
+
|
|
||||||
+ // match timestamps and packet size
|
|
||||||
+ frame->pts = frame->best_effort_timestamp = p.m.timestamp;
|
|
||||||
+#if FF_API_PKT_PTS
|
|
||||||
+FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
+ frame->pkt_pts = p.m.timestamp;
|
|
||||||
+FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
+#endif
|
|
||||||
+ frame->pkt_dts = p.m.timestamp;
|
|
||||||
+ frame->pkt_pos = p.m.offset;
|
|
||||||
+ frame->pkt_size = p.m.size;
|
|
||||||
+ frame->pkt_duration = p.m.duration;
|
|
||||||
+ frame->key_frame = p.frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY;
|
|
||||||
+
|
|
||||||
+ switch (p.frame_hdr->frame_type) {
|
|
||||||
+ case DAV1D_FRAME_TYPE_KEY:
|
|
||||||
+ case DAV1D_FRAME_TYPE_INTRA:
|
|
||||||
+ frame->pict_type = AV_PICTURE_TYPE_I;
|
|
||||||
+ break;
|
|
||||||
+ case DAV1D_FRAME_TYPE_INTER:
|
|
||||||
+ frame->pict_type = AV_PICTURE_TYPE_P;
|
|
||||||
+ break;
|
|
||||||
+ case DAV1D_FRAME_TYPE_SWITCH:
|
|
||||||
+ frame->pict_type = AV_PICTURE_TYPE_SP;
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ return AVERROR_INVALIDDATA;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static av_cold int libdav1d_close(AVCodecContext *c)
|
|
||||||
+{
|
|
||||||
+ Libdav1dContext *dav1d = c->priv_data;
|
|
||||||
+
|
|
||||||
+ dav1d_data_unref(&dav1d->data);
|
|
||||||
+ dav1d_close(&dav1d->c);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#define OFFSET(x) offsetof(Libdav1dContext, x)
|
|
||||||
+#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
|
|
||||||
+static const AVOption libdav1d_options[] = {
|
|
||||||
+ { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 64, VD, NULL },
|
|
||||||
+ { NULL }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static const AVClass libdav1d_class = {
|
|
||||||
+ .class_name = "libdav1d decoder",
|
|
||||||
+ .item_name = av_default_item_name,
|
|
||||||
+ .option = libdav1d_options,
|
|
||||||
+ .version = LIBAVUTIL_VERSION_INT,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+AVCodec ff_libdav1d_decoder = {
|
|
||||||
+ .name = "libdav1d",
|
|
||||||
+ .long_name = NULL_IF_CONFIG_SMALL("dav1d AV1 decoder by VideoLAN"),
|
|
||||||
+ .type = AVMEDIA_TYPE_VIDEO,
|
|
||||||
+ .id = AV_CODEC_ID_AV1,
|
|
||||||
+ .priv_data_size = sizeof(Libdav1dContext),
|
|
||||||
+ .init = libdav1d_init,
|
|
||||||
+ .close = libdav1d_close,
|
|
||||||
+ .flush = libdav1d_flush,
|
|
||||||
+ .receive_frame = libdav1d_receive_frame,
|
|
||||||
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
|
|
||||||
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
|
|
||||||
+ FF_CODEC_CAP_SETS_PKT_DTS,
|
|
||||||
+ .priv_class = &libdav1d_class,
|
|
||||||
+ .wrapper_name = "libdav1d",
|
|
||||||
+};
|
|
||||||
Index: ffmpeg-4.1.3/libavcodec/allcodecs.c
|
|
||||||
===================================================================
|
|
||||||
--- ffmpeg-4.1.3.orig/libavcodec/allcodecs.c
|
|
||||||
+++ ffmpeg-4.1.3/libavcodec/allcodecs.c
|
|
||||||
@@ -671,6 +671,7 @@ 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_libdav1d_decoder;
|
|
||||||
extern AVCodec ff_libaom_av1_decoder;
|
|
||||||
extern AVCodec ff_libaom_av1_encoder;
|
|
||||||
extern AVCodec ff_libcelt_decoder;
|
|
@ -11,11 +11,11 @@ reduced codec selection list.
|
|||||||
libavformat/matroskaenc.c | 19 +++++++++++++------
|
libavformat/matroskaenc.c | 19 +++++++++++++------
|
||||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
Index: ffmpeg-4.1.3/libavformat/matroskaenc.c
|
Index: ffmpeg-4.2/libavformat/matroskaenc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/libavformat/matroskaenc.c
|
--- ffmpeg-4.2.orig/libavformat/matroskaenc.c
|
||||||
+++ ffmpeg-4.1.3/libavformat/matroskaenc.c
|
+++ ffmpeg-4.2/libavformat/matroskaenc.c
|
||||||
@@ -2807,16 +2807,24 @@ static const AVClass matroska_class = {
|
@@ -2798,16 +2798,24 @@ static const AVClass matroska_class = {
|
||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ Index: ffmpeg-4.1.3/libavformat/matroskaenc.c
|
|||||||
.init = mkv_init,
|
.init = mkv_init,
|
||||||
.write_header = mkv_write_header,
|
.write_header = mkv_write_header,
|
||||||
.write_packet = mkv_write_flush_packet,
|
.write_packet = mkv_write_flush_packet,
|
||||||
@@ -2876,8 +2884,7 @@ AVOutputFormat ff_matroska_audio_muxer =
|
@@ -2867,8 +2875,7 @@ AVOutputFormat ff_matroska_audio_muxer =
|
||||||
.mime_type = "audio/x-matroska",
|
.mime_type = "audio/x-matroska",
|
||||||
.extensions = "mka",
|
.extensions = "mka",
|
||||||
.priv_data_size = sizeof(MatroskaMuxContext),
|
.priv_data_size = sizeof(MatroskaMuxContext),
|
||||||
|
@ -10,11 +10,11 @@ Improve the error messages a bit to say what's really going on
|
|||||||
fftools/ffmpeg_opt.c | 2 +-
|
fftools/ffmpeg_opt.c | 2 +-
|
||||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
Index: ffmpeg-4.1.3/fftools/ffmpeg.c
|
Index: ffmpeg-4.2/fftools/ffmpeg.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/fftools/ffmpeg.c
|
--- ffmpeg-4.2.orig/fftools/ffmpeg.c
|
||||||
+++ ffmpeg-4.1.3/fftools/ffmpeg.c
|
+++ ffmpeg-4.2/fftools/ffmpeg.c
|
||||||
@@ -2906,7 +2906,7 @@ static int init_input_stream(int ist_ind
|
@@ -2898,7 +2898,7 @@ static int init_input_stream(int ist_ind
|
||||||
if (ist->decoding_needed) {
|
if (ist->decoding_needed) {
|
||||||
AVCodec *codec = ist->dec;
|
AVCodec *codec = ist->dec;
|
||||||
if (!codec) {
|
if (!codec) {
|
||||||
@ -23,11 +23,11 @@ Index: ffmpeg-4.1.3/fftools/ffmpeg.c
|
|||||||
avcodec_get_name(ist->dec_ctx->codec_id), ist->file_index, ist->st->index);
|
avcodec_get_name(ist->dec_ctx->codec_id), ist->file_index, ist->st->index);
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
Index: ffmpeg-4.1.3/fftools/ffmpeg_filter.c
|
Index: ffmpeg-4.2/fftools/ffmpeg_filter.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/fftools/ffmpeg_filter.c
|
--- ffmpeg-4.2.orig/fftools/ffmpeg_filter.c
|
||||||
+++ ffmpeg-4.1.3/fftools/ffmpeg_filter.c
|
+++ ffmpeg-4.2/fftools/ffmpeg_filter.c
|
||||||
@@ -973,7 +973,7 @@ static int configure_input_filter(Filter
|
@@ -981,7 +981,7 @@ static int configure_input_filter(Filter
|
||||||
{
|
{
|
||||||
if (!ifilter->ist->dec) {
|
if (!ifilter->ist->dec) {
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
@ -36,7 +36,7 @@ Index: ffmpeg-4.1.3/fftools/ffmpeg_filter.c
|
|||||||
ifilter->ist->file_index, ifilter->ist->st->index);
|
ifilter->ist->file_index, ifilter->ist->st->index);
|
||||||
return AVERROR_DECODER_NOT_FOUND;
|
return AVERROR_DECODER_NOT_FOUND;
|
||||||
}
|
}
|
||||||
@@ -1123,7 +1123,7 @@ int configure_filtergraph(FilterGraph *f
|
@@ -1131,7 +1131,7 @@ int configure_filtergraph(FilterGraph *f
|
||||||
if (!ost->enc) {
|
if (!ost->enc) {
|
||||||
/* identical to the same check in ffmpeg.c, needed because
|
/* identical to the same check in ffmpeg.c, needed because
|
||||||
complex filter graphs are initialized earlier */
|
complex filter graphs are initialized earlier */
|
||||||
@ -45,11 +45,11 @@ Index: ffmpeg-4.1.3/fftools/ffmpeg_filter.c
|
|||||||
avcodec_get_name(ost->st->codecpar->codec_id), ost->file_index, ost->index);
|
avcodec_get_name(ost->st->codecpar->codec_id), ost->file_index, ost->index);
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
goto fail;
|
goto fail;
|
||||||
Index: ffmpeg-4.1.3/fftools/ffmpeg_opt.c
|
Index: ffmpeg-4.2/fftools/ffmpeg_opt.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ffmpeg-4.1.3.orig/fftools/ffmpeg_opt.c
|
--- ffmpeg-4.2.orig/fftools/ffmpeg_opt.c
|
||||||
+++ ffmpeg-4.1.3/fftools/ffmpeg_opt.c
|
+++ ffmpeg-4.2/fftools/ffmpeg_opt.c
|
||||||
@@ -1306,7 +1306,7 @@ static int choose_encoder(OptionsContext
|
@@ -1327,7 +1327,7 @@ static int choose_encoder(OptionsContext
|
||||||
if (!ost->enc) {
|
if (!ost->enc) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Automatic encoder selection failed for "
|
av_log(NULL, AV_LOG_FATAL, "Automatic encoder selection failed for "
|
||||||
"output stream #%d:%d. Default encoder for format %s (codec %s) is "
|
"output stream #%d:%d. Default encoder for format %s (codec %s) is "
|
||||||
|
Loading…
Reference in New Issue
Block a user