All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Christophe TROTIN <jean-christophe.trotin@st.com>
To: "nicolas@ndufresne.ca" <nicolas@ndufresne.ca>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>
Cc: "kernel@stlinux.com" <kernel@stlinux.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Yannick FERTRE <yannick.fertre@st.com>,
	Hugues FRUCHET <hugues.fruchet@st.com>
Subject: Re: [PATCH v2 2/3] [media] hva: multi-format video encoder V4L2 driver
Date: Wed, 13 Jul 2016 16:11:05 +0200	[thread overview]
Message-ID: <57864BF9.80203@st.com> (raw)
In-Reply-To: <1468260005.14217.14.camel@ndufresne.ca>



On 07/11/2016 08:00 PM, Nicolas Dufresne wrote:
> Le lundi 11 juillet 2016 à 17:14 +0200, Jean-Christophe Trotin a écrit :

[snip]

>> +static int hva_g_fmt_stream(struct file *file, void *fh, struct v4l2_format *f)
>> +{
>> +	struct hva_ctx *ctx = fh_to_ctx(file->private_data);
>> +	struct device *dev = ctx_to_dev(ctx);
>> +	struct hva_streaminfo *streaminfo = &ctx->streaminfo;
>> +
>> +	f->fmt.pix.width = streaminfo->width;
>> +	f->fmt.pix.height = streaminfo->height;
>> +	f->fmt.pix.field = V4L2_FIELD_NONE;
>> +	f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
>
> Hard coding this is not great.Ideally the colorimetry (if not modified) should be copied from OUTPUT to CAPTURE, you may also set this to V4L2_COLORSPACE_DEFAULT.
>

Nicolas,

Thank you for the remark.
Colorspace was hard-coded because only V4L2_COLORSPACE_SMPTE170M is supported. 
However, I understand that hard-coding is not great: I will align the code in 
version 3 on the colorspace management made in the coda driver.

Best regards,
Jean-Christophe.

>> +	f->fmt.pix.pixelformat = streaminfo->streamformat;
>> +	f->fmt.pix.bytesperline = 0;
>> +	f->fmt.pix.sizeimage = ctx->max_stream_size;
>> +
>> +	dev_dbg(dev, "%s V4L2 G_FMT (CAPTURE): %dx%d fmt:%.4s size:%d\n",
>> +		ctx->name, f->fmt.pix.width, f->fmt.pix.height,
>> +		(u8 *)&f->fmt.pix.pixelformat, f->fmt.pix.sizeimage);
>> +	return 0;
>> +}

[snip]

  reply	other threads:[~2016-07-13 14:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 15:14 [PATCH v2 0/3] support of v4l2 encoder for STMicroelectronics SOC Jean-Christophe Trotin
2016-07-11 15:14 ` [PATCH v2 1/3] Documentation: DT: add bindings for STI HVA Jean-Christophe Trotin
2016-07-11 15:14 ` [PATCH v2 2/3] [media] hva: multi-format video encoder V4L2 driver Jean-Christophe Trotin
2016-07-11 18:00   ` Nicolas Dufresne
2016-07-13 14:11     ` Jean Christophe TROTIN [this message]
2016-07-18 11:45   ` Hans Verkuil
2016-07-19 15:55     ` Jean Christophe TROTIN
2016-07-19 16:45       ` Hans Verkuil
2016-07-21  7:30     ` Jean Christophe TROTIN
2016-07-21  9:49       ` Hans Verkuil
2016-07-25 14:09         ` Jean Christophe TROTIN
2016-07-11 15:14 ` [PATCH v2 3/3] [media] hva: add H.264 video encoding support Jean-Christophe Trotin
2016-07-18 11:55   ` Hans Verkuil
2016-07-21  7:30     ` Jean Christophe TROTIN
2016-07-11 17:48 ` [PATCH v2 0/3] support of v4l2 encoder for STMicroelectronics SOC Nicolas Dufresne
2016-07-11 18:57   ` Javier Martinez Canillas
2016-07-13 13:49     ` Jean Christophe TROTIN
2016-07-13 14:00       ` Javier Martinez Canillas

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=57864BF9.80203@st.com \
    --to=jean-christophe.trotin@st.com \
    --cc=benjamin.gaignard@linaro.org \
    --cc=hugues.fruchet@st.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@stlinux.com \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=yannick.fertre@st.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 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.