[Ffmpeg-cvslog] r6516 - trunk/libavcodec/vorbis_enc.c

ods15 subversion
Mon Oct 2 08:09:48 CEST 2006


Author: ods15
Date: Mon Oct  2 08:09:47 2006
New Revision: 6516

Modified:
   trunk/libavcodec/vorbis_enc.c

Log:
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.

Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c	(original)
+++ trunk/libavcodec/vorbis_enc.c	Mon Oct  2 08:09:47 2006
@@ -1131,7 +1131,7 @@
         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 @@
 
     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);
 




More information about the ffmpeg-cvslog mailing list