Poor audio quality with beepdec

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Poor audio quality with beepdec

946 Views
canyon
Contributor I

We switched to the beepdec decoder and started getting customer complaints about audio quality.
While investigating the customer complaints, we decided to compare spectral output of three different decoders using the same audio sample.
decoder_compare.png

According to the debugger output, beepdec is halving the sample rate:

0:00:00.474878955 764 0x1a82e60 INFO beepdec beepdec.c:500:beep_dec_set_format: normal create sw wrapper interface

====== BEEP: 4.5.5 build on Jun 17 2021 21:07:54. ======
Core: AAC decoder Wrapper build on Dec 7 2017 18:13:49
file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacd_wrap_arm12_elinux.so.3
CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_CORTEX-A8 build on Sep 20 2017 15:02:14.
0:00:00.476810965 764 0x1a82e60 INFO beepdec beepdec.c:285:beep_dec_set_init_parameter: Set rate 44100
0:00:00.477207967 764 0x1a82e60 INFO beepdec beepdec.c:303:beep_dec_set_init_parameter: Set channel 2
0:00:00.477485969 764 0x1a82e60 INFO beepdec beepdec.c:354:beep_dec_set_init_parameter: Set codec_data buffer: 0x74f03950, pts 99:99:99.999999999, dts 99:99:99.999999999, dur 99:99:99.999999999, size 5, offset none, offset_end none, flags 0x0
0:00:00.477605970 764 0x1a82e60 INFO beepdec beepdec.c:368:beep_dec_set_init_parameter: Set stream_type raw
0:00:00.477751304 764 0x1a82e60 INFO beepdec beepdec.c:403:beep_dec_set_init_parameter: Set framed true
/GstPipeline:pipeline0/GstBeepDec:beepdec0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)1, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)139056e5a0, rate=(int)44100, channels=(int)2
0:00:00.480722320 764 0x1a82e60 DEBUG beepdec beepdec.c:693:beep_dec_handle_output_changed:<beepdec0> output changed channel num=2,core layout=1,2,0,0,0,0,0,0
0:00:00.480933321 764 0x1a82e60 DEBUG beepdec beepdec.c:725:beep_dec_handle_output_changed:<beepdec0> output changed after convert num=2,core layout=0,1,0,0,0,0,0,0
0:00:00.481187656 764 0x1a82e60 DEBUG beepdec beepdec.c:735:beep_dec_handle_output_changed:<beepdec0> output changed after map num=2,gstreamer layout=0,1,0,0,0,0,0,0
/GstPipeline:pipeline0/GstBeepDec:beepdec0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)22050, channels=(int)2, channel-mask=(bitmask)0x000000000000000

The halving of the sample rate would explain the spectral output of beepdec. In newer versions of imx-codec and imx-parser, is this issue fixed?

0 Kudos
5 Replies

929 Views
canyon
Contributor I

Igor:

It would be nice if NXP could confirm beepdec is fixed because I only see three newer commits with the version you posted and the version we are using. Perhaps, there are some internal commit comments or change logs you have access too. Otherwise, I will try to get my hands on an EVK and test the latest image.

We are aware of the Linux User's Guide. Using beepdec according to that document has the same results: poor audio quality.


Regards,
Canyon

0 Kudos

919 Views
igorpadykov
NXP Employee
NXP Employee

Hi Canyon

 

yes please try on NXP reference board with Demo Image from

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

 

 

0 Kudos

915 Views
canyon
Contributor I

Igor:

The newer version has no changes in the secret sauce for the codecs—binaries have the same sha1sum as previous release. Therefore, it was not a surprise it did not solve the issue.

Regards,
Canyon

0 Kudos

908 Views
igorpadykov
NXP Employee
NXP Employee

Hi Canyon

 

it may depend on hardware, so please try on NXP reference board with Demo Image.

 

Best regards
igor

0 Kudos

936 Views
igorpadykov
NXP Employee
NXP Employee

Hi Canyon

 

>..beepdec. In newer versions of imx-codec and imx-parser, is this issue fixed?

 

one can try latest Linux 5.10.9 version imx-gst1.0-plugin (MM_04.06.00_2012_L5.10.y):

https://source.codeaurora.org/external/imx/imx-gst1.0-plugin/tree/plugins/beepdec?h=MM_04.06.00_2012...

Usage is described in Chapter 8 Audio i.MX Linux User’s Guide​

All documentation

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

0 Kudos