Advertisement
Guest User

Patch ffmpeg libs for static link amd64 linux to shared lib

a guest
Apr 17th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 11.09 KB | None | 0 0
  1. diff -wurN ffmpeg/libavcodec/aacsbrdata.h ffmpeg.new/libavcodec/aacsbrdata.h
  2. --- ffmpeg/libavcodec/aacsbrdata.h  2014-02-23 21:59:03.000000000 +0000
  3. +++ ffmpeg.new/libavcodec/aacsbrdata.h  2014-04-14 16:00:35.000000000 +0100
  4. @@ -353,7 +353,7 @@
  5.  };
  6.  
  7.  /* First eight entries repeated at end to simplify SIMD implementations. */
  8. -const DECLARE_ALIGNED(16, float, ff_sbr_noise_table)[][2] = {
  9. +const DECLARE_ALIGNED(16, float, __attribute__((visibility("hidden"))) ff_sbr_noise_table)[][2] = {
  10.  {-0.99948153278296, -0.59483417516607}, { 0.97113454393991, -0.67528515225647},
  11.  { 0.14130051758487, -0.95090983575689}, {-0.47005496701697, -0.37340549728647},
  12.  { 0.80705063769351,  0.29653668284408}, {-0.38981478896926,  0.89572605717087},
  13. diff -wurN ffmpeg/libavcodec/ac3dsp.c ffmpeg.new/libavcodec/ac3dsp.c
  14. --- ffmpeg/libavcodec/ac3dsp.c  2014-02-23 21:59:03.000000000 +0000
  15. +++ ffmpeg.new/libavcodec/ac3dsp.c  2014-04-14 15:46:33.000000000 +0100
  16. @@ -138,7 +138,7 @@
  17.          mant_cnt[bap[len]]++;
  18.  }
  19.  
  20. -DECLARE_ALIGNED(16, const uint16_t, ff_ac3_bap_bits)[16] = {
  21. +DECLARE_ALIGNED(16, const uint16_t, __attribute__((visibility("hidden"))) ff_ac3_bap_bits)[16] = {
  22.      0,  0,  0,  3,  0,  4,  5,  6,  7,  8,  9, 10, 11, 12, 14, 16
  23.  };
  24.  
  25. diff -wurN ffmpeg/libavcodec/cabac.c ffmpeg.new/libavcodec/cabac.c
  26. --- ffmpeg/libavcodec/cabac.c   2014-02-23 21:59:03.000000000 +0000
  27. +++ ffmpeg.new/libavcodec/cabac.c   2014-04-14 14:09:38.000000000 +0100
  28. @@ -31,7 +31,7 @@
  29.  #include "cabac.h"
  30.  #include "cabac_functions.h"
  31.  
  32. -uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63] = {
  33. +uint8_t __attribute__((visibility("hidden"))) ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63] = {
  34.   9,8,7,7,6,6,6,6,5,5,5,5,5,5,5,5,
  35.   4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
  36.   3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
  37. diff -wurN ffmpeg/libavcodec/fft.h ffmpeg.new/libavcodec/fft.h
  38. --- ffmpeg/libavcodec/fft.h 2014-02-23 21:59:04.000000000 +0000
  39. +++ ffmpeg.new/libavcodec/fft.h 2014-04-14 17:21:10.000000000 +0100
  40. @@ -113,7 +113,7 @@
  41.  #endif
  42.  
  43.  #define COSTABLE(size) \
  44. -    COSTABLE_CONST DECLARE_ALIGNED(32, FFTSample, FFT_NAME(ff_cos_##size))[size/2]
  45. +  COSTABLE_CONST DECLARE_ALIGNED(32, FFTSample, __attribute__((visibility("hidden"))) FFT_NAME(ff_cos_##size))[size/2]
  46.  
  47.  extern COSTABLE(16);
  48.  extern COSTABLE(32);
  49. diff -wurN ffmpeg/libavcodec/h263data.h ffmpeg.new/libavcodec/h263data.h
  50. --- ffmpeg/libavcodec/h263data.h    2013-10-08 18:52:32.000000000 +0100
  51. +++ ffmpeg.new/libavcodec/h263data.h    2014-04-14 14:22:48.000000000 +0100
  52. @@ -272,7 +272,7 @@
  53.        6,   7,   9,  11,  13,  14,  14
  54.  };
  55.  
  56. -const uint8_t ff_h263_loop_filter_strength[32]={
  57. +const uint8_t __attribute__((visibility("hidden"))) ff_h263_loop_filter_strength[32]={
  58.  //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  59.      0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9,10,10,10,11,11,11,12,12,12
  60.  };
  61. diff -wurN ffmpeg/libavcodec/x86/constants.c ffmpeg.new/libavcodec/x86/constants.c
  62. --- ffmpeg/libavcodec/x86/constants.c   2014-02-23 21:59:07.000000000 +0000
  63. +++ ffmpeg.new/libavcodec/x86/constants.c   2014-04-14 14:15:22.000000000 +0100
  64. @@ -24,30 +24,30 @@
  65.  
  66.  DECLARE_ALIGNED(8,  const uint64_t, ff_wtwo) = 0x0002000200020002ULL;
  67.  
  68. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_1)    = { 0x0001000100010001ULL, 0x0001000100010001ULL };
  69. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_2)    = { 0x0002000200020002ULL, 0x0002000200020002ULL };
  70. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_3)    = { 0x0003000300030003ULL, 0x0003000300030003ULL };
  71. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_4)    = { 0x0004000400040004ULL, 0x0004000400040004ULL };
  72. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_5)    = { 0x0005000500050005ULL, 0x0005000500050005ULL };
  73. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_8)    = { 0x0008000800080008ULL, 0x0008000800080008ULL };
  74. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_9)    = { 0x0009000900090009ULL, 0x0009000900090009ULL };
  75. -DECLARE_ALIGNED(8,  const uint64_t, ff_pw_15)   =   0x000F000F000F000FULL;
  76. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_16)   = { 0x0010001000100010ULL, 0x0010001000100010ULL };
  77. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_17)   = { 0x0011001100110011ULL, 0x0011001100110011ULL };
  78. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_18)   = { 0x0012001200120012ULL, 0x0012001200120012ULL };
  79. -DECLARE_ALIGNED(8,  const uint64_t, ff_pw_20)   =   0x0014001400140014ULL;
  80. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_32)   = { 0x0020002000200020ULL, 0x0020002000200020ULL };
  81. -DECLARE_ALIGNED(8,  const uint64_t, ff_pw_42)   =   0x002A002A002A002AULL;
  82. -DECLARE_ALIGNED(8,  const uint64_t, ff_pw_53)   =   0x0035003500350035ULL;
  83. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_64)   = { 0x0040004000400040ULL, 0x0040004000400040ULL };
  84. -DECLARE_ALIGNED(8,  const uint64_t, ff_pw_96)   =   0x0060006000600060ULL;
  85. -DECLARE_ALIGNED(8,  const uint64_t, ff_pw_128)  =   0x0080008000800080ULL;
  86. -DECLARE_ALIGNED(8,  const uint64_t, ff_pw_255)  =   0x00ff00ff00ff00ffULL;
  87. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_512)  = { 0x0200020002000200ULL, 0x0200020002000200ULL };
  88. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_1019) = { 0x03FB03FB03FB03FBULL, 0x03FB03FB03FB03FBULL };
  89. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_1)    = { 0x0001000100010001ULL, 0x0001000100010001ULL };
  90. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_2)    = { 0x0002000200020002ULL, 0x0002000200020002ULL };
  91. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_3)    = { 0x0003000300030003ULL, 0x0003000300030003ULL };
  92. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_4)    = { 0x0004000400040004ULL, 0x0004000400040004ULL };
  93. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_5)    = { 0x0005000500050005ULL, 0x0005000500050005ULL };
  94. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_8)    = { 0x0008000800080008ULL, 0x0008000800080008ULL };
  95. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_9)    = { 0x0009000900090009ULL, 0x0009000900090009ULL };
  96. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pw_15)   =   0x000F000F000F000FULL;
  97. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_16)   = { 0x0010001000100010ULL, 0x0010001000100010ULL };
  98. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_17)   = { 0x0011001100110011ULL, 0x0011001100110011ULL };
  99. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_18)   = { 0x0012001200120012ULL, 0x0012001200120012ULL };
  100. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pw_20)   =   0x0014001400140014ULL;
  101. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_32)   = { 0x0020002000200020ULL, 0x0020002000200020ULL };
  102. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pw_42)   =   0x002A002A002A002AULL;
  103. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pw_53)   =   0x0035003500350035ULL;
  104. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_64)   = { 0x0040004000400040ULL, 0x0040004000400040ULL };
  105. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pw_96)   =   0x0060006000600060ULL;
  106. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pw_128)  =   0x0080008000800080ULL;
  107. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pw_255)  =   0x00ff00ff00ff00ffULL;
  108. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_512)  = { 0x0200020002000200ULL, 0x0200020002000200ULL };
  109. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pw_1019) = { 0x03FB03FB03FB03FBULL, 0x03FB03FB03FB03FBULL };
  110.  
  111. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pb_0)    = { 0x0000000000000000ULL, 0x0000000000000000ULL };
  112. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pb_1)    = { 0x0101010101010101ULL, 0x0101010101010101ULL };
  113. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pb_3)    = { 0x0303030303030303ULL, 0x0303030303030303ULL };
  114. -DECLARE_ALIGNED(16, const xmm_reg,  ff_pb_80)   = { 0x8080808080808080ULL, 0x8080808080808080ULL };
  115. -DECLARE_ALIGNED(8,  const uint64_t, ff_pb_FC)   =   0xFCFCFCFCFCFCFCFCULL;
  116. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pb_0)    = { 0x0000000000000000ULL, 0x0000000000000000ULL };
  117. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pb_1)    = { 0x0101010101010101ULL, 0x0101010101010101ULL };
  118. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pb_3)    = { 0x0303030303030303ULL, 0x0303030303030303ULL };
  119. +DECLARE_ALIGNED(16, const xmm_reg,  __attribute__((visibility("hidden"))) ff_pb_80)   = { 0x8080808080808080ULL, 0x8080808080808080ULL };
  120. +DECLARE_ALIGNED(8,  const uint64_t, __attribute__((visibility("hidden"))) ff_pb_FC)   =   0xFCFCFCFCFCFCFCFCULL;
  121. diff -wurN ffmpeg/libswscale/x86/swscale.c ffmpeg.new/libswscale/x86/swscale.c
  122. --- ffmpeg/libswscale/x86/swscale.c 2014-02-23 21:59:11.000000000 +0000
  123. +++ ffmpeg.new/libswscale/x86/swscale.c 2014-04-14 13:52:44.000000000 +0100
  124. @@ -54,17 +54,17 @@
  125.  DECLARE_ASM_CONST(8, uint64_t, g15Mask)=   0x03E003E003E003E0LL;
  126.  DECLARE_ASM_CONST(8, uint64_t, r15Mask)=   0x7C007C007C007C00LL;
  127.  
  128. -DECLARE_ALIGNED(8, const uint64_t, ff_M24A)         = 0x00FF0000FF0000FFLL;
  129. -DECLARE_ALIGNED(8, const uint64_t, ff_M24B)         = 0xFF0000FF0000FF00LL;
  130. -DECLARE_ALIGNED(8, const uint64_t, ff_M24C)         = 0x0000FF0000FF0000LL;
  131. -
  132. -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YCoeff)   = 0x000020E540830C8BULL;
  133. -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UCoeff)   = 0x0000ED0FDAC23831ULL;
  134. -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2VCoeff)   = 0x00003831D0E6F6EAULL;
  135. -
  136. -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YOffset)  = 0x1010101010101010ULL;
  137. -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL;
  138. -DECLARE_ALIGNED(8, const uint64_t, ff_w1111)        = 0x0001000100010001ULL;
  139. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_M24A)         = 0x00FF0000FF0000FFLL;
  140. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_M24B)         = 0xFF0000FF0000FF00LL;
  141. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_M24C)         = 0x0000FF0000FF0000LL;
  142. +
  143. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_bgr2YCoeff)   = 0x000020E540830C8BULL;
  144. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_bgr2UCoeff)   = 0x0000ED0FDAC23831ULL;
  145. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_bgr2VCoeff)   = 0x00003831D0E6F6EAULL;
  146. +
  147. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_bgr2YOffset)  = 0x1010101010101010ULL;
  148. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_bgr2UVOffset) = 0x8080808080808080ULL;
  149. +DECLARE_ALIGNED(8, const uint64_t, __attribute__((visibility("hidden"))) ff_w1111)        = 0x0001000100010001ULL;
  150.  
  151.  
  152.  //MMX versions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement