Why the decoding time is long compared to other methods?

1 回表示 (過去 30 日間)
Star Rats
Star Rats 2019 年 8 月 30 日
コメント済み: Star Rats 2019 年 9 月 5 日
I have run the mp3 decoding based on the coding provided here. Why it takes around 20 minutes to decode a 3.6MB mp3 file while other methods only take millisecond in the decoding time?
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 8 月 30 日
That appears to be a user contribution written in MATLAB rather than something compiled into machine language. Perhaps the user code could be improved. You should profile it on a smaller file.

サインインしてコメントする。

回答 (1 件)

Guillaume
Guillaume 2019 年 8 月 30 日
Just because a file is on the filexchange doesn't mean that it's good quality or performant. You can tell from the first few lines of the main function that this particular filexchange submission is never going to be performant: the file is read bit by bit and each bit stored as a byte. Not only is it extremely inefficient memory-wise (uses 8 times more memory than needed) but it precludes the use of bit manipulation operations that processors are very efficient at.
  1 件のコメント
Star Rats
Star Rats 2019 年 9 月 5 日
Hi @Guillaume, can it be improved by modifying the first few lines?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSignal Generation and Preprocessing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by