~ubuntu-branches/ubuntu/maverick/zapping/maverick

« back to all changes in this revision

Viewing changes to plugins/deinterlace/test/ditest-all.sh

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 11:07:34 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108110734-ygvf6uljvgcjmca7
Tags: 0.9.6-1ubuntu1
* Resynchronise with Debian (Closes: #4022):
  - Fix desktop file to not use absolute path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
. `dirname $0`/emulator.sh
 
4
 
 
5
methods="\
 
6
  VideoBob \
 
7
  VideoWeave \
 
8
  TwoFrame \
 
9
  Weave \
 
10
  Bob \
 
11
  ScalerBob \
 
12
  EvenOnly \
 
13
  OddOnly \
 
14
  Greedy \
 
15
  Greedy2Frame \
 
16
  GreedyH \
 
17
  TomsMoComp \
 
18
  MoComp2 \
 
19
"
 
20
 
 
21
size="-w 256 -h 16"
 
22
 
 
23
ditest_wrapper () {
 
24
  # -q quiet
 
25
  # -r use pseudo random source
 
26
  # -m method  deinterlace method
 
27
  # -c feature  test the version optimized for feature (mmx, sse, ...)
 
28
  # -w -h source and dest image size (adjusted to be a multiple of the
 
29
  #   system page size for a built-in efence test).
 
30
  if test x$2 = xscalar; then
 
31
    LD_PRELOAD=$pre $emu ./ditest -q -r -m $1 \
 
32
      $size $4 >$tmpd/$3.yuv 2>/dev/null
 
33
  else
 
34
    LD_PRELOAD=$pre $emu ./ditest -q -r -m $1 \
 
35
      -c $2 $size $4 >$tmpd/$3.yuv 2>/dev/null
 
36
  fi
 
37
 
 
38
  case "$?" in
 
39
    0)
 
40
      if test -e $tmpd/$3.yuv; then
 
41
        implemented="$implemented $3.yuv"
 
42
      fi
 
43
      ;;
 
44
    55)
 
45
      # Have no $2 implementation of $1.
 
46
      test -e $tmpd/$3.yuv && rm $tmpd/$3.yuv
 
47
      ;;
 
48
    *)
 
49
      echo "Test of $2 implementation of $1 failed."
 
50
      echo LD_PRELOAD=$pre $emu ./ditest -q -r -m $1 -c $2 $size $4
 
51
      exit 1
 
52
      ;;
 
53
  esac
 
54
 
 
55
  echo -n "."
 
56
}
 
57
 
 
58
ditest_all () {
 
59
  feature=$1
 
60
 
 
61
  if ! find_emulator $feature; then
 
62
    return 77
 
63
  fi
 
64
 
 
65
  tmpd="results-$$-$feature"
 
66
  rm -rf $tmpd
 
67
  mkdir $tmpd || exit $?
 
68
 
 
69
  implemented=
 
70
 
 
71
  for method in VideoBob VideoWeave TwoFrame Weave Bob ScalerBob EvenOnly \
 
72
    OddOnly Greedy Greedy2Frame MoComp2 ; do
 
73
    ditest_wrapper $method $feature $method
 
74
  done
 
75
 
 
76
  # Runtime options - run through all possible combinations.
 
77
  for upd in 0 1; do
 
78
    for umf in 0 1; do
 
79
      for uhs in 0 1; do
 
80
        for uvs in 0 1; do
 
81
          for uib in 0 1; do
 
82
            ditest_wrapper GreedyH $feature \
 
83
              GreedyH-$upd-$umf-$uhs-$uvs-$uib \
 
84
              "-o GreedyUsePulldown=$upd \
 
85
               -o GreedyUseMedianFilter=$umf \
 
86
               -o GreedyUseHSharpness=$uhs \
 
87
               -o GreedyUseVSharpness=$uvs \
 
88
               -o GreedyUseInBetween=$uib \
 
89
               -o GreedyTestMode=1"
 
90
          done
 
91
        done
 
92
      done
 
93
    done
 
94
  done
 
95
 
 
96
  # Runtime options - run through all possible combinations.
 
97
  for usb in 0 1; do
 
98
    for se in 0 1 2 4 6 10 12 14 16 20 22; do
 
99
      ditest_wrapper TomsMoComp $feature TomsMoComp-$usb-$se \
 
100
        "-o UseStrangeBob=$usb -o SearchEffort=$se"
 
101
    done
 
102
  done
 
103
 
 
104
  echo
 
105
 
 
106
  return 0
 
107
}