[FFmpeg-cvslog] avcodec/wmalosslessdec: support 24bit lossless

Michael Niedermayer git at videolan.org
Sat Nov 22 20:57:25 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 22 20:49:40 2014 +0100| [ce6141259bb910aa7f580f55cf71e3c503f9a4fb] | committer: Michael Niedermayer

avcodec/wmalosslessdec: support 24bit lossless

Not checked if its actually lossless
Fixes Ticket1847

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce6141259bb910aa7f580f55cf71e3c503f9a4fb
---

 Changelog                   |    1 +
 libavcodec/wmalosslessdec.c |    5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Changelog b/Changelog
index 486c127..f88a88e 100644
--- a/Changelog
+++ b/Changelog
@@ -16,6 +16,7 @@ version <next>:
 - creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer
 - WebP muxer with animated WebP support
 - zygoaudio decoding support
+- 24bit wmalossless decoding support
 
 
 version 2.4:
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 8e2ac5f..e6e3476 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -200,8 +200,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
             avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
         else if (s->bits_per_sample == 24) {
             avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
-            avpriv_report_missing_feature(avctx, "Bit-depth higher than 16");
-            return AVERROR_PATCHWELCOME;
+            avctx->bits_per_raw_sample = 24;
         } else {
             av_log(avctx, AV_LOG_ERROR, "Unknown bit-depth: %"PRIu8"\n",
                    s->bits_per_sample);
@@ -997,7 +996,7 @@ static int decode_subframe(WmallDecodeCtx *s)
             if (s->bits_per_sample == 16) {
                 *s->samples_16[c]++ = (int16_t) s->channel_residues[c][j] << padding_zeroes;
             } else {
-                *s->samples_32[c]++ = s->channel_residues[c][j] << padding_zeroes;
+                *s->samples_32[c]++ = s->channel_residues[c][j] << (padding_zeroes + 8);
             }
         }
     }



More information about the ffmpeg-cvslog mailing list