[FFmpeg-devel] [PATCH] MAINTAINERS: Add Haihao Xiang for vaapi

2021-12-13 Thread U. Artie Eoff
Current listed maintainers for vaapi plugin are
not reponsive and/or currently active in the
ffmpeg community.  Thus, vaapi plugin patches
(and qsv plugin) have generally gone ignored or
lost in the ether for too long.

Remove Gwenole Beauchesne from vaapi maintainer
who has not been active since 2016.

Current alternative maintainer for vaapi is Mark
Thompson whom has not been active since
March/April 2021.

Therefore, add Haihao Xiang to vaapi maintainer
who's primary role is FFmpeg development with a
focus on the vaapi and qsv plugins.  Haihao has
over a decade of media experience and many years
of FFmpeg development experience, amongst other
media frameworks.

The additional patch for adding Haihao as qsv
plugin maintainer has been submitted previously:

https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210608141134.27448-1-zhongli_...@126.com/

This will help FFmpeg to continue to be the leading
multimedia framework by allowing these plugins to be
actively improved, enhanced, and maintained for existing
and future HW platforms.

Signed-off-by: U. Artie Eoff 
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index dcac46003ecd..fddf065a3abb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -274,8 +274,8 @@ Hardware acceleration:
   dxva2*Hendrik Leppkes, Laurent Aimar, Steve 
Lhomme
   d3d11va*  Steve Lhomme
   mediacodec*   Matthieu Bouron, Aman Gupta
-  vaapi*Gwenole Beauchesne
-  vaapi_encode* Mark Thompson
+  vaapi*Haihao Xiang
+  vaapi_encode* Mark Thompson, Haihao Xiang
   vdpau*Philip Langdale, Carl Eugen Hoyos
   videotoolbox* Rick Kern, Aman Gupta
 
-- 
2.31.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] avfilter: add rawdump filter

2019-07-09 Thread U. Artie Eoff
This filter enables raw frames to be dumped to a
file before they are sent through the auto-inserted
scaler filter and useful when you want unscaled
raw frames in an output file.

Signed-off-by: U. Artie Eoff 
---
 Changelog|   1 +
 doc/filters.texi |  20 +
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/version.h|   4 +-
 libavfilter/vf_rawdump.c | 157 +++
 6 files changed, 182 insertions(+), 2 deletions(-)
 create mode 100644 libavfilter/vf_rawdump.c

diff --git a/Changelog b/Changelog
index 86167b76a13c..7fdd3789f26d 100644
--- a/Changelog
+++ b/Changelog
@@ -35,6 +35,7 @@ version :
 - IFV demuxer
 - derain filter
 - deesser filter
+- rawdump filter
 
 
 version 4.1:
diff --git a/doc/filters.texi b/doc/filters.texi
index b0c49265e296..710100486e14 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -14631,6 +14631,26 @@ less than @code{0}, the filter will try to use a good 
random seed on a
 best effort basis.
 @end table
 
+@anchor{rawdump}
+@section rawdump
+
+Dump raw video frames to a file.
+
+The filter is especially useful when you want to dump raw frames to a file
+before scaling is applied by the auto-inserted scaler in the graph (e.g. for
+multi-resolution input streams).
+
+The input must be in non-hardware format.  It may be necessary to insert an
+additional @option{format} filter immediately preceding in the graph to get
+the input in a supported format for dumping to the file.
+
+The following parameters are required:
+
+@table @option
+@item file @var{filename}
+Specify the filename to dump the data to.
+@end table
+
 @section readeia608
 
 Read closed captioning (EIA-608) information from the top lines of a video 
frame.
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 455c809b151e..f8e02f382af9 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -334,6 +334,7 @@ OBJS-$(CONFIG_PSNR_FILTER)   += vf_psnr.o 
framesync.o
 OBJS-$(CONFIG_PULLUP_FILTER) += vf_pullup.o
 OBJS-$(CONFIG_QP_FILTER) += vf_qp.o
 OBJS-$(CONFIG_RANDOM_FILTER) += vf_random.o
+OBJS-$(CONFIG_RAWDUMP_FILTER)+= vf_rawdump.o
 OBJS-$(CONFIG_READEIA608_FILTER) += vf_readeia608.o
 OBJS-$(CONFIG_READVITC_FILTER)   += vf_readvitc.o
 OBJS-$(CONFIG_REALTIME_FILTER)   += f_realtime.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 04a3df7d56d6..565e2a73cc82 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -317,6 +317,7 @@ extern AVFilter ff_vf_psnr;
 extern AVFilter ff_vf_pullup;
 extern AVFilter ff_vf_qp;
 extern AVFilter ff_vf_random;
