]> git.sesse.net Git - vlc/blob - debian/patches/20_ffmpeg.dpatch
* src/input/input.c: use a low priority input thread when in b_out_pace_control ...
[vlc] / debian / patches / 20_ffmpeg.dpatch
1 #! /bin/sh -e
2 ## 20_ffmpeg.dpatch by  <sam+deb@zoy.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: No description.
6
7 if [ $# -lt 1 ]; then
8     echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
9     exit 1
10 fi
11
12 [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
13 patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
14
15 case "$1" in
16     -patch) patch -p1 ${patch_opts} < $0;;
17     -unpatch) patch -R -p1 ${patch_opts} < $0;;
18     *)
19         echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
20         exit 1;;
21 esac
22
23 exit 0
24
25 @DPATCH@
26 diff -urNad /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/extras/ffmpeg/configure vlc-0.7.2.final/extras/ffmpeg/configure
27 --- /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/extras/ffmpeg/configure        2004-05-20 12:35:16.000000000 +0200
28 +++ vlc-0.7.2.final/extras/ffmpeg/configure     2004-07-29 17:11:45.000000000 +0200
29 @@ -124,6 +124,12 @@
30    sh4)
31      cpu="sh4"
32    ;;
33 +  parisc|parisc64)
34 +    cpu="parisc"
35 +  ;;
36 +  s390)
37 +    cpu="s390"
38 +  ;;
39    *)
40      cpu="unknown"
41    ;;
42 @@ -1051,6 +1057,12 @@
43  elif test "$cpu" = "sh4" ; then
44    echo "TARGET_ARCH_SH4=yes" >> config.mak
45    echo "#define ARCH_SH4 1" >> $TMPH
46 +elif test "$cpu" = "parisc" ; then
47 +  echo "TARGET_ARCH_PARISC=yes" >> config.mak
48 +  echo "#define ARCH_PARISC 1" >> $TMPH
49 +elif test "$cpu" = "s390" ; then
50 +  echo "TARGET_ARCH_S390=yes" >> config.mak
51 +  echo "#define ARCH_S390 1" >> $TMPH
52  fi
53  echo "#define TUNECPU $TUNECPU" >> $TMPH
54  if test "$bigendian" = "yes" ; then
55 diff -urNad /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/extras/ffmpeg/libavcodec/Makefile vlc-0.7.2.final/extras/ffmpeg/libavcodec/Makefile
56 --- /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/extras/ffmpeg/libavcodec/Makefile      2004-05-10 10:31:52.000000000 +0200
57 +++ vlc-0.7.2.final/extras/ffmpeg/libavcodec/Makefile   2004-07-29 17:11:45.000000000 +0200
58 @@ -205,6 +205,11 @@
59  libpostproc/libpostproc.a:
60         $(MAKE) -C libpostproc
61  
62 +ifeq ($(TARGET_ARCH_PARISC),yes)
63 +motion_est.o: motion_est.c
64 +       $(CC) $(CFLAGS) -O1 -c -o $@ $<
65 +endif
66 +
67  %.o: %.c
68         $(CC) $(CFLAGS) -c -o $@ $< 
69  
70 diff -urNad /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/extras/ffmpeg/libavcodec/svq1.c vlc-0.7.2.final/extras/ffmpeg/libavcodec/svq1.c
71 --- /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/extras/ffmpeg/libavcodec/svq1.c        2004-05-20 12:35:25.000000000 +0200
72 +++ vlc-0.7.2.final/extras/ffmpeg/libavcodec/svq1.c     2004-07-29 17:11:45.000000000 +0200
73 @@ -970,17 +970,17 @@
74              int best_vector_score= INT_MAX;
75              int best_vector_sum=-999, best_vector_mean=-999;
76              const int stage= count-1;
77 -            const int8_t *vector;
78 +            const int8_t *vect;
79      
80              for(i=0; i<16; i++){
81                  int sum= codebook_sum[stage*16 + i];
82                  int sqr=0;
83                  int diff, mean, score;
84      
85 -                vector = codebook + stage*size*16 + i*size;
86 +                vect = codebook + stage*size*16 + i*size;
87      
88                  for(j=0; j<size; j++){
89 -                    int v= vector[j];
90 +                    int v= vect[j];
91                      sqr += (v - block[stage][j])*(v - block[stage][j]);
92                  }
93                  diff= block_sum[stage] - sum;
94 @@ -997,9 +997,9 @@
95                  }
96              }
97              assert(best_vector_mean != -999);
98 -            vector= codebook + stage*size*16 + best_vector[stage]*size;
99 +            vect= codebook + stage*size*16 + best_vector[stage]*size;
100              for(j=0; j<size; j++){
101 -                block[stage+1][j] = block[stage][j] - vector[j];
102 +                block[stage+1][j] = block[stage][j] - vect[j];
103              }
104              block_sum[stage+1]= block_sum[stage] - best_vector_sum;
105              best_vector_score +=