[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xvid-devel
Subject:    Re: [XviD-devel] Statistics question
From:       Michael Militzer <michael () xvid ! org>
Date:       2006-01-19 22:24:29
Message-ID: 1137709469.43d0119d0e9d2 () www ! lansco ! de
[Download RAW message or body]

Hi,

CodeBlockIntra/CodeBlockInter store how _many_ MBs of the current frame were
coded using intra or inter prediction type.

The number of bits required to code the motion vectors is really not 
included in the statistics. But you're right, for completeness it should.
I have added a iMVBits entry to the stats to the code on CVS HEAD. 

But even if you can't update to latest CVS version, it's rather easy to 
count the motion vector bits. You just need to wrap your counter around the
calls to CodeVector() in bitstream/mbcoding.c. Refer to latest CVS code.

Regard,
Michael


Quoting Sang-Uok Kum <ksu@unc.edu>:

> 
> 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.
> _______________________________________________
> XviD-devel mailing list
> XviD-devel@xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
> 





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic