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

Investigate MMAL resizer component #21

Closed
waveform80 opened this Issue Nov 6, 2013 · 4 comments

Comments

Projects
None yet
1 participant
@waveform80
Owner

waveform80 commented Nov 6, 2013

This post from MacHack references the vc.ril.resize MMAL component (a GPU-side frame resizer) which can be used to provide full-frame video (and preview perhaps?) output, albeit at a slower 15fps.

Firstly we need to come up with a way of permitting full-frame video capture (nice interface? Maybe another parameter to start_recording like use_resizer?), and secondly we need to investigate the possibility of using this with previews. If it works with previews, it could solve the disparity between previews and still captures (I don't think anyone is going to particularly care about 30fps vs 15fps previews - although it might be worth polling the forums about this).

@waveform80

This comment has been minimized.

Owner

waveform80 commented Nov 10, 2013

Well, the resizer works but there's a minor issue... We only get full field of view when the camera is set to maximum resolution (2592x1944) which is a 4:3 (non-widescreen) ratio. That's fine if you want to capture or record a non-widescreen image/video but many people are going to want more "modern" ratios like 16:9 (for 1080p, 720p, etc.). It looks like we can use the resizer's output port's format struct to perform cropping but firstly that needs testing and secondly we need to figure out how to calculate the required crop given the input resolution (fixed with 4:3 aspect ratio) and the output resolution (any aspect ratio). Unfortunately that means no 0.7 release today - perhaps next weekend when I've got some more time!

@waveform80

This comment has been minimized.

Owner

waveform80 commented Nov 14, 2013

Pushing this to 0.8 - the API changes required are proving tricky and need some more refinement.

@waveform80

This comment has been minimized.

Owner

waveform80 commented Dec 9, 2013

Oh dear - this is going to have to get pushed again - I can't seem to get the crop working! Tried on camera output, encoder input, encoder output - effects range from nothing to exceptions but I haven't made much headway figuring out what's going on...

@waveform80 waveform80 closed this in bb967e6 Jan 8, 2014

@waveform80

This comment has been minimized.

Owner

waveform80 commented Jan 8, 2014

I should caution that while the resizer now works nicely, crop still isn't working. In practical terms this means that resizes from maximum resolution (2592x1944) to anything without a 4:3 aspect ratio will look squished. I'm thinking there might be a firmware issue here, but I'll have to consult the experts to make sure I'm not just doing something stupid...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment