comparison vorbis_enc.c @ 3911:a1b41e814052 libavcodec

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.
author ods15
date Mon, 02 Oct 2006 06:09:47 +0000
parents aada0ac47451
children f56e6d3a1d6e
comparison
equal deleted inserted replaced
3910:aada0ac47451 3911:a1b41e814052
1129 for (i = 0; i < fc->values; i++) { 1129 for (i = 0; i < fc->values; i++) {
1130 int position = fc->list[fc->list[i].sort].x; 1130 int position = fc->list[fc->list[i].sort].x;
1131 float average = averages[i]; 1131 float average = averages[i];
1132 int j; 1132 int j;
1133 1133
1134 average /= pow(average, 0.5) / tot_average * pow(0.8, position/200.); // MAGIC! 1134 average *= pow(tot_average / average, 0.5) * pow(1.25, position/200.); // MAGIC!
1135 for (j = 0; j < range - 1; j++) if (ff_vorbis_floor1_inverse_db_table[j * fc->multiplier] > average) break; 1135 for (j = 0; j < range - 1; j++) if (ff_vorbis_floor1_inverse_db_table[j * fc->multiplier] > average) break;
1136 posts[fc->list[i].sort] = j; 1136 posts[fc->list[i].sort] = j;
1137 } 1137 }
1138 } 1138 }
1139 1139
1364 return -1; 1364 return -1;
1365 } 1365 }
1366 1366
1367 create_vorbis_context(venc, avccontext); 1367 create_vorbis_context(venc, avccontext);
1368 1368
1369 if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 100.; 1369 if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 10.;
1370 else venc->quality = 0.17; 1370 else venc->quality = 1.;
1371 venc->quality *= venc->quality;
1371 1372
1372 avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata); 1373 avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata);
1373 1374
1374 avccontext->frame_size = 1 << (venc->blocksize[0] - 1); 1375 avccontext->frame_size = 1 << (venc->blocksize[0] - 1);
1375 1376