快速Cvvdp实现 (C语言)
Fast Cvvdp Implementation in C

原始链接: https://github.com/halidecx/fcvvdp

## fcvvdp:一种快速的CVVDP实现 fcvvdp是Halide Compression开发,基于Vship项目的一种新的、快速的C语言CVVDP感知质量指标实现。在Core i7 13700k Linux系统上的基准测试表明,fcvvdp相较于原始的`cvvdp`实现,性能有了显著提升。 具体而言,fcvvdp实现了大约**18%更快的墙钟时间**,使用了**91%更少的RAM**,并且需要**88%更少的CPU周期**。在用户时间方面,效率也大约提高了15倍。目前,fcvvdp运行在单个CPU线程上,未来计划更新以解决此限制。 该工具接受PNG或Y4M图像/视频输入,并支持各种显示模型(FHD、4K、HDR选项)。它使用Zig编译,需要安装依赖项并执行`zig build --release=fast`命令(可选FLTO以进行进一步优化)。生成的二进制文件和库位于`zig-out`目录中。fcvvdp采用Apache 2.0许可。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 快速 CVVDP C 语言实现 (github.com/halidecx) 4 点赞 by todsacerdoti 2 小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 password4321 5 分钟前 [–] TIL:CVVDP 是一种全参考视频和图像保真度指标,旨在模拟人类视觉系统以预测两个来源之间的感知差异。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

A fast C implementation of the CVVDP metric (arXiv) from the University of Cambridge. More information about how CVVDP works according to this implementation is provided here.

Benchmarked using poop on Linux, Core i7 13700k. Note that fcvvdp runs with one CPU thread here while cvvdp uses multiple threads. This is a current limitation of fcvvdp, which does not yet support multithreading.

poop "cvvdp -r fm360p.y4m -t fm360p_x264.y4m --display standard_fhd" "./fcvvdp -m fhd fm360p.y4m fm360p_x264.y4m"
Benchmark 1 (3 runs): cvvdp -r fm360p.y4m -t fm360p_x264.y4m --display standard_fhd
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          19.6s  ±  568ms    19.2s  … 20.2s           0 ( 0%)        0%
  peak_rss           1.00GB ± 28.1MB     979MB … 1.03GB          0 ( 0%)        0%
  cpu_cycles          747G  ± 8.54G      741G  …  757G           0 ( 0%)        0%
  instructions        362G  ± 1.20G      361G  …  363G           0 ( 0%)        0%
  cache_references   2.77G  ± 46.9M     2.71G  … 2.81G           0 ( 0%)        0%
  cache_misses        899M  ± 11.7M      890M  …  912M           0 ( 0%)        0%
  branch_misses       107M  ± 1.80M      105M  …  109M           0 ( 0%)        0%
Benchmark 2 (3 runs): ./fcvvdp -m fhd fm360p.y4m fm360p_x264.y4m
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          16.1s  ± 56.2ms    16.0s  … 16.1s           0 ( 0%)        ⚡- 17.9% ±  4.7%
  peak_rss           86.7MB ±  109KB    86.6MB … 86.8MB          0 ( 0%)        ⚡- 91.4% ±  4.5%
  cpu_cycles         82.8G  ± 80.9M     82.8G  … 82.9G           0 ( 0%)        ⚡- 88.9% ±  1.8%
  instructions        255G  ± 30.0M      255G  …  255G           0 ( 0%)        ⚡- 29.6% ±  0.5%
  cache_references   1.49G  ± 6.43M     1.49G  … 1.50G           0 ( 0%)        ⚡- 46.1% ±  2.7%
  cache_misses        369M  ± 2.84M      365M  …  371M           0 ( 0%)        ⚡- 59.0% ±  2.2%
  branch_misses      8.50M  ± 62.3K     8.45M  … 8.57M           0 ( 0%)        ⚡- 92.1% ±  2.7%

fcvvdp uses 91% less RAM, 88% fewer CPU cycles, and is almost 18% faster in terms of wall clock time. In terms of user time, fcvvdp is ~15x more efficient.

Compilation requires:

  1. Ensure all dependencies are installed
  2. Run zig build --release=fast (add -Dflto=true for FLTO)
  3. Your fcvvdp binary will be in zig-out/bin/
fcvvdp by Halide Compression, LLC | [version]

usage: fcvvdp [options] <reference.(png|y4m)> <distorted.(png|y4m)>

compare two images/videos using the CVVDP perceptual quality metric

options:
  -m, --model <name>
      display model to use (fhd, 4k, hdr_pq, hdr_hlg, hdr_linear,
      hdr_dark, hdr_zoom); default: fhd
  -v, --verbose
      show verbose output with display parameters
  -j, --json
      output result as JSON
  -h, --help
      show this help message
  1. Ensure all dependencies are installed
  2. Run zig build --release=fast (add -Dflto=true for FLTO)
  3. The libcvvdp library will be in zig-out/lib/, alongside cvvdp.h in zig-out/include/.

Library usage is clearly defined in cvvdp.h.

fcvvdp is under the Apache 2.0 License. fcvvdp is developed by Halide Compression.

Special thanks to Vship, from which this implementation was derived. Vship is under the MIT license.

联系我们 contact @ memedata.com