18 Star 0 Fork 0

openKylin / zimg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
WTFPL

z.lib

The "z" library implements the commonly required image processing basics of scaling, colorspace conversion, and depth conversion. A simple API enables conversion between any supported formats to operate with minimal knowledge from the programmer. All library routines were designed from the ground-up with correctness, flexibility, and thread-safety as first priorities. Allocation, buffering, and I/O are cleanly separated from processing, allowing the programmer to adapt "z" to many scenarios.

Requirements

  • Byte-addressable architecture
  • Two's complement integer encoding
  • 32-bit or greater machine word
  • C++11 compiler
  • Platforms: Microsoft Windows, POSIX

Building

The officially supported build system is GNU autotools. Use the provided "autogen.sh" script to instantiate the familiar "configure" and "make" build system. Visual Studio project files are not stable and are subject to change.

Capabilities

Colorspace

Colorspaces: SMPTE-C (NTSC), Rec.709, Rec.2020

The colorspace module provides for conversion between any combination of colorspaces, as defined by the commonly used triplet of matrix coefficients, transfer characteristics, and color primaries. Conversions are implemented with intelligent logic that minimizes the number of intermediate representations required for common scenarios, such as conversion between YCbCr and RGB. Support is also provided for the non-traditional YCbCr system of ITU-R BT.2020 constant luminance (CL), which retains higher fidelity with chroma subsampling. Note that "z" is not a color management system and should not be used to perform drastic contrast or gamut reduction, such as BT.2020 to BT.709.

Depth

Formats: BYTE, WORD, HALF, FLOAT

The depth module provides for conversion between any pixel (number) format, including one and two-byte integer formats as well as IEEE-754 binary16 (OpenEXR) and binary32 formats. Limited range (16-235) and full swing (0-255) integer formats are supported, including conversion between such formats. Multiple dithering methods are available when converting to integer formats, from basic rounding to high quality error diffusion.

Resize

The resize module provides high fidelity linear resamplers, including the popular Bicubic and Lanczos filters. Resampling ratios of up to 100x are supported for upsampling and downsampling. Full support is provided for various coordinate systems, including the various chroma siting conventions (e.g. JPEG and MPEG2) as well as interlaced images.

Performance

"z" is optimized for Intel(R) Architecture and features faster processing times than industry standard swscale software.

Time (ms) to resize FHD image to UHD with Lanczos filter.

z.lib 2.8 swscale 4.0.2*
Intel(R) Core(TM) i7-8565U 7.7 15.2
Intel(R) Xeon(R) Platinum 8176 10.8 22.2

Time (ms) to convert FHD BT.709 (YUV) to FHD BT.2020.

z.lib 2.8 swscale 4.0.2**
Intel(R) Core(TM) i7-8565U 8.3 17.5
Intel(R) Xeon(R) Platinum 8176 11.5 25.6

* scale=3840:2160:sws_flags=lanczos+accurate_rnd:sws_dither=none

** colorspace=all=bt2020:iall=bt709:format=yuv420p10

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO.

简介

暂无描述 展开 收起
C++ 等 5 种语言
WTFPL
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/openkylin/zimg.git
git@gitee.com:openkylin/zimg.git
openkylin
zimg
zimg
openkylin/yangtze

搜索帮助