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.

69 lines
1.9KB

  1. ;******************************************************************************
  2. ;* x86-SIMD-optimized IDCT for prores
  3. ;* this is identical to "simple" IDCT written by Michael Niedermayer
  4. ;* except for the clip range
  5. ;*
  6. ;* Copyright (c) 2011 Ronald S. Bultje <rsbultje@gmail.com>
  7. ;*
  8. ;* This file is part of FFmpeg.
  9. ;*
  10. ;* FFmpeg is free software; you can redistribute it and/or
  11. ;* modify it under the terms of the GNU Lesser General Public
  12. ;* License as published by the Free Software Foundation; either
  13. ;* version 2.1 of the License, or (at your option) any later version.
  14. ;*
  15. ;* FFmpeg is distributed in the hope that it will be useful,
  16. ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. ;* Lesser General Public License for more details.
  19. ;*
  20. ;* You should have received a copy of the GNU Lesser General Public
  21. ;* License along with FFmpeg; if not, write to the Free Software
  22. ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. ;******************************************************************************
  24. %include "libavutil/x86/x86util.asm"
  25. %if ARCH_X86_64
  26. SECTION_RODATA
  27. pw_88: times 8 dw 0x2008
  28. cextern pw_1
  29. cextern pw_4
  30. cextern pw_1019
  31. ; Below are defined in simple_idct10.asm built from selecting idctdsp
  32. cextern w4_plus_w2_hi
  33. cextern w4_min_w2_hi
  34. cextern w4_plus_w6_hi
  35. cextern w4_min_w6_hi
  36. cextern w1_plus_w3_hi
  37. cextern w3_min_w1_hi
  38. cextern w7_plus_w3_hi
  39. cextern w3_min_w7_hi
  40. cextern w1_plus_w5
  41. cextern w5_min_w1
  42. cextern w5_plus_w7
  43. cextern w7_min_w5
  44. %include "libavcodec/x86/simple_idct10_template.asm"
  45. SECTION .text
  46. define_constants _hi
  47. %macro idct_fn 0
  48. cglobal prores_idct_put_10, 4, 4, 15, pixels, lsize, block, qmat
  49. IDCT_FN pw_1, 15, pw_88, 18, "put", pw_4, pw_1019, r3
  50. RET
  51. %endmacro
  52. INIT_XMM sse2
  53. idct_fn
  54. %if HAVE_AVX_EXTERNAL
  55. INIT_XMM avx
  56. idct_fn
  57. %endif
  58. %endif