[XviD-devel] Statistics question

Sang-Uok Kum ksu at unc.edu
Tue Jan 17 23:50:55 CET 2006


I had a few questions about the Statistics calculated in the xvid encoder,
and was wondering if someone could verify the following

1. Statistics iTextBits: Sum of bits need to encode coefficents.
   The only place I see them is in mbcoding.c
   - CodeBlockIntra it only adds number of bits used to encode the
     coefficients.
   - CodeBlockInter it only adds number of bits used to encode the
     coefficients.

2. Statistics iMvCount: Total number of motion vectors in the frame. 
   (in estimation_pvop.c motionStatsPVOP)

3. Statistics iMvSum: Sum of (motion vector size)*(motion vector size)
   (in estimation_pvop.c motionStatsPVOP)

4. xvid_enc_stats_t hlength: The comment says
     '/* [out] header length (bytes) */' but looking at the source code
     it is 'frame->length - (frame->sStat.iTextBits / 8);' (in encoder.c 
     call_plugins) it seems to be total of bytes used for encoding except 
     the coefficients. Which means for Inter MBs the number of bits 
     needed to encode the motion vectors is also included in the hlength.

I'm trying to calculate the number of bits needed to encode the motion
vectors and was wondering if it is already done before I start putting
in my own code.

thanks.


More information about the XviD-devel mailing list