mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
7.2 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/jimmy/mplayer/gcc4-fix.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  20. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  21. #
  22. # T2 SDE: package/.../mplayer/gcc4-fix.patch
  23. # Copyright (C) 2004 - 2005 The T2 SDE Project
  24. #
  25. # More information can be found in the files COPYING and README.
  26. #
  27. # This patch file is dual-licensed. It is available under the license the
  28. # patched project is licensed under, as long as it is an OpenSource license
  29. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  30. # of the GNU General Public License as published by the Free Software
  31. # Foundation; either version 2 of the License, or (at your option) any later
  32. # version.
  33. # --- T2-COPYRIGHT-NOTE-END ---
  34. diff -Nur MPlayer-1.0pre7.orig/liba52/imdct.c MPlayer-1.0pre7/liba52/imdct.c
  35. --- MPlayer-1.0pre7.orig/liba52/imdct.c 2005-03-23 01:27:18.000000000 +0200
  36. +++ MPlayer-1.0pre7/liba52/imdct.c 2005-09-25 10:31:27.000000000 +0300
  37. @@ -937,7 +937,8 @@
  38. /* 4-7. iterations */
  39. for (m=3; m < 7; m++) {
  40. two_m = (1 << m);
  41. - two_m_plus_one = two_m<<1;
  42. + int two_m_plus_four=two_m<<4;
  43. + complex_t* buf_plus_128=buf+128;
  44. asm volatile(
  45. "movl %0, %%esi \n\t"
  46. ".balign 16 \n\t"
  47. @@ -963,7 +964,7 @@
  48. "addl %2, %%esi \n\t"
  49. "cmpl %1, %%esi \n\t"
  50. " jb 1b \n\t"
  51. - :: "g" (buf), "m" (buf+128), "m" (two_m_plus_one<<3), "r" (two_m<<3),
  52. + :: "g" (buf), "m" (buf_plus_128), "m" (two_m_plus_four), "r" (two_m<<3),
  53. "r" (sseW[m])
  54. : "%esi", "%edi", "%edx"
  55. );
  56. diff -Nur MPlayer-1.0pre7.orig/libavcodec/libpostproc/postprocess_template.c MPlayer-1.0pre7/libavcodec/libpostproc/postprocess_template.c
  57. --- MPlayer-1.0pre7.orig/libavcodec/libpostproc/postprocess_template.c 2005-04-16 23:41:13.000000000 +0300
  58. +++ MPlayer-1.0pre7/libavcodec/libpostproc/postprocess_template.c 2005-09-25 10:31:27.000000000 +0300
  59. @@ -2648,6 +2648,8 @@
  60. static always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int stride, PPContext *c){
  61. int64_t dc_mask, eq_mask;
  62. int64_t sums[10*8*2];
  63. + int64_t dc_and_eq_mask;
  64. +
  65. src+= step*3; // src points to begin of the 8x8 Block
  66. //START_TIMER
  67. asm volatile(
  68. @@ -2754,8 +2756,9 @@
  69. : "r" (src), "r" ((long)step), "m" (c->pQPb), "m"(c->ppMode.flatnessThreshold)
  70. : "%"REG_a
  71. );
  72. + dc_and_eq_mask=dc_mask & eq_mask;
  73. - if(dc_mask & eq_mask){
  74. + if(dc_and_eq_mask){
  75. long offset= -8*step;
  76. int64_t *temp_sums= sums;
  77. @@ -2930,7 +2933,7 @@
  78. " js 1b \n\t"
  79. : "+r"(offset), "+r"(temp_sums)
  80. - : "r" ((long)step), "r"(src - offset), "m"(dc_mask & eq_mask)
  81. + : "r" ((long)step), "r"(src - offset), "m"(dc_and_eq_mask)
  82. );
  83. }else
  84. src+= step; // src points to begin of the 8x8 Block
  85. diff -Nur MPlayer-1.0pre7.orig/libmpdemux/frequencies.h MPlayer-1.0pre7/libmpdemux/frequencies.h
  86. --- MPlayer-1.0pre7.orig/libmpdemux/frequencies.h 2001-11-17 00:06:48.000000000 +0200
  87. +++ MPlayer-1.0pre7/libmpdemux/frequencies.h 2005-09-25 10:31:27.000000000 +0300
  88. @@ -104,7 +104,7 @@
  89. /* --------------------------------------------------------------------- */
  90. extern struct CHANLISTS chanlists[];
  91. -extern struct STRTAB chanlist_names[];
  92. +/* extern struct STRTAB chanlist_names[]; */
  93. extern int chantab;
  94. extern struct CHANLIST *chanlist;
  95. diff -Nur MPlayer-1.0pre7.orig/libvo/aclib_template.c MPlayer-1.0pre7/libvo/aclib_template.c
  96. --- MPlayer-1.0pre7.orig/libvo/aclib_template.c 2005-01-21 23:11:35.000000000 +0200
  97. +++ MPlayer-1.0pre7/libvo/aclib_template.c 2005-09-25 10:31:27.000000000 +0300
  98. @@ -249,8 +249,8 @@
  99. MOVNTQ" %%mm6, 48(%1)\n"
  100. MOVNTQ" %%mm7, 56(%1)\n"
  101. :: "r" (from), "r" (to) : "memory");
  102. - ((const unsigned char *)from)+=64;
  103. - ((unsigned char *)to)+=64;
  104. + from+=64;
  105. + to+=64;
  106. }
  107. // printf(" %d %d\n", (int)from&1023, (int)to&1023);
  108. @@ -338,8 +338,8 @@
  109. MOVNTQ" %%mm6, 48(%1)\n"
  110. MOVNTQ" %%mm7, 56(%1)\n"
  111. :: "r" (from), "r" (to) : "memory");
  112. - ((const unsigned char *)from)+=64;
  113. - ((unsigned char *)to)+=64;
  114. + from+=64;
  115. + to+=64;
  116. }
  117. #endif /* Have SSE */
  118. diff -Nur MPlayer-1.0pre7.orig/mmx.h MPlayer-1.0pre7/mmx.h
  119. --- MPlayer-1.0pre7.orig/mmx.h 2001-10-28 13:47:21.000000000 +0200
  120. +++ MPlayer-1.0pre7/mmx.h 2005-09-25 10:31:27.000000000 +0300
  121. @@ -353,11 +353,11 @@
  122. #define mmx_m2r(op, mem, reg) \
  123. __asm__ __volatile__ (#op " %0, %%" #reg \
  124. : /* nothing */ \
  125. - : "X" (mem))
  126. + : "m" (mem))
  127. #define mmx_r2m(op, reg, mem) \
  128. __asm__ __volatile__ (#op " %%" #reg ", %0" \
  129. - : "=X" (mem) \
  130. + : "=m" (mem) \
  131. : /* nothing */ )
  132. #define mmx_r2r(op, regs, regd) \
  133. @@ -367,8 +367,8 @@
  134. __asm__ __volatile__ ("movq %0, %%mm0\n\t" \
  135. #op " %1, %%mm0\n\t" \
  136. "movq %%mm0, %0" \
  137. - : "=X" (memd) \
  138. - : "X" (mems))
  139. + : "=m" (memd) \
  140. + : "m" (mems))
  141. #endif
  142. diff -Nur MPlayer-1.0pre7.orig/postproc/swscale_template.c MPlayer-1.0pre7/postproc/swscale_template.c
  143. --- MPlayer-1.0pre7.orig/postproc/swscale_template.c 2005-02-17 01:47:00.000000000 +0200
  144. +++ MPlayer-1.0pre7/postproc/swscale_template.c 2005-09-25 10:31:27.000000000 +0300
  145. @@ -2136,6 +2136,7 @@
  146. else
  147. {
  148. long counter= -2*dstW;
  149. + uint8_t* ptr=src+filterSize;
  150. // filter-= counter*filterSize/2;
  151. filterPos-= counter/2;
  152. dst-= counter/2;
  153. @@ -2177,7 +2178,7 @@
  154. " jnc 1b \n\t"
  155. : "+r" (counter), "+r" (filter)
  156. - : "m" (filterPos), "m" (dst), "m"(src+filterSize),
  157. + : "m" (filterPos), "m" (dst), "m"(ptr),
  158. "m" (src), "r" ((long)filterSize*2)
  159. : "%"REG_b, "%"REG_a, "%"REG_c
  160. );
  161. @@ -2320,6 +2321,8 @@
  162. {
  163. #endif
  164. //NO MMX just normal asm ...
  165. + int xInc_hi=xInc>>16;
  166. + int xInc_lo=xInc&0xffff;
  167. asm volatile(
  168. "xor %%"REG_a", %%"REG_a" \n\t" // i
  169. "xor %%"REG_b", %%"REG_b" \n\t" // xx
  170. @@ -2356,7 +2359,7 @@
  171. " jb 1b \n\t"
  172. - :: "r" (src), "m" (dst), "m" (dstWidth), "m" (xInc>>16), "m" (xInc&0xFFFF)
  173. + :: "r" (src), "m" (dst), "m" (dstWidth), "m" (xInc_hi), "m" (xInc_lo)
  174. : "%"REG_a, "%"REG_b, "%ecx", "%"REG_D, "%esi"
  175. );
  176. #ifdef HAVE_MMX2
  177. @@ -2515,6 +2518,8 @@
  178. else
  179. {
  180. #endif
  181. + int xInc_hi=xInc>>16;
  182. + int xInc_lo=xInc&0xffff;
  183. asm volatile(
  184. "xor %%"REG_a", %%"REG_a" \n\t" // i
  185. "xor %%"REG_b", %%"REG_b" \n\t" // xx
  186. @@ -2548,7 +2553,7 @@
  187. "cmp %2, %%"REG_a" \n\t"
  188. " jb 1b \n\t"
  189. - :: "m" (src1), "m" (dst), "m" ((long)dstWidth), "m" ((long)(xInc>>16)), "m" ((xInc&0xFFFF)),
  190. + :: "m" (src1), "m" (dst), "m" ((long)dstWidth), "m" ((long)(xInc_hi)), "m" ((xInc_lo)),
  191. "r" (src2)
  192. : "%"REG_a, "%"REG_b, "%ecx", "%"REG_D, "%esi"
  193. );