summaryrefslogtreecommitdiff
path: root/libavfilter/vf_colormatrix.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-06-05 16:05:18 -0400
committerMichael Niedermayer <michaelni@gmx.at>2015-06-07 00:56:32 +0200
commit42db4aaaa6e49608b78db01f2698e1120b491fdb (patch)
treea3c0a9413ca3ed0ba29d473091d878c1ffd27d24 /libavfilter/vf_colormatrix.c
parent46428ea332d8afa3f598d6a9d660716a4f90da6d (diff)
vf_colormatrix: calculate coefficients only once
calc_coefficients is no longer being called every frame Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_colormatrix.c')
-rw-r--r--libavfilter/vf_colormatrix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index fde4b897fd..4971cac308 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -187,6 +187,8 @@ static av_cold int init(AVFilterContext *ctx)
return AVERROR(EINVAL);
}
+ calc_coefficients(ctx);
+
return 0;
}
@@ -400,8 +402,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
case COLOR_MODE_BT601 : av_frame_set_colorspace(out, AVCOL_SPC_BT470BG) ; break;
}
- calc_coefficients(ctx);
-
td.src = in;
td.dst = out;
td.c2 = color->yuv_convert[color->mode][0][1];