X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-codec-support%2Fsrc%2Fcodecs%2Fh263%2Fdecoder.rs;h=71c574ca0f3e807aadcc9a81a6dc43a65f4e0e26;hb=8989305f27376e92ec3f0a77cf7edf65a5255183;hp=0eb95ec21e236ee6230c56b32431c768c40c9f19;hpb=e65c00402a7bfdeb7e1922a46fab0fbabb7bbf33;p=nihav.git diff --git a/nihav-codec-support/src/codecs/h263/decoder.rs b/nihav-codec-support/src/codecs/h263/decoder.rs index 0eb95ec..71c574c 100644 --- a/nihav-codec-support/src/codecs/h263/decoder.rs +++ b/nihav-codec-support/src/codecs/h263/decoder.rs @@ -118,7 +118,7 @@ struct PredCoeffs { ver: [[i16; 8]; 6], } -const ZERO_PRED_COEFFS: PredCoeffs = PredCoeffs { hor: [[0; 8]; 6], ver: [[0; 8]; 6] }; +const ZERO_PRED_COEFFS: PredCoeffs = PredCoeffs { hor: [[1024, 0, 0, 0, 0, 0, 0, 0]; 6], ver: [[1024, 0, 0, 0, 0, 0, 0, 0]; 6] }; pub const H263DEC_OPT_USES_GOB: u32 = 0x0001; pub const H263DEC_OPT_SLICE_RESET: u32 = 0x0002; @@ -466,7 +466,7 @@ impl H263BaseDecoder { let mut sstate = SliceState::new(pinfo.mode == Type::I); let mut mb_pos = 0; - let apply_acpred = (pinfo.mode == Type::I) && pinfo.plusinfo.is_some() && pinfo.plusinfo.unwrap().aic; + let apply_acpred = /*(pinfo.mode == Type::I) && */pinfo.plusinfo.is_some() && pinfo.plusinfo.unwrap().aic; if apply_acpred { self.pred_coeffs.truncate(0); self.pred_coeffs.resize(self.mb_w * self.mb_h, ZERO_PRED_COEFFS); @@ -511,6 +511,7 @@ impl H263BaseDecoder { if is_b { mvi2.set_zero_mv(mb_x); } else if pinfo.is_pb() { + mvi.predict(mb_x, 0, false, binfo.get_mv2(0), sstate.first_line, sstate.first_mb); mvi2.predict(mb_x, 0, false, binfo.get_mv2(0), sstate.first_line, sstate.first_mb); } if do_obmc {