- Sync ffmpeg-4.2-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch

from upstream.

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=86
This commit is contained in:
Ismail Dönmez 2019-08-22 06:43:11 +00:00 committed by Git OBS Bridge
parent 07475fa3ce
commit b3dbd7f968
2 changed files with 44 additions and 43 deletions

View File

@ -1,7 +1,6 @@
Index: ffmpeg-4.2/configure
===================================================================
--- ffmpeg-4.2.orig/configure
+++ ffmpeg-4.2/configure
diff -up ffmpeg-4.2/configure.dlopen~ ffmpeg-4.2/configure
--- ffmpeg-4.2/configure.dlopen~ 2019-08-05 23:11:40.000000000 +0200
+++ ffmpeg-4.2/configure 2019-08-13 01:17:26.872828504 +0200
@@ -232,6 +232,7 @@ External library support:
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
@ -118,10 +117,9 @@ Index: ffmpeg-4.2/configure
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 libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
Index: ffmpeg-4.2/libavcodec/dlopen.h
===================================================================
--- /dev/null
+++ ffmpeg-4.2/libavcodec/dlopen.h
diff -up ffmpeg-4.2/libavcodec/dlopen.h.dlopen~ ffmpeg-4.2/libavcodec/dlopen.h
--- ffmpeg-4.2/libavcodec/dlopen.h.dlopen~ 2019-08-13 01:17:26.866828483 +0200
+++ ffmpeg-4.2/libavcodec/dlopen.h 2019-08-13 01:17:26.866828483 +0200
@@ -0,0 +1,13 @@
+#ifndef LOCALINC_DLOPEN_H
+#define LOCALINC_DLOPEN_H
@ -136,10 +134,9 @@ Index: ffmpeg-4.2/libavcodec/dlopen.h
+ goto error;
+
+#endif
Index: ffmpeg-4.2/libavcodec/libfdk-aacdec.c
===================================================================
--- ffmpeg-4.2.orig/libavcodec/libfdk-aacdec.c
+++ ffmpeg-4.2/libavcodec/libfdk-aacdec.c
diff -up ffmpeg-4.2/libavcodec/libfdk-aacdec.c.dlopen~ ffmpeg-4.2/libavcodec/libfdk-aacdec.c
--- ffmpeg-4.2/libavcodec/libfdk-aacdec.c.dlopen~ 2019-07-08 19:45:25.000000000 +0200
+++ ffmpeg-4.2/libavcodec/libfdk-aacdec.c 2019-08-13 01:17:26.866828483 +0200
@@ -37,6 +37,54 @@
#define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
#endif
@ -207,10 +204,9 @@ Index: ffmpeg-4.2/libavcodec/libfdk-aacdec.c
s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1);
if (!s->handle) {
av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n");
Index: ffmpeg-4.2/libavcodec/libfdk-aacenc.c
===================================================================
--- ffmpeg-4.2.orig/libavcodec/libfdk-aacenc.c
+++ ffmpeg-4.2/libavcodec/libfdk-aacenc.c
diff -up ffmpeg-4.2/libavcodec/libfdk-aacenc.c.dlopen~ ffmpeg-4.2/libavcodec/libfdk-aacenc.c
--- ffmpeg-4.2/libavcodec/libfdk-aacenc.c.dlopen~ 2019-07-08 19:45:25.000000000 +0200
+++ ffmpeg-4.2/libavcodec/libfdk-aacenc.c 2019-08-13 01:17:26.866828483 +0200
@@ -34,6 +34,48 @@
#define FDKENC_VER_AT_LEAST(vl0, vl1) 0
#endif
@ -272,10 +268,9 @@ Index: ffmpeg-4.2/libavcodec/libfdk-aacenc.c
if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
aac_get_error(err));
Index: ffmpeg-4.2/libavcodec/libmp3lame.c
===================================================================
--- ffmpeg-4.2.orig/libavcodec/libmp3lame.c
+++ ffmpeg-4.2/libavcodec/libmp3lame.c
diff -up ffmpeg-4.2/libavcodec/libmp3lame.c.dlopen~ ffmpeg-4.2/libavcodec/libmp3lame.c
--- ffmpeg-4.2/libavcodec/libmp3lame.c.dlopen~ 2019-07-08 19:45:25.000000000 +0200
+++ ffmpeg-4.2/libavcodec/libmp3lame.c 2019-08-13 01:17:26.866828483 +0200
@@ -38,6 +38,145 @@
#include "mpegaudio.h"
#include "mpegaudiodecheader.h"
@ -434,10 +429,9 @@ Index: ffmpeg-4.2/libavcodec/libmp3lame.c
s->avctx = avctx;
/* initialize LAME and get defaults */
Index: ffmpeg-4.2/libavcodec/libopencore-amr.c
===================================================================
--- ffmpeg-4.2.orig/libavcodec/libopencore-amr.c
+++ ffmpeg-4.2/libavcodec/libopencore-amr.c
diff -up ffmpeg-4.2/libavcodec/libopencore-amr.c.dlopen~ ffmpeg-4.2/libavcodec/libopencore-amr.c
--- ffmpeg-4.2/libavcodec/libopencore-amr.c.dlopen~ 2019-07-08 19:45:25.000000000 +0200
+++ ffmpeg-4.2/libavcodec/libopencore-amr.c 2019-08-13 01:17:26.866828483 +0200
@@ -29,6 +29,108 @@
#include "audio_frame_queue.h"
#include "internal.h"
@ -592,13 +586,12 @@ Index: ffmpeg-4.2/libavcodec/libopencore-amr.c
s->state = D_IF_init();
return 0;
Index: ffmpeg-4.2/libavcodec/libx264.c
===================================================================
--- ffmpeg-4.2.orig/libavcodec/libx264.c
+++ ffmpeg-4.2/libavcodec/libx264.c
@@ -44,6 +44,120 @@
// blocks of pixels (with respect to the luma plane)
#define MB_SIZE 16
diff -up ffmpeg-4.2/libavcodec/libx264.c.dlopen~ ffmpeg-4.2/libavcodec/libx264.c
--- ffmpeg-4.2/libavcodec/libx264.c.dlopen~ 2019-08-05 22:52:21.000000000 +0200
+++ ffmpeg-4.2/libavcodec/libx264.c 2019-08-13 01:32:51.872337236 +0200
@@ -40,6 +40,124 @@
#include <stdlib.h>
#include <string.h>
+#ifdef CONFIG_LIBX264_DLOPEN
+#include "dlopen.h"
@ -615,6 +608,7 @@ Index: ffmpeg-4.2/libavcodec/libx264.c
+static int (*dl_x264_param_apply_profile) (x264_param_t *, const char *profile);
+static void (*dl_x264_param_apply_fastfirstpass) (x264_param_t *);
+static int (*dl_x264_encoder_headers) (x264_t *, x264_nal_t **, int *);
+static int (*dl_x264_encoder_maximum_delayed_frames) (x264_t *);
+#define x264_picture_init dl_x264_picture_init
+#define x264_encoder_encode dl_x264_encoder_encode
+#define x264_encoder_delayed_frames dl_x264_encoder_delayed_frames
@ -628,6 +622,7 @@ Index: ffmpeg-4.2/libavcodec/libx264.c
+#define x264_param_parse dl_x264_param_parse
+#define x264_param_default_preset dl_x264_param_default_preset
+#define x264_encoder_headers dl_x264_encoder_headers
+#define x264_encoder_maximum_delayed_frames dl_x264_encoder_maximum_delayed_frames
+
+#define X264_BUILD_str num2str(X264_BUILD)
+#define X264_LIB "libx264.so." X264_BUILD_str
@ -701,6 +696,8 @@ Index: ffmpeg-4.2/libavcodec/libx264.c
+
+ dl_sym(x264_encoder_headers, (int (*) (x264_t *, x264_nal_t **, int *)), libx264);
+
+ dl_sym(x264_encoder_maximum_delayed_frames, (int (*) (x264_t *)), libx264);
+
+ ptr = (int *) dlsym(libx264, "x264_bit_depth");
+ dl_x264_bit_depth = *ptr;
+
@ -714,10 +711,10 @@ Index: ffmpeg-4.2/libavcodec/libx264.c
+}
+#endif
+
typedef struct X264Context {
AVClass *class;
x264_param_t params;
@@ -555,6 +669,11 @@ static av_cold int X264_init(AVCodecCont
// from x264.h, for quant_offsets, Macroblocks are 16x16
// blocks of pixels (with respect to the luma plane)
#define MB_SIZE 16
@@ -555,6 +673,11 @@ static av_cold int X264_init(AVCodecCont
if (avctx->global_quality > 0)
av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is recommended.\n");
@ -729,10 +726,9 @@ Index: ffmpeg-4.2/libavcodec/libx264.c
#if CONFIG_LIBX262_ENCODER
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
x4->params.b_mpeg2 = 1;
Index: ffmpeg-4.2/libavcodec/libx265.c
===================================================================
--- ffmpeg-4.2.orig/libavcodec/libx265.c
+++ ffmpeg-4.2/libavcodec/libx265.c
diff -up ffmpeg-4.2/libavcodec/libx265.c.dlopen~ ffmpeg-4.2/libavcodec/libx265.c
--- ffmpeg-4.2/libavcodec/libx265.c.dlopen~ 2019-08-05 22:52:21.000000000 +0200
+++ ffmpeg-4.2/libavcodec/libx265.c 2019-08-13 01:17:26.867828486 +0200
@@ -34,6 +34,39 @@
#include "avcodec.h"
#include "internal.h"
@ -784,10 +780,9 @@ Index: ffmpeg-4.2/libavcodec/libx265.c
if (x265_api_get(12))
codec->pix_fmts = x265_csp_twelve;
else if (x265_api_get(10))
Index: ffmpeg-4.2/libavcodec/libxvid.c
===================================================================
--- ffmpeg-4.2.orig/libavcodec/libxvid.c
+++ ffmpeg-4.2/libavcodec/libxvid.c
diff -up ffmpeg-4.2/libavcodec/libxvid.c.dlopen~ ffmpeg-4.2/libavcodec/libxvid.c
--- ffmpeg-4.2/libavcodec/libxvid.c.dlopen~ 2019-07-08 19:45:25.000000000 +0200
+++ ffmpeg-4.2/libavcodec/libxvid.c 2019-08-13 01:17:26.867828486 +0200
@@ -51,6 +51,61 @@
#include <io.h>
#endif

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 22 06:42:57 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Sync ffmpeg-4.2-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch
from upstream.
-------------------------------------------------------------------
Sun Aug 18 09:43:38 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>