mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
avcodec/wmalosslessdec: support 24bit lossless
Not checked if its actually lossless Fixes Ticket1847 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4327088da3
commit
ce6141259b
@ -16,6 +16,7 @@ version <next>:
|
|||||||
- creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer
|
- creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer
|
||||||
- WebP muxer with animated WebP support
|
- WebP muxer with animated WebP support
|
||||||
- zygoaudio decoding support
|
- zygoaudio decoding support
|
||||||
|
- 24bit wmalossless decoding support
|
||||||
|
|
||||||
|
|
||||||
version 2.4:
|
version 2.4:
|
||||||
|
@ -200,8 +200,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
|
||||||
else if (s->bits_per_sample == 24) {
|
else if (s->bits_per_sample == 24) {
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
|
||||||
avpriv_report_missing_feature(avctx, "Bit-depth higher than 16");
|
avctx->bits_per_raw_sample = 24;
|
||||||
return AVERROR_PATCHWELCOME;
|
|
||||||
} else {
|
} else {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Unknown bit-depth: %"PRIu8"\n",
|
av_log(avctx, AV_LOG_ERROR, "Unknown bit-depth: %"PRIu8"\n",
|
||||||
s->bits_per_sample);
|
s->bits_per_sample);
|
||||||
@ -997,7 +996,7 @@ static int decode_subframe(WmallDecodeCtx *s)
|
|||||||
if (s->bits_per_sample == 16) {
|
if (s->bits_per_sample == 16) {
|
||||||
*s->samples_16[c]++ = (int16_t) s->channel_residues[c][j] << padding_zeroes;
|
*s->samples_16[c]++ = (int16_t) s->channel_residues[c][j] << padding_zeroes;
|
||||||
} else {
|
} else {
|
||||||
*s->samples_32[c]++ = s->channel_residues[c][j] << padding_zeroes;
|
*s->samples_32[c]++ = s->channel_residues[c][j] << (padding_zeroes + 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user