Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Removing noise from PCM16 sample after decoding AC3 audio file using l (Read 5397 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Removing noise from PCM16 sample after decoding AC3 audio file using l

Hi,

I'm using the liba52 open source library to decode an AC3 file. After decoding I get  PCM16 raw data which I'm storing in a .RAW file and then using the Audio Converter Toolbox to convert it to WAV. The decoding is taking place and I'm able to hear the original audio samples. However, there are two problems:
1. There is a lot of noise in the foreground.
2. The length of the orignal AC3 sample is 9s and that of the decoded WAV file is 10s.

Could anyone please help me with these problems? Also it would be a great help if someone could point me to some detailed documentation regarding liba52( apart from the .doc file that comes with it.....and is also a bit outdated)?


Removing noise from PCM16 sample after decoding AC3 audio file using l

Reply #1
Quote from: kryvollf link=msg=0 date=
I'm using the liba52 open source library to decode an AC3 file. After decoding I get  PCM16 raw data which I'm storing in a .RAW file and then using the Audio Converter Toolbox to convert it to WAV. The decoding is taking place and I'm able to hear the original audio samples. However, there are two problems:
1. There is a lot of noise in the foreground.


It is posible that the noise was present in the origional files. Do you know or have a way of knowing?

Quote
2. The length of the orignal AC3 sample is 9s and that of the decoded WAV file is 10s.


Is the difference due to stretching, or has silence been added at the beginning or end?

Removing noise from PCM16 sample after decoding AC3 audio file using l

Reply #2
Quote
It is posible that the noise was present in the origional files. Do you know or have a way of knowing?


I've played the file with Windows Media Player( I had to download AC3 filter ). I didn't hear any noise in the file.

Quote
2. The length of the orignal AC3 sample is 9s and that of the decoded WAV file is 10s.


Quote
Is the difference due to stretching, or has silence been added at the beginning or end?


The difference is due to stretching.

I've tried to reduce noise by taking the average of all samples and subtracting that value from each of the samples but that hasn't made much of a difference.

Removing noise from PCM16 sample after decoding AC3 audio file using l

Reply #3
Quote
Is the difference due to stretching, or has silence been added at the beginning or end?


The difference is due to stretching.

I've tried to reduce noise by taking the average of all samples and subtracting that value from each of the samples but that hasn't made much of a difference.


As far as I'm concerned the stretching is the last straw. The software is garbage. Time to move on.

Removing noise from PCM16 sample after decoding AC3 audio file using l

Reply #4
Quote
As far as I'm concerned the stretching is the last straw. The software is garbage. Time to move on.


Funny thing is a lot of other decoders and players like TCPMP are using the same open source library as I am, i.e., LibA52.
I am basically porting the library and implementing it as a plugin in Symbian. Perhaps I am making some mistake while calling the functions of the library?

By the way, could you suggest some other open source library that is used for decoding AC3. I donot have sufficient knowledge to write my own codec.

Removing noise from PCM16 sample after decoding AC3 audio file using l

Reply #5
By the way, could you suggest some other open source library that is used for decoding AC3. I donot have sufficient knowledge to write my own codec.


FFmpeg's libavcodec can decode AC3 natively.

 

Removing noise from PCM16 sample after decoding AC3 audio file using l

Reply #6
Quote
FFmpeg's libavcodec can decode AC3 natively.


Thanks, I'll look into it....BTW do you have any documentation on liba52.