From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media <linux-media@vger.kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 7/8] [media] s5p_jpeg: Prevent JPEG 4:2:0 > YUV 4:2:0 decompression
Date: Wed, 09 Apr 2014 09:31:19 +0200 [thread overview]
Message-ID: <5344F747.6080103@samsung.com> (raw)
In-Reply-To: <CAK9yfHxXRXagZVAZhGjqH+qVGTAdP-=PnFw4O7HEU09UNB5Tsg@mail.gmail.com>
On 04/08/2014 09:49 AM, Sachin Kamat wrote:
> Hi Jacek,
>
> On 7 April 2014 18:46, Jacek Anaszewski <j.anaszewski@samsung.com> wrote:
>> Prevent decompression of a JPEG 4:2:0 with odd width to
>> the YUV 4:2:0 compliant formats for Exynos4x12 SoCs and
>> adjust capture format to RGB565 in such a case. This is
>> required because the configuration would produce a raw
>> image with broken luma component.
>>
>> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
> <snip>
>
>> + if (ctx->subsampling == V4L2_JPEG_CHROMA_SUBSAMPLING_420 &&
>> + (ctx->out_q.w & 1) &&
>> + (pix->pixelformat == V4L2_PIX_FMT_NV12 ||
>> + pix->pixelformat == V4L2_PIX_FMT_NV21 ||
>> + pix->pixelformat == V4L2_PIX_FMT_YUV420)) {
>> + pix->pixelformat = V4L2_PIX_FMT_RGB565;
>> + fmt = s5p_jpeg_find_format(ctx, pix->pixelformat,
>> + FMT_TYPE_CAPTURE);
>> + v4l2_info(&ctx->jpeg->v4l2_dev,
>> + "Adjusted capture fourcc to RGB565. Decompression\n"
>> + "of a JPEG file with 4:2:0 subsampling and odd\n"
>> + "width to the YUV 4:2:0 compliant formats produces\n"
>> + "a raw image with broken luma component.\n");
>
> This could be made a comment in the code rather than a info message.
>
Hello Sachin,
Thanks for the review. I put it into info message because this is
rather hard for the user to figure out why the adjustment occurred,
bearing in mind that JPEG with the same subsampling and even width
is decompressed properly. This is not a common adjustment like
alignment, and thus in my opinion it requires displaying the
information. Are there some rules that say what cases are relevant
for using the v4l2_info macro?
Regards,
Jacek Anaszewski
next prev parent reply other threads:[~2014-04-09 7:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 13:16 [PATCH 1/8] [media] s5p-jpeg: Add fmt_ver_flag field to the s5p_jpeg_variant structure Jacek Anaszewski
2014-04-07 13:16 ` [PATCH 2/8] [media] s5p-jpeg: Perform fourcc downgrade only for Exynos4x12 SoCs Jacek Anaszewski
2014-04-07 13:16 ` [PATCH 3/8] [media] s5p-jpeg: Add m2m_ops field to the s5p_jpeg_variant structure Jacek Anaszewski
2014-04-07 13:16 ` [PATCH 4/8] [media] s5p-jpeg: Fix build break when CONFIG_OF is undefined Jacek Anaszewski
2014-04-08 7:43 ` Sachin Kamat
2014-04-07 13:16 ` [PATCH 5/8] [media] s5p-jpeg: g_selection callback should always succeed Jacek Anaszewski
2014-04-07 13:16 ` [PATCH 6/8] [media] s5p-jpeg: Fix sysmmu page fault Jacek Anaszewski
2014-04-07 13:16 ` [PATCH 7/8] [media] s5p_jpeg: Prevent JPEG 4:2:0 > YUV 4:2:0 decompression Jacek Anaszewski
2014-04-08 7:49 ` Sachin Kamat
2014-04-09 7:31 ` Jacek Anaszewski [this message]
2014-04-09 7:56 ` Sachin Kamat
2014-04-09 8:28 ` Jacek Anaszewski
2014-04-07 13:16 ` [PATCH 8/8] [media] s5p_jpeg: Fix NV12 format entry related to S5C2120 SoC Jacek Anaszewski
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=5344F747.6080103@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sachin.kamat@linaro.org \
/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.