Skip to content

Commit

Permalink
should be u32
Browse files Browse the repository at this point in the history
  • Loading branch information
Comma Device committed Dec 13, 2024
1 parent 32b184f commit 0e27fb4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion system/camerad/cameras/camera_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CameraBuf {
VisionBuf *cur_camera_buf;
std::unique_ptr<VisionBuf[]> camera_bufs_raw;
std::unique_ptr<FrameMetadata[]> frame_metadata;
int out_img_width, out_img_height;
uint32_t out_img_width, out_img_height;

CameraBuf() = default;
~CameraBuf();
Expand Down
8 changes: 4 additions & 4 deletions system/camerad/cameras/camera_qcom2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ void CameraState::set_exposure_rect() {
float fl_ref = ae_target.second;

ae_xywh = (Rect){
std::max(0, camera.buf.out_img_width / 2 - (int)(fl_pix / fl_ref * xywh_ref.w / 2)),
std::max(0, camera.buf.out_img_height / 2 - (int)(fl_pix / fl_ref * (h_ref / 2 - xywh_ref.y))),
std::min((int)(fl_pix / fl_ref * xywh_ref.w), camera.buf.out_img_width / 2 + (int)(fl_pix / fl_ref * xywh_ref.w / 2)),
std::min((int)(fl_pix / fl_ref * xywh_ref.h), camera.buf.out_img_height / 2 + (int)(fl_pix / fl_ref * (h_ref / 2 - xywh_ref.y)))
std::max(0, (int)camera.buf.out_img_width / 2 - (int)(fl_pix / fl_ref * xywh_ref.w / 2)),
std::max(0, (int)camera.buf.out_img_height / 2 - (int)(fl_pix / fl_ref * (h_ref / 2 - xywh_ref.y))),
std::min((int)(fl_pix / fl_ref * xywh_ref.w), (int)camera.buf.out_img_width / 2 + (int)(fl_pix / fl_ref * xywh_ref.w / 2)),
std::min((int)(fl_pix / fl_ref * xywh_ref.h), (int)camera.buf.out_img_height / 2 + (int)(fl_pix / fl_ref * (h_ref / 2 - xywh_ref.y)))
};
}

Expand Down
2 changes: 1 addition & 1 deletion system/camerad/cameras/ife.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int build_update(uint8_t *dst, const SensorInfo *s, std::vector<uint32_t> &patch
}


int build_initial_config(uint8_t *dst, const SensorInfo *s, std::vector<uint32_t> &patches, int out_width, int out_height) {
int build_initial_config(uint8_t *dst, const SensorInfo *s, std::vector<uint32_t> &patches, uint32_t out_width, uint32_t out_height) {
uint8_t *start = dst;

// start with the every frame config
Expand Down

0 comments on commit 0e27fb4

Please sign in to comment.