Commit 293e25be authored by Ihar A. Tumashyk's avatar Ihar A. Tumashyk Committed by Michael Niedermayer

libavcodec/utils: av_get_exact_bits_per_sample fixed to return "1" for DSD codecs.

All DSD codes have 1 bit per sample.
https://en.wikipedia.org/wiki/Direct_Stream_DigitalSigned-off-by: 's avatarIhar A. Tumashyk <itumashyk@gmail.com>
Reviewed-by: 's avatarGanesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5870b3d2
......@@ -3311,6 +3311,11 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
{
switch (codec_id) {
case AV_CODEC_ID_DSD_LSBF:
case AV_CODEC_ID_DSD_MSBF:
case AV_CODEC_ID_DSD_LSBF_PLANAR:
case AV_CODEC_ID_DSD_MSBF_PLANAR:
return 1;
case AV_CODEC_ID_8SVX_EXP:
case AV_CODEC_ID_8SVX_FIB:
case AV_CODEC_ID_ADPCM_CT:
......@@ -3321,10 +3326,6 @@ int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
case AV_CODEC_ID_ADPCM_G722:
case AV_CODEC_ID_ADPCM_YAMAHA:
return 4;
case AV_CODEC_ID_DSD_LSBF:
case AV_CODEC_ID_DSD_MSBF:
case AV_CODEC_ID_DSD_LSBF_PLANAR:
case AV_CODEC_ID_DSD_MSBF_PLANAR:
case AV_CODEC_ID_PCM_ALAW:
case AV_CODEC_ID_PCM_MULAW:
case AV_CODEC_ID_PCM_S8:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment