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

Fix two-pass encoding and create basic CLI tests #2209

Merged
merged 2 commits into from
Mar 24, 2020

Conversation

shssoichiro
Copy link
Collaborator

Closes #2208

@shssoichiro shssoichiro force-pushed the fix-two-pass branch 2 times, most recently from 6210c17 to 8bf02ab Compare March 23, 2020 14:50
Copy link
Collaborator

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

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

Seems fine. Thank you for preparing the test.

Copy link
Collaborator

@rzumer rzumer left a comment

Choose a reason for hiding this comment

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

LGTM overall, thanks for the fix and for the tests.

tests/.gitignore Outdated Show resolved Hide resolved
fn get_tempfile_path(extension: &str) -> PathBuf {
let mut path = temp_dir();
let filename =
thread_rng().sample_iter(&Alphanumeric).take(12).collect::<String>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be personal preference, but I think tests should avoid using random values. A second opinion would be nice.

Copy link
Collaborator

@lu-zero lu-zero Mar 24, 2020

Choose a reason for hiding this comment

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

We could use non-random filenames, since the directory is already temporary

tests/small_input.y4m Show resolved Hide resolved
data
}

fn get_tempfile_path(extension: &str) -> PathBuf {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You may use tempfile maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I looked into that, but tempfile doesn't have an option to just generate a filename--it also creates the file. For this, we just want a filename in the temp directory that rav1e can write to.

@shssoichiro shssoichiro force-pushed the fix-two-pass branch 3 times, most recently from 81576ec to 11dfffb Compare March 24, 2020 07:51
@github-actions
Copy link

Coverage Status

Coverage increased (+5.5%) to 82.189% when pulling c7175d5 on shssoichiro:fix-two-pass into 38107c0 on xiph:master.

@shssoichiro shssoichiro merged commit bde0cfc into xiph:master Mar 24, 2020
@shssoichiro shssoichiro deleted the fix-two-pass branch March 24, 2020 17:48
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.

process_frame() refactor broke 2-pass encoding
3 participants