parent
960a3f63a2
commit
a311f11eb9
@ -1,35 +0,0 @@
|
||||
From a811e9ef43e36ca9334146ca3a993a964ae45168 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <slomo@coaxion.net>
|
||||
Date: Mon, 10 Aug 2020 20:44:18 +0300
|
||||
Subject: [PATCH] Update paste dependency to 1.0, arbitrary to 0.4, console to
|
||||
0.12 and semver to 0.10 (#2489)
|
||||
|
||||
---
|
||||
src/test_encode_decode/mod.rs | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/test_encode_decode/mod.rs b/src/test_encode_decode/mod.rs
|
||||
index 884a11da5bb8..ceba8109790d 100644
|
||||
--- a/src/test_encode_decode/mod.rs
|
||||
+++ b/src/test_encode_decode/mod.rs
|
||||
@@ -678,7 +678,7 @@ fn high_bit_depth(decoder: &str, depth: usize) {
|
||||
macro_rules! test_high_bit_depth {
|
||||
($($B:expr),+) => {
|
||||
$(
|
||||
- paste::item_with_macros!{
|
||||
+ paste::item!{
|
||||
#[cfg_attr(feature = "decode_test", interpolate_test(aom, "aom"))]
|
||||
#[cfg_attr(feature = "decode_test_dav1d", interpolate_test(dav1d, "dav1d"))]
|
||||
#[ignore]
|
||||
@@ -709,7 +709,7 @@ fn chroma_sampling(decoder: &str, cs: ChromaSampling) {
|
||||
macro_rules! test_chroma_sampling {
|
||||
($(($S:expr, $I:expr)),+) => {
|
||||
$(
|
||||
- paste::item_with_macros!{
|
||||
+ paste::item!{
|
||||
#[cfg_attr(feature = "decode_test", interpolate_test(aom, "aom"))]
|
||||
#[cfg_attr(feature = "decode_test_dav1d", interpolate_test(dav1d, "dav1d"))]
|
||||
#[ignore]
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,72 +0,0 @@
|
||||
From 900ed9f0f4a57b07315f54001981f2776f760fc3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rapha=C3=ABl=20Zumer?= <rzumer@tebako.net>
|
||||
Date: Fri, 22 May 2020 16:05:54 -0400
|
||||
Subject: [PATCH 1/2] Update the y4m dependency
|
||||
|
||||
(cherry picked from commit fff4653c4e17eba3df4b10fad3fa299e8806c069)
|
||||
---
|
||||
src/bin/decoder/y4m.rs | 4 ++--
|
||||
src/bin/muxer/y4m.rs | 2 +-
|
||||
src/bin/rav1e.rs | 4 ++--
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/bin/decoder/y4m.rs b/src/bin/decoder/y4m.rs
|
||||
index b8d843871209..623a4bcac4d9 100644
|
||||
--- a/src/bin/decoder/y4m.rs
|
||||
+++ b/src/bin/decoder/y4m.rs
|
||||
@@ -16,7 +16,7 @@ use crate::decoder::VideoDetails;
|
||||
use crate::Frame;
|
||||
use rav1e::prelude::*;
|
||||
|
||||
-impl Decoder for y4m::Decoder<'_, Box<dyn Read>> {
|
||||
+impl Decoder for y4m::Decoder<Box<dyn Read>> {
|
||||
fn get_video_details(&self) -> VideoDetails {
|
||||
let width = self.get_width();
|
||||
let height = self.get_height();
|
||||
@@ -77,7 +77,7 @@ impl From<y4m::Error> for DecodeError {
|
||||
y4m::Error::EOF => DecodeError::EOF,
|
||||
y4m::Error::BadInput => DecodeError::BadInput,
|
||||
y4m::Error::UnknownColorspace => DecodeError::UnknownColorspace,
|
||||
- y4m::Error::ParseError => DecodeError::ParseError,
|
||||
+ y4m::Error::ParseError(_) => DecodeError::ParseError,
|
||||
y4m::Error::IoError(e) => DecodeError::IoError(e),
|
||||
// Note that this error code has nothing to do with the system running out of memory,
|
||||
// it means the y4m decoder has exceeded its memory allocation limit.
|
||||
diff --git a/src/bin/muxer/y4m.rs b/src/bin/muxer/y4m.rs
|
||||
index e26c31dc2ab0..c61ffa5daa3a 100644
|
||||
--- a/src/bin/muxer/y4m.rs
|
||||
+++ b/src/bin/muxer/y4m.rs
|
||||
@@ -13,7 +13,7 @@ use std::io::Write;
|
||||
use std::slice;
|
||||
|
||||
pub fn write_y4m_frame<T: Pixel>(
|
||||
- y4m_enc: &mut y4m::Encoder<'_, Box<dyn Write>>, rec: &Frame<T>,
|
||||
+ y4m_enc: &mut y4m::Encoder<Box<dyn Write>>, rec: &Frame<T>,
|
||||
y4m_details: VideoDetails,
|
||||
) {
|
||||
let bytes_per_sample = if y4m_details.bit_depth > 8 { 2 } else { 1 };
|
||||
diff --git a/src/bin/rav1e.rs b/src/bin/rav1e.rs
|
||||
index 704434cbba30..675171f64e27 100644
|
||||
--- a/src/bin/rav1e.rs
|
||||
+++ b/src/bin/rav1e.rs
|
||||
@@ -100,7 +100,7 @@ fn process_frame<T: Pixel, D: Decoder>(
|
||||
ctx: &mut Context<T>, output_file: &mut dyn Muxer, source: &mut Source<D>,
|
||||
pass1file: Option<&mut File>, pass2file: Option<&mut File>,
|
||||
buffer: &mut [u8], buf_pos: &mut usize,
|
||||
- mut y4m_enc: Option<&mut y4m::Encoder<'_, Box<dyn Write>>>,
|
||||
+ mut y4m_enc: Option<&mut y4m::Encoder<Box<dyn Write>>>,
|
||||
) -> Result<Option<Vec<FrameSummary>>, CliError> {
|
||||
let y4m_details = source.input.get_video_details();
|
||||
let mut frame_summaries = Vec::new();
|
||||
@@ -198,7 +198,7 @@ fn do_encode<T: Pixel, D: Decoder>(
|
||||
cfg: Config, verbose: bool, mut progress: ProgressInfo,
|
||||
output: &mut dyn Muxer, source: &mut Source<D>,
|
||||
pass1file_name: Option<&String>, pass2file_name: Option<&String>,
|
||||
- mut y4m_enc: Option<y4m::Encoder<'_, Box<dyn Write>>>,
|
||||
+ mut y4m_enc: Option<y4m::Encoder<Box<dyn Write>>>,
|
||||
) -> Result<(), CliError> {
|
||||
let mut ctx: Context<T> =
|
||||
cfg.new_context().map_err(|e| e.context("Invalid encoder settings"))?;
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,95 +0,0 @@
|
||||
From 13771f767a4cb02ddd91aa35f8391b970178a6cb Mon Sep 17 00:00:00 2001
|
||||
From: Luca Barbato <lu_zero@gentoo.org>
|
||||
Date: Wed, 27 May 2020 17:35:58 +0200
|
||||
Subject: [PATCH 2/2] Avoid some indirection now that we can directly store the
|
||||
Writer/Reader in y4m
|
||||
|
||||
(cherry picked from commit d9ee06aae99b2a6c6dcb9c88da78b931610981da)
|
||||
---
|
||||
src/bin/rav1e.rs | 31 +++++++++++++++----------------
|
||||
1 file changed, 15 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/bin/rav1e.rs b/src/bin/rav1e.rs
|
||||
index 675171f64e27..3ae2636bc87f 100644
|
||||
--- a/src/bin/rav1e.rs
|
||||
+++ b/src/bin/rav1e.rs
|
||||
@@ -196,7 +196,7 @@ fn process_frame<T: Pixel, D: Decoder>(
|
||||
|
||||
fn do_encode<T: Pixel, D: Decoder>(
|
||||
cfg: Config, verbose: bool, mut progress: ProgressInfo,
|
||||
- output: &mut dyn Muxer, source: &mut Source<D>,
|
||||
+ output: &mut dyn Muxer, mut source: Source<D>,
|
||||
pass1file_name: Option<&String>, pass2file_name: Option<&String>,
|
||||
mut y4m_enc: Option<y4m::Encoder<Box<dyn Write>>>,
|
||||
) -> Result<(), CliError> {
|
||||
@@ -223,7 +223,7 @@ fn do_encode<T: Pixel, D: Decoder>(
|
||||
while let Some(frame_info) = process_frame(
|
||||
&mut ctx,
|
||||
&mut *output,
|
||||
- source,
|
||||
+ &mut source,
|
||||
pass1file.as_mut(),
|
||||
pass2file.as_mut(),
|
||||
&mut buffer,
|
||||
@@ -348,15 +348,14 @@ fn run() -> Result<(), error::CliError> {
|
||||
.saturating_mul(2304)
|
||||
.saturating_add(1024),
|
||||
};
|
||||
- let mut y4m_dec =
|
||||
- match y4m::Decoder::new_with_limits(&mut cli.io.input, limit) {
|
||||
- Err(_) => {
|
||||
- return Err(CliError::new("Could not input video. Is it a y4m file?"))
|
||||
- }
|
||||
- Ok(d) => d,
|
||||
- };
|
||||
+ let mut y4m_dec = match y4m::Decoder::new_with_limits(cli.io.input, limit) {
|
||||
+ Err(_) => {
|
||||
+ return Err(CliError::new("Could not input video. Is it a y4m file?"))
|
||||
+ }
|
||||
+ Ok(d) => d,
|
||||
+ };
|
||||
let video_info = y4m_dec.get_video_details();
|
||||
- let y4m_enc = match cli.io.rec.as_mut() {
|
||||
+ let y4m_enc = match cli.io.rec {
|
||||
Some(rec) => Some(
|
||||
y4m::encode(
|
||||
video_info.width,
|
||||
@@ -462,29 +461,29 @@ fn run() -> Result<(), error::CliError> {
|
||||
};
|
||||
|
||||
#[cfg(all(unix, feature = "signal-hook"))]
|
||||
- let mut source =
|
||||
+ let source =
|
||||
Source { limit: cli.limit, input: y4m_dec, count: 0, exit_requested };
|
||||
#[cfg(not(all(unix, feature = "signal-hook")))]
|
||||
- let mut source = Source { limit: cli.limit, input: y4m_dec, count: 0 };
|
||||
+ let source = Source { limit: cli.limit, input: y4m_dec, count: 0 };
|
||||
|
||||
if video_info.bit_depth == 8 {
|
||||
- do_encode::<u8, y4m::Decoder<'_, Box<dyn Read>>>(
|
||||
+ do_encode::<u8, y4m::Decoder<Box<dyn Read>>>(
|
||||
cfg,
|
||||
cli.verbose,
|
||||
progress,
|
||||
&mut *cli.io.output,
|
||||
- &mut source,
|
||||
+ source,
|
||||
cli.pass1file_name.as_ref(),
|
||||
cli.pass2file_name.as_ref(),
|
||||
y4m_enc,
|
||||
)?
|
||||
} else {
|
||||
- do_encode::<u16, y4m::Decoder<'_, Box<dyn Read>>>(
|
||||
+ do_encode::<u16, y4m::Decoder<Box<dyn Read>>>(
|
||||
cfg,
|
||||
cli.verbose,
|
||||
progress,
|
||||
&mut *cli.io.output,
|
||||
- &mut source,
|
||||
+ source,
|
||||
cli.pass1file_name.as_ref(),
|
||||
cli.pass2file_name.as_ref(),
|
||||
y4m_enc,
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (rav1e-0.3.4.crate) = 76c0ec3e096c579c734ade1d6b5fbc072e27beca1a1bf0f5dfae28f8840d5e1de67b7dbe572015fab82a72624c8f47608a85f67b85fb67bc26d44a530d441d9b
|
||||
SHA512 (rav1e-0.4.0-alpha.crate) = 533ec02d78677441816ad1dcaf6133a6fb04fc2fbdbc2ee55f7a9649cddbdfd3f20cdb86590144e9dba527095afb6c501de9bb037b2fb1575e94b7c9fa256a88
|
||||
|
Loading…
Reference in new issue