JM8.6中读取配置文件

来源:互联网 发布:软件测试培训靠谱不 编辑:程序博客网 时间:2024/06/13 22:30

1,配置文件(decoder.cfg)如下

test.264                 ........H.264 coded bitstreamtest_dec.yuv             ........Output file, YUV 4:2:0 formattest_rec.yuv             ........Ref sequence (for SNR)10                       ........Decoded Picture Buffer size0                        ........NAL mode (0=Annex B, 1: RTP packets)0                        ........SNR computation offset1                        ........Poc Scale (1 or 2)500000                   ........Rate_Decoder104000                   ........B_decoder73000                    ........F_decoderleakybucketparam.cfg     ........LeakyBucket ParamsThis is a file containing input parameters to the JVT H.264/AVC decoder.The text line following each parameter is discarded by the decoder.

2,

fscanf(fd,"%s",inp->infile); // H.264 compressed input bitsream
fscanf(fd,"%*[^\n]");去除test.264之后的字符串


fscanf(fd,"%s",inp->outfile); // YUV 4:2:2 input format
fscanf(fd,"%*[^\n]");

fscanf(fd,"%s",inp->reffile); // reference file
fscanf(fd,"%*[^\n]");



原创粉丝点击