1. 程式人生 > 其它 >ffmpeg用了多少條彙編指令?

ffmpeg用了多少條彙編指令?

Download FFmpeg 不用映象,下載原始碼也很快。

     所列檔案總數:
             156 個檔案      2,097,608 位元組
               0 個目錄 63,336,206,336 可用位元組

D:\ffmpeg>dir *.asm /s

寫了個很土的python程式:

import glob
import re
s = set()
p = re.compile('[a-zA-Z]+')
#print(p.match('vp9_%4_ymm_1d'))
for filename in glob.glob("d:/ffmpeg/**/*.asm
", recursive=True): with open(filename, 'r') as file: for line in file: try: x = line.split(maxsplit=1)[0] #if p.fullmatch(x): s.add(x.lower()) if x.isalpha(): s.add(x.lower()) except Exception: pass for x in s: print
(x)

雖然我的電腦很舊了,但一敲回車程式就跑完了。輸出是415行:

...
posrotateshuf # 應該不是指令
cmovs # The cmovs conditional move if sign check the state of SF.
vaddps # the old two-operand Intel SSE instruction ADDPS xmm1, xmm2/m128can now be expressed in three-operand syntax as VADDPS
butterfly # 好像IDCT裡有個操作叫這個名字,不是指令
movx # https://stackoverflow.com/questions/33268906/how-does-movsx-assembly-instruction-work
pabsw #  PABSB/W/D computes the absolute value of each data element of the source operand...
...

請注意,那些.asm裡有g722, h263等沒用的,有aac, ac3, h264, hevc等有用的。

直白地說:我覺得LoongArch很厲害,但似乎有一點點跑偏了。推出了再撤回也不合適。開個新帖子,RISC-V+ffmpeg加速(不超過415條指令),大cache, 高主頻,低耗電,NVMe SSD, USB 3.0, 2D顯示卡,桌上型電腦/筆記本,UOS,辦公上網學習用,如何?有線和無線網絡卡,千兆位足夠了。

https://www.rfwireless-world.com/Terminology/difference-between-wifi-6-and-wifi-5.html