Merge pull request #2519 from openmv/mt9v_bayer

sensors/mt9v0xx: Fix bayer output.
This commit is contained in:
Ibrahim Abdelkader 2024-11-26 16:01:04 +02:00 committed by GitHub
commit ce8aee77c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -153,10 +153,12 @@ static int write_reg(omv_csi_t *csi, uint16_t reg_addr, uint16_t reg_data) {
static int set_pixformat(omv_csi_t *csi, pixformat_t pixformat) {
switch (cfa_type) {
case BAYER_CFA: {
if (pixformat != PIXFORMAT_BAYER) {
return -1;
if (pixformat == PIXFORMAT_RGB565 ||
pixformat == PIXFORMAT_BAYER ||
pixformat == PIXFORMAT_GRAYSCALE) {
return 0;
}
return 0;
return -1;
}
default: {
if (pixformat != PIXFORMAT_GRAYSCALE) {
@ -553,6 +555,7 @@ int mt9v0xx_init(omv_csi_t *csi) {
break;
}
}
csi->raw_output = 1;
break;
}
default: {
@ -560,7 +563,6 @@ int mt9v0xx_init(omv_csi_t *csi) {
break;
}
}
return ret;
}