- let pb_mv_add = if is_intra { 1 } else { 0 };
- if br.read_bool()?{
- if br.read_bool()? {
- let pb_mv_count = 1 - (br.read(1)? as usize);
- let cbpb = br.read(6)? as u8;
- Ok(BBlockInfo::new(true, cbpb, pb_mv_count + pb_mv_add, pb_mv_count == 1))
+ if is_ipb {
+ let pb_mv_add = if is_intra { 1 } else { 0 };
+ if br.read_bool()?{
+ if br.read_bool()? {
+ let pb_mv_count = 1 - (br.read(1)? as usize);
+ let cbpb = br.read(6)? as u8;
+ Ok(BBlockInfo::new(true, cbpb, pb_mv_count + pb_mv_add, pb_mv_count == 1))
+ } else {
+ Ok(BBlockInfo::new(true, 0, 1 + pb_mv_add, true))
+ }