vp9_noise_estimate.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2012 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_NOISE_ESTIMATE_H_
  11. #define VP9_ENCODER_NOISE_ESTIMATE_H_
  12. #include "vp9/encoder/vp9_block.h"
  13. #include "vp9/encoder/vp9_skin_detection.h"
  14. #include "vpx_scale/yv12config.h"
  15. #if CONFIG_VP9_TEMPORAL_DENOISING
  16. #include "vp9/encoder/vp9_denoiser.h"
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. typedef enum noise_level { kLowLow, kLow, kMedium, kHigh } NOISE_LEVEL;
  22. typedef struct noise_estimate {
  23. int enabled;
  24. NOISE_LEVEL level;
  25. int value;
  26. int thresh;
  27. int count;
  28. int last_w;
  29. int last_h;
  30. int num_frames_estimate;
  31. } NOISE_ESTIMATE;
  32. struct VP9_COMP;
  33. void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne, int width, int height);
  34. NOISE_LEVEL vp9_noise_estimate_extract_level(NOISE_ESTIMATE *const ne);
  35. void vp9_update_noise_estimate(struct VP9_COMP *const cpi);
  36. #ifdef __cplusplus
  37. } // extern "C"
  38. #endif
  39. #endif // VP9_ENCODER_NOISE_ESTIMATE_H_