[XviD-devel] Question about xvid_decraw and XVID_DEC_FRAME.length property

Ricardo Ferreira ricardo-c-ferreira at ptinovacao.pt
Thu Apr 3 17:20:30 CEST 2003


Hi!
I've downloaded the latest version of xvidcore source code from CVS 1 month
ago. Everything worked ok until digging in xvid_decraw.c... 
I have 2 questions/comments:

1. What is XVID_DEC_FRAME.length property for?
It seems that XVID_DEC_FRAME.length, as input for xvid_decore, represents
the number of bytes presented in the bitstream ready to be processed (to
prevent access violations). When returning from xvid_decore it gives the
bytes consumed in this call.
Am I right?

2. To do some experiments I changed xvid_decraw.c code to try to only read
1000 bytes at each time instead of BUFFER_SIZE.
What I get is an access violation error at the following line:
block[scan[coeff]] = level; // in get_intra_block from mbcoding.c (line
1216)
Is this a bug?
I carefuly analysed the code to catch any error regarding bitstream pointer
and bitstream length but everything seemed ok.
BTW, it seems that mp4_size it's useless and has to be changed by
still_left_in_buffer in the following instruction: 
status = dec_main(mp4_ptr, out_buffer, mp4_size, &used_bytes,
&notification);
My tests were made in both conditions (mp4_size and still_left_in_buffer)...

Any comments will be appreciated.


Ricardo Ferreira
rscfNOSPAM at esoterica.pt


More information about the XviD-devel mailing list