Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop benchmarks #951

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Develop benchmarks #951

wants to merge 4 commits into from

Conversation

brzep
Copy link
Collaborator

@brzep brzep commented Feb 5, 2025

PR for issue #937

Develop more benchmark options:

  • resolution

    • presets
    • iteration
  • outputs

    • iteration
    • maximize
  • run without encoder

  • run without decoder

  • renamed encoder/decoder_count to output/input_count to be more meaningful

@brzep brzep requested a review from jerzywilczek February 5, 2025 14:46
@brzep brzep self-assigned this Feb 5, 2025
@brzep
Copy link
Collaborator Author

brzep commented Feb 5, 2025

I am wondering what kind of resolution presets use to be meaningful and unambiguous. Maybe rename it to sth like Res1080p, Res480p, etc?

pub enum ResolutionPreset {
    Uhd,
    Qhd,
    Fhd,
    Hd,
    Sd,
}

Comment on lines +104 to +110
pub enum ResolutionPreset {
Uhd,
Qhd,
Fhd,
Hd,
Sd,
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be cool if the only thing you specified on the cmd was the number ++ p: --resolution 1080p. I would hate if you had to specify the resolution like this: --resolution res_480_p.

Also, derive(ValueEnum) does nothing here I think, since you implement parsing manually anyway.

#[derive(Debug, Clone, Copy)]
pub enum ResolutionConstant {
Preset(ResolutionPreset),
Value(u32, u32),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Value(u32, u32),
Value(Resolution),

That's how I'd do it, but it's up to you

pub encoder_preset: EncoderPreset,
pub disable_encoder: bool,

#[arg(long, global = true, required_unless_present("disable_encoder"))]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need global here, as we don't have subcommands.

Also, you can use default_value instead of Option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants