[FFmpeg-cvslog] avfilter/vf_waveform: reduce number of operations a little

Paul B Mahol git at videolan.org
Fri Sep 4 19:20:46 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Sep  3 14:21:52 2015 +0000| [fda05554e378d18edaf0a810f20341709c7beecf] | committer: Paul B Mahol

avfilter/vf_waveform: reduce number of operations a little

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index db99d33..21151a6 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -588,7 +588,7 @@ static void flat(WaveformContext *s, AVFrame *in, AVFrame *out,
 
         if (mirror) {
             d0_data += s->size - 1;
-            d1_data += s->size;
+            d1_data += s->size - 1;
         }
 
         for (y = 0; y < src_h; y++) {
@@ -607,7 +607,7 @@ static void flat(WaveformContext *s, AVFrame *in, AVFrame *out,
 
                 for (p = c0 - c1; p < c0 + c1; p++) {
                     if (mirror)
-                        target = d1_data - p - 1;
+                        target = d1_data - p;
                     else
                         target = d1_data + p;
 



More information about the ffmpeg-cvslog mailing list