From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Thomas Vajzovic <thomas.vajzovic@irisys.co.uk>
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: width and height of JPEG compressed images
Date: Wed, 24 Jul 2013 10:39:11 +0200 [thread overview]
Message-ID: <51EF92AF.7040205@samsung.com> (raw)
In-Reply-To: <A683633ABCE53E43AFB0344442BF0F053616A13A@server10.irisys.local>
Hi,
On 07/24/2013 09:47 AM, Thomas Vajzovic wrote:
> On 23 July 2013 23:21 Sakari Ailus wrote:
>> On Sun, Jul 21, 2013 at 10:38:18PM +0200, Sylwester Nawrocki wrote:
>>> On 07/19/2013 10:28 PM, Sakari Ailus wrote:
>>>> On Sat, Jul 06, 2013 at 09:58:23PM +0200, Sylwester Nawrocki wrote:
>>>>> On 07/05/2013 10:22 AM, Thomas Vajzovic wrote:
>>>>>
>>>>>> The hardware reads AxB sensor pixels from its array, resamples them
>>>>>> to CxD image pixels, and then compresses them to ExF bytes.
>>>>>>
>>>>> sensor matrix (AxB pixels) -> binning/skipping (CxD pixels) ->
>>>>> -> JPEG compresion (width = C, height = D, sizeimage ExF bytes)
>>>>
>>>> Does the user need to specify ExF, for other purposes than limiting
>>>> the size of the image? I would leave this up to the sensor driver
>>>> (with reasonable alignment). The sensor driver would tell about this
>>>> to the receiver through
>>>
>>> AFAIU ExF is closely related to the memory buffer size, so the sensor
>>> driver itself wouldn't have enough information to fix up ExF, would it ?
>>
>> If the desired sizeimage is known, F can be calculated if E is fixed, say
>> 1024 should probably work for everyone, shoulnd't it?
>
> It's a nice clean idea (and I did already consider it) but it reduces the
> flexibility of the system as a whole.
>
> Suppose an embedded device wants to send the compressed image over a
> network in packets of 1500 bytes, and they want to allow 3 packets per
> frame. Your proposal limits sizeimage to a multiple of 1K, so they have
> to set sizeimage to 4K when they want 4.5K, meaning that they waste 500
> bytes of bandwidth every frame.
>
> You could say "tough luck, extra overhead like this is something you should
> expect if you want to use a general purpose API like V4L2", but why make
> it worse if we can make it better?
I entirely agree with that. Other issue with fixed number of samples
per line is that internal (FIFO) line buffer size of the transmitter
devices will vary, and for example some devices might have line buffer
smaller than the value we have arbitrarily chosen. I'd expect the
optimal number of samples per line to vary among different devices
and use cases.
Regards,
Sylwester
next prev parent reply other threads:[~2013-07-24 8:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 8:22 width and height of JPEG compressed images Thomas Vajzovic
2013-07-06 19:58 ` Sylwester Nawrocki
2013-07-07 8:18 ` Thomas Vajzovic
2013-07-10 19:43 ` Sylwester Nawrocki
2013-07-15 9:18 ` Thomas Vajzovic
2013-07-19 20:40 ` Sakari Ailus
2013-07-22 21:47 ` Sylwester Nawrocki
2013-07-23 16:07 ` Thomas Vajzovic
2013-07-19 20:28 ` Sakari Ailus
2013-07-21 20:38 ` Sylwester Nawrocki
2013-07-22 8:40 ` Thomas Vajzovic
2013-07-24 9:30 ` Sylwester Nawrocki
2013-08-06 16:26 ` Thomas Vajzovic
2013-08-21 13:34 ` Sakari Ailus
2013-08-22 16:08 ` Thomas Vajzovic
2013-08-31 22:25 ` Sylwester Nawrocki
2013-09-01 23:23 ` Laurent Pinchart
2013-07-23 22:21 ` Sakari Ailus
2013-07-24 7:47 ` Thomas Vajzovic
2013-07-24 8:39 ` Sylwester Nawrocki [this message]
2013-07-26 9:06 ` Sakari Ailus
2013-08-06 15:25 ` Thomas Vajzovic
2013-08-07 9:35 ` Sakari Ailus
2013-08-07 17:43 ` Thomas Vajzovic
2013-08-21 13:17 ` Sakari Ailus
2013-08-21 13:28 ` Laurent Pinchart
2013-08-22 15:41 ` Thomas Vajzovic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51EF92AF.7040205@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=sylvester.nawrocki@gmail.com \
--cc=thomas.vajzovic@irisys.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.