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.

125 lines
6.8KB

  1. /*
  2. * Copyright (c) 2015 Shivraj Patil (Shivraj.Patil@imgtec.com)
  3. *
  4. * This file is part of FFmpeg.
  5. *
  6. * FFmpeg is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * FFmpeg is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with FFmpeg; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H
  21. #define AVCODEC_MIPS_VP9DSP_MIPS_H
  22. #define VP9_8TAP_MIPS_MSA_FUNC(SIZE, type, type_idx) \
  23. void ff_put_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \
  24. const uint8_t *src, \
  25. ptrdiff_t srcstride, \
  26. int h, int mx, int my); \
  27. \
  28. void ff_put_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
  29. const uint8_t *src, \
  30. ptrdiff_t srcstride, \
  31. int h, int mx, int my); \
  32. \
  33. void ff_put_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
  34. const uint8_t *src, \
  35. ptrdiff_t srcstride, \
  36. int h, int mx, int my); \
  37. \
  38. void ff_avg_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \
  39. const uint8_t *src, \
  40. ptrdiff_t srcstride, \
  41. int h, int mx, int my); \
  42. \
  43. void ff_avg_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
  44. const uint8_t *src, \
  45. ptrdiff_t srcstride, \
  46. int h, int mx, int my); \
  47. \
  48. void ff_avg_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
  49. const uint8_t *src, \
  50. ptrdiff_t srcstride, \
  51. int h, int mx, int my);
  52. #define VP9_COPY_AVG_MIPS_MSA_FUNC(SIZE) \
  53. void ff_copy##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \
  54. const uint8_t *src, ptrdiff_t srcstride, \
  55. int h, int mx, int my); \
  56. \
  57. void ff_avg##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \
  58. const uint8_t *src, ptrdiff_t srcstride, \
  59. int h, int mx, int my);
  60. VP9_8TAP_MIPS_MSA_FUNC(64, regular, FILTER_8TAP_REGULAR);
  61. VP9_8TAP_MIPS_MSA_FUNC(32, regular, FILTER_8TAP_REGULAR);
  62. VP9_8TAP_MIPS_MSA_FUNC(16, regular, FILTER_8TAP_REGULAR);
  63. VP9_8TAP_MIPS_MSA_FUNC(8, regular, FILTER_8TAP_REGULAR);
  64. VP9_8TAP_MIPS_MSA_FUNC(4, regular, FILTER_8TAP_REGULAR);
  65. VP9_8TAP_MIPS_MSA_FUNC(64, sharp, FILTER_8TAP_SHARP);
  66. VP9_8TAP_MIPS_MSA_FUNC(32, sharp, FILTER_8TAP_SHARP);
  67. VP9_8TAP_MIPS_MSA_FUNC(16, sharp, FILTER_8TAP_SHARP);
  68. VP9_8TAP_MIPS_MSA_FUNC(8, sharp, FILTER_8TAP_SHARP);
  69. VP9_8TAP_MIPS_MSA_FUNC(4, sharp, FILTER_8TAP_SHARP);
  70. VP9_8TAP_MIPS_MSA_FUNC(64, smooth, FILTER_8TAP_SMOOTH);
  71. VP9_8TAP_MIPS_MSA_FUNC(32, smooth, FILTER_8TAP_SMOOTH);
  72. VP9_8TAP_MIPS_MSA_FUNC(16, smooth, FILTER_8TAP_SMOOTH);
  73. VP9_8TAP_MIPS_MSA_FUNC(8, smooth, FILTER_8TAP_SMOOTH);
  74. VP9_8TAP_MIPS_MSA_FUNC(4, smooth, FILTER_8TAP_SMOOTH);
  75. VP9_COPY_AVG_MIPS_MSA_FUNC(64);
  76. VP9_COPY_AVG_MIPS_MSA_FUNC(32);
  77. VP9_COPY_AVG_MIPS_MSA_FUNC(16);
  78. VP9_COPY_AVG_MIPS_MSA_FUNC(8);
  79. VP9_COPY_AVG_MIPS_MSA_FUNC(4);
  80. #undef VP9_8TAP_MIPS_MSA_FUNC
  81. #undef VP9_COPY_AVG_MIPS_MSA_FUNC
  82. void ff_loop_filter_h_4_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  83. int32_t i, int32_t h);
  84. void ff_loop_filter_h_8_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  85. int32_t i, int32_t h);
  86. void ff_loop_filter_h_16_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  87. int32_t i, int32_t h);
  88. void ff_loop_filter_v_4_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  89. int32_t i, int32_t h);
  90. void ff_loop_filter_v_8_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  91. int32_t i, int32_t h);
  92. void ff_loop_filter_v_16_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  93. int32_t i, int32_t h);
  94. void ff_loop_filter_h_44_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  95. int32_t i, int32_t h);
  96. void ff_loop_filter_h_88_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  97. int32_t i, int32_t h);
  98. void ff_loop_filter_h_16_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  99. int32_t i, int32_t h);
  100. void ff_loop_filter_v_44_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  101. int32_t i, int32_t h);
  102. void ff_loop_filter_v_88_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  103. int32_t i, int32_t h);
  104. void ff_loop_filter_v_16_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  105. int32_t i, int32_t h);
  106. void ff_loop_filter_h_48_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  107. int32_t i, int32_t h);
  108. void ff_loop_filter_h_84_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  109. int32_t i, int32_t h);
  110. void ff_loop_filter_v_48_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  111. int32_t i, int32_t h);
  112. void ff_loop_filter_v_84_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
  113. int32_t i, int32_t h);
  114. #endif // #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H