Skip to content

Commit

Permalink
amf_fsrのsharpnessを設定可能に。 ( #97 )
Browse files Browse the repository at this point in the history
floatでなく、doubleでの指定が必要だった。
  • Loading branch information
rigaya committed Nov 10, 2023
1 parent 065f1b5 commit 184e218
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 9 deletions.
7 changes: 3 additions & 4 deletions VCECore/rgy_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#ifndef __RGY_VERSION_H__
#define __RGY_VERSION_H__

#define VER_FILEVERSION 0,8,18,0
#define VER_STR_FILEVERSION "8.18"
#define VER_STR_FILEVERSION_TCHAR _T("8.18")
#define VER_FILEVERSION 0,8,19,0
#define VER_STR_FILEVERSION "8.19"
#define VER_STR_FILEVERSION_TCHAR _T("8.19")


#ifdef _M_IX86
Expand All @@ -55,7 +55,6 @@ const char *get_encoder_version();
#define AV1_TIMESTAMP_OVERRIDE 1

#define DONOTSHOW_AMF_POINT_FSR11 1
#define DONOTSHOW_AMF_SHARPNESS 1

#if defined(_WIN32) || defined(_WIN64)

Expand Down
4 changes: 2 additions & 2 deletions VCECore/vce_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ static tstring PrintMultipleListOptions(const TCHAR *option_name, const TCHAR *o
tstring gen_cmd_help_vppamf() {
tstring str;
str += strsprintf(_T("\n")
#if !DONOTSHOW_AMF_SHARPNESS
_T(" --vpp-scaler-sharpness <float>\n")
#endif
_T(" (default: %.1f, range 0.0 - 2.0)\n")
_T(" --vpp-preprocess [<param1>=<value>][,<param2>=<value>][...]\n")
_T(" JND based edge-adaptive denoising filter.\n")
_T(" params\n")
_T(" strength=<int> (default: %d, range 0 - 10)\n")
_T(" sensitivity=<int> (default: %d, range 0 - 10)\n")
_T(" adapt-filter=<bool> (default: %s)\n"),
VCE_FILTER_HQ_SCALER_SHARPNESS_DEFAULT,
VCE_FILTER_PP_STRENGTH_DEFAULT,
VCE_FILTER_PP_SENSITIVITY_DEFAULT,
VCE_FILTER_PP_ADAPT_FILTER_DEFAULT ? _T("on") : _T("off")
Expand Down
4 changes: 2 additions & 2 deletions VCECore/vce_param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
VppAMFHQScaler::VppAMFHQScaler() :
enable(false),
algorithm(AMF_HQ_SCALER_ALGORITHM_BICUBIC),
sharpness(0.5) {
sharpness(VCE_FILTER_HQ_SCALER_SHARPNESS_DEFAULT) {
};
bool VppAMFHQScaler::operator==(const VppAMFHQScaler& x) const {
return enable == x.enable
Expand All @@ -47,7 +47,7 @@ tstring VppAMFHQScaler::print() const {
tstring str = strsprintf(
_T("scaler: %s"),
get_cx_desc(list_vce_hq_scaler, algorithm));
if (!DONOTSHOW_AMF_SHARPNESS || sharpness != VppAMFHQScaler().sharpness) {
if (sharpness != VppAMFHQScaler().sharpness) {
str += strsprintf(_T(", sharpness % .1f"), sharpness);
}
str += _T("\n");
Expand Down
4 changes: 3 additions & 1 deletion VCECore/vce_param.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ static const int VCE_FILTER_PP_SENSITIVITY_DEFAULT = 4;
static const bool VCE_FILTER_PP_ADAPT_FILTER_DEFAULT = false;
static const int VCE_FILTER_VQENHANCER_RADIUS_DEFAULT = 2;

static const double VCE_FILTER_HQ_SCALER_SHARPNESS_DEFAULT = 0.5;

enum {
VCE_RC_CQP = 0,
VCE_RC_CBR = 3,
Expand Down Expand Up @@ -521,7 +523,7 @@ const CX_DESC list_vce_hq_scaler[] = {
struct VppAMFHQScaler {
bool enable;
AMF_HQ_SCALER_ALGORITHM_ENUM algorithm;
float sharpness;
double sharpness; // sharpness はdoubleでないとエラー

VppAMFHQScaler();
bool operator==(const VppAMFHQScaler& x) const;
Expand Down
4 changes: 4 additions & 0 deletions VCEEnc/VCEEnc_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ Radeon RX550
今後の更新で設定ファイルの互換性がなくなるかもしれません。

【どうでもいいメモ】
2023.11.10 (8.19)
[VCEEncC]
- amf_fsrのsharpnessを設定可能に。 (--vpp-scaler-sharpness)

2023.11.09 (8.18)
[VCEEncC]
- 正常に動作しない --vpp-resize amf_point を削除。
Expand Down
4 changes: 4 additions & 0 deletions VCEEncC_Options.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
- [--vpp-preprocess \[\<param1\>=\<value1\>\[,\<param2\>=\<value2\>\]...\]](#--vpp-preprocess-param1value1param2value2)
- [--vpp-subburn \[\<param1\>=\<value1\>\[,\<param2\>=\<value2\>\]...\]](#--vpp-subburn-param1value1param2value2)
- [--vpp-resize \<string\>](#--vpp-resize-string)
- [--vpp-scaler-sharpness \<float\>](#--vpp-scaler-sharpness-float)
- [--vpp-unsharp \[\<param1\>=\<value1\>\[,\<param2\>=\<value2\>\]...\]](#--vpp-unsharp-param1value1param2value2)
- [--vpp-edgelevel \[\<param1\>=\<value1\>\[,\<param2\>=\<value2\>\]...\]](#--vpp-edgelevel-param1value1param2value2)
- [--vpp-warpsharp \[\<param1\>=\<value1\>\[,\<param2\>=\<value2\>\]...\]](#--vpp-warpsharp-param1value1param2value2)
Expand Down Expand Up @@ -2021,6 +2022,9 @@ Specify the resizing algorithm.
| amf_bicubic | amf bicubic interpolation |
| amf_fsr | amf fsr resampling |

### --vpp-scaler-sharpness &lt;float&gt;
sharpness for amf_fsr. (default=0.5, 0.0-2.0)

### --vpp-unsharp [&lt;param1&gt;=&lt;value1&gt;[,&lt;param2&gt;=&lt;value2&gt;]...]
unsharp filter, for edge and detail enhancement.

Expand Down
3 changes: 3 additions & 0 deletions VCEEncC_Options.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,9 @@ yadifによるインタレ解除を行う。
| amf_bicubic | amf 3次補間 |
| amf_fsr | amf fsr 補間 |

### --vpp-scaler-sharpness &lt;float&gt;
--vpp-resize amf_fsr を選択したときのsharpnessの値。 (default=0.5, 0.0-2.0)

### --vpp-unsharp [&lt;param1&gt;=&lt;value1&gt;[,&lt;param2&gt;=&lt;value2&gt;]...]
unsharpフィルタ。輪郭・ディテール強調用のフィルタ。

Expand Down

0 comments on commit 184e218

Please sign in to comment.