libmpeg2-0.5.1-gcc4.6.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. --- libmpeg2-0.5.1/libmpeg2/idct_mmx.c.orig 2011-05-13 09:23:02.557758717 -0300
  2. +++ libmpeg2-0.5.1/libmpeg2/idct_mmx.c 2011-05-13 09:23:06.346778580 -0300
  3. @@ -39,7 +39,6 @@
  4. #define rounder(bias) {round (bias), round (bias)}
  5. #define rounder_sse2(bias) {round (bias), round (bias), round (bias), round (bias)}
  6. -
  7. #if 0
  8. /* C row IDCT - it is just here to document the MMXEXT and MMX versions */
  9. static inline void idct_row (int16_t * row, int offset,
  10. @@ -464,10 +463,10 @@ static inline void sse2_idct_col (int16_
  11. /* Almost identical to mmxext version: */
  12. /* just do both 4x8 columns in paraller */
  13. - static const short t1_vector[] ATTR_ALIGN(16) = {T1,T1,T1,T1,T1,T1,T1,T1};
  14. - static const short t2_vector[] ATTR_ALIGN(16) = {T2,T2,T2,T2,T2,T2,T2,T2};
  15. - static const short t3_vector[] ATTR_ALIGN(16) = {T3,T3,T3,T3,T3,T3,T3,T3};
  16. - static const short c4_vector[] ATTR_ALIGN(16) = {C4,C4,C4,C4,C4,C4,C4,C4};
  17. + static/* const*/ short t1_vector[] ATTR_ALIGN(16) = {T1,T1,T1,T1,T1,T1,T1,T1};
  18. + static/* const*/ short t2_vector[] ATTR_ALIGN(16) = {T2,T2,T2,T2,T2,T2,T2,T2};
  19. + static/* const*/ short t3_vector[] ATTR_ALIGN(16) = {T3,T3,T3,T3,T3,T3,T3,T3};
  20. + static/* const*/ short c4_vector[] ATTR_ALIGN(16) = {C4,C4,C4,C4,C4,C4,C4,C4};
  21. #if defined(__x86_64__)
  22. @@ -710,10 +709,10 @@ static inline void sse2_idct_col (int16_
  23. /* MMX column IDCT */
  24. static inline void idct_col (int16_t * const col, const int offset)
  25. {
  26. - static const short t1_vector[] ATTR_ALIGN(8) = {T1,T1,T1,T1};
  27. - static const short t2_vector[] ATTR_ALIGN(8) = {T2,T2,T2,T2};
  28. - static const short t3_vector[] ATTR_ALIGN(8) = {T3,T3,T3,T3};
  29. - static const short c4_vector[] ATTR_ALIGN(8) = {C4,C4,C4,C4};
  30. + static/* const*/ short t1_vector[] ATTR_ALIGN(8) = {T1,T1,T1,T1};
  31. + static/* const*/ short t2_vector[] ATTR_ALIGN(8) = {T2,T2,T2,T2};
  32. + static/* const*/ short t3_vector[] ATTR_ALIGN(8) = {T3,T3,T3,T3};
  33. + static/* const*/ short c4_vector[] ATTR_ALIGN(8) = {C4,C4,C4,C4};
  34. /* column code adapted from peter gubanov */
  35. /* http://www.elecard.com/peter/idct.shtml */
  36. @@ -847,33 +846,33 @@ static inline void idct_col (int16_t * c
  37. }
  38. -static const int32_t rounder0[] ATTR_ALIGN(8) =
  39. +static/* const*/ int32_t rounder0[] ATTR_ALIGN(8) =
  40. rounder ((1 << (COL_SHIFT - 1)) - 0.5);
  41. -static const int32_t rounder4[] ATTR_ALIGN(8) = rounder (0);
  42. -static const int32_t rounder1[] ATTR_ALIGN(8) =
  43. +static/* const*/ int32_t rounder4[] ATTR_ALIGN(8) = rounder (0);
  44. +static/* const*/ int32_t rounder1[] ATTR_ALIGN(8) =
  45. rounder (1.25683487303); /* C1*(C1/C4+C1+C7)/2 */
  46. -static const int32_t rounder7[] ATTR_ALIGN(8) =
  47. +static/* const*/ int32_t rounder7[] ATTR_ALIGN(8) =
  48. rounder (-0.25); /* C1*(C7/C4+C7-C1)/2 */
  49. -static const int32_t rounder2[] ATTR_ALIGN(8) =
  50. +static/* const*/ int32_t rounder2[] ATTR_ALIGN(8) =
  51. rounder (0.60355339059); /* C2 * (C6+C2)/2 */
  52. -static const int32_t rounder6[] ATTR_ALIGN(8) =
  53. +static/* const*/ int32_t rounder6[] ATTR_ALIGN(8) =
  54. rounder (-0.25); /* C2 * (C6-C2)/2 */
  55. -static const int32_t rounder3[] ATTR_ALIGN(8) =
  56. +static/* const*/ int32_t rounder3[] ATTR_ALIGN(8) =
  57. rounder (0.087788325588); /* C3*(-C3/C4+C3+C5)/2 */
  58. -static const int32_t rounder5[] ATTR_ALIGN(8) =
  59. +static/* const*/ int32_t rounder5[] ATTR_ALIGN(8) =
  60. rounder (-0.441341716183); /* C3*(-C5/C4+C5-C3)/2 */
  61. #define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \
  62. static inline void idct (int16_t * const block) \
  63. { \
  64. - static const int16_t table04[] ATTR_ALIGN(16) = \
  65. + static/* const*/ int16_t table04[] ATTR_ALIGN(16) = \
  66. table (22725, 21407, 19266, 16384, 12873, 8867, 4520); \
  67. - static const int16_t table17[] ATTR_ALIGN(16) = \
  68. + static/* const*/ int16_t table17[] ATTR_ALIGN(16) = \
  69. table (31521, 29692, 26722, 22725, 17855, 12299, 6270); \
  70. - static const int16_t table26[] ATTR_ALIGN(16) = \
  71. + static/* const*/ int16_t table26[] ATTR_ALIGN(16) = \
  72. table (29692, 27969, 25172, 21407, 16819, 11585, 5906); \
  73. - static const int16_t table35[] ATTR_ALIGN(16) = \
  74. + static/* const*/ int16_t table35[] ATTR_ALIGN(16) = \
  75. table (26722, 25172, 22654, 19266, 15137, 10426, 5315); \
  76. \
  77. idct_row_head (block, 0*8, table04); \
  78. @@ -900,29 +899,29 @@ static inline void idct (int16_t * const
  79. static inline void sse2_idct (int16_t * const block)
  80. {
  81. - static const int16_t table04[] ATTR_ALIGN(16) =
  82. + static/* const*/ int16_t table04[] ATTR_ALIGN(16) =
  83. sse2_table (22725, 21407, 19266, 16384, 12873, 8867, 4520);
  84. - static const int16_t table17[] ATTR_ALIGN(16) =
  85. + static/* const*/ int16_t table17[] ATTR_ALIGN(16) =
  86. sse2_table (31521, 29692, 26722, 22725, 17855, 12299, 6270);
  87. - static const int16_t table26[] ATTR_ALIGN(16) =
  88. + static/* const*/ int16_t table26[] ATTR_ALIGN(16) =
  89. sse2_table (29692, 27969, 25172, 21407, 16819, 11585, 5906);
  90. - static const int16_t table35[] ATTR_ALIGN(16) =
  91. + static/* const*/ int16_t table35[] ATTR_ALIGN(16) =
  92. sse2_table (26722, 25172, 22654, 19266, 15137, 10426, 5315);
  93. - static const int32_t rounder0_128[] ATTR_ALIGN(16) =
  94. + static/* const*/ int32_t rounder0_128[] ATTR_ALIGN(16) =
  95. rounder_sse2 ((1 << (COL_SHIFT - 1)) - 0.5);
  96. - static const int32_t rounder4_128[] ATTR_ALIGN(16) = rounder_sse2 (0);
  97. - static const int32_t rounder1_128[] ATTR_ALIGN(16) =
  98. + static/* const*/ int32_t rounder4_128[] ATTR_ALIGN(16) = rounder_sse2 (0);
  99. + static/* const*/ int32_t rounder1_128[] ATTR_ALIGN(16) =
  100. rounder_sse2 (1.25683487303); /* C1*(C1/C4+C1+C7)/2 */
  101. - static const int32_t rounder7_128[] ATTR_ALIGN(16) =
  102. + static/* const*/ int32_t rounder7_128[] ATTR_ALIGN(16) =
  103. rounder_sse2 (-0.25); /* C1*(C7/C4+C7-C1)/2 */
  104. - static const int32_t rounder2_128[] ATTR_ALIGN(16) =
  105. + static/* const*/ int32_t rounder2_128[] ATTR_ALIGN(16) =
  106. rounder_sse2 (0.60355339059); /* C2 * (C6+C2)/2 */
  107. - static const int32_t rounder6_128[] ATTR_ALIGN(16) =
  108. + static/* const*/ int32_t rounder6_128[] ATTR_ALIGN(16) =
  109. rounder_sse2 (-0.25); /* C2 * (C6-C2)/2 */
  110. - static const int32_t rounder3_128[] ATTR_ALIGN(16) =
  111. + static/* const*/ int32_t rounder3_128[] ATTR_ALIGN(16) =
  112. rounder_sse2 (0.087788325588); /* C3*(-C3/C4+C3+C5)/2 */
  113. - static const int32_t rounder5_128[] ATTR_ALIGN(16) =
  114. + static/* const*/ int32_t rounder5_128[] ATTR_ALIGN(16) =
  115. rounder_sse2 (-0.441341716183); /* C3*(-C5/C4+C5-C3)/2 */
  116. #if defined(__x86_64__)