使用内核: 友善最新的 2.6.38, 测试代码是光盘中的 三星JPEG_app
据了解2.6.38的内核将这部分驱动做成了fo, 因此不需要编译较老的 驱动模块以插入模块的方式添加到内核。
可以直接编译测试程序, 当然需要把设备文件 名 改了。 /dev/misc/s3c-jpg 改为 /dev/s3c-jpg。
现在我的测试结果是, encode测试, 可以将yuv文件 encode 为 jpg。
但是 decode时, decode 出来的yuv文件 均是 0字节, 测试代码中GET_DECODE_WIDTH\ GET_DECODE_HEIGHT均
返回0. 希望有做过的朋友给与解答。
以下是输出结果
[root@Enjoylinux /root]# ./test
------------------------Decoder Test Start ---------------------
inFilename : ./testVectors/testInp/test_420_640_480.jpg
outFilename : ./testVectors/testOut/test_420_640_480.yuv
filesize : 166872
inBuf : 0x40341000
decParam->width : 0 decParam->height : 0
[JPEG Decoding Performance] Elapsed time : 9
OutBuf : 0x40528800 streamsize : 0
width : 0 height : 0 samplemode : 4096
inFilename : ./testVectors/testInp/1.jpg
outFilename : ./testVectors/testOut/test_420_640_480.yuv
filesize : 12247
inBuf : 0x4024b000
decParam->width : 0 decParam->height : 0
[JPEG Decoding Performance] Elapsed time : 8
OutBuf : 0x40432800 streamsize : 0
width : 0 height : 0 samplemode : 4096
------------------------Decoder Test Done ---------------------
[root@Enjoylinux /root]#
[ 此帖被lightfather1在2011-06-18 16:41重新编辑 ]