Skip to content

Commit

Permalink
Support grain tables for SVT-AV1
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed Oct 9, 2023
1 parent a9d5d65 commit a9e78e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions av1an-core/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,17 @@ pub(crate) fn insert_noise_table_params(
video_params.retain(|param| !param.starts_with("--denoise-noise-level="));
video_params.push(format!("--film-grain-table={}", table.to_str().unwrap()));
}
Encoder::svt_av1 => {
let film_grain_idx = video_params
.iter()
.find_position(|param| param.as_str() == "--film-grain");
if let Some((idx, _)) = film_grain_idx {
video_params.remove(idx + 1);
video_params.remove(idx);
}
video_params.push("--fgs-table".to_string());
video_params.push(table.to_str().unwrap().to_string());
}
Encoder::rav1e => {
let photon_noise_idx = video_params
.iter()
Expand Down

0 comments on commit a9e78e3

Please sign in to comment.