isp_denoise3d.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2021 Alibaba Group Holding Limited
  3. * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <stdint.h>
  12. #include <unistd.h>
  13. #include <string.h>
  14. #include "ra_common.h"
  15. #define ISP_DENOISE3D_BASE 0x3700
  16. #define REG_BASE ISP_DENOISE3D_BASE
  17. static const reg_field_s reg_desc[] = {
  18. /* structure field order
  19. reg_name, reg_desc, offset,reset_value,msb,lsb, field_name, field_desc */
  20. {"ISP_DENOISE3D_CTRL", "Denoise3D Control Register",
  21. 0x00003700, 0x00000000, 10, 10, "denoise3d_read_ref_en", "0: disable read ref data from SRAM; 1: Enable read ref data from SRAM"},
  22. {NULL, NULL, 0x00003700, 0x00000000, 9, 9, "denoise3d_raw_decompress_en", "1: decompress enable; t0: decompress disable"},
  23. {NULL, NULL, 0x00003700, 0x00000000, 8, 8, "denoise3d_raw_compress_en", "1: compress enable; 0: compress disable"},
  24. {NULL, NULL, 0x00003700, 0x00000000, 7, 7, "denoise3d_write_ref_en", "0: disable write ref data to SRAM; 1: Enable write ref data to SRAM (Default)"},
  25. };
  26. int light_isp_denoise3d_reg_dump(reg_analyzer_info_s *ra_info)
  27. {
  28. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  29. return ra_dump_reg_fields(ra_info, reg_desc, count);
  30. }
  31. int light_isp_denoise3d_reg_define(reg_analyzer_info_s *ra_info)
  32. {
  33. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  34. return ra_dump_reg_define(ra_info, reg_desc, count);
  35. }
  36. int light_isp_denoise3d_reg_find(reg_analyzer_info_s *ra_info)
  37. {
  38. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  39. return ra_dump_reg_find(ra_info, reg_desc, count);
  40. }