Commit 40a0624e authored by Wim Taymans's avatar Wim Taymans

audio-format: fix shift for 18 bits samples

The 18bits of the sample are in the LSB so we need to shift them 14 positions to
bring them to 32 bits.
parent 7b135e88
......@@ -183,13 +183,13 @@ static void pack_ ##name (const GstAudioFormatInfo *info, \
#define PACK_U20BE GST_AUDIO_FORMAT_S32, unpack_u20be, pack_u20be
MAKE_PACK_UNPACK (u20be, 3, SIGNED, 12, READ24_FROM_BE, WRITE24_TO_BE)
#define PACK_S18LE GST_AUDIO_FORMAT_S32, unpack_s18le, pack_s18le
MAKE_PACK_UNPACK (s18le, 3, 0, 12, READ24_FROM_LE, WRITE24_TO_LE)
MAKE_PACK_UNPACK (s18le, 3, 0, 14, READ24_FROM_LE, WRITE24_TO_LE)
#define PACK_U18LE GST_AUDIO_FORMAT_S32, unpack_u18le, pack_u18le
MAKE_PACK_UNPACK (u18le, 3, SIGNED, 12, READ24_FROM_LE, WRITE24_TO_LE)
MAKE_PACK_UNPACK (u18le, 3, SIGNED, 14, READ24_FROM_LE, WRITE24_TO_LE)
#define PACK_S18BE GST_AUDIO_FORMAT_S32, unpack_s18be, pack_s18be
MAKE_PACK_UNPACK (s18be, 3, 0, 12, READ24_FROM_BE, WRITE24_TO_BE)
MAKE_PACK_UNPACK (s18be, 3, 0, 14, READ24_FROM_BE, WRITE24_TO_BE)
#define PACK_U18BE GST_AUDIO_FORMAT_S32, unpack_u18be, pack_u18be
MAKE_PACK_UNPACK (u18be, 3, SIGNED, 12, READ24_FROM_BE, WRITE24_TO_BE)
MAKE_PACK_UNPACK (u18be, 3, SIGNED, 14, READ24_FROM_BE, WRITE24_TO_BE)
#define PACK_F32LE GST_AUDIO_FORMAT_F64, unpack_f32le, pack_f32le
MAKE_ORC_PACK_UNPACK (f32le)
#define PACK_F32BE GST_AUDIO_FORMAT_F64, unpack_f32be, pack_f32be
......
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