Skip to content

Commit 80634df

Browse files
committed
update readme
Signed-off-by: Liang <[email protected]>
1 parent 691483a commit 80634df

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

How to build.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
# Prerequisites
22
To build this project you will need:
3-
- Linux based OS (Tested and validated on Ubuntu 18.04 LTS, Ubuntu 22.04 and CentOS 7.9)
3+
- Linux based OS
4+
- For CPU tested and validated on Ubuntu 18.04 LTS, Ubuntu 22.04 and CentOS 7.9
5+
- For GPU tested and validated on Intel® Data Center GPU Flex 170 with Ubuntu 22.04 LTS(5.15 LTS kernel)
46
- [Docker](https://www.docker.com/)
57
- Intel Xeon hardware which supports Intel AVX512 (Skylake generation or later)
6-
- Compiler (clang++, g++)
8+
- Compiler (clang++, g++, icc), and enabling AVX512-FP16 on Sapphire Rapiads needs:
9+
- clang++ version 14.0.0 or later
10+
- g++ version 12.1.0 with binutils 2.38 or later
11+
- icc version 2021.2 or later
712
- Cmake version 3.14 or later
813
- Intel® Integrated Performance Primitives (Intel® IPP) (Stand-Alone Version is the minimum requirement)
914
- zlib1g-dev, pkg-config (The pkg-config is used to find x264.pc/x265.pc in specific pkgconfig path.)
1015

1116
We provide 3 ways to build the Intel VSR with FFmpeg environment:
12-
- build docker images with dockerfiles
13-
- build via [scripts](https://github.com/OpenVisualCloud/Video-Super-Resolution-Library/tree/master/scripts)
14-
- build manually.
17+
- build docker images with dockerfiles(only for CPU).
18+
- build via [scripts](https://github.com/OpenVisualCloud/Video-Super-Resolution-Library/tree/master/scripts)(only for CPU).
19+
- build manually(both CPU and GPU).
1520

1621
# Build Docker Images.
1722

18-
We provide 3 Dockerfile: Ubuntu18.04, Ubuntu22.04 and CentOS7.9. You can refer to below steps to build docker images.
23+
We provide 3 Dockerfile for Intel Xeon platforms: Ubuntu18.04, Ubuntu22.04 and CentOS7.9. You can refer to below steps to build docker images.
1924
## Setup docker proxy as follows if you are behind a firewall:
2025
```
2126
sudo mkdir -p /etc/systemd/system/docker.service.d
@@ -111,7 +116,7 @@ To build the library with OpenCL support, run \
111116

112117
#### Copy vf_raisr.c to ffmpeg libavfilter folder
113118
`cp ../Video-Super-Resolution-Library/ffmpeg/vf_raisr.c libavfilter/` \
114-
To use raisr_opencl you need ot copy vf_raisr_opencl.c as well \
119+
To use raisr_opencl you need to copy vf_raisr_opencl.c as well \
115120
`cp ../Video-Super-Resolution-Library/ffmpeg/vf_raisr_opencl.c libavfilter/`
116121

117122
#### Apply patch

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Intel® Library for Video Super Resolution (Intel® Library for VSR) README
2-
This project aims to provide a CPU based implementation of the RAISR (Rapid and Accurate Image Super Resolution) algorithm (https://arxiv.org/pdf/1606.01299.pdf) optimized to achieve beyond real-time performance for 2x upscaling on Intel® Xeon® platforms. It can take a lower resolution image and upscale 2x (e.g 540p to 1080p) and provides better quality results than standard (bicubic) algorithms and a good performance vs quality trade-off as compared to DL-based algorithms like EDSR. The Intel Library for VSR is provided as an FFmpeg plugin inside of a Docker container to help ease testing and deployment burdens. This project is developed using C++ and takes advantage of Intel® Advanced Vector Extension 512 (Intel® AVX-512) where available and newly added Intel® AVX-512FP16 support on Intel® Xeon® 4th Generation (Sapphire Rapids).
2+
Video Super Resolution coverts video from low resolution to high resolution using traditional image processing or AI-based methods.
3+
4+
RAISR (Rapid and Accurate Image Super Resolution) algorithm (https://arxiv.org/pdf/1606.01299.pdf) is public AI-based VSR algorithm. The algorithm provides better quality results than standard (bicubic) algorithms and a good performance vs quality trade-off as compared to DL-based algorithms like EDSR.
5+
6+
We have enhanced the public RAISR algorithm to achieve better visual quality and beyond real-time performance for 2x and 1.5x upscaling on Intel® Xeon® platforms and Intel® GPUs. The Intel Library for VSR is provided as an FFmpeg plugin inside of a Docker container(Docker container only for CPU) to help ease testing and deployment burdens. This project is developed using C++ and takes advantage of Intel® Advanced Vector Extension 512 (Intel® AVX-512) where available and newly added Intel® AVX-512FP16 support on Intel® Xeon® 4th Generation (Sapphire Rapids) and added OpenCL support on Intel® GPUs.
37

48
## How to build
59
Please see "How to build.md" to build via scripts or manually.
@@ -64,21 +68,21 @@ ffmpeg -init_hw_device vaapi=va -init_hw_device opencl=ocl@va -hwaccel vaapi -hw
6468
`./ffmpeg -h filter=raisr`
6569

6670
raisr AVOptions:
67-
ratio <int> ..FV....... ratio (currently only ratio of 2 is supported) (from 2 to 2) (default 2)
71+
ratio <float> ..FV....... ratio of the upscaling, between 1 and 4 (from 1 to 4) (default 2)
6872
bits <int> ..FV....... bit depth (from 8 to 10) (default 8)
69-
range <string> ..FV....... color range of the input. If you are working with images, you
70-
may want to set range to full (video/full) (default video)
71-
threadcount <int> ..FV....... thread count (from 1 to 120) (default 1)
73+
range <string> ..FV....... color range of the input. If you are working with images, you may want to set range to full (video/full) (default video)
74+
threadcount <int> ..FV....... thread count (from 1 to 120) (default 20)
7275
filterfolder <string> ..FV....... absolute filter folder path (default "filters_2x/filters_lowres")
7376
blending <int> ..FV....... CT blending mode (1: Randomness, 2: CountOfBitsChanged) (from 1 to 2) (default 2)
7477
passes <int> ..FV....... passes to run (1: one pass, 2: two pass) (from 1 to 2) (default 1)
75-
mode <int> ..FV....... mode for two pass (1: upscale in 1st pass, 2: upscale in 2nd
76-
pass) (from 1 to 2) (default 1)
77-
asm <string> ..FV....... x86 asm type: (avx512fp16, avx512 or avx2) (default "avx512fp16")
78+
mode <int> ..FV....... mode for two pass (1: upscale in 1st pass, 2: upscale in 2nd pass) (from 1 to 2) (default 1)
79+
asm <string> ..FV....... x86 asm type: (avx512fp16, avx512, avx2 or opencl) (default "avx512fp16")
80+
platform <int> ..FV....... select the platform (from 0 to INT_MAX) (default 0)
81+
device <int> ..FV....... select the device (from 0 to INT_MAX) (default 0)
7882

7983
## Advanced Usage ( through Exposed Parameters )
8084
The FFmpeg plugin for Intel Library for VSR exposes a number of parameters that can be changed for advanced customization
81-
### threadcount
85+
### threadcount (only for CPU)
8286
Allowable values (1,120), default (20)
8387

8488
Changes the number of software threads used in the algorithm. Values 1..120 will operate on segments of an image such that efficient threading can greatly increase the performance of the upscale. The value itself is the number of threads allocated.
@@ -159,7 +163,7 @@ The library caps color within video/full range.
159163
./ffmpeg -y -i [image/video file] -vf "raisr=threadcount=20:range=full" outputfile
160164
```
161165
### blending
162-
Allowable values (1: Randomness, 2: CountOfBitsChanged), default (2 )
166+
Allowable values (1: Randomness, 2: CountOfBitsChanged), default (2 ). For GPU only support 2:CountOfBitsChanged blending.
163167

164168
The library holds two different functions which blend the initial (cheap) upscaled image with the RAISR filtered image. This can be a means of removing any aggressive or outlying artifacts that get introduced by the filtered image.
165169
### passes
@@ -174,7 +178,7 @@ Dictates which pass the upscaling should occur in. Some filters have the best r
174178
./ffmpeg -i /input_files/input.mp4 -vf "raisr=threadcount=20:passes=2:mode=2" -pix_fmt yuv420p /output_files/out.yuv
175179
```
176180
### asm
177-
Allowable values ("avx512","avx2","opencl"), default("avx512fp16")
181+
Allowable values ("avx512fp16", "avx512","avx2","opencl"), default("avx512fp16")
178182

179183
The VSR Library requires an x86 processor which has the Advanced Vector Extensions 2 (AVX2) available. AVX2 was first introduced into the Intel Xeon roadmap with Haswell in 2015. Performance can be further increased if the newer AVX-512 Foundation and Vector Length Extensions are available. AVX512 was introduced into the Xeon Scalable Processors (Skylake gen) in 2017. Performance improves again with the introduction of AVX-512FP16, which uses _Float16 instead of float(32bit) with minimal precision and visual quality loss. AVX-512FP16 was introduced into the 4th gen Xeon (Sapphire Rappids) in 2022. The VSR Library will always check for the highest available ISA first, then fallback according to what is available (AVX-512FP16/AVX512/AVX2). However if the use case requires it, this asm parameter allows the default behavior to be changed. User can also choose opencl if the opencl is supported in their system.
180184

0 commit comments

Comments
 (0)