Mercurial > libavcodec.hg
comparison flacenc.c @ 6545:85acd5166cf8 libavcodec
Use 15-bit LPC precision by default. This generally gives better compression
results. Also update Ogg regression test.
author | jbr |
---|---|
date | Sun, 30 Mar 2008 16:01:10 +0000 |
parents | 48759bfbd073 |
children | 28e34d24b3f7 |
comparison
equal
deleted
inserted
replaced
6544:8a059debc2ba | 6545:85acd5166cf8 |
---|---|
365 avctx->lpc_coeff_precision); | 365 avctx->lpc_coeff_precision); |
366 return -1; | 366 return -1; |
367 } | 367 } |
368 s->options.lpc_coeff_precision = avctx->lpc_coeff_precision; | 368 s->options.lpc_coeff_precision = avctx->lpc_coeff_precision; |
369 } else { | 369 } else { |
370 /* select LPC precision based on block size */ | 370 /* default LPC precision */ |
371 if( s->blocksize <= 192) s->options.lpc_coeff_precision = 7; | 371 s->options.lpc_coeff_precision = 15; |
372 else if(s->blocksize <= 384) s->options.lpc_coeff_precision = 8; | |
373 else if(s->blocksize <= 576) s->options.lpc_coeff_precision = 9; | |
374 else if(s->blocksize <= 1152) s->options.lpc_coeff_precision = 10; | |
375 else if(s->blocksize <= 2304) s->options.lpc_coeff_precision = 11; | |
376 else if(s->blocksize <= 4608) s->options.lpc_coeff_precision = 12; | |
377 else if(s->blocksize <= 8192) s->options.lpc_coeff_precision = 13; | |
378 else if(s->blocksize <= 16384) s->options.lpc_coeff_precision = 14; | |
379 else s->options.lpc_coeff_precision = 15; | |
380 } | 372 } |
381 av_log(avctx, AV_LOG_DEBUG, " lpc precision: %d\n", | 373 av_log(avctx, AV_LOG_DEBUG, " lpc precision: %d\n", |
382 s->options.lpc_coeff_precision); | 374 s->options.lpc_coeff_precision); |
383 | 375 |
384 /* set maximum encoded frame size in verbatim mode */ | 376 /* set maximum encoded frame size in verbatim mode */ |