#shopt -s expand_aliases #source /home/andy/.bashrc SW_PASS=0 SW_FAIL=0 OMX_PASS=0 OMX_FAIL=0 VA_PASS=0 VA_FAIL=0 VD_PASS=0 VD_FAIL=0 VID=/mnt/ramdisk/Test_1440x576_WVC1_6Mbps.wmv OUT=/mnt/ramdisk/raw rm $OUT &>/dev/null #NV_REFSUM=`ffm -i $VID -vframes 499 -f rawvideo -pix_fmt nv12 - | md5sum` #I_REFSUM=`ffm -i $VID -f rawvideo - | md5sum` H_REFSUM=`ffmpeg -hwaccel vdpau -i $VID -f rawvideo - | md5sum` echo -e "\n==============================================" echo "H_REFSUM = $H_REFSUM" #echo "I_REFSUM = $I_REFSUM" echo -e "================================================\n" while [ 1 ] ; do # RAND=`shuf -i 1-4 -n 1 -z` RAND=3 case "$RAND" in 1) echo -e "\nStarting OMX\n" date echo -e "\n" gst-launch-1.0 -f filesrc location=$VID ! matroskademux ! h264parse ! omxh264dec ! filesink location=$OUT sleep 1 echo " " echo "Starting md5sum" SUM=`dd if=$OUT count=499 bs=12441600 | md5sum` if [ "$SUM" == "$NV_REFSUM" ] then let "OMX_PASS++" echo "OMX_PASS md5sum" else let "OMX_FAIL++" echo -e "\a******* OMX_FAIL md5sum *******" echo "Failed sum = $SUM" fi echo -e "\n==============================================" echo -e "\tomx\tvaapi\tvdpau\ts/w" echo -e "Pass\t$OMX_PASS\t$VA_PASS\t$VD_PASS\t$SW_PASS" echo -e "Fail\t$OMX_FAIL\t$VA_FAIL\t$VD_FAIL\t$SW_FAIL" echo -e "\n==============================================" rm $OUT sleep 1 ;; 2) echo -e "\nStarting Vaapi\n" date echo -e "\n" gst-launch-1.0 -f filesrc location=$VID ! matroskademux ! h264parse ! vaapidecode ! filesink location=$OUT sleep 1 echo " " echo "Starting md5sum" SUM=`cat $OUT | md5sum` if [ "$SUM" == "$I_REFSUM" ] then let "VA_PASS++" echo "VA_PASS md5sum" else let "VA_FAIL++" echo -e "\a******* VA_FAIL md5sum *******" echo "Failed sum = $SUM" fi echo -e "\n==============================================" echo -e "\tomx\tvaapi\tvdpau\ts/w" echo -e "Pass\t$OMX_PASS\t$VA_PASS\t$VD_PASS\t$SW_PASS" echo -e "Fail\t$OMX_FAIL\t$VA_FAIL\t$VD_FAIL\t$SW_FAIL" echo -e "\n==============================================" rm $OUT sleep 1 ;; 3) echo -e "\nStarting Vdpau\n" date echo -e "\n" ffmpeg -hwaccel vdpau -i $VID -f rawvideo $OUT sleep 1 echo " " echo "Starting md5sum" SUM=`cat $OUT | md5sum` if [ "$SUM" == "$H_REFSUM" ] then let "VD_PASS++" echo "VD_PASS md5sum" else let "VD_FAIL++" echo -e "\a******* VD_FAIL md5sum *******" echo "Failed sum = $SUM" fi echo -e "\n==============================================" echo -e "\tomx\tvaapi\tvdpau\ts/w" echo -e "Pass\t$OMX_PASS\t$VA_PASS\t$VD_PASS\t$SW_PASS" echo -e "Fail\t$OMX_FAIL\t$VA_FAIL\t$VD_FAIL\t$SW_FAIL" echo -e "\n==============================================" rm $OUT sleep 1 ;; 4) echo -e "\nStarting Software\n" date echo -e "\n" ffm -i $VID -f rawvideo $OUT sleep 1 echo " " echo "Starting md5sum" SUM=`cat $OUT | md5sum` if [ "$SUM" == "$I_REFSUM" ] then let "SW_PASS++" echo "SW_PASS md5sum" else let "SW_FAIL++" echo -e "\a******* SW_FAIL md5sum *******" echo "Failed sum = $SUM" fi echo -e "\n==============================================" echo -e "\tomx\tvaapi\tvdpau\ts/w" echo -e "Pass\t$OMX_PASS\t$VA_PASS\t$VD_PASS\t$SW_PASS" echo -e "Fail\t$OMX_FAIL\t$VA_FAIL\t$VD_FAIL\t$SW_FAIL" echo -e "\n==============================================" rm $OUT sleep 1 ;; esac done