[XviD-devel] [BUG] BFrame encoder doesn't force intra for 1st frame

Christoph Lampert xvid-devel@xvid.org
Sun, 4 Aug 2002 18:46:00 +0200 (CEST)


> When you use a freshly  initialized encoder, then you go through the encoder_encode_bframes function to the line 
> 
> line 874 :
>     inc_frame_num(pEnc);
> 
> And here you increase all counters, among then iFrameNum (=1).
> 
> And when the encoder must decide what type the frame is :
> 
> line 929 :
> 
>     if (pEnc->iFrameNum == 0 || pFr...)
> 
> So we never satisfy the iFrameNum == 0.

Oops, that might have been me, when changing timecodes. 
Strange that I never had problem with a missing I-Frames...?

The correct (old) position might have  been here:




inc_frame_num(pEnc);
		
#ifdef _DEBUG_PSNR
	image_copy(&pEnc->sOriginal, &pEnc->current->image,
		   pEnc->mbParam.edged_width,pEnc->mbParam.height);
#endif
	emms();




just before the 

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* Luminance masking *
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */


stuff (sorry, I have wrong linenumbers at the moment). 

Can anybody check on this?

gruel



-- 
Christoph H. Lampert chl@math,uni-bonn,de | Diese Signature wurde maschi-     
Beringstr. 6, Raum 14 Tel. (0228) 73-2948 | nell erstellt und bedarf
Sprechstunden: keine, aber meistens da    | keiner Unterschrift. AZ 27B-6