Skip to content

Commit

Permalink
read passes and encoder from zone overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
SwareJonge committed Jan 26, 2025
1 parent 31235a0 commit f7a896d
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions av1an-core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,14 @@ impl Av1anContext {
|| self.args.video_params.clone(),
|ovr| ovr.video_params.clone(),
),
passes: self.args.passes,
encoder: self.args.encoder,
passes: overrides.as_ref().map_or(
self.args.passes,
|ovr| ovr.passes,
),
encoder: overrides.as_ref().map_or(
self.args.encoder.clone(),
|ovr| ovr.encoder.clone(),
),
noise_size: self.args.photon_noise_size,
tq_cq: None,
ignore_frame_mismatch: self.args.ignore_frame_mismatch,
Expand Down Expand Up @@ -972,8 +978,14 @@ impl Av1anContext {
|| self.args.video_params.clone(),
|ovr| ovr.video_params.clone(),
),
passes: self.args.passes,
encoder: self.args.encoder,
passes: scene.zone_overrides.as_ref().map_or(
self.args.passes,
|ovr| ovr.passes,
),
encoder: scene.zone_overrides.as_ref().map_or(
self.args.encoder.clone(),
|ovr| ovr.encoder.clone(),
),
noise_size: self.args.photon_noise_size,
tq_cq: None,
ignore_frame_mismatch: self.args.ignore_frame_mismatch,
Expand Down Expand Up @@ -1175,8 +1187,14 @@ impl Av1anContext {
|| self.args.video_params.clone(),
|ovr| ovr.video_params.clone(),
),
passes: self.args.passes,
encoder: self.args.encoder,
passes: overrides.as_ref().map_or(
self.args.passes,
|ovr| ovr.passes,
),
encoder: overrides.as_ref().map_or(
self.args.encoder.clone(),
|ovr| ovr.encoder.clone(),
),
noise_size: self.args.photon_noise_size,
tq_cq: None,
ignore_frame_mismatch: self.args.ignore_frame_mismatch,
Expand Down

0 comments on commit f7a896d

Please sign in to comment.