summaryrefslogtreecommitdiff
path: root/libavcodec/flacenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-03-30 16:01:10 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-03-30 16:01:10 +0000
commitfe790f89e81e489b941caae278cb2fac163a4595 (patch)
treed96a4058c72054a58ad41c78d0c71f55a958a974 /libavcodec/flacenc.c
parent55727a835bd04de3d42026e093a26de0866f290b (diff)
downloadffmpeg-fe790f89e81e489b941caae278cb2fac163a4595.tar.gz
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
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r--libavcodec/flacenc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 2f07ac56a9..fbef3c9e57 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -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);