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.

190 lines
6.3 KiB

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