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.

78 lines
3.1KB

  1. /*
  2. * DSP utils : average functions are compiled twice for 3dnow/mmxext
  3. * Copyright (c) 2000, 2001 Fabrice Bellard
  4. * Copyright (c) 2002-2004 Michael Niedermayer
  5. *
  6. * MMX optimization by Nick Kurshev <nickols_k@mail.ru>
  7. * mostly rewritten by Michael Niedermayer <michaelni@gmx.at>
  8. * and improved by Zdenek Kabelac <kabi@users.sf.net>
  9. *
  10. * This file is part of FFmpeg.
  11. *
  12. * FFmpeg is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU Lesser General Public
  14. * License as published by the Free Software Foundation; either
  15. * version 2.1 of the License, or (at your option) any later version.
  16. *
  17. * FFmpeg is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. * Lesser General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Lesser General Public
  23. * License along with FFmpeg; if not, write to the Free Software
  24. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  25. */
  26. //FIXME the following could be optimized too ...
  27. static void DEF(ff_put_no_rnd_pixels16_x2)(uint8_t *block,
  28. const uint8_t *pixels,
  29. ptrdiff_t line_size, int h)
  30. {
  31. DEF(ff_put_no_rnd_pixels8_x2)(block, pixels, line_size, h);
  32. DEF(ff_put_no_rnd_pixels8_x2)(block + 8, pixels + 8, line_size, h);
  33. }
  34. static void DEF(ff_put_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
  35. ptrdiff_t line_size, int h)
  36. {
  37. DEF(ff_put_pixels8_y2)(block, pixels, line_size, h);
  38. DEF(ff_put_pixels8_y2)(block + 8, pixels + 8, line_size, h);
  39. }
  40. static void DEF(ff_put_no_rnd_pixels16_y2)(uint8_t *block,
  41. const uint8_t *pixels,
  42. ptrdiff_t line_size, int h)
  43. {
  44. DEF(ff_put_no_rnd_pixels8_y2)(block, pixels, line_size, h);
  45. DEF(ff_put_no_rnd_pixels8_y2)(block + 8, pixels + 8, line_size, h);
  46. }
  47. static void DEF(ff_avg_pixels16)(uint8_t *block, const uint8_t *pixels,
  48. ptrdiff_t line_size, int h)
  49. {
  50. DEF(ff_avg_pixels8)(block, pixels, line_size, h);
  51. DEF(ff_avg_pixels8)(block + 8, pixels + 8, line_size, h);
  52. }
  53. static void DEF(ff_avg_pixels16_x2)(uint8_t *block, const uint8_t *pixels,
  54. ptrdiff_t line_size, int h)
  55. {
  56. DEF(ff_avg_pixels8_x2)(block, pixels, line_size, h);
  57. DEF(ff_avg_pixels8_x2)(block + 8, pixels + 8, line_size, h);
  58. }
  59. static void DEF(ff_avg_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
  60. ptrdiff_t line_size, int h)
  61. {
  62. DEF(ff_avg_pixels8_y2)(block, pixels, line_size, h);
  63. DEF(ff_avg_pixels8_y2)(block + 8, pixels + 8, line_size, h);
  64. }
  65. static void DEF(ff_avg_pixels16_xy2)(uint8_t *block, const uint8_t *pixels,
  66. ptrdiff_t line_size, int h)
  67. {
  68. DEF(ff_avg_pixels8_xy2)(block, pixels, line_size, h);
  69. DEF(ff_avg_pixels8_xy2)(block + 8, pixels + 8, line_size, h);
  70. }