vp9_noise_estimate.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 VPX_VP9_ENCODER_VP9_NOISE_ESTIMATE_H_
  11. #define VPX_VP9_ENCODER_VP9_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. #define MAX_VAR_HIST_BINS 20
  22. typedef enum noise_level { kLowLow, kLow, kMedium, kHigh } NOISE_LEVEL;
  23. typedef struct noise_estimate {
  24. int enabled;
  25. NOISE_LEVEL level;
  26. int value;
  27. int thresh;
  28. int adapt_thresh;
  29. int count;
  30. int last_w;
  31. int last_h;
  32. int num_frames_estimate;
  33. } NOISE_ESTIMATE;
  34. struct VP9_COMP;
  35. void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne, int width, int height);
  36. NOISE_LEVEL vp9_noise_estimate_extract_level(NOISE_ESTIMATE *const ne);
  37. void vp9_update_noise_estimate(struct VP9_COMP *const cpi);
  38. #ifdef __cplusplus
  39. } // extern "C"
  40. #endif
  41. #endif // VPX_VP9_ENCODER_VP9_NOISE_ESTIMATE_H_