You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/alac: fix 20-bit support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -391,6 +391,12 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
|
|||||||
*outbuffer++ = alac->output_samples_buffer[ch][i];
|
*outbuffer++ = alac->output_samples_buffer[ch][i];
|
||||||
}}
|
}}
|
||||||
break;
|
break;
|
||||||
|
case 20: {
|
||||||
|
for (ch = 0; ch < channels; ch++) {
|
||||||
|
for (i = 0; i < alac->nb_samples; i++)
|
||||||
|
alac->output_samples_buffer[ch][i] <<= 12;
|
||||||
|
}}
|
||||||
|
break;
|
||||||
case 24: {
|
case 24: {
|
||||||
for (ch = 0; ch < channels; ch++) {
|
for (ch = 0; ch < channels; ch++) {
|
||||||
for (i = 0; i < alac->nb_samples; i++)
|
for (i = 0; i < alac->nb_samples; i++)
|
||||||
@@ -556,6 +562,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
|
|||||||
switch (alac->sample_size) {
|
switch (alac->sample_size) {
|
||||||
case 16: avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
|
case 16: avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
|
||||||
break;
|
break;
|
||||||
|
case 20:
|
||||||
case 24:
|
case 24:
|
||||||
case 32: avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
|
case 32: avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user