Update TVAI functionality across desktop app and cargo modules
This commit is contained in:
@@ -58,6 +58,7 @@ pub type Result<T> = std::result::Result<T, TvaiError>;
|
||||
|
||||
// Quick processing functions
|
||||
pub use video::quick_upscale_video;
|
||||
pub use video::quick_upscale_video_with_model;
|
||||
pub use video::quick_interpolate_video;
|
||||
pub use image::quick_upscale_image;
|
||||
pub use video::auto_enhance_video;
|
||||
|
||||
@@ -373,6 +373,16 @@ pub async fn quick_upscale_video(
|
||||
input: &Path,
|
||||
output: &Path,
|
||||
scale: f32,
|
||||
) -> Result<ProcessResult, TvaiError> {
|
||||
quick_upscale_video_with_model(input, output, scale, None).await
|
||||
}
|
||||
|
||||
/// Quick video upscaling function with model selection
|
||||
pub async fn quick_upscale_video_with_model(
|
||||
input: &Path,
|
||||
output: &Path,
|
||||
scale: f32,
|
||||
model: Option<UpscaleModel>,
|
||||
) -> Result<ProcessResult, TvaiError> {
|
||||
// Detect Topaz installation
|
||||
let topaz_path = crate::utils::detect_topaz_installation()
|
||||
@@ -387,10 +397,10 @@ pub async fn quick_upscale_video(
|
||||
// Create processor
|
||||
let mut processor = TvaiProcessor::new(config)?;
|
||||
|
||||
// Create default upscaling parameters
|
||||
// Create upscaling parameters with specified or default model
|
||||
let params = VideoUpscaleParams {
|
||||
scale_factor: scale,
|
||||
model: crate::config::UpscaleModel::Iris3, // Best general purpose model
|
||||
model: model.unwrap_or(crate::config::UpscaleModel::Iris3), // Use specified model or default to Iris3
|
||||
compression: 0.0,
|
||||
blend: 0.0,
|
||||
quality_preset: crate::config::QualityPreset::HighQuality,
|
||||
|
||||
Reference in New Issue
Block a user