Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: media: imx477: Set horizontal binning when disabling the scaler #5685

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

davidplowman
Copy link
Contributor

The horizontal scaler has been disabled but actually the sensor is not binning horizontally, resulting in images that are stretched 2x horizontally (missing the right half of the field of view completely).

Therefore we must additionally set the horizontal binning mode. There is only marginal change in output quality and noise levels.

Fixes: f075893 ("drivers: media: imx477: Disable the scaler")

The horizontal scaler has been disabled but actually the sensor is not
binning horizontally, resulting in images that are stretched 2x
horizontally (missing the right half of the field of view completely).

Therefore we must additionally set the horizontal binning mode. There
is only marginal change in output quality and noise levels.

Signed-off-by: David Plowman <[email protected]>
Fixes: f075893 ("drivers: media: imx477: Disable the scaler")
@davidplowman
Copy link
Contributor Author

@naushir You probably want to look and see if you agree with me on this. As far as I can tell, these modes were scaling horizontally and not binning at all! But this does seem to fix the headline problem for me.

I think it might be very slightly more alias-y, it's hard to be sure. But not offensively so. I didn't find a way to go back to the scaler and not mess up the final pixel column.

@naushir
Copy link
Contributor

naushir commented Oct 27, 2023

Hmmm, makes sense, but I was sure I looked at the images with the scaling disabled and they seemed ok. How did I miss this?

@davidplowman
Copy link
Contributor Author

Yes, I really don't understand. Maybe an independent check that (a) the problem exists and (b) this fixes it would be advisable...

@naushir
Copy link
Contributor

naushir commented Oct 27, 2023

I'll run this first thing on Monday.

@naushir
Copy link
Contributor

naushir commented Oct 30, 2023

Yup this is definitely an issue! I went back to the old captures I took to show the original fix worked, and they are all stretched as well. It was hardly noticeable as i was pointing it to the flat board without many objects in the frame! Also confirmed that this fixes it, so going to merge it now.

@naushir naushir merged commit 8dcc16f into raspberrypi:rpi-6.1.y Oct 30, 2023
12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Oct 30, 2023
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants