[XviD-devel] Forced iframes lost?

peter ross xvid-devel@xvid.org
Sun, 06 Oct 2002 09:25:51 +1000


>Hm, we checked that the iframes are correctly marked in the statsfiles:
>http://forum.doom9.org/showthread.php?s=&threadid=34268&pagenumber=2
>
>He also offers to send out an excel spreadsheet with the first pass iframes 
>locations compared to the 2nd pass, maybe it helps (from the frame count I 
>guess he made his test with matrix, if someone wants to reproduce his 
>results ;) ).

matrix, hmm, iam really tempted to purchase that disc.
it seems to be the reference video codec test.

>So this is somewhere happening in the 2nd pass code for sure - I just 
>wanted to see if maybe the stats files are already wrong, but they're 
>produced just fine.
>
>Very strange :-/

strange is an understatement. from what ive read, it appears "i-frames"
are occasionly being replaced with "p-frames". this, as dan said,
is simply not possible within xvidcore. it must be a vfw error.

  if xvid_enc_frame->intra < 0: auto detection.

  if xvid_enc_frame->intra == 1: you always get an i-frame

  if xvid_enc_frame->intra == 0: you always get an p-frame
     (UNLESS, the hinted mv-data specifies the frame was an i-frame)

to to etablish exactly whats happening, i suggest adding an 
OutputDebugString at the begining of encoder_encode() and display
the pFrame->intra value. then add OutputDebugString("FrameCodeI")
and OutputDebugString("FrameCodeP") to the beginning of the respective
functions. add a furhur OutputDebugString() where you apply the
pFrame->intra value to the stats file.

other thoughts:
* the problem might be un-related to xvid. has anyone else been able
  to reproduce this bug? i will run some tests today.
* what method is currently being used to determine the frame-type of
  the 2nd pass bitstream? it might be that i-frames are being written,
  but not reported back to vfw/virtualdub/etc.
* it would be good to have build(which compiler) and vfw config
  settings(bitrate,quant,etc).

-- pete

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com