Commit 86cc3d0c authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato

Move the encoder logic out of lib.rs

parent 562247e4
......@@ -25,8 +25,8 @@ use plane::*;
use util::clamp;
use std::*;
use REF_CONTEXTS;
use SINGLE_REFS;
use self::REF_CONTEXTS;
use self::SINGLE_REFS;
const PLANES: usize = 3;
......@@ -1874,12 +1874,12 @@ impl ContextWriter {
if rf[1] == NONE_FRAME {
for i in 0..2 {
if cand.ref_frame[i] == rf[0] {
}
}
} else {
if cand.ref_frame[0] == rf[0] && cand.ref_frame[1] == rf[1] {
}
}
*/
......
This diff is collapsed.
This diff is collapsed.
......@@ -10,9 +10,9 @@
#![allow(non_camel_case_types)]
#![allow(dead_code)]
use BlockSize::*;
use TxSize::*;
use FrameInvariants;
use self::BlockSize::*;
use self::TxSize::*;
use encoder::FrameInvariants;
pub const NONE_FRAME: isize = -1;
pub const INTRA_FRAME: usize = 0;
......@@ -466,7 +466,7 @@ impl PredictionMode {
if x == 0 && y == 0 {
above[0] = base;
left[0] = base;
}
}
}
let slice = dst.as_mut_slice();
......
......@@ -27,7 +27,7 @@ use std::f64;
use std::vec::Vec;
use write_tx_blocks;
use write_tx_tree;
use BlockSize;
use partition::BlockSize;
use Frame;
use FrameInvariants;
use FrameState;
......@@ -54,7 +54,7 @@ pub struct RDOPartitionOutput {
#[allow(unused)]
fn cdef_dist_wxh_8x8(src1: &PlaneSlice<'_>, src2: &PlaneSlice<'_>, bit_depth: usize) -> u64 {
let coeff_shift = bit_depth - 8;
let mut sum_s: i32 = 0;
let mut sum_d: i32 = 0;
let mut sum_s2: i64 = 0;
......@@ -526,7 +526,7 @@ pub fn rdo_cdef_decision(sbo: &SuperBlockOffset, fi: &FrameInvariants,
let mut out_plane = &mut cdef_output.planes[p];
let out_po = sbo_0.block_offset(bx<<1, by<<1).plane_offset(&out_plane.cfg);
let out_slice = &out_plane.slice(&out_po);
let xdec = in_plane.cfg.xdec;
let ydec = in_plane.cfg.ydec;
......@@ -545,7 +545,7 @@ pub fn rdo_cdef_decision(sbo: &SuperBlockOffset, fi: &FrameInvariants,
best_err = err;
best_index = cdef_index;
}
}
best_index
}
......
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