+extern AVFilter ff_vf_rawdump;
 extern AVFilter ff_vf_readeia608;
 extern AVFilter ff_vf_readvitc;
 extern AVFilter ff_vf_realtime;
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 5bf37fa8b407..cc5b23b70bbe 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,8 +30,8 @@
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   7
-#define LIBAVFILTER_VERSION_MINOR  56
-#define LIBAVFILTER_VERSION_MICRO 101
+#define LIBAVFILTER_VERSION_MINOR  57
+#define LIBAVFILTER_VERSION_MICRO 100
 
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/vf_rawdump.c b/libavfilter/vf_rawdump.c
new file mode 100644
index ..fe8a8a692603
--- /dev/null
+++ b/libavfilter/vf_rawdump.c
@@ -0,0 +1,157 @@
+/*
+ * 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 "libavutil/buffer.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/opt.h"
+
+#include "avfilter.h"
+#include "formats.h"
+#include "internal.h"
+#include "video.h"
+
+typedef struct RawDumpContext {
+const AVClass *class;
+FILE *rawdump_file;
+char *rawdump_file_str;
+} RawDumpContext;
+
+static int rawdump_query_formats(AVFilterContext *avctx)
+{
+AVFilterFormats *formats = NULL;
+const AVPixFmtDescriptor *desc;
+int err;
+
+for (desc = av_pix_fmt_desc_next(NULL); desc;
+ desc = av_pix_fmt_desc_next(desc)) {
+  

[FFmpeg-devel] [PATCH v4] vaapi_encode_mjpeg: fix bad component id bug

2019-06-07 Thread U. Artie Eoff
The compound literals assigned to "components"
only exist within the scope of the if/else
block (thanks Mark Thompson for the better
explanation).

Thus, after this if/else block, "components"
ends up pointing to an arbitrary/undefined
array.  With some compilers and depending on
optimization settings, these arbitrary values
may end up being the same value (i.e. 0 with
GNU GCC 9.x).  Unfortunately, the GNU GCC
compiler, at least, never prints any warnings
about this.

This patch fixes this issue by assigning the
constant arrays to local variables at function
scope and then pointing "components" to those
as necessary.

Fixes #7915

Signed-off-by: U. Artie Eoff 
---
 libavcodec/vaapi_encode_mjpeg.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vaapi_encode_mjpeg.c b/libavcodec/vaapi_encode_mjpeg.c
index 4dcdc3d16bb0..bd029cc90315 100644
--- a/libavcodec/vaapi_encode_mjpeg.c
+++ b/libavcodec/vaapi_encode_mjpeg.c
@@ -227,6 +227,8 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 JPEGRawScanHeader *sh = >scan.header;
 VAEncPictureParameterBufferJPEG *vpic = pic->codec_picture_params;
 const AVPixFmtDescriptor *desc;
+const uint8_t components_rgb[3] = { 'R', 'G', 'B' };
+const uint8_t components_yuv[3] = {  1,   2,   3  };
 const uint8_t *components;
 int t, i, quant_scale, len;
 
@@ -235,9 +237,9 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 desc = av_pix_fmt_desc_get(priv->common.input_frames->sw_format);
 av_assert0(desc);
 if (desc->flags & AV_PIX_FMT_FLAG_RGB)
-components = (uint8_t[3]) { 'R', 'G', 'B' };
+components = components_rgb;
 else
-components = (uint8_t[3]) {  1,   2,   3  };
+components = components_yuv;
 
 // Frame header.
 
-- 
2.20.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v3] vaapi_encode_mjpeg: fix bad component id bug

2019-06-07 Thread U. Artie Eoff
The compound literals assigned to "components"
only exist within the scope of the if/else
block (thanks Mike Thompson for the better
explanation).

Thus, after this if/else block, "components"
ends up pointing to an arbitrary/undefined
array.  With some compilers and depending on
optimization settings, these arbitrary values
may end up being the same value (i.e. 0 with
GNU GCC 9.x).  Unfortunately, the GNU GCC
compiler, at least, never prints any warnings
about this.

This patch fixes this issue by assigning the
constant arrays to local variables at function
scope and then pointing "components" to those
as necessary.

Fixes #7915

Signed-off-by: U. Artie Eoff 
---
 libavcodec/vaapi_encode_mjpeg.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vaapi_encode_mjpeg.c b/libavcodec/vaapi_encode_mjpeg.c
index 4dcdc3d16bb0..bd029cc90315 100644
--- a/libavcodec/vaapi_encode_mjpeg.c
+++ b/libavcodec/vaapi_encode_mjpeg.c
@@ -227,6 +227,8 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 JPEGRawScanHeader *sh = >scan.header;
 VAEncPictureParameterBufferJPEG *vpic = pic->codec_picture_params;
 const AVPixFmtDescriptor *desc;
+const uint8_t components_rgb[3] = { 'R', 'G', 'B' };
+const uint8_t components_yuv[3] = {  1,   2,   3  };
 const uint8_t *components;
 int t, i, quant_scale, len;
 
@@ -235,9 +237,9 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 desc = av_pix_fmt_desc_get(priv->common.input_frames->sw_format);
 av_assert0(desc);
 if (desc->flags & AV_PIX_FMT_FLAG_RGB)
-components = (uint8_t[3]) { 'R', 'G', 'B' };
+components = components_rgb;
 else
-components = (uint8_t[3]) {  1,   2,   3  };
+components = components_yuv;
 
 // Frame header.
 
-- 
2.20.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v2] vaapi_encode_mjpeg: fix bad component id bug

2019-06-07 Thread U. Artie Eoff
When compile time optimizations are enabled and
compiling with GNU GCC 9.x, the pointer assignment
to the inline brace-enclosed list initialized
array does not work and "component" ends up pointing
to an empty/undefined array.  Thus, all of the
frame header component id's get assigned the
same value of 0.

As Mark Thompson described, this is caused by
"...the compound literals only exist in the tiny
scope of the if/else branches..." which strangely
is not producing a compiler warning.

This patch fixes this issue by assigning the constant
arrays to local variables at function scope and then
pointing "component" to those as necessary.

Fixes #7915

Signed-off-by: U. Artie Eoff 
---
 libavcodec/vaapi_encode_mjpeg.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vaapi_encode_mjpeg.c b/libavcodec/vaapi_encode_mjpeg.c
index 4dcdc3d16bb0..bd029cc90315 100644
--- a/libavcodec/vaapi_encode_mjpeg.c
+++ b/libavcodec/vaapi_encode_mjpeg.c
@@ -227,6 +227,8 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 JPEGRawScanHeader *sh = >scan.header;
 VAEncPictureParameterBufferJPEG *vpic = pic->codec_picture_params;
 const AVPixFmtDescriptor *desc;
+const uint8_t components_rgb[3] = { 'R', 'G', 'B' };
+const uint8_t components_yuv[3] = {  1,   2,   3  };
 const uint8_t *components;
 int t, i, quant_scale, len;
 
@@ -235,9 +237,9 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 desc = av_pix_fmt_desc_get(priv->common.input_frames->sw_format);
 av_assert0(desc);
 if (desc->flags & AV_PIX_FMT_FLAG_RGB)
-components = (uint8_t[3]) { 'R', 'G', 'B' };
+components = components_rgb;
 else
-components = (uint8_t[3]) {  1,   2,   3  };
+components = components_yuv;
 
 // Frame header.
 
-- 
2.20.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] vaapi_encode_mjpeg: WA: fix bad component id bug

2019-06-07 Thread U. Artie Eoff
When compile time optimizations are enabled and
compiling with GNU GCC 9.x, the pointer assignment
to the inline brace-enclosed list initialized
array does not work and "component" ends up pointing
to an empty array.  This is probably a bug in GCC
9.x.

This patch works around this issue by assigning
the constant arrays to local variables and then
pointing "component" to those as necessary.

Fixes #7915

Signed-off-by: U. Artie Eoff 
---
 libavcodec/vaapi_encode_mjpeg.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vaapi_encode_mjpeg.c b/libavcodec/vaapi_encode_mjpeg.c
index 4dcdc3d16bb0..3e8cbb7c9bf9 100644
--- a/libavcodec/vaapi_encode_mjpeg.c
+++ b/libavcodec/vaapi_encode_mjpeg.c
@@ -227,6 +227,8 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 JPEGRawScanHeader *sh = >scan.header;
 VAEncPictureParameterBufferJPEG *vpic = pic->codec_picture_params;
 const AVPixFmtDescriptor *desc;
+const uint8_t components_rgb[3] = { 'R', 'G', 'B' };
+const uint8_t components_123[3] = {  1,   2,   3  };
 const uint8_t *components;
 int t, i, quant_scale, len;
 
@@ -235,9 +237,9 @@ static int 
vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
 desc = av_pix_fmt_desc_get(priv->common.input_frames->sw_format);
 av_assert0(desc);
 if (desc->flags & AV_PIX_FMT_FLAG_RGB)
-components = (uint8_t[3]) { 'R', 'G', 'B' };
+components = components_rgb;
 else
-components = (uint8_t[3]) {  1,   2,   3  };
+components = components_123;
 
 // Frame header.
 
-- 
2.20.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".