vp9_variance.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef VP9_ENCODER_VP9_VARIANCE_H_
  11. #define VP9_ENCODER_VP9_VARIANCE_H_
  12. #include "vpx/vpx_integer.h"
  13. #include "vpx_ports/mem.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. typedef unsigned int(*vp9_sad_fn_t)(const uint8_t *src_ptr,
  18. int source_stride,
  19. const uint8_t *ref_ptr,
  20. int ref_stride);
  21. typedef unsigned int(*vp9_sad_avg_fn_t)(const uint8_t *src_ptr,
  22. int source_stride,
  23. const uint8_t *ref_ptr,
  24. int ref_stride,
  25. const uint8_t *second_pred);
  26. typedef void (*vp9_sad_multi_fn_t)(const uint8_t *src_ptr,
  27. int source_stride,
  28. const uint8_t *ref_ptr,
  29. int ref_stride,
  30. unsigned int *sad_array);
  31. typedef void (*vp9_sad_multi_d_fn_t)(const uint8_t *src_ptr,
  32. int source_stride,
  33. const uint8_t* const ref_ptr[],
  34. int ref_stride, unsigned int *sad_array);
  35. typedef unsigned int (*vp9_variance_fn_t)(const uint8_t *src_ptr,
  36. int source_stride,
  37. const uint8_t *ref_ptr,
  38. int ref_stride,
  39. unsigned int *sse);
  40. typedef unsigned int (*vp9_subpixvariance_fn_t)(const uint8_t *src_ptr,
  41. int source_stride,
  42. int xoffset,
  43. int yoffset,
  44. const uint8_t *ref_ptr,
  45. int Refstride,
  46. unsigned int *sse);
  47. typedef unsigned int (*vp9_subp_avg_variance_fn_t)(const uint8_t *src_ptr,
  48. int source_stride,
  49. int xoffset,
  50. int yoffset,
  51. const uint8_t *ref_ptr,
  52. int Refstride,
  53. unsigned int *sse,
  54. const uint8_t *second_pred);
  55. typedef struct vp9_variance_vtable {
  56. vp9_sad_fn_t sdf;
  57. vp9_sad_avg_fn_t sdaf;
  58. vp9_variance_fn_t vf;
  59. vp9_subpixvariance_fn_t svf;
  60. vp9_subp_avg_variance_fn_t svaf;
  61. vp9_sad_multi_fn_t sdx3f;
  62. vp9_sad_multi_fn_t sdx8f;
  63. vp9_sad_multi_d_fn_t sdx4df;
  64. } vp9_variance_fn_ptr_t;
  65. #ifdef __cplusplus
  66. } // extern "C"
  67. #endif
  68. #endif // VP9_ENCODER_VP9_VARIANCE_H_