feat(ncm): 网易云技术栈预研+构建验证 (agent-200) — 选型: mbedtls3.6.2裁剪(TLS+AES+MD5+RSA raw+Base64,~388KB)/jsmn(2.2KB)/qrcodegen(10.8KB)/minimp3(37.4KB), 合计~438KB; HTTPS unikey 全链路宿主+qemu-mipsel 实测通过; RSA raw 与 Python pow 逐字节一致; MP3 解码非瓶颈

vendor源码+out产物不入库(126MB, gitignore; 版本/许可/裁剪见 VENDOR_NOTES.md, build_*.sh 可复现)
This commit is contained in:
MeowOS committed 2026-08-31 06:03:36 +08:00
1 parent 2d93298f8a
commit c96e912518
19 files changed
+733

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#define MINIMP3_IMPLEMENTATION
#include "minimp3_ex.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
static double now(){ struct timespec ts; clock_gettime(CLOCK_MONOTONIC,&ts); return ts.tv_sec+ts.tv_nsec*1e-9; }
int main(int argc,char**argv){
if(argc<2){fprintf(stderr,"usage: %s file.mp3\n",argv[0]);return 1;}
mp3dec_t dec; mp3dec_init(&dec);
mp3dec_file_info_t info; memset(&info,0,sizeof info);
double t0=now(); int r=mp3dec_load(&dec,argv[1],&info,NULL,NULL); double t1=now();
if(r){fprintf(stderr,"decode fail %d\n",r);return 1;}
long long frames=info.samples/info.channels;
printf("rate=%d ch=%d total_pcm_frames=%lld\n",info.hz,info.channels,frames);
printf("wall=%.3f s throughput=%.1f xRT (%.1f frames/s)\n",(t1-t0),
(double)frames/info.hz/(t1-t0),(double)frames/(t1-t0));
free(info.buffer); return 0;
}