Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

Related tags

CLI FidelityFX-CLI
Overview

FidelityFX-CLI

Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Overview

Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

FidelityFX-CLI 1.0.0

Command line syntax:
  FidelityFX_CLI.exe [Options]     ...

Options:
-Scale  
-Mode 
  Modes from FSR package:
    EASU - Edge Adaptive Spatial Upsampling (default) aliases: FSR, FSR1
    RCAS - Robust Contrast Adaptive Sharpening (doesn't support Scale)
  Modes from CAS package:
    CAS - Contrast Adaptive Sharpening
  Modes from Windows Imaging Component (WICBitmapInterpolationMode):
    NearestNeighbor, Linear, Cubic, HighQualityCubic, Fant
-Sharpness 
  -Mode CAS: range from 0.0 (default) to 1.0 (maximum extra sharpness)
  -Mode RCAS: range from 0.0 (maximum sharpness) to number of stops (halving) of the reduction of sharpness
-FP16
  If not set (default), uses R8G8B8A8_UNORM GPU texture format.
  If set, uses R16G16B16A16_FLOAT GPU texture format.
-Linear
  If not set (default), treats input and output image as sRGB.
  If set, treats input and output image as linear.
  Works only when -FP16 is not specified.

Supported input formats: BMP, PNG, ICO, JPG, TIF, GIF

Written in C++ using Visual Studio 2019. No external dependencies other than the WIC API and Direct3D 11. Image file formats are handled using the Windows Imaging Component (WIC) framework. Shaders are compiled to H files (with a little help from the Fx Batch Compiler tool) and bundled with the source code to build the executable.

Comments
  • Link error due to WIN32 in add_executable() call

    Link error due to WIN32 in add_executable() call

    Executable link fails because /SUBSYSTEM:WINDOWS is defined when add_executable() has WIN32 argument.

    Suggested fix:

    • Remove WIN32 from add_executable(${PROJECT_NAME} WIN32 ${sources}) call
    • Remove set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") line because this flag is controlled by the presence of WIN32 argument as stated above
    opened by adevaykin 4
  • README improvements

    README improvements

    Thanks for this open-source example. Unfortunately, while reading the README file, I had to really work hard to determine what this tool would even do. Only after searching the AMD website, I came to the realization of what "FidelityFX Super Resolution (FSR)" and "Contrast Adaptive Sharpening (CAS)" would even imply.

    While I don't mean to dismiss the importance of AMD's efforts with regard to open-source technologies, I think some improvements to the manner in which these are presented to third parties would be welcome. Perhaps the README could be enhanced to clearly demonstrate and sell the utility of this tool? Even links to the AMD website or relevant Youtube videos might be use?

    opened by Ganonmaster 3
  • 1.0.3 is totally broken compared to 1.0.2

    1.0.3 is totally broken compared to 1.0.2

    It do not generate output even when pass with no warning or errors... it pretend that it save destination but nothing... 1.0.2 it was okay

    tried in both modes: FSR1 and CAS

    it also do not provide option to upscale more then 2x... where it say 4x is recommended :-) 1.0.2 didn't have issue with 4x upscale, now tried it with 8x even 20x and works like charm

    it start fail with 25x (FidelityFX_CLI.cpp(657): FAILED( dev->CreateTexture2D(&dstTextureDesc, nullptr, &dstTexture) ))

    so it is very very big downgrade about scalability :-(

    Treating input/output images as sRGB space, processing as sRGB.

    Loading "312981607_5590160864395316_8625555753732413662_n.png"... Image size: 720 x 515 scaled to 2880 x 2060. WARNING: SCALING RATIO HIGHER THAN 2X IN EITHER DIRECTION IS UNSUPPORTED! WARNING: Scaling factor is greater than recommended 4. Saving "312981607_5590160864395316_8625555753732413662_n-FSR1.png"...

    but even with no upscale it do not generate output C:\FidelityFX-CLI-v1.0.3>

    ./FidelityFX_CLI.exe -Mode FSR1 -Scale 100% 100% -QualityMode UltraQuality 312981607_5590160864395316_8625555753732413662_n.png 312981607_5590160864395316_8625555753732413662_n-FSR1.png Treating input/output images as sRGB space, processing as sRGB. Loading "312981607_5590160864395316_8625555753732413662_n.png"... Image size: 720 x 515 scaled to 936 x 670. Saving "312981607_5590160864395316_8625555753732413662_n-FSR1.png"...

    pls note that with 100% scale it change scaling as you can see from Image size, very crazy behavior :-( tried with no QualityMode it do not change Image Size...

    never save anything :-(

    opened by kizmo 2
  • Piped IO is required

    Piped IO is required

    Hello.

    I like to use tool without storing temporary files for video transcoding. So, piped IO is required.

    For example vmaf tool on Windows can be used like this:

    D:\vmaf\2.3.0\vmaf.exe --reference \\.\pipe\Process_Pipe_20900_33_1121943890000000 --distorted \\.\pipe\Process_Pipe_20900_34_1121943890000000 --width 3840 --height 2160 --pixel_format 420 --bitdepth 8 --json --output R:\Temp\g3o8le0l.tmp\outFile
    

    Or something like image2pipe from ffmpeg (see ffmpeg faq):

    cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
    

    Thanks!

    opened by Klayflash 2
  • Work on directories option

    Work on directories option

    It's possible to use a loop to upscale a folder full of images, but this is pretty slow for what it could be. Could you make it able to work on folders, probably by not restarting itself between frames?

    Helpful for: Upscaling a video's worth of frames Upscaling a lot of images that don't relate to each other. This would be drastically sped up in either case.

    Thanks in advance regardless of decision.

    opened by WubTheGame 2
  • FidelityFX_CLI.cpp(606) error

    FidelityFX_CLI.cpp(606) error

    when trying to run the following command:

    FidelityFX_CLI.exe image.png out.png

    i get this error message:

    ERROR: C:\GitLab-Runner\builds\d617e10a\0\gpuopen\GPUOpen-Effects\fidelityfx-cli\FidelityFX_CLI.cpp(606): FAILED(CoCreateInstance(CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&m_WICImagingFactory)) )

    i'm using the latest binaries currently available (FidelityFX-CLI-v1.0.3.zip), latest Visual C++ 2022 runtimes, a known good PNG image (640x480 res), and the latest NVIDIA drivers available for Windows 7.

    opened by blueclouds8666 1
  • Create FidelityFX Assist.exe

    Create FidelityFX Assist.exe

    ##GUI Assistance Screensho 01

    Prefix: The prefix or word before the number sequence starts.

    Starting Number: number of first image after prefix

    Ending Number: number of last image after prefix

    Output Prefix: the prefix all the output images will have

    Input Extension: aka image type Supported Formats: BMP, PNG, ICO, JPG, TIF, GIF

    For example, to upscale two images which are render0.png and render1.png and get output as ups0.png and ups1.png these are the settings required:

    Prefix: render Starting Number: 0 Ending Number: 1 Output Prefix: ups Input Extension: .png

    Protip: Use absolute or relative directories in both prefix fields to get input and store output in different folder.

    Does not create folders automatically. Only use existing folders.

    opened by NukeGH05T 3
  • How to build in windows?

    How to build in windows?

    Hi Dear @rys :

    it seems can use VS2019 to build this project, but I do not find the .sln file, it is only have a CMakeList.txt, so Could you please help me: How to build in windows?

    thank you very much~

    opened by xiaoxiongli 2
Releases(v1.0.3)
  • v1.0.3(Aug 31, 2021)

    v1.0.3

    v1.0.3 is a minor release that improves the README, adds support for specifying relative scaling factors with -Scale, and adds a new parameter called -QualityMode that lets you directly specify a supported FSR1 mode. Fixes #2.

    Release Notes

    The FidelityFX CLI allows you to apply selected FidelityFX effects to still images, to allow you to assess the output quality of the effect before attempting an integration of the effect into your game or other image processing software.

    This release contains support for FidelityFX Contrast Adaptive Sharpening (CAS), inherited from the original CasCmdLine tool provided by the CAS project, plus FidelityFX Super Resolution (FSR).

    Written in C++ using Visual Studio 2019. No external dependencies other than the WIC API and Direct3D 11. Image file formats are handled using the Windows Imaging Component (WIC) framework. Shaders are pre-compiled to H files (with a little help from the Fx Batch Compiler tool) and bundled with the source code to build the executable.

    Source code(tar.gz)
    Source code(zip)
    FidelityFX-CLI-v1.0.3.zip(34.71 KB)
  • v1.0.2(Aug 6, 2021)

    v1.0.2

    v1.0.2 is a minor bugfix release to the build system, to remove the unnecessary WIN32 directive and forced console subsystem usage during linking. Fixes #1.

    Release Notes

    The FidelityFX CLI allows you to apply selected FidelityFX effects to still images, to allow you to assess the output quality of the effect before attempting an integration of the effect into your game or other image processing software.

    This release contains support for FidelityFX Contrast Adaptive Sharpening (CAS), inherited from the original CasCmdLine tool provided by the CAS project, plus FidelityFX Super Resolution (FSR).

    Written in C++ using Visual Studio 2019. No external dependencies other than the WIC API and Direct3D 11. Image file formats are handled using the Windows Imaging Component (WIC) framework. Shaders are pre-compiled to H files (with a little help from the Fx Batch Compiler tool) and bundled with the source code to build the executable.

    Source code(tar.gz)
    Source code(zip)
    FidelityFX-CLI-v1.0.2.zip(33.54 KB)
  • v1.0.1(Jul 28, 2021)

    v1.0.1

    v1.0.1 is a minor bugfix release of the CLI to correct gamma correction and the default sharpending value for RCAS, to match other implementations.

    Release Notes

    The FidelityFX CLI allows you to apply selected FidelityFX effects to still images, to allow you to assess the output quality of the effect before attempting an integration of the effect into your game or other image processing software.

    This release contains support for FidelityFX Contrast Adaptive Sharpening (CAS), inherited from the original CasCmdLine tool provided by the CAS project, plus FidelityFX Super Resolution (FSR).

    Written in C++ using Visual Studio 2019. No external dependencies other than the WIC API and Direct3D 11. Image file formats are handled using the Windows Imaging Component (WIC) framework. Shaders are pre-compiled to H files (with a little help from the Fx Batch Compiler tool) and bundled with the source code to build the executable.

    Source code(tar.gz)
    Source code(zip)
    FidelityFX-CLI-v1.0.1.zip(33.51 KB)
  • v1.0(Jul 14, 2021)

    Release Notes

    The FidelityFX CLI allows you to apply selected FidelityFX effects to still images, to allow you to assess the output quality of the effect before attempting an integration of the effect into your game or other image processing software.

    This release contains support for FidelityFX Contrast Adaptive Sharpening (CAS), inherited from the original CasCmdLine tool provided by the CAS project, plus FidelityFX Super Resolution (FSR).

    Written in C++ using Visual Studio 2019. No external dependencies other than the WIC API and Direct3D 11. Image file formats are handled using the Windows Imaging Component (WIC) framework. Shaders are pre-compiled to H files (with a little help from the Fx Batch Compiler tool) and bundled with the source code to build the executable.

    Source code(tar.gz)
    Source code(zip)
    FidelityFX-CLI-v1.0.zip(33.34 KB)
Owner
GPUOpen Effects
Real-time visual effects from the GPUOpen initiative
GPUOpen Effects
Simple command line utilities for extracting data from Fallout 4 and 76 files

fo76utils Simple command line utilities for extracting data from Fallout 4 and 76 files. baunpack - list the contents of, or extract from .BA2 archive

null 15 Dec 6, 2022
Simple command line tools to create/extract X4 .cat+.dat files

x4cat Simple command line tools to to create/extract X4 .cat+.dat files x4encat Usage: x4encat <archive name> Looks for a directory named <archive nam

Alexander Sago 1 Oct 31, 2021
led is a line-oriented text editor in command line

led is a line-oriented text editor in command line. This editor is similar to the standard program on unix systems - GNU ed. But i'm not going to make an exact clone of that program, it's just a pet project.

Artem Mironov 16 Dec 27, 2022
LwSHELL is lightweight, platform independent, command line shell for embedded systems.

LwSHELL is lightweight, platform independent, command line shell for embedded systems. It targets communication with embedded systems from remote terminal to quickly send commands and the retrieve data from the device.

Tilen Majerle 80 Dec 25, 2022
pbr2gltf2 is a command line tool for converting PBR images to a glTF 2.0 material.

pbr2gltf2 is a command line tool for converting PBR images to a glTF 2.0 material. The tool is detecting depending on the filename, which PBR information is stored. It swizzles the images and does reassign the channels to a glTF 2.0 image. The tool stores the images plus a minimal, valid glTF 2.0 file containing the required material, textures and images.

UX3D GmbH 23 Jul 31, 2022
A command-line tool to display colorful distro information.

sjfetch A command-line tool to display colorful distro information.

Fikret Musk 6 Apr 6, 2022
A command line tool with no external dependencies to print information about an X server instance.

xinfo A command line tool with no external dependencies to print information about an X server instance. Building and running To build the code in thi

Jean-Michel Gorius 6 Jan 13, 2022
A command line tool for numerically computing Out-of-time-ordered correlations for N=4 supersymmetric Yang-Mills theory and Beta deformed N=4 SYM.

A command line tool to compute OTOC for N=4 supersymmetric Yang–Mills theory This is a command line tool to numerically compute Out-of-time-ordered co

Gaoli Chen 1 Oct 16, 2021
Microsoft Visual TrueType(VTT) command line compile tool.

Project Microsoft Visual TrueType(VTT) is a professional-level tool for graphically instructing TrueType and OpenType fonts. For details on the tool v

Microsoft 39 Dec 21, 2022
A command-line tool to generate Linux manual pages from C source code.

mangen A command-line tool to generate Linux manual pages from C source code. Description mangen is, as said above, a program to generate Linux manual

null 2 Nov 15, 2021
brn is a command line tool similar to vimv.

brn is a command line tool similar to vimv. It can be used to easily mass-rename files in your preferred text editor (i.e. vim).

Nimai Patel 13 Nov 3, 2022
This command-line tool converts an FM broadcast signal into stereo sound with de-emphasis applied.

stereodemux This command-line tool converts an FM broadcast signal into stereo sound with de-emphasis applied. It expects 16-bit signed-integer MPX (F

Oona Räisänen 12 Nov 6, 2022
nicegraf-shaderc is a command-line tool that transforms HLSL code into shaders for various graphics APIs.

User Manual Table of Contents Introduction Project Status Obtaining the Source Code and Building Running Defining Techniques Generated Header File Pip

nicebyte 94 Dec 8, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Clara v1.1.5 !! This repository is unmaintained. Go here for a fork that is somewhat maintained. !! A simple to use, composable, command line parser f

Catch Org 648 Dec 27, 2022
CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.

CLI11: Command line parser for C++11 What's new • Documentation • API Reference CLI11 is a command line parser for C++11 and beyond that provides a ri

null 2.4k Dec 30, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Lyra A simple to use, composing, header only, command line arguments parser for C++ 11 and beyond. Obtain License Standards Stats Tests License Distri

Build Frameworks Group 388 Dec 22, 2022
Simple, command line based player toolkit for the Ironsworn tabletop RPG

isscrolls - Command line based player toolkit for the Ironsworn tabletop RPG isscrolls is a simple toolkit for players of the Ironsworn tabletop RPG.

null 7 Sep 9, 2022
A simple command line application in order to create new Code workspaces.

mkcws Summary A simple command line application in order to create new Code workspaces. License This project's license is GPL 2. The whole license tex

Kevin Matthes 0 Apr 1, 2022
Simple Driver loading command-line utility.

lddrv Simple Driver loading command-line utility. Command Line Load a driver: "lddrv.exe -operation create -binpath C:\Dev\TestDriver.sys -svcname Tes

Josh S. 3 Sep 8, 2022