Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float funque plus features #9

Closed
wants to merge 164 commits into from
Closed

Float funque plus features #9

wants to merge 164 commits into from

Conversation

MallikarjunKamble
Copy link

Floating Point Implementation for new features:

  • Added support for 5-Tap nadeanu spatial csf
  • Added support for nadenau_weight, li, hill, watson and mannos_weight wavelet csf
  • Added MS_ESSIM feature
  • Added ST-RRED feature

Fixed:

  • Repeated aligned_malloc memory allocation for dwt buffers has been removed
  • Added json file for float_funque
  • Added features list in integer_funque

ajayshyam and others added 30 commits January 3, 2023 09:42
Co-authored-by: Ajayshyam <[email protected]>
Co-authored-by: Rakshith G B <[email protected]>
Co-authored-by: RakshithGB <[email protected]>
Co-authored-by: Neha Mary Thomas <[email protected]>
Co-authored-by: Jeeva Raj A <[email protected]>
Added integer implementation for ADM, VIF, Motion score, SSIM, Spatial filter, DWT
Added new feature extractor for integer funque as vmaf_fex_integer_funque.
Added new json file funque_integer.json
Optimisations to VIF, ADM, spatial filter, SSIM, DWT modules
Cleaned up unused memory

Some other updates:

VIF:
Merged computation of var_x, var_y, cov_xy into a single loop.
Memory optimization by removing intermediate buffers
Merged the last stage(numerator & denominator) score computations to the integral image function

ADM:
Avoided computations for pixels outside the border, that are not used for score computation
Optimised integral image (added data across 3 bands & used for integral computation)
Memory optimizations by removing intermediate buffers
Merged the last stage (numerator & denominator) score computations to the integral image & decouple functions

Resizer:
Optimised resizer when resizing width & height by 2.
SIMD optimisations for 32bit & 64bit ARM
Memory optimizations for integer FUNQUE (ADM & VIF)
Configurable reflect padding in integer VIF & ADM
Higher bit-depth support in resizer & spatial filter. All other modules are bit-depth independent.
Resolved all the build warnings in FUNQUE modules
Resolved memory leak in libvmaf code (when the reference and distorted videos have an unequal number of frames)
Mink3 pool SSIM (configurable using a macro)
Stability fixes for VIF (configurable using a macro)
Code clean-up and removal of warnings
Resolved build error reported on the last pull request
Build system updates to support ARM 32-bit compilation
Bug fix in ADM (handling overflow during accumulation)
Added README.md for funque, located at libvmaf/src/feature/third_party/funque/README.md. It contains the following details:

Compile & build steps
Funque model & feature name configurations
The build issue for hbd_resizer in float has been resolved.
* Add AVX2 version of CSF
* Add AVX2 version of DWT
* Add avx2 version of compute_vif and vif_horz_integralsum
* Add AVX2 version of compute_SSIM
* Use ARCH_X86 flag for including avx2 files and VMAF_X86_CPU_FLAG_AVX2 to map the avx2 function
Separate the AVX2 and C code in a x86 folder
* Add AVX2 version of ADM
* Add SSE computation in integer_adm_declouple_avx2 and integer_compute_ssim_funque_avx2

Co-authored-by: PierreIntel <[email protected]>
* Add AVX2 version of integer_funque_image_mad_avx2
* Add AVX2 version of SAST (h/vresize, 8 & 10 bits)


Co-authored-by: PierreIntel <[email protected]>
…ith it, marking it temporal kills parallelism, best to keep motion in separate feature extractor we can leverage from vmaf
…gn the DWT decomposition to allow ssim and ADM calculation on all needed levels
- Add structure for ST-RRED levels
- Add function caller
- Add functions in the feature collector
- Add ST-RRED functions in the provided features
- Add ST-RRED features in json files
- Add files required for build
- Add leaf level function used to compute entropy and scale
- Add the MACROS and functions definitions
- Borrow reflect padding and integral image code from VIF feature

void spatial_csfs(float *src, float *dst, int width, int height, float *tmp_buf, int num_taps)
{
int fwidth;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwidth appears to be a duplicate of num_taps.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will address num_taps redundancy in the next commit

void integer_spatial_filter(void *src, spat_fil_output_dtype *dst, int dst_stride, int width,
int height, int bitdepth, spat_fil_inter_dtype *tmp, int num_taps)
{
int fwidth;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwidth appears to be a duplicate of num_taps.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will address num_taps redundancy in the next commit

cs_sum += cs;
ssim_sq_sum += (l * cs) * (l * cs);
l_sq_sum += l * l;
cs_sq_sum += cs * cs;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l and cs need to be mink3 pooled for use in MS-ESSIM.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Please review and close.

return ret;
}

int compute_ms_ssim_mean_scales(MsSsimScore* score, int n_levels)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function doesn't appear to be handled appropriately under ENABLE_MINK3POOL. Flagging to double-check.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ssim. We will correct the code in ssim and add support for mink3 pooling and update in next commit.

@@ -99,7 +99,7 @@ int vmaf_write_output_xml(VmafContext *vmaf, VmafFeatureCollector *fc,
int err = vmaf_feature_score_pooled(vmaf, feature_name, j, &score,
0, pic_cnt - 1);
if (!err)
fprintf(outfile, "%s=\"%.6f\" ", pool_method_name[j], score);
fprintf(outfile, "%s=\"%.30f\" ", pool_method_name[j], score);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these .30f formattings deliberately left in or are they holdovers from debugging?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to take care of ST-RRED accuracy. ST-RRED values go upto E-30

@MallikarjunKamble
Copy link
Author

Fixed Point Implementation:

  • Addition of Multi-Scale feature computation (All 4 scales)
  • Addition of support for crop width and crop height
  • Addition of MINK3 pool in MS_SSIM
  • Bug fixes for accuracy improvements wrt python

Enhancements to Floating point:

  • Addition of support for crop width and crop height
  • Addition of MINK3 pool in MS_SSIM
  • Addition of filter coeffs for Li and Hill

@MallikarjunKamble MallikarjunKamble closed this by deleting the head repository Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants