-
Notifications
You must be signed in to change notification settings - Fork 9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
camerad: IFE debayer support (#33720)
* ife is up * split out cdm, bps needs this too * straight to vipc buffer * start reducing the diff * support both * disable for now * cleanup --------- Co-authored-by: Comma Device <[email protected]>
- Loading branch information
1 parent
6f40dec
commit 8e8f61a
Showing
11 changed files
with
931 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "cdm.h" | ||
|
||
int write_cont(uint8_t *dst, uint32_t reg, std::vector<uint32_t> vals) { | ||
struct cdm_regcontinuous_cmd *cmd = (struct cdm_regcontinuous_cmd*)dst; | ||
cmd->cmd = CAM_CDM_CMD_REG_CONT; | ||
cmd->count = vals.size(); | ||
cmd->offset = reg; | ||
cmd->reserved0 = 0; | ||
cmd->reserved1 = 0; | ||
|
||
uint32_t *vd = (uint32_t*)(dst + sizeof(struct cdm_regcontinuous_cmd)); | ||
for (int i = 0; i < vals.size(); i++) { | ||
*vd = vals[i]; | ||
vd++; | ||
} | ||
|
||
return sizeof(struct cdm_regcontinuous_cmd) + vals.size()*sizeof(uint32_t); | ||
} | ||
|
||
int write_random(uint8_t *dst, std::vector<uint32_t> vals) { | ||
struct cdm_regrandom_cmd *cmd = (struct cdm_regrandom_cmd*)dst; | ||
cmd->cmd = CAM_CDM_CMD_REG_RANDOM; | ||
cmd->count = vals.size() / 2; | ||
cmd->reserved = 0; | ||
|
||
uint32_t *vd = (uint32_t*)(dst + sizeof(struct cdm_regrandom_cmd)); | ||
for (int i = 0; i < vals.size(); i++) { | ||
*vd = vals[i]; | ||
vd++; | ||
} | ||
|
||
return sizeof(struct cdm_regrandom_cmd) + vals.size()*sizeof(uint32_t); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.