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

Bump av-metrics-decoders in other av-metrics crates #298

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion av_metrics_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false

[dependencies]
av-metrics = { version = "0.9", features = ["serde"] }
av-metrics-decoders = "0.2.1"
av-metrics-decoders = "0.3.1"

[features]
default = ["y4m"]
Expand Down
8 changes: 6 additions & 2 deletions av_metrics_tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#[cfg(test)]
mod tests {
#![allow(unused_imports)]

use av_metrics::video::ciede::{calculate_video_ciede, calculate_video_ciede_nosimd};
use av_metrics::video::psnr::{calculate_video_apsnr, calculate_video_psnr};
use av_metrics::video::psnr_hvs::calculate_video_psnr_hvs;
Expand All @@ -8,11 +10,13 @@ mod tests {
use av_metrics_decoders::FfmpegDecoder;
#[cfg(not(feature = "ffmpeg"))]
use av_metrics_decoders::Y4MDecoder;
use std::fs::File;
use std::io::BufReader;
use std::path::Path;

#[cfg(not(feature = "ffmpeg"))]
fn get_decoder<P: AsRef<Path>>(input: P) -> Result<Y4MDecoder, String> {
Y4MDecoder::new(input)
fn get_decoder<P: AsRef<Path>>(input: P) -> Result<Y4MDecoder<BufReader<File>>, String> {
av_metrics_decoders::y4m::new_decoder_from_file(input)
}

#[cfg(feature = "ffmpeg")]
Expand Down
2 changes: 1 addition & 1 deletion av_metrics_tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include = ["src/**/*", "LICENSE"]

[dependencies]
av-metrics = { version = "0.9", features = ["serde"] }
av-metrics-decoders = "0.2.1"
av-metrics-decoders = "0.3.1"
clap = "4"
console = "0.15.0"
indicatif = "0.17.1"
Expand Down
6 changes: 4 additions & 2 deletions av_metrics_tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use indicatif::{ProgressBar, ProgressStyle};
use serde::Serialize;
use std::error::Error;
use std::fs::File;
#[cfg(not(feature = "ffmpeg"))]
use std::io::BufReader;
use std::io::{BufWriter, Stdout, Write};
use std::path::Path;

Expand Down Expand Up @@ -166,8 +168,8 @@ impl InputType {
}

#[cfg(not(feature = "ffmpeg"))]
pub fn get_decoder<P: AsRef<Path>>(input: P) -> Result<Y4MDecoder, String> {
Y4MDecoder::new(input)
pub fn get_decoder<P: AsRef<Path>>(input: P) -> Result<Y4MDecoder<BufReader<File>>, String> {
av_metrics_decoders::y4m::new_decoder_from_file(input)
}

#[cfg(feature = "ffmpeg")]
Expand Down
Loading