Currently, the progress output is embedded in the RealSR object, and cannot be controlled. This creates problems especially when the program is used as a library as it will spam lots of messages onto the screen. While it is possible to suppress the messages by suppressing STDERR entirely, it will also suppress error messages, which is undesirable.
Behavior Before the Update
Before any changes are made, realsr-ncnn-vulkan will print the progress of the current task:
Proposed Changes
I am proposing to add a new param -q (quiet) to suppress the progress output. From a consistency standpoint, I'd rather make the output suppressed by default. However, I'd like to not alter the program's default behavior in this PR and leave the choice to @nihui.
Behavior After the Update
A new parameter quiet is added to the RealSR class to control the suppression of progress output. This can also be controlled with the new -q argument in the command line argument parser.
Motivation
Currently, the progress output is embedded in the RealSR object, and cannot be controlled. This creates problems especially when the program is used as a library as it will spam lots of messages onto the screen. While it is possible to suppress the messages by suppressing STDERR entirely, it will also suppress error messages, which is undesirable.
Behavior Before the Update
Before any changes are made, realsr-ncnn-vulkan will print the progress of the current task:
Proposed Changes
I am proposing to add a new param
-q
(quiet) to suppress the progress output. From a consistency standpoint, I'd rather make the output suppressed by default. However, I'd like to not alter the program's default behavior in this PR and leave the choice to @nihui.Behavior After the Update
A new parameter
quiet
is added to the RealSR class to control the suppression of progress output. This can also be controlled with the new-q
argument in the command line argument parser.After adding the
-q
param, the progress output can be suppressed like such:Remarks
I've never written any serious C++ before, so my apologies if I've made any mistakes in the changes.