Skip to content

Commit

Permalink
Expr: scale_inputs to case insensitve, add floatUV to error text
Browse files Browse the repository at this point in the history
  • Loading branch information
pinterf committed Mar 11, 2022
1 parent 0d9c160 commit 2747497
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions avs_core/filters/exprfilter/exprfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3956,7 +3956,8 @@ AVSValue __cdecl Exprfilter::Create(AVSValue args, void* , IScriptEnvironment* e
}
next_paramindex++;

const std::string scale_inputs = args[next_paramindex].Defined() ? args[next_paramindex].AsString("none") : "none";
std::string scale_inputs = args[next_paramindex].Defined() ? args[next_paramindex].AsString("none") : "none";
transform(scale_inputs.begin(), scale_inputs.end(), scale_inputs.begin(), ::tolower);
next_paramindex++;

const bool clamp_float = args[next_paramindex].AsBool(false);
Expand Down Expand Up @@ -5949,13 +5950,13 @@ Exprfilter::Exprfilter(const std::vector<PClip>& _child_array, const std::vector
else if (scale_inputs == "float") {
autoconv_conv_float = true;
}
else if (scale_inputs == "floatUV") {
else if (scale_inputs == "floatuv") {
autoconv_conv_float = false; // !! really
// like in masktools2 2.2.20+
shift_float = true; // !!
}
else if (scale_inputs != "none") {
env->ThrowError("Expr: scale_inputs must be 'all','allf','int','intf','float','floatf' or 'none'");
env->ThrowError("Expr: scale_inputs must be 'all','allf','int','intf','float','floatf','floatUV' or 'none'");
}

try {
Expand Down

0 comments on commit 2747497

Please sign in to comment.