Opened 6 years ago

Closed 6 years ago

#6921 closed defect (wontfix)

compile error with vf_libvmaf.c in ffmpeg git master

Reported by: bermond Owned by:
Priority: important Component: build system
Version: git-master Keywords: libvmaf regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm getting the following compile error when trying to build ffmpeg git master:

CC      libavfilter/vf_libvmaf.o
libavfilter/vf_libvmaf.c: In function ‘compute_vmaf_score’:
libavfilter/vf_libvmaf.c:162:29: warning: passing argument 1 of ‘compute_vmaf’ from incompatible pointer type [-Wincompatible-pointer-types]
     s->error = compute_vmaf(&s->vmaf_score, format, s->width, s->height,
                             ^
In file included from libavfilter/vf_libvmaf.c:28:0:
/usr/include/libvmaf.h:26:8: note: expected ‘char *’ but argument is of type ‘double *’
 double compute_vmaf(char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, int do_ssim, int do_ms_ssim, char *pool_method);
        ^~~~~~~~~~~~
libavfilter/vf_libvmaf.c:162:45: warning: passing argument 2 of ‘compute_vmaf’ makes integer from pointer without a cast [-Wint-conversion]
     s->error = compute_vmaf(&s->vmaf_score, format, s->width, s->height,
                                             ^~~~~~
In file included from libavfilter/vf_libvmaf.c:28:0:
/usr/include/libvmaf.h:26:8: note: expected ‘int’ but argument is of type ‘char *’
 double compute_vmaf(char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, int do_ssim, int do_ms_ssim, char *pool_method);
        ^~~~~~~~~~~~
libavfilter/vf_libvmaf.c:162:63: warning: passing argument 4 of ‘compute_vmaf’ makes pointer from integer without a cast [-Wint-conversion]
     s->error = compute_vmaf(&s->vmaf_score, format, s->width, s->height,
                                                               ^
In file included from libavfilter/vf_libvmaf.c:28:0:
/usr/include/libvmaf.h:26:8: note: expected ‘int (*)(float *, float *, float *, int,  void *)’ but argument is of type ‘int’
 double compute_vmaf(char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, int do_ssim, int do_ms_ssim, char *pool_method);
        ^~~~~~~~~~~~
libavfilter/vf_libvmaf.c:163:41: warning: passing argument 6 of ‘compute_vmaf’ from incompatible pointer type [-Wincompatible-pointer-types]
                             read_frame, s, s->model_path, s->log_path,
                                         ^
In file included from libavfilter/vf_libvmaf.c:28:0:
/usr/include/libvmaf.h:26:8: note: expected ‘char *’ but argument is of type ‘LIBVMAFContext * {aka struct LIBVMAFContext *}’
 double compute_vmaf(char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, int do_ssim, int do_ms_ssim, char *pool_method);
        ^~~~~~~~~~~~
libavfilter/vf_libvmaf.c:164:29: warning: passing argument 9 of ‘compute_vmaf’ makes integer from pointer without a cast [-Wint-conversion]
                             s->log_fmt, 0, 0, s->enable_transform,
                             ^
In file included from libavfilter/vf_libvmaf.c:28:0:
/usr/include/libvmaf.h:26:8: note: expected ‘int’ but argument is of type ‘char *’
 double compute_vmaf(char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, int do_ssim, int do_ms_ssim, char *pool_method);
        ^~~~~~~~~~~~
libavfilter/vf_libvmaf.c:166:29: warning: passing argument 16 of ‘compute_vmaf’ makes pointer from integer without a cast [-Wint-conversion]
                             s->ms_ssim, s->pool);
                             ^
In file included from libavfilter/vf_libvmaf.c:28:0:
/usr/include/libvmaf.h:26:8: note: expected ‘char *’ but argument is of type ‘int’
 double compute_vmaf(char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, int do_ssim, int do_ms_ssim, char *pool_method);
        ^~~~~~~~~~~~
libavfilter/vf_libvmaf.c:162:16: error: too many arguments to function ‘compute_vmaf’
     s->error = compute_vmaf(&s->vmaf_score, format, s->width, s->height,
                ^~~~~~~~~~~~
In file included from libavfilter/vf_libvmaf.c:28:0:
/usr/include/libvmaf.h:26:8: note: declared here
 double compute_vmaf(char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, int do_ssim, int do_ms_ssim, char *pool_method);
        ^~~~~~~~~~~~
make: *** [ffbuild/common.mak:60: libavfilter/vf_libvmaf.o] Error 1

How to reproduce:

$ git clone git://source.ffmpeg.org/ffmpeg.git
$ cd ffmpeg
$ ./configure --enable-version3 --enable-libvmaf
$ make -j1

A git bisect points to the recent commit df3222d4bb18cbceda443def17b1b29067ed6e3f.

System information:
OS: Arch Linux x86_64
ffmpeg: git master
libvmaf: 1.3.1
compiler: gcc 7.2.1

Change History (4)

comment:1 by Gyan, 6 years ago

Is your libvmaf repo up to date? The fn 'compute_vmaf_score' was recently changed. See https://github.com/Netflix/vmaf/commit/96b99b9416135a0dfeb42c3b148852cce2b3f531

comment:2 by Carl Eugen Hoyos, 6 years ago

Component: undeterminedbuild system
Keywords: libvmaf regression added
Priority: normalimportant

comment:3 by bermond, 6 years ago

ffmpeg currently needs libvmaf git master.

Currently it will not compile with libvmaf stable release version.

I think this can be closed.

comment:4 by Elon Musk, 6 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.