has_b: bool,
b_data: Vec<BMB>,
pred_coeffs: Vec<PredCoeffs>,
+ is_gob: bool,
}
#[inline]
#[allow(dead_code)]
impl H263BaseDecoder {
- pub fn new() -> Self {
+ pub fn new(is_gob: bool) -> Self {
H263BaseDecoder{
w: 0, h: 0, mb_w: 0, mb_h: 0, num_mb: 0,
ftype: Type::Special,
last_ts: 0,
has_b: false, b_data: Vec::new(),
pred_coeffs: Vec::new(),
+ is_gob: is_gob,
}
}
let mut bufinfo = bufret.unwrap();
let mut buf = bufinfo.get_vbuf().unwrap();
- let mut slice = if bd.is_gob() {
+ let mut slice = if self.is_gob {
SliceInfo::get_default_slice(&pinfo)
} else {
bd.decode_slice_header(&pinfo)?
}
fn is_slice_end(&mut self) -> bool { self.br.peek(16) == 0 }
-
- fn is_gob(&mut self) -> bool { true }
}
impl Intel263Decoder {
Intel263Decoder{
info: Rc::new(DUMMY_CODEC_INFO),
- dec: H263BaseDecoder::new(),
+ dec: H263BaseDecoder::new(true),
tables: tables,
bdsp: H263BlockDSP::new(),
}
fn decode_block_intra(&mut self, info: &BlockInfo, sstate: &SliceState, quant: u8, no: usize, coded: bool, blk: &mut [i16; 64]) -> DecoderResult<()>;
fn decode_block_inter(&mut self, info: &BlockInfo, sstate: &SliceState, quant: u8, no: usize, coded: bool, blk: &mut [i16; 64]) -> DecoderResult<()>;
fn is_slice_end(&mut self) -> bool;
- fn is_gob(&mut self) -> bool;
}
pub trait BlockDSP {
}
fn is_slice_end(&mut self) -> bool { false }
-
- fn is_gob(&mut self) -> bool { false }
}
impl<'a> RealVideo10BR<'a> {
RealVideo10Decoder{
info: Rc::new(DUMMY_CODEC_INFO),
- dec: H263BaseDecoder::new(),
+ dec: H263BaseDecoder::new(false),
tables: tables,
w: 0,
h: 0,
use test::dec_video::test_file_decoding;
#[test]
fn test_rv10() {
- test_file_decoding("realmedia", "assets/RV/rv10_dnet_640x352_realvideo_encoder_4.0.rm", Some(1000), true, false, Some("rv10"));
+ test_file_decoding("realmedia", "assets/RV/rv10_dnet_640x352_realvideo_encoder_4.0.rm", Some(1000), true, false, None/*Some("rv10")*/);
}
}
}
fn is_slice_end(&mut self) -> bool { false }
-
- fn is_gob(&mut self) -> bool { false }
}
impl<'a> RealVideo20BR<'a> {
RealVideo20Decoder{
info: Rc::new(DUMMY_CODEC_INFO),
- dec: H263BaseDecoder::new(),
+ dec: H263BaseDecoder::new(false),
tables: tables,
w: 0,
h: 0,