Netflix / vmaf

Perceptual video quality assessment based on multi-method fusion.
Other
4.65k stars 755 forks source link

Modify metadata_register API for support individual metric propagation. #1387

Open yigithanyigit opened 2 months ago

yigithanyigit commented 2 months ago

In current state of this API it can only propagate explicitly given features, In other words giving an identifier doesn't work.

For example; for propagating PSNR: psnr_y, psnr_cb, psnr_cr should be given.

With these changes, propagating individual features and propagating with identifier possible.

kylophone commented 2 months ago

I'm not sure if we need an API like this yet (?). I will hold off on the reviewing this PR until we figure that out. In the meantime, I will reply to your patch in ffmpeg-devel.

yigithanyigit commented 2 months ago

Thanks for the comment,

I found some problems about this patch and I wanted to add for future reference.

After some tests I realized this patch doesn't work expected in some identifiers (VIF, ADM). The main reason of the problem those identifiers has some conditional features.

For example:

https://github.com/Netflix/vmaf/blob/d95b69e03d9401ad9f3532eaab14066427761c35/libvmaf/src/feature/integer_adm.c#L2707-L2741

https://github.com/Netflix/vmaf/blob/d95b69e03d9401ad9f3532eaab14066427761c35/libvmaf/src/feature/integer_vif.c#L692-L746

As you see those features going to append if debug enabled. However my implementation going to add those features anyway:

https://github.com/Netflix/vmaf/blob/d95b69e03d9401ad9f3532eaab14066427761c35/libvmaf/src/feature/integer_adm.c#L2757-L2767

We should handle this somehow. Maybe we can add an option to VmafMetadataConfiguration.

Thanks