patch-libavcodec_arm_synth_filter_vfp_S 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --- ffmpeg-3.4.1.orig/libavcodec/arm/synth_filter_vfp.S 2016-03-29 04:25:11.000000000 +0200
  2. +++ ffmpeg-3.4.1/libavcodec/arm/synth_filter_vfp.S 2017-07-27 02:09:00.326946211 +0200
  3. @@ -1,6 +1,5 @@
  4. /*
  5. * Copyright (c) 2013 RISC OS Open Ltd
  6. - * Author: Ben Avison <bavison@riscosopen.org>
  7. *
  8. * This file is part of FFmpeg.
  9. *
  10. @@ -17,6 +16,8 @@
  11. * You should have received a copy of the GNU Lesser General Public
  12. * License along with FFmpeg; if not, write to the Free Software
  13. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  14. + *
  15. + * Author: Ben Avison <bavison@riscosopen.org>
  16. */
  17. #include "libavutil/arm/asm.S"
  18. @@ -124,7 +125,7 @@ function ff_synth_filter_float_vfp, expo
  19. push {r3-r7,lr}
  20. vpush {s16-s31}
  21. ldr lr, [P_SB_OFF]
  22. - add a2, ORIG_P_SB, lr, lsl #2 @ calculate synth_buf to pass to imdct_half
  23. + add a2, ORIG_P_SB, lr, LSL #2 @ calculate synth_buf to pass to imdct_half
  24. mov P_SB, a2 @ and keep a copy for ourselves
  25. bic J_WRAP, lr, #63 @ mangled to make testing for wrap easier in inner loop
  26. sub lr, lr, #32
  27. @@ -132,12 +133,12 @@ function ff_synth_filter_float_vfp, expo
  28. str lr, [P_SB_OFF] @ rotate offset, modulo buffer size, ready for next call
  29. ldr a3, [sp, #(16+6+2)*4] @ fetch in from stack, to pass to imdct_half
  30. VFP vmov s16, SCALE @ imdct_half is free to corrupt s0, but it contains one of our arguments in hardfp case
  31. - bl X(ff_imdct_half_vfp)
  32. + bl ff_imdct_half_c
  33. VFP vmov SCALE, s16
  34. - fmrx OLDFPSCR, FPSCR
  35. + vmrs OLDFPSCR, FPSCR
  36. ldr lr, =0x03030000 @ RunFast mode, short vectors of length 4, stride 1
  37. - fmxr FPSCR, lr
  38. + vmsr FPSCR, lr
  39. ldr P_SB2_DN, [sp, #16*4]
  40. ldr P_WIN_DN, [sp, #(16+6+0)*4]
  41. ldr P_OUT_DN, [sp, #(16+6+1)*4]
  42. @@ -196,48 +197,10 @@ NOVFP vldr SCALE, [sp, #(16+6+3)*4]
  43. vstmdb P_SB2_DN!, {VD0-VD3}
  44. bne 1b
  45. - fmxr FPSCR, OLDFPSCR
  46. + vmsr FPSCR, OLDFPSCR
  47. vpop {s16-s31}
  48. pop {r3-r7,pc}
  49. endfunc
  50. - .unreq IMDCT
  51. - .unreq ORIG_P_SB
  52. - .unreq P_SB_OFF
  53. - .unreq I
  54. - .unreq P_SB2_UP
  55. - .unreq OLDFPSCR
  56. - .unreq P_SB2_DN
  57. - .unreq P_WIN_DN
  58. - .unreq P_OUT_DN
  59. - .unreq P_SB
  60. - .unreq J_WRAP
  61. - .unreq P_WIN_UP
  62. - .unreq P_OUT_UP
  63. -
  64. - .unreq SCALE
  65. - .unreq SBUF_DAT_REV0
  66. - .unreq SBUF_DAT_REV1
  67. - .unreq SBUF_DAT_REV2
  68. - .unreq SBUF_DAT_REV3
  69. - .unreq VA0
  70. - .unreq VA3
  71. - .unreq VB0
  72. - .unreq VB3
  73. - .unreq VC0
  74. - .unreq VC3
  75. - .unreq VD0
  76. - .unreq VD3
  77. - .unreq SBUF_DAT0
  78. - .unreq SBUF_DAT1
  79. - .unreq SBUF_DAT2
  80. - .unreq SBUF_DAT3
  81. - .unreq SBUF_DAT_ALT0
  82. - .unreq SBUF_DAT_ALT1
  83. - .unreq SBUF_DAT_ALT2
  84. - .unreq SBUF_DAT_ALT3
  85. - .unreq WIN_DN_DAT0
  86. - .unreq WIN_UP_DAT0
  87. -
  88. .align 3
  89. zero: .word 0, 0