linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: linux-media@vger.kernel.org, stoth@kernellabs.com,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCHv2 17/20] cx23885: fix weird sizes.
Date: Wed, 03 Sep 2014 14:07:40 +0200	[thread overview]
Message-ID: <5407048C.1050601@xs4all.nl> (raw)
In-Reply-To: <20140903084624.2cc523b8.m.chehab@samsung.com>

On 09/03/14 13:46, Mauro Carvalho Chehab wrote:
> Em Thu, 14 Aug 2014 11:54:02 +0200
> Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> 
>> From: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> These values make no sense. All SDTV standards have the same width.
>> This seems to be copied from the cx88 driver. Just drop these weird
>> values.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> ---
>>  drivers/media/pci/cx23885/cx23885.h | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/pci/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h
>> index 99a5fe0..f542ced 100644
>> --- a/drivers/media/pci/cx23885/cx23885.h
>> +++ b/drivers/media/pci/cx23885/cx23885.h
>> @@ -610,15 +610,15 @@ extern int cx23885_risc_databuffer(struct pci_dev *pci,
>>  
>>  static inline unsigned int norm_maxw(v4l2_std_id norm)
>>  {
>> -	return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 720 : 768;
>> +	return 720;
> 
> Not sure if you checked cx23885 datasheet. I didn't, but I don't doubt
> that it uses about the same A/D logic as cx88.
> 
> In the case of cx88, the sampling rate for a few standards is different,
> as recommended at the datasheet. This is done to provide the highest
> image quality, as there are some customized filters for some standards,
> but they require some specific sampling rates. That's why PAL-Nc and
> NTSC/PAL-M are handled on a different way.

I will double-check what the datasheet has to say about this. And if there
is a good reason for this then I will add a comment at the very least.

> 
>>  }
>>  
>>  static inline unsigned int norm_maxh(v4l2_std_id norm)
>>  {
>> -	return (norm & V4L2_STD_625_50) ? 576 : 480;
>> +	return (norm & V4L2_STD_525_60) ? 480 : 576;
> 
> This is obviously wrong.

What is wrong? The original code or the new code? They are both right.

I prefer to use the same standard test everywhere in a driver. That way
if the standard is set to STD_ALL the driver will still interpret it
the same everywhere instead of as 50 Hz in one case and 60 Hz in another.

But it's no big deal.

Regards,

	Hans

> 
>>  }
>>  
>>  static inline unsigned int norm_swidth(v4l2_std_id norm)
>>  {
>> -	return (norm & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 754 : 922;
>> +	return 754;
>>  }
> 
> Same as above commented.
> 
> Regards,
> Mauro
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2014-09-03 12:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14  9:53 [PATCHv2 00/20] cx23885: convert to the V4L2 core frameworks Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 01/20] cx23885: fix querycap Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 02/20] cx23885: fix audio input handling Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 03/20] cx23885: support v4l2_fh and g/s_priority Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 04/20] cx23885: use core locking, switch to unlocked_ioctl Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 05/20] cx23885: convert to the control framework Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 06/20] cx23885: convert 417 " Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 07/20] cx23885: fix format colorspace compliance error Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 08/20] cx23885: map invalid fields to a valid field Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 09/20] cx23885: drop radio-related dead code Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 10/20] cx23885: drop type field from struct cx23885_fh Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 11/20] cx23885: drop unused clip fields " Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 12/20] cx23885: fmt, width and height are global, not per-fh Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 13/20] cx23885: drop videobuf abuse in cx23885-alsa Hans Verkuil
2014-08-14  9:53 ` [PATCHv2 14/20] cx23885: use video_drvdata to get cx23885_dev pointer Hans Verkuil
2014-08-14  9:54 ` [PATCHv2 15/20] cx23885: convert to vb2 Hans Verkuil
2014-09-03 11:32   ` Mauro Carvalho Chehab
2014-09-03 11:57     ` Hans Verkuil
2014-09-03 12:17       ` Mauro Carvalho Chehab
2014-08-14  9:54 ` [PATCHv2 16/20] cx23885: fix field handling Hans Verkuil
2014-08-14  9:54 ` [PATCHv2 17/20] cx23885: fix weird sizes Hans Verkuil
2014-09-03 11:46   ` Mauro Carvalho Chehab
2014-09-03 12:07     ` Hans Verkuil [this message]
2014-09-03 12:16       ` Mauro Carvalho Chehab
2014-09-05  9:29         ` Hans Verkuil
2014-08-14  9:54 ` [PATCHv2 18/20] cx23885: remove FSF address as per checkpatch Hans Verkuil
2014-08-14  9:54 ` [PATCHv2 19/20] cx23885: remove btcx-risc dependency Hans Verkuil
2014-08-14  9:54 ` [PATCHv2 20/20] cx23885: Add busy checks before changing formats 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=5407048C.1050601@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=stoth@kernellabs.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 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).