Mercurial > libavcodec.hg
comparison mlpdec.c @ 8276:9149588e5cc9 libavcodec
mlp: support bit-depths greater than 16 by default.
author | ramiro |
---|---|
date | Sun, 07 Dec 2008 00:57:26 +0000 |
parents | 82dbfe8d2e0b |
children | a793f9afd5cb |
comparison
equal
deleted
inserted
replaced
8275:e2ef97f0ab4b | 8276:9149588e5cc9 |
---|---|
220 | 220 |
221 init_static(); | 221 init_static(); |
222 m->avctx = avctx; | 222 m->avctx = avctx; |
223 for (substr = 0; substr < MAX_SUBSTREAMS; substr++) | 223 for (substr = 0; substr < MAX_SUBSTREAMS; substr++) |
224 m->substream[substr].lossless_check_data = 0xffffffff; | 224 m->substream[substr].lossless_check_data = 0xffffffff; |
225 avctx->sample_fmt = SAMPLE_FMT_S16; | 225 |
226 return 0; | 226 return 0; |
227 } | 227 } |
228 | 228 |
229 /** Read a major sync info header - contains high level information about | 229 /** Read a major sync info header - contains high level information about |
230 * the stream - sample rate, channel arrangement etc. Most of this | 230 * the stream - sample rate, channel arrangement etc. Most of this |
294 m->max_decoded_substream = m->num_substreams - 1; | 294 m->max_decoded_substream = m->num_substreams - 1; |
295 | 295 |
296 m->avctx->sample_rate = mh.group1_samplerate; | 296 m->avctx->sample_rate = mh.group1_samplerate; |
297 m->avctx->frame_size = mh.access_unit_size; | 297 m->avctx->frame_size = mh.access_unit_size; |
298 | 298 |
299 #ifdef CONFIG_AUDIO_NONSHORT | |
300 m->avctx->bits_per_raw_sample = mh.group1_bits; | 299 m->avctx->bits_per_raw_sample = mh.group1_bits; |
301 if (mh.group1_bits > 16) { | 300 if (mh.group1_bits > 16) { |
302 m->avctx->sample_fmt = SAMPLE_FMT_S32; | 301 m->avctx->sample_fmt = SAMPLE_FMT_S32; |
303 } | 302 } |
304 #endif | 303 else |
304 m->avctx->sample_fmt = SAMPLE_FMT_S16; | |
305 | 305 |
306 m->params_valid = 1; | 306 m->params_valid = 1; |
307 for (substr = 0; substr < MAX_SUBSTREAMS; substr++) | 307 for (substr = 0; substr < MAX_SUBSTREAMS; substr++) |
308 m->substream[substr].restart_seen = 0; | 308 m->substream[substr].restart_seen = 0; |
309 | 309 |