Commit 19da15d9 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Update patchset

parent 806b6667
From 250bba9922df89c3c8c95afc689bccb6cc8d1c3e Mon Sep 17 00:00:00 2001
From 44f32ac7e25d3eaf170caf276734aac1c3236784 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Wed, 18 May 2016 20:28:19 +0200
Subject: [PATCH 01/17] modules: bank: Save the cache if it was empty
......
From 4d8bcee64701a113b7a4ef5b53434f9f6a6f4c31 Mon Sep 17 00:00:00 2001
From c7df7d456444a8f40c23e61aea4ccdc0ce42627c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 10 Feb 2015 11:58:54 +0100
Subject: [PATCH 02/17] wasapi: Don't fail if the client is already initialized
......
From 00c3e7c348fdeabdea1ff4c8b887a2bf8b57c6e4 Mon Sep 17 00:00:00 2001
From 4497e3c7d4995384b4b3b2b720f1d03405e2edee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Wed, 11 May 2016 17:37:47 +0200
Subject: [PATCH 03/17] gnutls: Set cannot_unload_broken_library for winrt
......
From e48b146aa23025cec314cbdf32cd9ecc1f0a83da Mon Sep 17 00:00:00 2001
From 1753fcf92174f49b84d83050d1825179c48e4171 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed, 16 Apr 2014 16:09:53 +0200
Subject: [PATCH 04/17] Cheat for Windows Store subtitles
......
From 77a99b65a20d6f2f96af5bd3c7809ae6d55cb7f0 Mon Sep 17 00:00:00 2001
From aef6f14b7346a3df35cdf265b1d426bfb1b85eca Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed, 12 Mar 2014 00:11:26 +0100
Subject: [PATCH 05/17] Accept the weird WinRT pathes
......
From f47929a851c47d2a8631233d56bd9bed1b528d50 Mon Sep 17 00:00:00 2001
From adc8bee541e8aeadea26c64c4d1d19e6073f7752 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Wed, 15 Jun 2016 09:42:20 +0200
Subject: [PATCH 06/17] contrib: use a fixed ffmpeg version for winstore builds
......
From 538c8efc29dcec970c64f6ccc5c778607449496d Mon Sep 17 00:00:00 2001
From d6124257f0d26e3f6188bd0bb1a50e5845ea79d8 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Wed, 15 Jun 2016 19:14:48 +0200
Subject: [PATCH 07/17] upnp: lookup the best interface to use libupnp with
......
From 74e8cc05bc161592e741dcf60d57e0124e31e365 Mon Sep 17 00:00:00 2001
From 39b687f1324a26d7a0fe0c483ce0e5f2a442385a Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Wed, 15 Jun 2016 15:23:12 +0200
Subject: [PATCH 08/17] contrib: microdns: fix uninitialized memory usages
......
From 6e5e2060c4b0d33c457e09342ee0971bec28168c Mon Sep 17 00:00:00 2001
From a7f45a6ba695fe97404dd5aac7e27ed698d0be08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 2 Aug 2016 18:54:28 +0200
Subject: [PATCH 09/17] config: cmdline: Use msg_* instead of fprintf
......
From a7b9b4c8ecfa0698502064072b3a8151d051343b Mon Sep 17 00:00:00 2001
From 5f419aed9e5c48fa19db883e3de7522e14e13c6d Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Fri, 30 Sep 2016 09:49:19 +0200
Subject: [PATCH 10/17] plugin cache: Windows doesn't like relative pathes in
......
From 2d836f0443f7bcaa605febbaf4c481a60ab17f13 Mon Sep 17 00:00:00 2001
From d8be48b1416d3b47d95836388e28e50dde2b2493 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Thu, 20 Oct 2016 15:17:11 +0200
Subject: [PATCH 11/17] direct3d11: avoid crashing later in the decoder
......
From 910fe35ff55c5d8394ba50f6314d63afc2f6fd7a Mon Sep 17 00:00:00 2001
From f8bc9b421924e49369f450c7d20a7b2e233831a9 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Thu, 20 Oct 2016 13:41:54 +0200
Subject: [PATCH 12/17] avcodec: remove unused parameter in va->release()
......@@ -99,10 +99,10 @@ index 937a3ef..8671139 100644
static void Delete( vlc_va_t *va, AVCodecContext *avctx )
diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index cb4070e..7c716ad 100644
index 29c0944..c89685e 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -171,10 +171,9 @@ static int Get( vlc_va_t *va, picture_t *p_picture, uint8_t **data )
@@ -166,10 +166,9 @@ static int Get( vlc_va_t *va, picture_t *p_picture, uint8_t **data )
}
// Never called
......
From c6f5a8c5693084ede0620c3990842b2cabf74e5b Mon Sep 17 00:00:00 2001
From efd591798e101c247e75b8855671ed0da9ef351b Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Thu, 20 Oct 2016 13:32:29 +0200
Subject: [PATCH 13/17] codec: use macros to avoid confusion between data[0]
......
From 49b0f3f7dd17358804bf2f1ba98c18ca069d54ba Mon Sep 17 00:00:00 2001
From 52fa3fa0a30de45a5bdfcf0dda93239811a29fb8 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Thu, 20 Oct 2016 13:35:31 +0200
Subject: [PATCH 14/17] codec: av_buffer_create() uses the raw buffer data not
......
From 4b4632770f788c098c4a05d8d61eb95f9696598a Mon Sep 17 00:00:00 2001
From b8ef40af1163230b1ec3bef1c787f80bdb2ac7ea Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Thu, 20 Oct 2016 14:25:42 +0200
Subject: [PATCH 15/17] avcodec: vlc_va_Get() mostly get the data[3] surface
......
From 1d65b9277ba359295a73c92176e0cb3659eb9dca Mon Sep 17 00:00:00 2001
From 6eeff8954568f04b99c9a675f13aa6773f43f73f Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Thu, 20 Oct 2016 14:19:09 +0200
Subject: [PATCH 16/17] avcodec: get the context of the data allocated outside
......@@ -140,10 +140,10 @@ index 8671139..cd3ef4e 100644
return VLC_SUCCESS;
}
diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 7c716ad..0107056 100644
index c89685e..ff33f0b 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -162,10 +162,10 @@ static void Close( vlc_va_t *va, AVCodecContext *avctx )
@@ -157,10 +157,10 @@ static void Close( vlc_va_t *va, AVCodecContext *avctx )
}
// Never called
......
From c354d53c5de8539dbe6ccf8b393610b9bc374481 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Thu, 20 Oct 2016 14:59:14 +0200
From cf80c861644f856a7081e5d08a9c63c419fe53e8 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robUx4@videolabs.io>
Date: Fri, 21 Oct 2016 17:42:59 +0200
Subject: [PATCH 17/17] avcodec: pull the decoder picture_t only when the va
has a picture to extract
......@@ -10,16 +10,25 @@ when needed. This surface context is filled during vlc_va_Get().
picture_t->context is no longer filled before/after calling vlc_va_Extract().
The AVFrame->opaque is no longer a picture_t but the surface context.
--
replaces https://patches.videolan.org/patch/14764/
* vdpau needs the picture->context after the vlc_va_Extract() so that
VDPAU filters can work. *UNTESTED*
replaces https://patches.videolan.org/patch/14766/
* fixes picture_t handling wit no video acceleration
* fixes vdpau decoding by holding/releasing the surface reference when attached
to a picture_t
---
modules/codec/avcodec/d3d11va.c | 4 ++--
modules/codec/avcodec/directx_va.c | 7 +------
modules/codec/avcodec/directx_va.c | 7 +-----
modules/codec/avcodec/dxva2.c | 4 ++--
modules/codec/avcodec/va.h | 14 +++++++-------
modules/codec/avcodec/vaapi.c | 9 +++------
modules/codec/avcodec/vda.c | 11 +++--------
modules/codec/avcodec/video.c | 38 +++++++++++++++++---------------------
modules/hw/vdpau/avcodec.c | 4 ++--
8 files changed, 37 insertions(+), 54 deletions(-)
modules/codec/avcodec/va.h | 14 ++++++------
modules/codec/avcodec/vaapi.c | 9 +++-----
modules/codec/avcodec/vda.c | 11 +++-------
modules/codec/avcodec/video.c | 45 ++++++++++++++++++++------------------
modules/hw/vdpau/avcodec.c | 14 +++++++++---
8 files changed, 53 insertions(+), 55 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index da3b891..94a9311 100644
......@@ -163,10 +172,10 @@ index cd3ef4e..0e5008c 100644
static void Delete( vlc_va_t *va, AVCodecContext *avctx )
diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 0107056..870ce41 100644
index ff33f0b..e06f4ce 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -149,7 +149,7 @@ static int Open(vlc_va_t *va,
@@ -144,7 +144,7 @@ static int Open(vlc_va_t *va,
va->sys = sys;
va->description = (char *)"VDA";
va->get = Get;
......@@ -175,7 +184,7 @@ index 0107056..870ce41 100644
va->extract = Extract;
return VLC_SUCCESS;
@@ -170,14 +170,9 @@ static int Get( vlc_va_t *va, void **data_context, uint8_t **data )
@@ -165,14 +165,9 @@ static int Get( vlc_va_t *va, void **data_context, uint8_t **data )
return VLC_SUCCESS;
}
......@@ -193,7 +202,7 @@ index 0107056..870ce41 100644
CVPixelBufferRef cv_buffer = (CVPixelBufferRef)data;
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 5b99732..54e5809 100644
index 5b99732..d0dc7b1 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -954,8 +954,8 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
......@@ -207,25 +216,31 @@ index 5b99732..54e5809 100644
{ /* When direct rendering is not used, get_format() and get_buffer()
* might not be called. The output video format must be set here
* then picture buffer can be allocated. */
@@ -975,9 +975,15 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
}
@@ -976,8 +976,21 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
else
{
+ p_pic = decoder_NewPicture(p_dec);
+ if( !p_pic )
+ {
+ av_frame_free(&frame);
+ break;
+ }
+
if( p_sys->p_va != NULL )
- vlc_va_Extract( p_sys->p_va, p_pic, AV_FRAME_SURFACE_DATA(frame) );
- picture_Hold( p_pic );
+ {
+ /* a picture_ has not been allocated yet, frame->opaque is meaningless */
+ p_pic = decoder_NewPicture(p_dec);
+ if( unlikely(p_pic==NULL) )
+ {
+ av_frame_free(&frame);
+ break;
+ }
+ vlc_va_Extract( p_sys->p_va, p_pic, AV_FRAME_SURFACE(frame), AV_FRAME_SURFACE_DATA(frame) );
+ }
+ else
+ {
+ p_pic = frame->opaque;
+ picture_Hold(p_pic);
+ }
}
if( !p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den )
@@ -1117,34 +1123,24 @@ static void lavc_ReleaseFrame(void *opaque)
@@ -1117,34 +1130,24 @@ static void lavc_ReleaseFrame(void *opaque)
picture_Release(picture);
}
......@@ -246,11 +261,11 @@ index 5b99732..54e5809 100644
}
- pic->context = data_context;
- AV_FRAME_SURFACE(frame) = AV_FRAME_SURFACE_DATA(frame);
-
- void (*release)(void *) = va->release;
- if (va->release == NULL)
- release = lavc_ReleaseFrame;
-
- frame->buf[0] = av_buffer_create(AV_FRAME_SURFACE_DATA(frame), 0, release, pic, 0);
+ frame->buf[0] = av_buffer_create(AV_FRAME_SURFACE_DATA(frame), 0, va->release, AV_FRAME_SURFACE(frame), 0);
if (unlikely(frame->buf[0] == NULL))
......@@ -264,7 +279,7 @@ index 5b99732..54e5809 100644
assert(AV_FRAME_SURFACE(frame) != NULL);
return 0;
}
@@ -1258,13 +1254,13 @@ static int lavc_GetFrame(struct AVCodecContext *ctx, AVFrame *frame, int flags)
@@ -1258,13 +1261,13 @@ static int lavc_GetFrame(struct AVCodecContext *ctx, AVFrame *frame, int flags)
}
post_mt(sys);
......@@ -282,10 +297,10 @@ index 5b99732..54e5809 100644
* so we need to check for direct rendering again. */
int ret = lavc_dr_GetFrame(ctx, frame, pic);
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 0be3500..45d6527 100644
index 0be3500..b420f80 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -134,9 +134,9 @@ static int Lock(vlc_va_t *va, void **data_context, uint8_t **data)
@@ -134,12 +134,20 @@ static int Lock(vlc_va_t *va, void **data_context, uint8_t **data)
return VLC_SUCCESS;
}
......@@ -293,10 +308,30 @@ index 0be3500..45d6527 100644
+static int Copy(vlc_va_t *va, picture_t *pic, void *data_context, uint8_t *data)
{
- (void) va; (void) pic; (void) data;
+ (void) va; (void) pic; (void) data; (void) data_context;
+ (void) va; (void) data;
+ vlc_vdp_video_field_t *field = data_context;
+ pic->context = vlc_vdp_video_copy(field);
return VLC_SUCCESS;
}
+static void Release(void *opaque)
+{
+ vlc_vdp_video_field_t *f = opaque;
+ DestroySurface(f);
+}
+
static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
const es_format_t *fmt, picture_sys_t *p_sys)
{
@@ -316,7 +324,7 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
va->description = infos;
va->get = Lock;
- va->release = NULL;
+ va->release = Release;
va->extract = Copy;
return VLC_SUCCESS;
--
2.9.3
Subproject commit 530b11e5d2ae7417fa14937b9a6342d001a0b6be
Subproject commit 1b103e12a7d40c71fd61b60f339be66298ccb703
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment