mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: Thierry Escande <thierry.escande@collabora.com>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/6] [media] s5p-jpeg: Decode 4:1:1 chroma subsampling format
Date: Tue, 20 Jun 2017 13:57:46 +0200	[thread overview]
Message-ID: <460fd251-b0ce-5acc-db94-0d0e5fc9eb04@samsung.com> (raw)
In-Reply-To: <1497287605-20074-5-git-send-email-thierry.escande@collabora.com>

Hi Thierry,

W dniu 12.06.2017 o 19:13, Thierry Escande pisze:
> From: Tony K Nadackal <tony.kn@samsung.com>
> 
> This patch adds support for decoding 4:1:1 chroma subsampling in the
> jpeg header parsing function.
> 
> Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
> Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
> ---
>   drivers/media/platform/s5p-jpeg/jpeg-core.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> index 0d935f5..7ef7173 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> @@ -1236,6 +1236,9 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
>   	case 0x33:
>   		ctx->subsampling = V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY;
>   		break;
> +	case 0x41:
> +		ctx->subsampling = V4L2_JPEG_CHROMA_SUBSAMPLING_411;
> +		break;

Merely parsing 4:1:1 subsampling is not enough.

Now the s5p_jpeg_parse_hdr() sometimes returns false, among others
it does so when unsupported subsampling is encountered in the header.

As far as I know 4:1:1 is supported only on some variants (3250, 5420, 5433)
of the hardware, so the kind of change intended by the patch author
must take hardware variants into account. In the above function
ctx is available, so accessing hardware variant information is possible.

The s5p_jpeg_parse_hdr() is a lengthy function, so probably the
switch (subsampling) part should be factored out to a separate
function and extended appropriately.

Andrzej  

  reply	other threads:[~2017-06-20 11:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 17:13 [PATCH v2 0/6] [media] s5p-jpeg: Various fixes and improvements Thierry Escande
2017-06-12 17:13 ` [PATCH v2 1/6] [media] s5p-jpeg: Reset the Codec before doing a soft reset Thierry Escande
2017-06-21  8:00   ` Andrzej Pietrasiewicz
2017-06-12 17:13 ` [PATCH v2 2/6] [media] s5p-jpeg: Call jpeg_bound_align_image after qbuf Thierry Escande
2017-06-12 17:13 ` [PATCH v2 3/6] [media] s5p-jpeg: Correct WARN_ON statement for checking subsampling Thierry Escande
2017-06-12 17:13 ` [PATCH v2 4/6] [media] s5p-jpeg: Decode 4:1:1 chroma subsampling format Thierry Escande
2017-06-20 11:57   ` Andrzej Pietrasiewicz [this message]
2017-06-12 17:13 ` [PATCH v2 5/6] [media] s5p-jpeg: Add support for resolution change event Thierry Escande
2017-06-16 15:38   ` Andrzej Pietrasiewicz
2017-06-19 13:50     ` Thierry Escande
2017-06-20 10:51       ` Andrzej Pietrasiewicz
2017-06-20 14:08         ` Thierry Escande
2017-06-12 17:13 ` [PATCH v2 6/6] [media] s5p-jpeg: Add stream error handling for Exynos5420 Thierry Escande
2017-06-16 15:30   ` Andrzej Pietrasiewicz

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=460fd251-b0ce-5acc-db94-0d0e5fc9eb04@samsung.com \
    --to=andrzej.p@samsung.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=thierry.escande@collabora.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®