0018-deinterlace-merge-arm64-fix-linking-on-appleOS.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. From 648dae663d74c71bdbb8c2d9e31185f81dd672a0 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Mon, 12 Sep 2016 17:04:05 +0200
  4. Subject: [PATCH 18/18] deinterlace-merge-arm64: fix linking on appleOS
  5. ---
  6. modules/arm_neon/asm64.S | 46 ++++++++++++++++++++++++++
  7. modules/video_filter/deinterlace/merge_arm64.S | 14 ++++----
  8. 2 files changed, 52 insertions(+), 8 deletions(-)
  9. create mode 100644 modules/arm_neon/asm64.S
  10. diff --git a/modules/arm_neon/asm64.S b/modules/arm_neon/asm64.S
  11. new file mode 100644
  12. index 0000000..d778163
  13. --- /dev/null
  14. +++ b/modules/arm_neon/asm64.S
  15. @@ -0,0 +1,46 @@
  16. + //*****************************************************************************
  17. + // asm.S : defines and macros
  18. + //*****************************************************************************
  19. + // Copyright (C) 2012 David Geldreich <david.geldreich at free.fr>
  20. + // Copyright (C) 2016 Felix Paul Kühne <fkuehne at videolan.org>
  21. + //
  22. + // This program is free software; you can redistribute it and/or modify
  23. + // it under the terms of the GNU Lesser General Public License as published by
  24. + // the Free Software Foundation; either version 2.1 of the License, or
  25. + // (at your option) any later version.
  26. + //
  27. + // This program is distributed in the hope that it will be useful,
  28. + // but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  30. + // GNU Lesser General Public License for more details.
  31. + //
  32. + // You should have received a copy of the GNU Lesser General Public License
  33. + // along with this program; if not, write to the Free Software Foundation,
  34. + // Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  35. + //****************************************************************************/
  36. +
  37. +#ifdef __APPLE__
  38. +# define EXTERN_ASM _
  39. +#else
  40. +# define EXTERN_ASM
  41. +#endif
  42. +
  43. +# define ELF
  44. +
  45. +.macro function name, export=0
  46. + .macro endfunc
  47. + .size \name, . - \name
  48. + .endfunc
  49. + .purgem endfunc
  50. + .endm
  51. + .text
  52. + .align 2
  53. + .if \export
  54. + .global EXTERN_ASM\name
  55. +EXTERN_ASM\name:
  56. + .endif
  57. + .type \name, %function
  58. + .func \name
  59. +\name:
  60. +.endm
  61. +
  62. diff --git a/modules/video_filter/deinterlace/merge_arm64.S b/modules/video_filter/deinterlace/merge_arm64.S
  63. index ad898a3..27b662d 100644
  64. --- a/modules/video_filter/deinterlace/merge_arm64.S
  65. +++ b/modules/video_filter/deinterlace/merge_arm64.S
  66. @@ -19,6 +19,8 @@
  67. // Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  68. //****************************************************************************/
  69. +#include "../../arm_neon/asm64.S"
  70. +
  71. .text
  72. #define DEST x0
  73. @@ -26,11 +28,8 @@
  74. #define SRC2 x2
  75. #define SIZE x3
  76. - .align 2
  77. - .global merge8_arm64_neon
  78. - .type merge8_arm64_neon, %function
  79. // NOTE: Offset and pitch must be multiple of 16-bytes in VLC.
  80. -merge8_arm64_neon:
  81. +function merge8_arm64_neon, export=1
  82. ands x5, SIZE, #~63
  83. b.eq 2f
  84. mov x10, #64
  85. @@ -65,11 +64,9 @@ merge8_arm64_neon:
  86. st1 {v0.16b}, [DEST]
  87. 4:
  88. ret
  89. +endfunc
  90. - .align 2
  91. - .global merge16_arm64_neon
  92. - .type merge16_arm64_neon, %function
  93. -merge16_arm64_neon:
  94. +function merge16_arm64_neon, export=1
  95. ands x5, SIZE, #~63
  96. b.eq 2f
  97. 1:
  98. @@ -100,3 +97,4 @@ merge16_arm64_neon:
  99. st1 {v0.8h}, [DEST]
  100. 4:
  101. ret
  102. +endfunc
  103. --
  104. 2.9.3