[XviD-devel] possible bug :(

Radoslaw 'sysKin' Czyz xvid-devel@xvid.org
Wed, 31 Jul 2002 19:31:04 +0930


Hi

> So B-frames are still bugfree ;-) unless somebody comes up with
> something new...

Sorry, it seems I did. But it's not very important, please don't reset
the counter ;) (even if that's cheating).
Of course I may be wrong.

In direct mode with inter4v (motion_est.c line 3213) there is:
  sad8bi(frame->image.y + 2*(i+(k&1))*8 + 2*(j+(k>>1))*8*edged_width,
         get_ref_mv(f_ref->y, f_refH->y, f_refV->y, f_refHV->y,
                    2*(i+(k&1)), 2*(j+(k>>1)), 8, &mb->mvs[k], edged_width),
         get_ref_mv(b_ref->y, b_refH->y, b_refV->y, b_refHV->y,
                    2*(i+(k&1)), 2*(j+(k>>1)), 8, &mb->b_mvs[k], edged_width),
                                                        edged_width);

where is:
  2*(i+(k&1)) , shouldn't be
  (2*i+(k&1)) ?

The same for 2*(i+(k>>1)) . It happens in both get_ref_mv and in the
first parameter of sad8 (6 times total)

Am I right?

Radek