[FFmpeg-cvslog] avfilter/vf_waveform: add gray10 and gray12 support

Paul B Mahol git at videolan.org
Tue Nov 29 12:36:49 EET 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Nov 29 11:34:48 2016 +0100| [57ef0f0f17a0b71946bfc9304902d4a531ea42a8] | committer: Paul B Mahol

avfilter/vf_waveform: add gray10 and gray12 support

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57ef0f0f17a0b71946bfc9304902d4a531ea42a8
---

 libavfilter/vf_waveform.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index 64abbf2..70995ee 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -166,7 +166,7 @@ static const enum AVPixelFormat in_lowpass_pix_fmts[] = {
     AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUVJ420P,
     AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P,
     AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P,
-    AV_PIX_FMT_GRAY8,
+    AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12,
     AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV420P9,
     AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA420P9,
     AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV420P10,
@@ -252,6 +252,16 @@ static const enum AVPixelFormat out_gray8_lowpass_pix_fmts[] = {
     AV_PIX_FMT_NONE
 };
 
+static const enum AVPixelFormat out_gray10_lowpass_pix_fmts[] = {
+    AV_PIX_FMT_GRAY10,
+    AV_PIX_FMT_NONE
+};
+
+static const enum AVPixelFormat out_gray12_lowpass_pix_fmts[] = {
+    AV_PIX_FMT_GRAY12,
+    AV_PIX_FMT_NONE
+};
+
 static const enum AVPixelFormat flat_pix_fmts[] = {
     AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P,
     AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV444P10,
@@ -301,6 +311,10 @@ static int query_formats(AVFilterContext *ctx)
 
     if (s->filter == LOWPASS && ncomp == 1 && depth == 8)
         out_pix_fmts = out_gray8_lowpass_pix_fmts;
+    else if (s->filter == LOWPASS && ncomp == 1 && depth == 10)
+        out_pix_fmts = out_gray10_lowpass_pix_fmts;
+    else if (s->filter == LOWPASS && ncomp == 1 && depth == 12)
+        out_pix_fmts = out_gray12_lowpass_pix_fmts;
     else if (rgb && depth == 8 && ncomp > 2)
         out_pix_fmts = out_rgb8_lowpass_pix_fmts;
     else if (rgb && depth == 9 && ncomp > 2)



More information about the ffmpeg-cvslog mailing list