[FFmpeg-cvslog] vf_colormatrix: calculate coefficients only once

Ganesh Ajjanagadde git at videolan.org
Sun Jun 7 02:54:43 CEST 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Fri Jun  5 16:05:18 2015 -0400| [42db4aaaa6e49608b78db01f2698e1120b491fdb] | committer: Michael Niedermayer

vf_colormatrix: calculate coefficients only once

calc_coefficients is no longer being called every frame

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/vf_colormatrix.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index fde4b89..4971cac 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];



More information about the ffmpeg-cvslog mailing list