Commit 42db4aaa authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde Committed by Michael Niedermayer

vf_colormatrix: calculate coefficients only once

calc_coefficients is no longer being called every frame
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 46428ea3
...@@ -187,6 +187,8 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -187,6 +187,8 @@ static av_cold int init(AVFilterContext *ctx)
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
calc_coefficients(ctx);
return 0; return 0;
} }
...@@ -400,8 +402,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) ...@@ -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; case COLOR_MODE_BT601 : av_frame_set_colorspace(out, AVCOL_SPC_BT470BG) ; break;
} }
calc_coefficients(ctx);
td.src = in; td.src = in;
td.dst = out; td.dst = out;
td.c2 = color->yuv_convert[color->mode][0][1]; td.c2 = color->yuv_convert[color->mode][0][1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment