diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:09:47 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:09:47 +0000 |
commit | 2613f6c15664be1a2d02a706609ad5c95cd398ad (patch) | |
tree | 64c9fb06904b197d9ea83b2913195d3a82f6b8c9 /libavcodec/vorbis_enc.c | |
parent | c83637b96532eaa0c57f646d7b08af94856d141f (diff) | |
download | ffmpeg-2613f6c15664be1a2d02a706609ad5c95cd398ad.tar.gz |
Original Commit: r112 | ods15 | 2006-10-01 20:48:39 +0200 (Sun, 01 Oct 2006) | 3 lines
psy change. -aq param about the same, and behaves more consistently with
different content.
Originally committed as revision 6516 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r-- | libavcodec/vorbis_enc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index 3bd55fb423..40fad0b4a0 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -1131,7 +1131,7 @@ static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, uint_ float average = averages[i]; int j; - average /= pow(average, 0.5) / tot_average * pow(0.8, position/200.); // MAGIC! + average *= pow(tot_average / average, 0.5) * pow(1.25, position/200.); // MAGIC! for (j = 0; j < range - 1; j++) if (ff_vorbis_floor1_inverse_db_table[j * fc->multiplier] > average) break; posts[fc->list[i].sort] = j; } @@ -1366,8 +1366,9 @@ static int vorbis_encode_init(AVCodecContext * avccontext) create_vorbis_context(venc, avccontext); - if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 100.; - else venc->quality = 0.17; + if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 10.; + else venc->quality = 1.; + venc->quality *= venc->quality; avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata); |