X-Git-Url: https://git.ao2.it/experiments/gstreamer.git/blobdiff_plain/6d8e3f247b57f409402a7d016b895a2c95015e4d..87e464c0b3660c7dcf381c52a9b7449911219290:/shell/gst-test-jpegdec.sh?ds=inline diff --git a/shell/gst-test-jpegdec.sh b/shell/gst-test-jpegdec.sh index 997a629..6ec2954 100755 --- a/shell/gst-test-jpegdec.sh +++ b/shell/gst-test-jpegdec.sh @@ -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