1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Use 15-bit LPC precision by default. This generally gives better compression

results. Also update Ogg regression test.

Originally committed as revision 12630 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Justin Ruggles 2008-03-30 16:01:10 +00:00
parent 55727a835b
commit fe790f89e8
2 changed files with 5 additions and 13 deletions

View File

@ -367,16 +367,8 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
}
s->options.lpc_coeff_precision = avctx->lpc_coeff_precision;
} else {
/* select LPC precision based on block size */
if( s->blocksize <= 192) s->options.lpc_coeff_precision = 7;
else if(s->blocksize <= 384) s->options.lpc_coeff_precision = 8;
else if(s->blocksize <= 576) s->options.lpc_coeff_precision = 9;
else if(s->blocksize <= 1152) s->options.lpc_coeff_precision = 10;
else if(s->blocksize <= 2304) s->options.lpc_coeff_precision = 11;
else if(s->blocksize <= 4608) s->options.lpc_coeff_precision = 12;
else if(s->blocksize <= 8192) s->options.lpc_coeff_precision = 13;
else if(s->blocksize <= 16384) s->options.lpc_coeff_precision = 14;
else s->options.lpc_coeff_precision = 15;
/* default LPC precision */
s->options.lpc_coeff_precision = 15;
}
av_log(avctx, AV_LOG_DEBUG, " lpc precision: %d\n",
s->options.lpc_coeff_precision);

View File

@ -84,9 +84,9 @@ ae3a23a7ea13c92a2909445ca8144dcd *./tests/data/b-libav.aif
8d117c49d6b210abe783d1b0b897cec7 *./tests/data/b-libav.voc
32768 ./tests/data/b-libav.voc
./tests/data/b-libav.voc CRC=0x49972c8c
8ac1fa6e0ee5d47ea98aea17b67d5908 *./tests/data/b-libav.ogg
23596 ./tests/data/b-libav.ogg
./tests/data/b-libav.ogg CRC=0x93baa056
9268c90bd2623a5ab3c2a1a751826f69 *./tests/data/b-libav.ogg
14210 ./tests/data/b-libav.ogg
./tests/data/b-libav.ogg CRC=0x6bcbb966
ce356ce2708cb6033ab5d762da93cfd4 *./tests/data/b-libav-yuv420p.yuv
304128 ./tests/data/b-libav-yuv420p.yuv
ce356ce2708cb6033ab5d762da93cfd4 *./tests/data/b-libav-yuv422p.yuv