0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MIPSでもmpg123

Last updated at Posted at 2021-11-03

mpg123は依存もないのでZRouter.orgに追加してみました。

image.png

ビルドして試したところCPUを使いきって音トビが発生します。

mpg123はx86やarmではMMXなどのCPUの機能を使ってアセンブラで最適化されてますが、MIPSには最適化コードがありません。

mpg123のページを見るとSGIではテストしているようですが、MIPSにはまったくふれられてません。

しかしそんなに遅くはないだろうと思って調べてみたところ、--with-cpu=generic_nofpuでconfigureしたら問題なくなりました。

procs  memory       page                    disks     faults         cpu
r b w  avm   fre   flt  re  pi  po    fr   sr fl0 md0   in    sy    cs us sy id
1 0 0  45M   45M     0   0   0   0     0    3   0   0  458   149   628 14  7 79
1 0 0  45M   45M     0   0   0   0     0    2   0   0  443   142   595 16  6 78
0 1 0  45M   45M     0   0   0   0     0    2   0   0  457   142   639 15  6 79
0 0 0  45M   45M     0   0   0   0     0    3   0   0  442   143   599 15  7 78
0 1 0  45M   45M     0   0   0   0     0    2   0   0  438   141   603 15  6 80

mpg123のデフォルトはgeneric_fpuで、MIPSの場合はFPU処理は例外でソフトウエアで処理するのでCPUを使い切ってしまうのかもしれません。

整数演算で精度が出ないのか、ノイズがあります。ちょっと対策を考えないとダメそうです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?