Skip to content

Commit 9ef6c9c

Browse files
committed
ffmpeg: update vf-deinterlace-v4l2m2m patch
Patch created using revisions 9047fa1..69dd718 from branch vf-deinterlace-v4l2m2m-n8.1 of https://github.com/jernejsk/FFmpeg
1 parent 03f4b30 commit 9ef6c9c

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

packages/multimedia/ffmpeg/patches/vf-deinterlace-v4l2m2m/ffmpeg-001-vf-deinterlace-v4l2m2m.patch

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From f64d9707c9c9d8393fda20bb0b7ebef1dc97d74e Mon Sep 17 00:00:00 2001
1+
From 69dd718a8b4b00cefbc108589895650f35bbc13b Mon Sep 17 00:00:00 2001
22
From: Jernej Skrabec <jernej.skrabec@siol.net>
33
Date: Tue, 3 Dec 2019 21:01:18 +0100
44
Subject: [PATCH] Add V4L2 m2m deinterlace filter
@@ -7,40 +7,40 @@ Signed-off-by: Alex Bee <knaerzche@gmail.com>
77
---
88
libavfilter/Makefile | 1 +
99
libavfilter/allfilters.c | 1 +
10-
libavfilter/vf_deinterlace_v4l2m2m.c | 1011 ++++++++++++++++++++++++++
11-
3 files changed, 1013 insertions(+)
10+
libavfilter/vf_deinterlace_v4l2m2m.c | 1015 ++++++++++++++++++++++++++
11+
3 files changed, 1017 insertions(+)
1212
create mode 100644 libavfilter/vf_deinterlace_v4l2m2m.c
1313

1414
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
15-
index 69d74183b2..1378c12630 100644
15+
index a530cfae29be..155ea9127f1c 100644
1616
--- a/libavfilter/Makefile
1717
+++ b/libavfilter/Makefile
18-
@@ -278,6 +278,7 @@ OBJS-$(CONFIG_DEFLATE_FILTER) += vf_neighbor.o
19-
OBJS-$(CONFIG_DEFLICKER_FILTER) += vf_deflicker.o
18+
@@ -279,6 +279,7 @@ OBJS-$(CONFIG_DEFLICKER_FILTER) += vf_deflicker.o
19+
OBJS-$(CONFIG_DEINTERLACE_D3D12_FILTER) += vf_deinterlace_d3d12.o
2020
OBJS-$(CONFIG_DEINTERLACE_QSV_FILTER) += vf_vpp_qsv.o
2121
OBJS-$(CONFIG_DEINTERLACE_VAAPI_FILTER) += vf_deinterlace_vaapi.o vaapi_vpp.o
2222
+OBJS-$(CONFIG_DEINTERLACE_V4L2M2M_FILTER) += vf_deinterlace_v4l2m2m.o
2323
OBJS-$(CONFIG_DEJUDDER_FILTER) += vf_dejudder.o
2424
OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o
2525
OBJS-$(CONFIG_DENOISE_VAAPI_FILTER) += vf_misc_vaapi.o vaapi_vpp.o
2626
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
27-
index 0a3e782fe9..ca71234d57 100644
27+
index e26859e15914..e037f8ab647f 100644
2828
--- a/libavfilter/allfilters.c
2929
+++ b/libavfilter/allfilters.c
30-
@@ -252,6 +252,7 @@ extern const FFFilter ff_vf_dedot;
31-
extern const FFFilter ff_vf_deflate;
30+
@@ -253,6 +253,7 @@ extern const FFFilter ff_vf_deflate;
3231
extern const FFFilter ff_vf_deflicker;
3332
extern const FFFilter ff_vf_deinterlace_qsv;
33+
extern const FFFilter ff_vf_deinterlace_d3d12;
3434
+extern const FFFilter ff_vf_deinterlace_v4l2m2m;
3535
extern const FFFilter ff_vf_deinterlace_vaapi;
3636
extern const FFFilter ff_vf_dejudder;
3737
extern const FFFilter ff_vf_delogo;
3838
diff --git a/libavfilter/vf_deinterlace_v4l2m2m.c b/libavfilter/vf_deinterlace_v4l2m2m.c
3939
new file mode 100644
40-
index 0000000000..a498397525
40+
index 000000000000..ef015bb76453
4141
--- /dev/null
4242
+++ b/libavfilter/vf_deinterlace_v4l2m2m.c
43-
@@ -0,0 +1,1011 @@
43+
@@ -0,0 +1,1015 @@
4444
+/*
4545
+ * This file is part of FFmpeg.
4646
+ *
@@ -664,11 +664,15 @@ index 0000000000..a498397525
664664
+ if (!buf)
665665
+ return AVERROR(ENOMEM);
666666
+
667-
+ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type))
668-
+ for (i = 0; i < drm_desc->nb_objects; i++)
667+
+ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type)) {
668+
+ for (i = 0; i < drm_desc->nb_objects; i++) {
669669
+ buf->buffer.m.planes[i].m.fd = drm_desc->objects[i].fd;
670-
+ else
670+
+ buf->buffer.m.planes[i].bytesused = buf->plane_info[i].length;
671+
+ }
672+
+ } else {
671673
+ buf->buffer.m.fd = drm_desc->objects[0].fd;
674+
+ buf->buffer.bytesused = buf->plane_info[0].length;
675+
+ }
672676
+
673677
+ return deint_v4l2m2m_enqueue_buffer(buf);
674678
+}
@@ -1052,6 +1056,3 @@ index 0000000000..a498397525
10521056
+ FILTER_INPUTS(deint_v4l2m2m_inputs),
10531057
+ FILTER_OUTPUTS(deint_v4l2m2m_outputs),
10541058
+};
1055-
--
1056-
2.34.1
1057-

0 commit comments

Comments
 (0)