summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-30 11:35:25 +0200
committerwm4 <wm4@nowhere>2016-09-30 13:05:30 +0200
commit7e6456f43ad87df538efa979007c4125a8a33cf0 (patch)
tree6ba010b070d4111a90b6b8cefea5b8f417924180
parentb6920372c23fe79a61855c65511c4807b96a7f2e (diff)
downloadmpv-7e6456f43ad87df538efa979007c4125a8a33cf0.tar.bz2
mpv-7e6456f43ad87df538efa979007c4125a8a33cf0.tar.xz
rpi: add --hwdec=rpi-copy
This means it can be used with normal video filters. Might help out with #3604.
-rw-r--r--DOCS/man/options.rst4
-rw-r--r--options/options.c1
-rw-r--r--video/decode/vd_lavc.c6
-rw-r--r--video/hwdec.h1
4 files changed, 12 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index eecf48a636..9103d3d641 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -622,6 +622,7 @@ Video
:d3d11va-copy: copies video back to system RAM (Windows only)
:mediacodec: copies video back to system RAM (Android only)
:rpi: requires ``--vo=opengl`` (Raspberry Pi only - default if available)
+ :rpi-copy: copies video back to system RAM (Raspberry Pi only)
:cuda: requires ``--vo=opengl`` (Any platform CUDA is available)
:cuda-copy: copies video back to system RAM (Any platform CUDA is available)
@@ -707,6 +708,9 @@ Video
to deinterlace inside the decoder. However, traditional deinterlacing
filters can be used in this case.
+ ``rpi`` always uses the hardware overlay renderer, even with
+ ``--vo=opengl``.
+
All other methods, in particular the copy-back methods (like
``dxva2-copy`` etc.) are either fully safe, or not worse than software
decoding.
diff --git a/options/options.c b/options/options.c
index b7cc7443d2..f8f5f707a5 100644
--- a/options/options.c
+++ b/options/options.c
@@ -98,6 +98,7 @@ const struct m_opt_choice_alternatives mp_hwdec_names[] = {
{"d3d11va", HWDEC_D3D11VA},
{"d3d11va-copy",HWDEC_D3D11VA_COPY},
{"rpi", HWDEC_RPI},
+ {"rpi-copy", HWDEC_RPI_COPY},
{"mediacodec", HWDEC_MEDIACODEC},
{"cuda", HWDEC_CUDA},
{"cuda-copy", HWDEC_CUDA_COPY},
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 6328f5fe49..147b1d664d 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -141,6 +141,11 @@ static const struct vd_lavc_hwdec mp_vd_lavc_rpi = {
.lavc_suffix = "_mmal",
.image_format = IMGFMT_MMAL,
};
+static const struct vd_lavc_hwdec mp_vd_lavc_rpi_copy = {
+ .type = HWDEC_RPI_COPY,
+ .lavc_suffix = "_mmal",
+ .copying = true,
+};
#endif
#if HAVE_ANDROID
@@ -162,6 +167,7 @@ static const struct vd_lavc_hwdec mp_vd_lavc_cuda_copy = {
static const struct vd_lavc_hwdec *const hwdec_list[] = {
#if HAVE_RPI
&mp_vd_lavc_rpi,
+ &mp_vd_lavc_rpi_copy,
#endif
#if HAVE_VDPAU_HWACCEL
&mp_vd_lavc_vdpau,
diff --git a/video/hwdec.h b/video/hwdec.h
index b69e3fc309..fd99043c10 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -20,6 +20,7 @@ enum hwdec_type {
HWDEC_D3D11VA,
HWDEC_D3D11VA_COPY,
HWDEC_RPI,
+ HWDEC_RPI_COPY,
HWDEC_MEDIACODEC,
HWDEC_CUDA,
HWDEC_CUDA_COPY,