X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-realmedia%2Fsrc%2Fcodecs%2Frv30dsp.rs;h=6065f7ee7d19d04798059ab64fe4ff38b2380d32;hb=bf109afe32ce8eb2722ebd830667f9438ba21b54;hp=92719165f8059dc1d4e691dc298d7db4797311c0;hpb=1a967e6bad5f17943b4de0607078eb940ad5adfe;p=nihav.git diff --git a/nihav-realmedia/src/codecs/rv30dsp.rs b/nihav-realmedia/src/codecs/rv30dsp.rs index 9271916..6065f7e 100644 --- a/nihav-realmedia/src/codecs/rv30dsp.rs +++ b/nihav-realmedia/src/codecs/rv30dsp.rs @@ -1,6 +1,6 @@ use nihav_core::frame::{FrameType, NAVideoBuffer}; -use nihav_core::codecs::MV; -use nihav_core::codecs::blockdsp::edge_emu; +use nihav_codec_support::codecs::MV; +use nihav_codec_support::codecs::blockdsp::edge_emu; use super::rv3040::{RV34DSP, RV34MBInfo}; fn clip8(a: i16) -> u8 { @@ -34,7 +34,7 @@ macro_rules! mc_matrix { ($c1 * 6) * ($s[$o] as i32) + ($c1 * 9) * ($s[$o + 1] as i32) + ($c1) * ($s[$o + 2] as i32) ); ($s: ident, $o: expr, $c1: expr, $d1: expr, $d2: expr) => ( - (-$c1) * ($s[$o - 1] as i32) + ($c1 * $d1) * ($s[$o] as i32) + ($c1 * $d2) * ($s[$o + 1] as i32) + (-$c1) * ($s[$o + 2] as i32) + -($c1) * ($s[$o - 1] as i32) + ($c1 * $d1) * ($s[$o] as i32) + ($c1 * $d2) * ($s[$o + 1] as i32) + -($c1) * ($s[$o + 2] as i32) ); ($s: ident, $o: expr, $ss: expr, $c1: expr, $c2: expr, $d1: expr, $d2: expr) => ( ((mc_matrix!($s, $o - $ss, -1, $d1, $d2) + @@ -238,7 +238,7 @@ const RV30_EDGE1: [isize; 3] = [ 0, 1, 1 ]; const RV30_EDGE2: [isize; 3] = [ 0, 2, 2 ]; impl RV34DSP for RV30DSP { - fn loop_filter(&self, frame: &mut NAVideoBuffer, _ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, row: usize) { + fn loop_filter(&self, frame: &mut NAVideoBuffer, _ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, _mb_h: usize, row: usize) { let mut offs: [usize; 3] = [0; 3]; let mut stride: [usize; 3] = [0; 3]; @@ -401,7 +401,7 @@ impl RV34DSP for RV30DSP { self.luma_mc[if use16 { 0 } else { 1 }][mode](dst, doffset, dstride, src, soffset, sstride); } else { let mut ebuf: [u8; 32*20] = [0; 32*20]; - edge_emu(prev_frame, (x as isize) + (dx as isize) - 1, (y as isize) + (dy as isize) - 1, 16+3, 16+3, &mut ebuf, 32, 0); + edge_emu(prev_frame, (x as isize) + (dx as isize) - 1, (y as isize) + (dy as isize) - 1, 16+3, 16+3, &mut ebuf, 32, 0, 4); self.luma_mc[if use16 { 0 } else { 1 }][mode](dst, doffset, dstride, &ebuf, 32 + 1, 32); } } @@ -428,7 +428,7 @@ impl RV34DSP for RV30DSP { rv30_chroma_mc(dst, doffset, dstride, src, soffset, sstride, size, cx, cy); } else { let mut ebuf: [u8; 16*10] = [0; 16*10]; - edge_emu(prev_frame, (x as isize) + (dx as isize), (y as isize) + (dy as isize), 8+1, 8+1, &mut ebuf, 16, comp); + edge_emu(prev_frame, (x as isize) + (dx as isize), (y as isize) + (dy as isize), 8+1, 8+1, &mut ebuf, 16, comp, 4); rv30_chroma_mc(dst, doffset, dstride, &ebuf, 0, 16, size, cx, cy); } }