(4)工程目录中的cfg文件夹中有多个预先设定好的配置文件,分别代表了不同的编码模式。该目录中的pre-sequence文件夹中指定了多个输入测试序列的配置信息。我们在这里选择encoder_intra_main.cfg作为编码的配置文件,另外用akiyo_qcif.yuv作为测试序列。新建一个cfg文件命名为akiyo.cfg,内容如下:
#======== File I/O ===============
InputFile : E:\TestSquence\176x144\akiyo_qcif.yuv
InputBitDepth : 8 # Input bitdepth
FrameRate : 30 # Frame Rate per second
FrameSkip : 0 # Number of frames to be skipped in input
SourceWidth : 176 # Input frame width
SourceHeight : 144 # Input frame height
FramesToBeEncoded : 50 # Number of frames to be coded
将两个cfg文件拷贝到(3)中的目录下,待编码序列要依据cfg的路径存放,否则会出现找不到文件的错误。
(5)配置工程属性。
在TAppEncoder工程上右键单击->Properties->Configuration Properties->Debugging。将命令行参数和工作目录改成下图所示:
这一步也可以用命令行完成,效果是一样的。
(6)编译运行。Debug->Start Without Debuging->是,命令行窗口中会显示编码的信息和结果,如下图所示。