vsp1_hgt.h 843 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * vsp1_hgt.h -- R-Car VSP1 Histogram Generator 2D
  4. *
  5. * Copyright (C) 2016 Renesas Electronics Corporation
  6. *
  7. * Contact: Niklas Söderlund (niklas.soderlund@ragnatech.se)
  8. */
  9. #ifndef __VSP1_HGT_H__
  10. #define __VSP1_HGT_H__
  11. #include <media/media-entity.h>
  12. #include <media/v4l2-ctrls.h>
  13. #include <media/v4l2-subdev.h>
  14. #include "vsp1_histo.h"
  15. struct vsp1_device;
  16. #define HGT_NUM_HUE_AREAS 6
  17. struct vsp1_hgt {
  18. struct vsp1_histogram histo;
  19. struct v4l2_ctrl_handler ctrls;
  20. u8 hue_areas[HGT_NUM_HUE_AREAS * 2];
  21. };
  22. static inline struct vsp1_hgt *to_hgt(struct v4l2_subdev *subdev)
  23. {
  24. return container_of(subdev, struct vsp1_hgt, histo.entity.subdev);
  25. }
  26. struct vsp1_hgt *vsp1_hgt_create(struct vsp1_device *vsp1);
  27. void vsp1_hgt_frame_end(struct vsp1_entity *hgt);
  28. #endif /* __VSP1_HGT_H__ */