informx
Posts: 5
Joined: Sat Dec 06, 2014 1:27 am

Maximum size of a JPEG frame buffer

Sat Dec 06, 2014 1:38 am

Hi,

what is the maximum size of a buffer containing one JPEG frame (any quality and with NO bayer data inside)? If possible I would like know/calculate this information "statically", not at run-time by configuring and querying the encoder component with MMAL.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32227
Joined: Sat Jul 30, 2011 7:41 pm

Re: Maximum size of a JPEG frame buffer

Sat Dec 06, 2014 12:29 pm

Not sure. The same GPU is used on the Nokia 808, which can handle a 38MP image and save it to JPEG. Clearly the JPEG buffer will be smaller than 38MP, but still much larger than most cameras out there require.

So 'quite big' would be the cop out answer.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 14328
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Maximum size of a JPEG frame buffer

Sat Dec 06, 2014 5:27 pm

There is no right answer as there are too many variables.
A worst case guesstimate (and what the MMAL component currently works with) would be width*height bytes, but I'd be surprised if you ever really exceeded half of that. The JPEG codec works in a linear manner over the image, so it doesn't care and will just create multiple buffers to carry the required data.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”