vf_fspp_init.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
  3. * Copyright (C) 2005 Nikolaj Poroshin <porosh3@psu.ru>
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
  19. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  20. */
  21. #include "libavutil/attributes.h"
  22. #include "libavutil/x86/cpu.h"
  23. #include "libavfilter/vf_fspp.h"
  24. void ff_store_slice_mmx(uint8_t *dst, int16_t *src,
  25. ptrdiff_t dst_stride, ptrdiff_t src_stride,
  26. ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale);
  27. void ff_store_slice2_mmx(uint8_t *dst, int16_t *src,
  28. ptrdiff_t dst_stride, ptrdiff_t src_stride,
  29. ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale);
  30. void ff_mul_thrmat_mmx(int16_t *thr_adr_noq, int16_t *thr_adr, int q);
  31. void ff_column_fidct_mmx(int16_t *thr_adr, int16_t *data, int16_t *output, int cnt);
  32. void ff_row_idct_mmx(int16_t *workspace, int16_t *output_adr, ptrdiff_t output_stride, int cnt);
  33. void ff_row_fdct_mmx(int16_t *data, const uint8_t *pixels, ptrdiff_t line_size, int cnt);
  34. av_cold void ff_fspp_init_x86(FSPPContext *s)
  35. {
  36. int cpu_flags = av_get_cpu_flags();
  37. if (EXTERNAL_MMX(cpu_flags)) {
  38. s->store_slice = ff_store_slice_mmx;
  39. s->store_slice2 = ff_store_slice2_mmx;
  40. s->mul_thrmat = ff_mul_thrmat_mmx;
  41. s->column_fidct = ff_column_fidct_mmx;
  42. s->row_idct = ff_row_idct_mmx;
  43. s->row_fdct = ff_row_fdct_mmx;
  44. }
  45. }