diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-28 23:49:38 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-29 00:52:02 +0400 |
commit | b50efe85eaf22b0a4cc8cc1cbe6bfd8ce08226f4 (patch) | |
tree | 02e5347725ae45f554560050b5b069f0a8365656 /libavfilter/vf_colormatrix.c | |
parent | 3e41e747d65467116f41f6be0c9289d6c8e44a5d (diff) |
avfilter/vf_colormatrix: update output AVFrame colorspace
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_colormatrix.c')
-rw-r--r-- | libavfilter/vf_colormatrix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index 6b38763d45..2e962637bf 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) |