linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Philipp Zabel <p.zabel@pengutronix.de>, linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Kamil Debski <k.debski@samsung.com>,
	Fabio Estevam <fabio.estevam@freescale.com>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	kernel@pengutronix.de
Subject: Re: [PATCH 10/11] [media] coda: default to h.264 decoder on invalid formats
Date: Thu, 17 Jul 2014 18:24:27 +0200	[thread overview]
Message-ID: <53C7F8BB.2080903@xs4all.nl> (raw)
In-Reply-To: <1405613112-22442-11-git-send-email-p.zabel@pengutronix.de>

On 07/17/2014 06:05 PM, Philipp Zabel wrote:
> If the user provides an invalid format, let the decoder device
> default to h.264.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  drivers/media/platform/coda.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
> index e63226b..ed5fa4c 100644
> --- a/drivers/media/platform/coda.c
> +++ b/drivers/media/platform/coda.c
> @@ -685,7 +685,7 @@ static int coda_try_fmt_vid_cap(struct file *file, void *priv,
>  				struct v4l2_format *f)
>  {
>  	struct coda_ctx *ctx = fh_to_ctx(priv);
> -	struct coda_codec *codec;
> +	struct coda_codec *codec = NULL;
>  	struct vb2_queue *src_vq;
>  	int ret;
>  
> @@ -738,6 +738,12 @@ static int coda_try_fmt_vid_out(struct file *file, void *priv,
>  	/* Determine codec by encoded format, returns NULL if raw or invalid */
>  	codec = coda_find_codec(ctx->dev, f->fmt.pix.pixelformat,
>  				V4L2_PIX_FMT_YUV420);
> +	if (!codec && ctx->inst_type == CODA_INST_DECODER) {
> +		codec = coda_find_codec(ctx->dev, V4L2_PIX_FMT_H264,
> +					V4L2_PIX_FMT_YUV420);
> +		if (!codec)
> +			return -EINVAL;
> +	}
>  
>  	if (!f->fmt.pix.colorspace)
>  		f->fmt.pix.colorspace = V4L2_COLORSPACE_REC709;
> 


  reply	other threads:[~2014-07-17 16:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 16:05 [PATCH 00/11] CODA encoder/decoder device split Philipp Zabel
2014-07-17 16:05 ` [PATCH 01/11] [media] coda: fix CODA7541 hardware reset Philipp Zabel
2014-07-17 16:05 ` [PATCH 02/11] [media] coda: initialize hardware on pm runtime resume only if firmware available Philipp Zabel
2014-07-17 16:05 ` [PATCH 03/11] [media] coda: remove CAPTURE and OUTPUT caps Philipp Zabel
2014-07-17 16:08   ` Hans Verkuil
2014-07-17 16:05 ` [PATCH 04/11] [media] coda: remove VB2_USERPTR from queue io_modes Philipp Zabel
2014-07-17 16:10   ` Hans Verkuil
2014-07-17 16:05 ` [PATCH 05/11] [media] coda: use CODA_MAX_FRAME_SIZE everywhere Philipp Zabel
2014-07-17 16:05 ` [PATCH 06/11] [media] coda: delay coda_fill_bitstream() Philipp Zabel
2014-07-17 16:17   ` Hans Verkuil
2014-07-17 17:30     ` Philipp Zabel
2014-07-17 16:05 ` [PATCH 07/11] [media] coda: lock capture frame size to output frame size when streaming Philipp Zabel
2014-07-17 16:19   ` Hans Verkuil
2014-07-17 16:05 ` [PATCH 08/11] [media] coda: split userspace interface into encoder and decoder device Philipp Zabel
2014-07-17 16:21   ` Hans Verkuil
2014-07-17 16:05 ` [PATCH 09/11] [media] coda: split format enumeration for encoder end " Philipp Zabel
2014-07-17 16:23   ` Hans Verkuil
2014-07-17 16:05 ` [PATCH 10/11] [media] coda: default to h.264 decoder on invalid formats Philipp Zabel
2014-07-17 16:24   ` Hans Verkuil [this message]
2014-07-17 16:05 ` [PATCH 11/11] [media] coda: mark constant structures as such Philipp Zabel
2014-07-17 16:24   ` Hans Verkuil

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=53C7F8BB.2080903@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=fabio.estevam@freescale.com \
    --cc=k.debski@samsung.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).