chore(models): moved model files into subdirectories

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
k4yt3x 2024-10-26 00:00:00 +00:00
parent 482e82f9c4
commit f0f3166d92
No known key found for this signature in database
13 changed files with 5 additions and 4 deletions

View File

@ -42,8 +42,9 @@ int LibplaceboFilter::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVB
shader_full_path = shader_path; shader_full_path = shader_path;
} else { } else {
// Construct the fallback path using std::filesystem // Construct the fallback path using std::filesystem
shader_full_path = shader_full_path = find_resource_file(
find_resource_file(std::filesystem::path("models") / (shader_path.string() + ".glsl")); std::filesystem::path("models") / "libplacebo" / (shader_path.string() + ".glsl")
);
} }
// Check if the shader file exists // Check if the shader file exists

View File

@ -39,9 +39,9 @@ int RealesrganFilter::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVB
if (model) { if (model) {
// Find the model paths by model name if provided // Find the model paths by model name if provided
model_param_path = std::filesystem::path("models") / model_param_path = std::filesystem::path("models") / "realesrgan" /
(std::string(model) + "-x" + std::to_string(scaling_factor) + ".param"); (std::string(model) + "-x" + std::to_string(scaling_factor) + ".param");
model_bin_path = std::filesystem::path("models") / model_bin_path = std::filesystem::path("models") / "realesrgan" /
(std::string(model) + "-x" + std::to_string(scaling_factor) + ".bin"); (std::string(model) + "-x" + std::to_string(scaling_factor) + ".bin");
} else if (!custom_model_param_path.empty() && !custom_model_bin_path.empty()) { } else if (!custom_model_param_path.empty() && !custom_model_bin_path.empty()) {
// Use the custom model paths if provided // Use the custom model paths if provided