Revert "rav1e: Update to rav1e 0.6"

Revert for the time being because it pulls in libgit2-sys, which fails
to build on macOS because of course it does. It regularly fails building
everywhere because of its brittle C code and build system, which is why
gst-plugin-version-helper moved away from it.

This reverts commit e6789fc338.
This commit is contained in:
Sebastian Dröge 2022-12-12 19:01:40 +02:00
parent 7b1ee9f948
commit 5f6afce842
2 changed files with 7 additions and 8 deletions

View file

@ -11,7 +11,7 @@ rust-version = "1.63"
[dependencies]
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.19", version = "0.19.1" }
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.19", version = "0.19" }
rav1e = { version = "0.6", default-features = false }
rav1e = { version = "0.5", default-features = false }
once_cell = "1.0"
atomic_refcell = "0.1"

View file

@ -166,7 +166,6 @@ impl Context {
rav1e::prelude::FrameTypeOverride::No
},
opaque: Some(rav1e::prelude::Opaque::new(frame_number)),
t35_metadata: Box::default(),
}),
))
}
@ -200,7 +199,6 @@ impl Context {
rav1e::prelude::FrameTypeOverride::No
},
opaque: Some(rav1e::prelude::Opaque::new(frame_number)),
t35_metadata: Box::default(),
}),
))
}
@ -583,10 +581,6 @@ impl VideoEncoderImpl for Rav1Enc {
.with_encoder_config(config::EncoderConfig {
width: video_info.width() as usize,
height: video_info.height() as usize,
sample_aspect_ratio: rav1e::data::Rational {
num: video_info.par().numer() as u64,
den: video_info.par().denom() as u64,
},
bit_depth: video_info.format_info().depth()[0] as usize,
chroma_sampling: match video_info.format() {
gst_video::VideoFormat::I420
@ -754,7 +748,7 @@ impl VideoEncoderImpl for Rav1Enc {
None
}
},
speed_settings: config::SpeedSettings::from_preset(settings.speed_preset as u8),
speed_settings: config::SpeedSettings::from_preset(settings.speed_preset as usize),
time_base: if video_info.fps() != gst::Fraction::new(0, 1) {
data::Rational {
num: video_info.fps().numer() as u64,
@ -773,6 +767,11 @@ impl VideoEncoderImpl for Rav1Enc {
tile_cols: settings.tile_cols,
tile_rows: settings.tile_rows,
tiles: settings.tiles,
rdo_lookahead_frames: if settings.rdo_lookahead_frames < 0 {
config::SpeedSettings::rdo_lookahead_frames(settings.speed_preset as usize)
} else {
settings.rdo_lookahead_frames as usize
},
tune: match settings.tune {
Tune::Psnr => rav1e::prelude::Tune::Psnr,
Tune::Psychovisual => rav1e::prelude::Tune::Psychovisual,