Log in

View Full Version : decoded b-frames are copied i- or p-frames??


hlavacs
11th September 2003, 13:04
Hi all!

I have written a simple RTP/RTSP player which saves the payload which is an MPEG-4 video bitstream (created by: AVI with XVID encoder, then turned in to MPEG-4 with mp4creator60, then added hinttrack)

When giving the saved bitstream to xvid_decraw as input and saving the single frames it turns out that the b-frames are just copies of the previous i- or p-frame. In the function decoder_decode() found in decode.c a b-frame as well as an n-frame results in a call to

image_copy(&dec->cur, &dec->refn[0], dec->edged_width, dec->height);

but is not decoded. Is a decoded b-frame simply a copied frame? Or is it interpolated sometimes later? I did not find a special treatment for this in Koepi's DirectShow filter as well. But it seems that this filter also takes care for the VOL header. Is the VOL header important for XVID and b-frames?

How can get out b-frames and save them on disk?

Thanks for your help!

Helmut

sysKin
11th September 2003, 14:48
First and most important question - what xvid version do you use?

From what you say, it seems you're using the old 0.9.x 'stable' core. It's old and doesn't support any advaced simple profile tools - like b-frames, for example.

Radek

hlavacs
11th September 2003, 15:14
Radek,

I use xvidcore-0.9.2.
I thought b-frame support is already in there.
Is this wrong?

Helmut

hlavacs
11th September 2003, 16:29
Radek,

great tip, thanks!
I've got the daily snapshot which contains full b-frame support!
Everything works fine now.

THANK YOU!!!

Helmut