swscale_loongarch.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (C) 2022 Loongson Technology Corporation Limited
  3. * Contributed by Hao Chen(chenhao@loongson.cn)
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (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 GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #ifndef SWSCALE_LOONGARCH_SWSCALE_LOONGARCH_H
  22. #define SWSCALE_LOONGARCH_SWSCALE_LOONGARCH_H
  23. #include "libswscale/swscale.h"
  24. #include "libswscale/swscale_internal.h"
  25. void ff_hscale_8_to_15_lasx(SwsContext *c, int16_t *dst, int dstW,
  26. const uint8_t *src, const int16_t *filter,
  27. const int32_t *filterPos, int filterSize);
  28. void ff_hscale_8_to_19_lasx(SwsContext *c, int16_t *_dst, int dstW,
  29. const uint8_t *src, const int16_t *filter,
  30. const int32_t *filterPos, int filterSize);
  31. void ff_hscale_16_to_19_lasx(SwsContext *c, int16_t *_dst, int dstW,
  32. const uint8_t *_src, const int16_t *filter,
  33. const int32_t *filterPos, int filterSize);
  34. void ff_hscale_16_to_15_lasx(SwsContext *c, int16_t *dst, int dstW,
  35. const uint8_t *_src, const int16_t *filter,
  36. const int32_t *filterPos, int filterSize);
  37. void planar_rgb_to_uv_lasx(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *src[4],
  38. int width, int32_t *rgb2yuv, void *opq);
  39. void planar_rgb_to_y_lasx(uint8_t *_dst, const uint8_t *src[4], int width,
  40. int32_t *rgb2yuv, void *opq);
  41. int yuv420_rgb24_lasx(SwsContext *c, const uint8_t *src[], int srcStride[],
  42. int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]);
  43. int yuv420_bgr24_lasx(SwsContext *c, const uint8_t *src[], int srcStride[],
  44. int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]);
  45. int yuv420_rgba32_lasx(SwsContext *c, const uint8_t *src[], int srcStride[],
  46. int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]);
  47. int yuv420_bgra32_lasx(SwsContext *c, const uint8_t *src[], int srcStride[],
  48. int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]);
  49. int yuv420_argb32_lasx(SwsContext *c, const uint8_t *src[], int srcStride[],
  50. int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]);
  51. int yuv420_abgr32_lasx(SwsContext *c, const uint8_t *src[], int srcStride[],
  52. int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]);
  53. void ff_interleave_bytes_lasx(const uint8_t *src1, const uint8_t *src2,
  54. uint8_t *dest, int width, int height,
  55. int src1Stride, int src2Stride, int dstStride);
  56. av_cold void ff_sws_init_output_loongarch(SwsContext *c);
  57. void ff_yuv2planeX_8_lasx(const int16_t *filter, int filterSize,
  58. const int16_t **src, uint8_t *dest, int dstW,
  59. const uint8_t *dither, int offset);
  60. #endif /* SWSCALE_LOONGARCH_SWSCALE_LOONGARCH_H */