[FFmpeg-cvslog] avfilter/vf_libvmaf: fix pre convert to framesync2 bugs

Ashish Singh git at videolan.org
Wed Aug 30 16:24:02 EEST 2017


ffmpeg | branch: master | Ashish Singh <ashk43712 at gmail.com> | Thu Aug  3 11:22:01 2017 +0530| [2a4a26fa4f3c9310cd8cf6a0d093c927f64ef8a7] | committer: Ronald S. Bultje

avfilter/vf_libvmaf: fix pre convert to framesync2 bugs

Hi, it fixes the errors while converting to framesync2.
libvmaf was changed recently, double *score variable is removed in the new
version since it's not used anywhere. This patch fixes all the warnings and
segmentation faults.

Signed-off-by: Ashish Singh <ashk43712 at gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>

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

 libavfilter/vf_libvmaf.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
index 2165561c5a..405820f182 100644
--- a/libavfilter/vf_libvmaf.c
+++ b/libavfilter/vf_libvmaf.c
@@ -24,7 +24,6 @@
  * Calculate the VMAF between two input videos.
  */
 
-#include <inttypes.h>
 #include <pthread.h>
 #include <libvmaf.h>
 #include "libavutil/avstring.h"
@@ -84,11 +83,10 @@ static const AVOption libvmaf_options[] = {
 FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs);
 
 #define read_frame_fn(type, bits)                                               \
-    static int read_frame_##bits##bit(float *ref_data, float *main_data,            \
-                                      float *temp_data, int stride,             \
-                                      double *score, void *ctx)                 \
+    static int read_frame_##bits##bit(float *ref_data, float *main_data,        \
+                                      float *temp_data, int stride, void *ctx)  \
 {                                                                               \
-    LIBVMAFContext *s = (LIBVMAFContext *) ctx;                                       \
+    LIBVMAFContext *s = (LIBVMAFContext *) ctx;                                 \
     int ret;                                                                    \
     \
     pthread_mutex_lock(&s->lock);                                               \
@@ -150,7 +148,7 @@ read_frame_fn(uint16_t, 10);
 static void compute_vmaf_score(LIBVMAFContext *s)
 {
     int (*read_frame)(float *ref_data, float *main_data, float *temp_data,
-                      int stride, double *score, void *ctx);
+                      int stride, void *ctx);
 
     if (s->desc->comp[0].depth <= 8) {
         read_frame = read_frame_8bit;



More information about the ffmpeg-cvslog mailing list