Commit 50be70f2 authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato
Browse files

Move plane into the frame module

parent 8c4fa27f
......@@ -10,7 +10,7 @@
use criterion::*;
use rav1e::bench::partition::*;
use rav1e::bench::partition::BlockSize::*;
use rav1e::bench::plane::*;
use rav1e::bench::frame::*;
use rand::{Rng, SeedableRng};
use rand_chacha::ChaChaRng;
use rav1e::bench::me;
......
......@@ -12,7 +12,7 @@ use rand::{Rng, RngCore, SeedableRng};
use rand_chacha::ChaChaRng;
use rav1e::bench::partition::BlockSize;
use rav1e::bench::predict::{Block4x4, Intra};
use rav1e::bench::plane::*;
use rav1e::bench::frame::*;
use rav1e::bench::util::*;
pub const BLOCK_SIZE: BlockSize = BlockSize::BLOCK_32X32;
......
......@@ -12,7 +12,7 @@
use crate::context::*;
use crate::frame::Frame;
use crate::encoder::FrameInvariants;
use crate::plane::*;
use crate::frame::*;
use crate::tiling::*;
use crate::util::{clamp, msb, Pixel, CastFromPrimitive};
......
......@@ -27,7 +27,7 @@ use crate::transform::TxSize::*;
use crate::transform::TxType::*;
use crate::transform::*;
use crate::lrf::*;
use crate::plane::*;
use crate::frame::*;
use crate::scan_order::*;
use crate::tiling::*;
use crate::token_cdfs::*;
......
......@@ -15,7 +15,7 @@ use crate::encoder::FrameInvariants;
use crate::encoder::FrameState;
use crate::api::FrameType;
use crate::partition::RefType::*;
use crate::plane::*;
use crate::frame::*;
use crate::predict::PredictionMode::*;
use crate::quantize::*;
use crate::util::Pixel;
......
......@@ -11,14 +11,13 @@ use crate::api::*;
use crate::cdef::*;
use crate::context::*;
use crate::deblock::*;
use crate::frame::*;
use crate::ec::*;
use crate::lrf::*;
use crate::mc::MotionVector;
use crate::me::*;
use crate::partition::*;
use crate::predict::PredictionMode;
use crate::plane::*;
use crate::frame::*;
use crate::quantize::*;
use crate::rate::QuantizerParameters;
use crate::rate::FRAME_SUBTYPE_I;
......
......@@ -8,12 +8,14 @@
// PATENTS file, you can obtain it at www.aomedia.org/license/patent.
use crate::util::*;
use crate::plane::*;
use crate::tiling::*;
use crate::api::ChromaSampling;
use crate::context::MAX_SB_SIZE;
use crate::mc::SUBPEL_FILTER_SIZE;
mod plane;
pub use plane::*;
const FRAME_MARGIN: usize = 16 + SUBPEL_FILTER_SIZE;
#[derive(Debug, Clone)]
......
......@@ -17,7 +17,6 @@ extern crate pretty_assertions;
mod ec;
mod partition;
mod plane;
mod transform;
mod quantize;
mod predict;
......@@ -189,7 +188,7 @@ pub mod bench {
pub mod encoder { pub use crate::encoder::*; }
pub mod me { pub use crate::me::*; }
pub mod partition { pub use crate::partition::*; }
pub mod plane { pub use crate::plane::*; }
pub mod frame { pub use crate::frame::*; }
pub mod predict { pub use crate::predict::*; }
pub mod rdo { pub use crate::rdo::*; }
pub mod transform { pub use crate::transform::*; }
......
......@@ -13,11 +13,11 @@ use crate::frame::Frame;
use crate::encoder::FrameInvariants;
use crate::context::PLANES;
use crate::context::MAX_SB_SIZE;
use crate::plane::Plane;
use crate::plane::PlaneSlice;
use crate::plane::PlaneMutSlice;
use crate::plane::PlaneOffset;
use crate::plane::PlaneConfig;
use crate::frame::Plane;
use crate::frame::PlaneSlice;
use crate::frame::PlaneMutSlice;
use crate::frame::PlaneOffset;
use crate::frame::PlaneConfig;
use std::cmp;
use crate::util::clamp;
use crate::util::CastFromPrimitive;
......
......@@ -177,7 +177,7 @@ const SUBPEL_FILTERS: [[[i32; SUBPEL_FILTER_SIZE]; 16]; 6] = [
#[cfg(all(target_arch = "x86_64", feature = "nasm"))]
mod nasm {
use super::*;
use crate::plane::*;
use crate::frame::*;
use std::mem;
......@@ -368,7 +368,7 @@ mod nasm {
mod native {
use super::*;
use num_traits::*;
use crate::plane::*;
use crate::frame::*;
use crate::util::*;
unsafe fn run_filter<T: AsPrimitive<i32>>(
......
......@@ -18,7 +18,7 @@ use crate::mc::MotionVector;
use crate::partition::*;
use crate::partition::RefType::*;
use crate::predict::PredictionMode;
use crate::plane::*;
use crate::frame::*;
use crate::tiling::*;
use crate::util::Pixel;
......
......@@ -8,7 +8,7 @@
// PATENTS file, you can obtain it at www.aomedia.org/license/patent.
use crate::frame::Frame;
use crate::plane::Plane;
use crate::frame::Plane;
use crate::util::{CastFromPrimitive, Pixel};
/// Calculates the PSNR for a `Frame` by comparing the original (uncompressed) to the compressed
......
......@@ -13,7 +13,7 @@
use self::BlockSize::*;
use self::TxSize::*;
use crate::context::*;
use crate::plane::*;
use crate::frame::*;
use crate::predict::*;
use crate::tiling::*;
use crate::transform::TxSize;
......
......@@ -15,7 +15,7 @@ use crate::context::{INTRA_MODES, MAX_TX_SIZE};
use crate::encoder::FrameInvariants;
use crate::mc::*;
use crate::partition::*;
use crate::plane::*;
use crate::frame::*;
use crate::tiling::*;
use crate::transform::*;
use crate::util::*;
......
......@@ -26,7 +26,7 @@ use crate::me::*;
use crate::motion_compensate;
use crate::partition::*;
use crate::partition::RefType::*;
use crate::plane::*;
use crate::frame::*;
use crate::predict::{RAV1E_INTRA_MODES, RAV1E_INTER_MODES_MINIMAL, RAV1E_INTER_COMPOUND_MODES, PredictionMode};
use crate::Tune;
use crate::write_tx_blocks;
......
......@@ -86,7 +86,7 @@ impl<T: Pixel> Drop for Dav1dDecoder<T> {
}
fn compare_pic<T: Pixel>(pic: &Dav1dPicture, frame: &Frame<T>, bit_depth: usize, width: usize, height: usize) {
use plane::Plane;
use crate::frame::Plane;
let cmp_plane = |data, stride, frame_plane: &Plane<T>| {
let w = width >> frame_plane.cfg.xdec;
......
......@@ -8,7 +8,7 @@
// PATENTS file, you can obtain it at www.aomedia.org/license/patent.
use crate::context::*;
use crate::plane::*;
use crate::frame::*;
use crate::util::*;
use std::marker::PhantomData;
......
......@@ -11,7 +11,6 @@ use super::*;
use crate::context::*;
use crate::frame::*;
use crate::plane::*;
use crate::util::*;
/// Rectangle of a tile, in pixels
......
......@@ -12,7 +12,6 @@ use super::*;
use crate::context::*;
use crate::encoder::*;
use crate::frame::*;
use crate::plane::*;
use crate::quantize::*;
use crate::rdo::*;
use crate::util::*;
......
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