mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-15 23:01:02 +00:00
Revert "Revert "rav1e: Update to rav1e 0.6""
This reverts commit 5f6afce842
.
It should be building fine on macOS too now.
This commit is contained in:
parent
b701003352
commit
cbc99fb198
2 changed files with 8 additions and 7 deletions
|
@ -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.5", default-features = false }
|
||||
rav1e = { version = "0.6", default-features = false }
|
||||
once_cell = "1.0"
|
||||
atomic_refcell = "0.1"
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ impl Context {
|
|||
rav1e::prelude::FrameTypeOverride::No
|
||||
},
|
||||
opaque: Some(rav1e::prelude::Opaque::new(frame_number)),
|
||||
t35_metadata: Box::default(),
|
||||
}),
|
||||
))
|
||||
}
|
||||
|
@ -199,6 +200,7 @@ impl Context {
|
|||
rav1e::prelude::FrameTypeOverride::No
|
||||
},
|
||||
opaque: Some(rav1e::prelude::Opaque::new(frame_number)),
|
||||
t35_metadata: Box::default(),
|
||||
}),
|
||||
))
|
||||
}
|
||||
|
@ -581,6 +583,10 @@ 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
|
||||
|
@ -748,7 +754,7 @@ impl VideoEncoderImpl for Rav1Enc {
|
|||
None
|
||||
}
|
||||
},
|
||||
speed_settings: config::SpeedSettings::from_preset(settings.speed_preset as usize),
|
||||
speed_settings: config::SpeedSettings::from_preset(settings.speed_preset as u8),
|
||||
time_base: if video_info.fps() != gst::Fraction::new(0, 1) {
|
||||
data::Rational {
|
||||
num: video_info.fps().numer() as u64,
|
||||
|
@ -767,11 +773,6 @@ 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,
|
||||
|
|
Loading…
Reference in a new issue