[Ffmpeg-cvslog] r6494 - trunk/libavcodec/vorbis_enc.c
ods15
subversion
Mon Oct 2 08:08:56 CEST 2006
Author: ods15
Date: Mon Oct 2 08:08:55 2006
New Revision: 6494
Modified:
trunk/libavcodec/vorbis_enc.c
Log:
Original Commit: r90 | ods15 | 2006-09-29 22:14:40 +0300 (Fri, 29 Sep 2006) | 3 lines
much better magic for floor, the first psychoacoustic in this encoder!
now creates valid, 175kbps audio, which sounds good! :)
Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c (original)
+++ trunk/libavcodec/vorbis_enc.c Mon Oct 2 08:08:55 2006
@@ -780,13 +780,11 @@
int end = fc->list[fc->list[FFMIN(i+1, fc->values - 1)].sort].x;
int j;
float average = 0;
- begin = (position + begin) / 2;
- end = (position + end ) / 2;
assert(end <= samples);
for (j = begin; j < end; j++) average += fabs(coeffs[j]);
average /= end - begin;
- average /= 32; // MAGIC!
+ average /= pow(4, 1 - position/400.); // MAGIC!
for (j = 0; j < range - 1; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
posts[fc->list[i].sort] = j;
}
More information about the ffmpeg-cvslog
mailing list