public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Hans de Goede <hdegoede@redhat.com>, linux-media@vger.kernel.org
Subject: Re: [PATCH RFC] libv4lconvert: SDR conversion from U8 to FLOAT
Date: Sat, 16 Nov 2013 19:34:12 +0200	[thread overview]
Message-ID: <5287AC94.5020401@iki.fi> (raw)
In-Reply-To: <5287AAFC.9050209@redhat.com>

Hello Hans!
Actually I has already fixed version according to Andy and Hans V. 
comments, which I was just planning to send for you too, just due to 
that issue format selection issue!



On 16.11.2013 19:27, Hans de Goede wrote:
> Hi,
>> @@ -78,7 +78,8 @@ static void v4lconvert_get_framesizes(struct
>> v4lconvert_data *data,
>>       { V4L2_PIX_FMT_RGB24,        24,     1,     5,    0 }, \
>>       { V4L2_PIX_FMT_BGR24,        24,     1,     5,    0 }, \
>>       { V4L2_PIX_FMT_YUV420,        12,     6,     1,    0 }, \
>> -    { V4L2_PIX_FMT_YVU420,        12,     6,     1,    0 }
>> +    { V4L2_PIX_FMT_YVU420,        12,     6,     1,    0 }, \
>> +    { V4L2_PIX_FMT_FLOAT,         0,     0,     0,    0 }
>>
>
> This looks wrong, here you claim that V4L2_PIX_FMT_FLOAT is a supported
> destination
> format. which suggests there will be conversion code from any of the
> supported_src_pixfmts to it, which you don't add (and I don't think we
> will want
> to add.
>
>>   static const struct v4lconvert_pixfmt supported_src_pixfmts[] = {
>>       SUPPORTED_DST_PIXFMTS,
>> @@ -131,6 +132,8 @@ static const struct v4lconvert_pixfmt
>> supported_src_pixfmts[] = {
>>       { V4L2_PIX_FMT_Y6,         8,    20,    20,    0 },
>>       { V4L2_PIX_FMT_Y10BPACK,    10,    20,    20,    0 },
>>       { V4L2_PIX_FMT_Y16,        16,    20,    20,    0 },
>> +    /* SDR formats */
>> +    { V4L2_PIX_FMT_U8,        0,    0,    0,    0 },
>>   };
>
> Likewise this will tell libv4lconvert that it can convert from
> V4L2_PIX_FMT_U8 to
> any of the supported destination formats, which again is not true.
>
> I suggest simply adding a hardcoded test for the SDR formats to relevant
> code paths
> which use supported_src_pixfmts and when seeing V4L2_PIX_FMT_U8 as
> source only
> support V4L2_PIX_FMT_FLOAT as dest, and short-circuit a whole bunch of
> other tests
> done.

Sounds reasonable. I will try implement it after I do some more 
conversions tests.

regards
Antti

-- 
http://palosaari.fi/

      reply	other threads:[~2013-11-16 17:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 17:16 [PATCH RFC] libv4lconvert: SDR conversion from U8 to FLOAT Antti Palosaari
2013-11-11 13:14 ` Hans Verkuil
2013-11-11 13:40   ` Antti Palosaari
2013-11-11 13:52     ` Hans Verkuil
2013-11-15 19:11     ` Antti Palosaari
2013-11-15 19:13       ` Devin Heitmueller
2013-11-15 19:17         ` Antti Palosaari
2013-11-16 14:11           ` Antti Palosaari
2013-11-16 17:28             ` Hans de Goede
2013-11-11 14:19 ` Andy Walls
2013-11-11 14:38   ` Hans Verkuil
2013-11-14 13:45     ` Antti Palosaari
2013-11-14 13:50       ` Hans Verkuil
2013-11-18 17:43   ` Antti Palosaari
2013-11-16 17:27 ` Hans de Goede
2013-11-16 17:34   ` Antti Palosaari [this message]

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=5287AC94.5020401@iki.fi \
    --to=crope@iki.fi \
    --cc=hdegoede@redhat.com \
    --cc=linux-media@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox