[XviD-devel] Return PSNR in new API?

Christoph Lampert xvid-devel@xvid.org
Fri, 24 Jan 2003 16:43:16 +0100 (CET)


On Fri, 24 Jan 2003, Edouard Gomez wrote:

> En réponse à Christoph Lampert <chl@math.uni-bonn.de>:
> > MSE/PSNR code is already there, just #ifdef'ed .
> > 
> > Any objections to turning #ifdef's into FLAGS ? 
> 
> Personally, i would be very very happy with this type of stats, because PSNR
> calculation outside XviD is a bit difficult with bframes.

Also possible would be to pass a pointer to an external function to XVID
with fixed API (e.g. pointer to 2 images, x/y-dim + stride) and XVID
returns the numerical result(s). This could e.g. be good if somebody isn't
interested in PSNR, but in "weighted PSNR" etc. 

Yes, that's not too bad. 

Add a fields  "stat_function()"  and "void* stat_results" to
encoding API. stat_function would be called after encoding, and it 
writes it's values to the memory location given by stat_results. 

As default, stat_function would be NULL and nothing is called at all. 
But if somebody is interesting in something special, he has full access to
all internal structures of XVID (pEnc would be passed to the function). 

Isn't that was made DivX3.11 survive for so long? That somebody found out
how to modify/patch internal values? 

gruel