diff options
author | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
commit | 2648e999d277eac5c3d331a3609bcc73fafbea71 (patch) | |
tree | 40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/core/test-pattern/test_pattern.bash | |
parent | c759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff) | |
parent | 7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff) | |
download | linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2 |
Merge branch 'testing'
# By James Meyer (1091) and others
# Via James Meyer (5) and others
* testing: (1148 commits)
LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish
Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web
LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables.
xf86-video-ati: xorg ati driver.
LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE.
LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop.
e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers.
LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902
zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to
linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink
runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr
LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900
iguanair: rebuild with python 2.7
LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first.
linhes-udev-rules: add rules for mce,streamzap,serial lirc devices.
mythinstall: recompile for matching libs
mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager
linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist
LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV
linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/
...
Diffstat (limited to 'abs/core/test-pattern/test_pattern.bash')
-rwxr-xr-x | abs/core/test-pattern/test_pattern.bash | 326 |
1 files changed, 0 insertions, 326 deletions
diff --git a/abs/core/test-pattern/test_pattern.bash b/abs/core/test-pattern/test_pattern.bash deleted file mode 100755 index d220fb0..0000000 --- a/abs/core/test-pattern/test_pattern.bash +++ /dev/null @@ -1,326 +0,0 @@ -#!/bin/bash - -# Set default options to be overriden by command line arguments. - -w=400 -h=325 -rate=50 -TEMPDIR= -unset remove_tempdir -interlaced= -aspect_ratio= -bitrate= - -while getopts ":w:h:t:r:ia:b:" opt; do - case $opt in - w) - w=$OPTARG - ;; - h) - h=$OPTARG - ;; - t) - TEMPDIR=$OPTARG - ;; - r) - rate=$OPTARG - ;; - i) - interlaced=TRUE - ;; - a) - aspect_ratio=$OPTARG - ;; - b) - bitrate=$OPTARG - ;; - \?) - echo -n "\ -Error: Invalid option -$OPTARG - -Usage: - test_pattern.bash [options] - -w width - The width in pixels. - -h height - The height in pixels. - -t tempdir - Temporary directory for intermediate files. If no directory is specified, one is created and deleted at the end of processing. - -r fieldrate - -i - Generate an interlaced test pattern - -a n:m - Aspect ratio of generated video. - -b bitrate - Bitrate used for encoding. - -Example: -test_pattern.bash -w 1440 -h 1080 -t temp -r 50 -i -a 16:9 -b 12000k -" - exit 1 - esac -done - -if [ -z "$aspect_ratio" ] ; then - aspect_ratio="${w}:${h}" -fi - -aspectx=$(echo $aspect_ratio | cut -d: -f1) -aspecty=$(echo $aspect_ratio | cut -d: -f2) - -# Calculate some dimensions based on the requested size. - -barw=$((w/32)) -barstep=$((w/90)) -barstart=$((-barw/barstep-1)) - -frames=$((w/2)) - -unity=$((h*2/27)) -unitx=$((unity*aspecty*w/(aspectx*h))) -gridlw=$((unity*3/43)) - -echo unity=$unity -echo unitx=$unitx - -nvgrid=$(((h-gridlw)/unity)) -nhgrid=$(((((w-gridlw)/unitx)-1)/2*2+1)) - -gridstartx=$((w/2-(nhgrid*unitx+gridlw)/2-1)) -gridstarty=$((h/2-(nvgrid*unity+gridlw)/2-1)) - -echo nvgrid=$nvgrid -echo nhgrid=$nhgrid -echo gridstartx=$gridstartx -echo gridstarty=$gridstarty - -echo parsed tempdir $TEMPDIR - -if [ -z "$TEMPDIR" ] ; then - TEMPDIR=$(mktemp -d --tmpdir=/tmp) - remove_tempdir=1 -else - if [ ! -d "$TEMPDIR" ] ; then - mkdir $TEMPDIR - fi -fi - -echo parsed tempdir $TEMPDIR $remove_tempdir - -unset checker -checker=( -fill "rgb(192,192,192)" ) -for ((g=-9;g<=7;g=g+2)) ; do - checker=( "${checker[@]}" - -draw - "rectangle $((w/2+g*unitx*7/10)),$((gridstarty+unity*3+gridlw)) $((w/2+(g+1)*unitx*7/10)),$((gridstarty+unity*4+gridlw))" ) -done - -checker=( "${checker[@]}" -fill black ) -for ((g=-8;g<=8;g=g+2)) ; do - checker=( "${checker[@]}" - -draw - "rectangle $((w/2+g*unitx*7/10)),$((gridstarty+unity*3+gridlw)) $((w/2+(g+1)*unitx*7/10)),$((gridstarty+unity*4+gridlw))" ) -done - -unset stripe -stripe=( -fill white ) - -for ((g=0;g<5;g++)) ; do - startx=$((w/2+(3-g*2)*unitx)) - endx=$((startx+2*unitx)) - - for ((x=startx;x<endx;x=x+2*(g+1))) ; do - stripe=( "${stripe[@]}" - -draw - "rectangle $x,$((gridstarty+unity*7+gridlw)) $((x+g)),$((gridstarty+unity*9+gridlw))" ) - done -done - -for ((g=0;g<13;g++)) ; do - stripe=( "${stripe[@]}" - -draw - "rectangle $((gridstartx+(nhgrid/2-6+g)*unitx)),$((gridstarty+unity*6+gridlw)) $((gridstartx+(nhgrid/2-6+g)*unitx+gridlw)),$((gridstarty+unity*7+gridlw-1))" ) -done - -convert -size ${w}x${h} xc:white \ - -fill "rgb(204,204,0)" \ - -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-4*unitx)),$((gridstarty+unity*6+gridlw))" \ - -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*11+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*13+gridlw))" \ - -fill "rgb(0,204,204)" \ - -draw "rectangle $((w/2-4*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-2*unitx)),$((gridstarty+unity*6+gridlw))" \ - -fill "rgb(0,204,0)" \ - -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-0*unitx)),$((gridstarty+unity*6+gridlw))" \ - -fill "rgb(204,0,204)" \ - -draw "rectangle $((w/2-0*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*6+gridlw))" \ - -fill "rgb(204,0,0)" \ - -draw "rectangle $((w/2+2*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+4*unitx)),$((gridstarty+unity*6+gridlw))" \ - -draw "rectangle $((w/2-unitx/2)),$((gridstarty+unity*11+gridlw)) $((w/2+unitx/2)),$((gridstarty+unity*13+gridlw))" \ - -fill "rgb(0,0,204)" \ - -draw "rectangle $((w/2+4*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*6+gridlw))" \ -\ - -fill black \ - -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*6+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*9+gridlw))" \ - "${stripe[@]}" \ - -fill black \ - -draw "rectangle $((w/2-(unitx-gridlw)/2)),$((gridstarty+unity*5+gridlw)) $((w/2+(unitx-gridlw)/2-1)),$((gridstarty+unity*8+gridlw))" \ - -fill white \ - -draw "rectangle $((w/2-6*unitx)),$((h/2-gridlw/2)) $((w/2+6*unitx)),$((h/2-gridlw/2+gridlw))" \ - -draw "rectangle $((w/2-gridlw/2)),$((gridstarty+unity*5+gridlw)) $((w/2-gridlw/2+gridlw)),$((gridstarty+unity*8+gridlw))" \ -\ - -fill "rgb(0,0,0)" \ - -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-4*unitx)),$((gridstarty+unity*10+gridlw))" \ - -fill "rgb(51,51,51)" \ - -draw "rectangle $((w/2-4*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-2*unitx)),$((gridstarty+unity*10+gridlw))" \ - -fill "rgb(102,102,102)" \ - -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-0*unitx)),$((gridstarty+unity*10+gridlw))" \ - -fill "rgb(153,153,153)" \ - -draw "rectangle $((w/2-0*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*10+gridlw))" \ - -fill "rgb(204,204,204)" \ - -draw "rectangle $((w/2+2*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+4*unitx)),$((gridstarty+unity*10+gridlw))" \ - -fill "rgb(255,255,255)" \ - -draw "rectangle $((w/2+4*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*10+gridlw))" \ -\ - -fill black \ - -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*1+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*2+gridlw))" \ - -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*2+gridlw)) $((w/2-3*unitx)),$((gridstarty+unity*3+gridlw))" \ - -draw "rectangle $((w/2+6*unitx)),$((gridstarty+unity*2+gridlw)) $((w/2+3*unitx)),$((gridstarty+unity*3+gridlw))" \ - -draw "rectangle $((gridstartx+(nhgrid/2-2)*unitx)),$((gridstarty+unity*2+gridlw)) $((gridstartx+(nhgrid/2-2)*unitx+gridlw)),$((gridstarty+unity*3+gridlw))" \ - -draw "rectangle $((w/2-3*unitx+1)),$((gridstarty+unity*10+gridlw)) $((w/2+3*unitx)),$((gridstarty+unity*11+gridlw))" \ - -fill white \ - -draw "rectangle $((gridstartx+(nhgrid/2-2)*unitx)),$((gridstarty+unity*10+gridlw)) $((gridstartx+(nhgrid/2-2)*unitx+gridlw)),$((gridstarty+unity*11+gridlw))" \ - "${checker[@]}" \ - ${TEMPDIR}/centre.png - -convert -size ${w}x${h} xc:black \ - -fill white \ - -draw "ellipse $((w/2)),$((h/2)) $((6*unitx)),$((6*unity)) 0,360" \ - ${TEMPDIR}/circle.png - -unset drawgrid -drawgrid=( -fill white ) -for ((g=0;g<=$nhgrid;g++)) ; do - drawgrid=( "${drawgrid[@]}" - -draw - "rectangle $((gridstartx+g*unitx)),0 $((gridstartx+g*unitx+gridlw)),$h" ) -done - -for ((g=0;g<=$nvgrid;g++)) ; do - drawgrid=( "${drawgrid[@]}" - -draw - "rectangle 0,$((gridstarty+g*unity)) $w,$((gridstarty+g*unity+gridlw))" ) -done - -drawgrid=( "${drawgrid[@]}" - -draw "rectangle 0,0 $gridstartx,$h" - -draw "rectangle 0,0 $w,$gridstarty" - -draw "rectangle $w,$h $((gridstartx+nhgrid*unitx)),0" - -draw "rectangle $w,$h 0,$((gridstarty+nvgrid*unity))" - -fill black -) - -for ((g=0;g<=$nhgrid;g=g+2)) ; do - drawgrid=( "${drawgrid[@]}" - -draw - "rectangle $((gridstartx+g*unitx+gridlw+1)),0 $((gridstartx+(g+1)*unitx)),$((gridstarty-1))" - -draw - "rectangle $((gridstartx+g*unitx+gridlw+1)),$((gridstarty+nvgrid*unity+gridlw+1)) $((gridstartx+(g+1)*unitx)),$h" - ) -done - -for ((g=0;g<=$nvgrid;g=g+2)) ; do - drawgrid=( "${drawgrid[@]}" - -draw - "rectangle 0,$((gridstarty+g*unity+gridlw+1)) $((gridstartx-1)),$((gridstarty+(g+1)*unity-1))" - -draw - "rectangle $((gridstartx+nhgrid*unitx+gridlw+1)),$((gridstarty+g*unity+gridlw+1)) $w,$((gridstarty+(g+1)*unity-1))" - ) -done - -diagonals=( - -fill white - -linewidth 10 - -fill white - -draw "line 0,0 $((w/2)),$((h-1))" - -draw "line 0,0 $((w-1)),$((h/2))" - -draw "line 0,$((h-1)) $((w/2)),0" - -draw "line 0,$((h-1)) $((w-1)),$((h/2))" - -draw "line $((w-1)),0 $((w/2)),$((h-1))" - -draw "line $((w-1)),0 0,$((h/2))" - -draw "line $((w-1)),$((h-1)) $((w/2)),0" - -draw "line $((w-1)),$((h-1)) 0,$((h/2))" ) - -convert -size ${w}x${h} xc:grey50 \ - "${diagonals[@]}" \ - "${drawgrid[@]}" \ - -fill "rgb(51,153,102)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-7)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2-6)*unitx-1)),$((h/2))" \ - -fill "rgb(204,102,102)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-7)*unitx+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2-6)*unitx-1)),$((gridstarty+unity*12-1))" \ - -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-6)*unitx)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unitx-1)),$((gridstarty+unity*3-1))" \ - -fill "rgb(153,102,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-6)*unitx)),$((gridstarty+10*unity+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unitx-1)),$((gridstarty+unity*12-1))" \ - -fill "rgb(128,128,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+7)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2+8)*unitx-1)),$((h/2))" \ - -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+7)*unitx+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2+8)*unitx-1)),$((gridstarty+unity*12-1))" \ - -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+6)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unitx+gridlw)),$((gridstarty+unity*3-1))" \ - -fill "rgb(153,102,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+6)*unitx+gridlw+1)),$((gridstarty+10*unity+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unitx+gridlw)),$((gridstarty+unity*12-1))" \ - ${TEMPDIR}/grid.png - -convert -size ${w}x${h} ${TEMPDIR}/grid.png ${TEMPDIR}/centre.png ${TEMPDIR}/circle.png -composite ${TEMPDIR}/background.png - -if [ -n "$interlaced" ] ; then - interlaced_frame=0 - convert -size 1x${h} -tile-offset +0+1 pattern:gray50 \ - -scale ${w}x${h}\! ${TEMPDIR}/interlace.png -fi - -for ((i=0; i < $frames; i++)) ; do - - prev_image_name=$image_name - image_name=${TEMPDIR}/test$(printf "%03d" $i).png - echo creating image $image_name - - convert -size ${w}x${h} ${TEMPDIR}/background.png \ - -fill black \ - -draw "rectangle $(((barstart+i)*barstep)),0 $(((barstart+i)*barstep+barw)),${h}" \ - -font Arial-Black-Regular \ - -pointsize $unity \ - -fill white \ - -stroke black -strokewidth 5 -annotate +$((w-2*i))+$((gridstartx+11*unity)) 'Judder Test' \ - -stroke none -annotate +$((w-2*i))+$((gridstartx+11*unity)) 'Judder Test' \ - -depth 8 \ - ${image_name} - - if [ -n "$interlaced" ] ; then - interlaced_frame=$((interlaced_frame + 1)) - - if [ $interlaced_frame = 2 ] ; then - echo interlacing $((i-1)) and $i - interlaced_frame=0 - convert -size ${w}x${h} -depth 8 $prev_image_name $image_name ${TEMPDIR}/interlace.png -composite ${TEMPDIR}/interlaced$(printf "%03d" $((i/2))).png - fi - fi -done - -bitrate_flags= -if [ -n "$bitrate" ] ; then - bitrate_flags="-b $bitrate" -fi - -if [ -n "$interlaced" ] ; then - ffmpeg -r ${rate} -i ${TEMPDIR}/interlaced%03d.png -r ${rate} \ - -vcodec mpeg2video -flags +ilme+ildct -aspect $aspect_ratio \ - ${bitrate_flags} -y test.mpg -else - ffmpeg -r ${rate} -i ${TEMPDIR}/test%03d.png -r ${rate} \ - -vcodec mpeg2video -aspect $aspect_ratio \ - ${bitrate_flags} -y test.mpg -fi - -if [ -n "$remove_tempdir" ] ; then - rm -Rf $TEMPDIR -fi |