Re: Where is the variance of Macroblock is calculated?
Michael Militzer <[email protected]> Tue, 22 May 2012 18:14:44 +0200
| Newsgroups | gmane.comp.video.xvid.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, indeed, the var16 macroblock variance is not calculated anymore. Instead, we calculate a relative variance (rel_var8) tailored for use with the PSNR-HVS-M metric. The respective calculations are in image_block_variance() in image/image.c. You can put your own variance code there too. But note that the image_block_variance() function will only get called when the XVID_VOP_RD_PSNRHVSM flag is set in xvid_enc_frame_t->vop_flags (see xvid.h). Regards, Michael Quoting Chien Tran <[email protected]>: > Hi everyone, > I was looking at the structure of MACROBLOCK struct and realized that there > is var16 field. That would be good for me because I want to make use of > this variable in the future. Unfortunaly, it seems like this field is never > calculated through the encoding process, am I right? If I want to use this > field, where should I put the code to calculate the variance of the > Macroblock? Do I need to calculate it after Motion Estimation had completed? > > -- > Best wishes, > > Tran Xuan Chien > University of Information Technology > Phone: (+84) 1692 468 154 > _______________________________________________ > Xvid-devel mailing list > [email protected] > http://list.xvid.org/mailman/listinfo/xvid-devel > >