[XviD-devel] [DEBUG TASK] Valgrind report
suxen_drol
xvid-devel@xvid.org
Wed, 15 Jan 2003 20:04:47 +1100
On Wed, 15 Jan 2003 01:01:25 +0100 Edouard Gomez <ed.gomez@free.fr> wrote:
> Well well, still going further in my dev-api-3 tests when trying MfA VLC
> codes and i get very strange results when enabling small LUTs. Frame
> size becomes HUGE.
>
> 1- We decided to see if LUTs were not corrupted using valgrind and qt
> the end of the email.
>
> 2- When steping trhough the code, i noticed that the first input frame
> goes make is path to encoder.c:1015 then iFrameNum is incremented and
> so, first frame is not a *forced IFrame* but it is an IFrame because
> MEanalysis is trying to analyse first frame against garbage. I'm pretty
> sure valgrind is reporting this bug, because Meanalysis is comparing a
> frame with unitialised data.
yep. iFrameNum is initially set to zero, but we increment it before
doing the:
if (iFrameNum==0) force_first_iframe
a simple fix is to init iFrameNum=-1.
-- pete; life is like a box of ammo