Commit 8b1f5016 authored by Xu Guangxin's avatar Xu Guangxin Committed by Luca Barbato
Browse files

refact: move y4mmuxer to seperate file

parent f21d3d66
......@@ -7,12 +7,12 @@
// Media Patent License 1.0 was not distributed with this source code in the
// PATENTS file, you can obtain it at
mod muxer;
pub use muxer::*;
mod ivf;
use self::ivf::IvfMuxer;
mod y4m;
pub use self::y4m::write_y4m_frame;
use std::io;
pub trait Muxer {
......@@ -8,9 +8,9 @@
// PATENTS file, you can obtain it at
use crate::decoder::VideoDetails;
use rav1e::*;
use std::io::Write;
use std::slice;
use rav1e::*;
pub fn write_y4m_frame<T: Pixel>(y4m_enc: &mut y4m::Encoder<'_, Box<dyn Write>>, rec: &rav1e::Frame<T>, y4m_details: VideoDetails) {
let pitch_y = if y4m_details.bit_depth > 8 { y4m_details.width * 2 } else { y4m_details.width };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment