[x264-devel] obtaining psnr

aviad rozenhek aviadr1 at gmail.com
Mon Jul 20 00:09:04 CEST 2009


>
>
>> h->anything isn't part of the public api. It so happens that *currently*
> the global stats (i.e. that part of h->stat that's not in h->stat.frame) are
> only touched by the application thread, not the encoding threads.


thanks!


> Otoh, that gives you a sum of errors without telling you exactly how many
> frames it was summed over...


can't I just do this?

int total_frames = 0; /// total frames encoded so far, assuming each frame
is just one slice
for(int i=0 ; i <5 ; ++i) {
  total_frames += h->stat.i_slice_count[i];
}

also, since for my application I just want to present a single number
representing quality, would it make sense to calculate a weighted-average of
PSNR over slice types?

double psnr = 0;
for(int i=0 ; i <5 ; ++i) {
  psnr += h-> stat. f_psnr_average[i] * h-> stat.i_slice_count[i] /
total_frames;
}

thank you for your time
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20090720/cd37c18a/attachment.htm>


More information about the x264-devel mailing list