[FFmpeg-cvslog] avfilter/vf_colormatrix: update output AVFrame colorspace

Michael Niedermayer git at videolan.org
Tue Jan 28 22:00:57 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jan 28 20:49:38 2014 +0100| [b50efe85eaf22b0a4cc8cc1cbe6bfd8ce08226f4] | committer: Michael Niedermayer

avfilter/vf_colormatrix: update output AVFrame colorspace

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/vf_colormatrix.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index 6b38763..2e96263 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -359,6 +359,13 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
     } else
         color->mode = color->source * 4 + color->dest;
 
+    switch(color->dest) {
+    case COLOR_MODE_BT709    : av_frame_set_colorspace(out, AVCOL_SPC_BT709)    ; break;
+    case COLOR_MODE_FCC      : av_frame_set_colorspace(out, AVCOL_SPC_FCC)      ; break;
+    case COLOR_MODE_SMPTE240M: av_frame_set_colorspace(out, AVCOL_SPC_SMPTE240M); break;
+    case COLOR_MODE_BT601    : av_frame_set_colorspace(out, AVCOL_SPC_BT470BG)  ; break;
+    }
+
     calc_coefficients(ctx);
 
     if (in->format == AV_PIX_FMT_YUV422P)



More information about the ffmpeg-cvslog mailing list