Re: Questions regarding your's decoding process ????????????????
Christoph Lampert <[email protected]>
| Newsgroups | gmane.comp.video.xvid.user |
|---|---|
| Message-ID | <[email protected]> |
Hallo,
sorry if I don't answer all your questions. I don't understand all of
them, and some you can also very easily answer yourself by reading the
code.
nevertheless:
On Fri, 10 Jan 2003, Amit Bhushan wrote:
> 1) The decoder is decoding in INTRA mode only. is this so because the encoder is coding in INTRA mode only. how to change this in the encoder so that it codes in "P" and "B" mode also. Whether the sequence can be hard coded only or can be chosen in run time that is while the encoder is running. if it is hard coded how to the change this configuration of giving the sequence of the type of encoding modes(e.g INTRA or P-INTER or B-INTER) for the frames for encoding.
I don't know what you mean. The decoder can handle I-VOP,P-VOP,B-VOP and
S(GMC)-VOP (and also N-VOPs). It support
INTRA,INTER,INTER4V,SKIP,FORWARD,BACKWARD,INTERPOLATE and DIRECT MB
types. The same holds for the encoder.
> 2) The decoder is skipping some frames if i give an input of large frames say 30 or 40. is that also can be changed. if possible how?
I also don't know what you mean. When called correctly, the decoder does
not skip any frame, unless they are encoded as "N-VOPs".
> 3)In decoder.c, in the function 'read_video_packet_header' for reading the macroblock number it is reading 9 bits only while the MPEG-4 draft says that the number of bits can be upto 14. why is it reading 9 bits only?
This might be a decoder bug. However, this field is only in streams with "short header", and XVID
doesn't create those, so it won't happen for XVID encoded material.
> 5)is that in the function 'read_video_packet_header' it is reading 9 bits only, because it can support only upto CIF format pictures only? is it so then it can have is 512 macroblocks only in a video packet? is it correct?
No.
> 4)whether a video packet will contain data of one frame only?
yes
> 5)In decoder.c in decoder_create what is param->height or dec->height and param->width or dec->width. what are these values say for a qcif picture whether it will 144 and 176 respectively.
yes
> 6) in decoder.c in decoder_create function
> it is given that
> mb_width=(dec->width+15)/16
> mb_height=(dec->height+15)/16.
> why they are adding 15 and divding by 16. what is actually mb_width and mb_height. say for a macro block it will be always 16x16. why is the above calculation done.
mb_width and mb_height are number of macroblocks in width and height.
for qcif it would be 11 and 9.
> 7)in the same function
> there is
> x=bound%mb_width
> y=bound%mb_width.
>
> what are this x and y used for and what is the above calculation meant for?
the lines are
x = bound % dec->mb_width;
y = bound / dec->mb_width;
so for macroblock with number "bound" you get its x and y position
in the macroblock grid.
> 8)in colorspace.c
> what is the variable stride ,src_stride, y_stride and uv_stride used for?
the "stride" is the difference between the addresses of a image line x
and the image line x+1
gruel