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>
This commit is contained in:
Ganesh Ajjanagadde 2015-06-05 16:05:18 -04:00 committed by Michael Niedermayer
parent 46428ea332
commit 42db4aaaa6
1 changed files with 2 additions and 2 deletions

View File

@ -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];