python: update python examples to modern python, Gst, and Glib versions
[experiments/gstreamer.git] / shell / gst-test-jpegdec.sh
index 997a629..6ec2954 100755 (executable)
@@ -9,18 +9,24 @@ command -v cjpeg &> /dev/null || { echo "cjpeg needed, should be in libjpeg-turb
 
 if [ "x$1" = "x" ];
 then
-  gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,width=996,height=784 ! jpegenc ! filesink location=videotest.jpg
+  WIDTH=996
+  HEIGHT=784
+  gst-launch-1.0 videotestsrc num-buffers=1 ! "video/x-raw,width=${WIDTH},height=${HEIGHT}" ! jpegenc ! filesink location=videotest.jpg
   INPUT_FILE="videotest.jpg"
 else
   INPUT_FILE="$1"
 fi
 
 declare -A SAMPLINGS
+# 4:1:0 is ambiguous, see https://blog.awm.jp/2016/02/10/yuv/
+SAMPLINGS["NORMAL_410"]="4x2,1x1,1x1"
+SAMPLINGS["NORMAL_411"]="4x1,1x1,1x1"
 SAMPLINGS["NORMAL_420"]="2x2,1x1,1x1"
 SAMPLINGS["NORMAL_422"]="2x1,1x1,1x1"
+SAMPLINGS["NORMAL_440"]="1x2,1x1,1x1"
 SAMPLINGS["NORMAL_444"]="1x1,1x1,1x1"
 SAMPLINGS["WEIRD_422"]="2x2,1x2,1x2"
-SAMPLINGS["WEIRDER_422"]="2x2,2x1,2x1"
+SAMPLINGS["WEIRD_440"]="2x2,2x1,2x1"
 
 for sampling in "${!SAMPLINGS[@]}";
 do