Please refer to the mxc_vpu_test.out source code.
for test, here is the command
modprobe ov5640_camera_mipi
modprobe ov5642_camera
modprobe mxc_v4l2_capture
/unit_tests/mxc_vpu_test.out -E "-x 0 -o /enc.h264 -w 720 -h 480 -c 5000 -f 2"
-x <input method> input mode V4L2 with video node
0 - /dev/video0, 1 - /dev/video1, and so on
then you can play the enc.h264 with following command
/unit_tests/mxc_vpu_test.out -D "-i /enc.h264 "