All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todor Tomov <todor.tomov@linaro.org>
To: Hans Verkuil <hverkuil@xs4all.nl>, hansverk@cisco.com
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [media] v4l2-mediabus: Add helper functions
Date: Fri, 7 Jul 2017 11:38:40 +0300	[thread overview]
Message-ID: <13de1991-678e-3f8f-a9c6-490d9b597aa5@linaro.org> (raw)
In-Reply-To: <c9d253aa-b9dd-e4d0-7c9e-a02688f8fc60@xs4all.nl>

On 07/07/2017 11:23 AM, Hans Verkuil wrote:
> On 07/07/2017 10:18 AM, Todor Tomov wrote:
>> Add helper functions for mbus to/from mplane pixel format conversion.
>>
>> Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
>> ---
>>   include/media/v4l2-mediabus.h | 26 ++++++++++++++++++++++++++
>>   1 file changed, 26 insertions(+)
>>
>> diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
>> index 34cc99e..f97fd4a 100644
>> --- a/include/media/v4l2-mediabus.h
>> +++ b/include/media/v4l2-mediabus.h
>> @@ -113,4 +113,30 @@ static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
>>       mbus_fmt->code = code;
>>   }
>>   +static inline void v4l2_fill_pix_format_mplane(
>> +                struct v4l2_pix_format_mplane *pix_fmt,
>> +                const struct v4l2_mbus_framefmt *mbus_fmt)
>> +{
>> +    pix_fmt->width = mbus_fmt->width;
>> +    pix_fmt->height = mbus_fmt->height;
>> +    pix_fmt->field = mbus_fmt->field;
>> +    pix_fmt->colorspace = mbus_fmt->colorspace;
>> +    pix_fmt->ycbcr_enc = mbus_fmt->ycbcr_enc;
>> +    pix_fmt->quantization = mbus_fmt->quantization;
>> +    pix_fmt->xfer_func = mbus_fmt->xfer_func;
>> +}
>> +
>> +static inline void v4l2_fill_mbus_format_mplane(
>> +                struct v4l2_mbus_framefmt *mbus_fmt,
>> +                const struct v4l2_pix_format_mplane *pix_fmt)
>> +{
>> +    mbus_fmt->width = pix_fmt->width;
>> +    mbus_fmt->height = pix_fmt->height;
>> +    mbus_fmt->field = pix_fmt->field;
>> +    mbus_fmt->colorspace = pix_fmt->colorspace;
>> +    mbus_fmt->ycbcr_enc = pix_fmt->ycbcr_enc;
>> +    mbus_fmt->quantization = pix_fmt->quantization;
>> +    mbus_fmt->xfer_func = pix_fmt->xfer_func;
>> +}
>> +
>>   #endif
>>
> 
> Looks good. But can you rename pix_fmt to pix_mp_fmt? It makes it a bit
> clearer that we're operating on the pix_mp member of struct v4l2_format.

Ok, I'll rename and resend.

> 
> Regards,
> 
>     Hans

-- 
Best regards,
Todor Tomov

      reply	other threads:[~2017-07-07  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  8:18 [PATCH] [media] v4l2-mediabus: Add helper functions Todor Tomov
2017-07-07  8:23 ` Hans Verkuil
2017-07-07  8:38   ` Todor Tomov [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=13de1991-678e-3f8f-a9c6-490d9b597aa5@linaro.org \
    --to=todor.tomov@linaro.org \
    --cc=hansverk@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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 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.