[Xvid-devel] Where is the variance of Macroblock is calculated?

Michael Militzer michael at xvid.org
Tue May 22 18:14:44 CEST 2012


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 <chien.study at gmail.com>:

> 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
> Xvid-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>





More information about the Xvid-devel mailing list