[xiph-commits] r17231 - experimental/derf/theora-ptalarbvorm/lib
gmaxwell at svn.xiph.org
gmaxwell at svn.xiph.org
Tue May 18 13:49:55 PDT 2010
Author: gmaxwell
Date: 2010-05-18 13:49:55 -0700 (Tue, 18 May 2010)
New Revision: 17231
Modified:
experimental/derf/theora-ptalarbvorm/lib/analyze.c
Log:
Bug fix in the activity average calculation. The average was being incorrectly computed as a the sum divided by the total number of image fragments rather than by the number of fragments in the luma plane. A casual test of this fix shows improvements of 0.15dB PSNR and SSIM on one clip.
Modified: experimental/derf/theora-ptalarbvorm/lib/analyze.c
===================================================================
--- experimental/derf/theora-ptalarbvorm/lib/analyze.c 2010-05-18 15:59:52 UTC (rev 17230)
+++ experimental/derf/theora-ptalarbvorm/lib/analyze.c 2010-05-18 20:49:55 UTC (rev 17231)
@@ -1702,7 +1702,7 @@
}
/*Compute the average block activity and MB luma score for the frame.*/
_enc->activity_avg=
- (unsigned)((activity_sum+(_enc->state.nfrags>>1))/_enc->state.nfrags);
+ (unsigned)((activity_sum+(_enc->state.fplanes[0].nfrags>>1))/_enc->state.fplanes[0].nfrags);
_enc->luma_avg=(unsigned)((luma_sum+(_enc->state.nmbs>>1))/_enc->state.nmbs);
/*Finish filling in the reference frame borders.*/
refi=_enc->state.ref_frame_idx[OC_FRAME_SELF];
@@ -2650,7 +2650,7 @@
We could use a Bessel follower here, but fast reaction is probably almost
always best.*/
_enc->activity_avg=
- (unsigned)((activity_sum+(_enc->state.nfrags>>1))/_enc->state.nfrags);
+ (unsigned)((activity_sum+(_enc->state.fplanes[0].nfrags>>1))/_enc->state.fplanes[0].nfrags);
_enc->luma_avg=(unsigned)((luma_sum+(_enc->state.nmbs>>1))/_enc->state.nmbs);
/*Finish filling in the reference frame borders.*/
refi=_enc->state.ref_frame_idx[OC_FRAME_SELF];
More information about the commits
mailing list