All of lore.kernel.org
 help / color / mirror / Atom feed
* Framerate is consistently divided by 2.5
@ 2014-09-06  8:05 Isaac Nickaein
  2014-09-10 13:41 ` Laurent Pinchart
  0 siblings, 1 reply; 5+ messages in thread
From: Isaac Nickaein @ 2014-09-06  8:05 UTC (permalink / raw)
  To: linux-media

Hi,

After patching the kernel, the rate that images are captured from the
camera reduce by a factor of 2.5. Here are a list of frame rates I
have tried followed by the resulted frame-rate:

10 fps --> 4 fps
15 fps --> 6 fps
25 fps --> 10 fps
30 fps --> 12 fps

Note that all of the rates are consistently divided by 2.5. This seems
to be a clocking issue to me. Is there any multipliers in V4L2 (or
UVC?) code in framerate calculation which depends on the hardware and
be cause of this?

Bests,
Isaac

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framerate is consistently divided by 2.5
  2014-09-06  8:05 Framerate is consistently divided by 2.5 Isaac Nickaein
@ 2014-09-10 13:41 ` Laurent Pinchart
  2014-09-13 21:27   ` Isaac Nickaein
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2014-09-10 13:41 UTC (permalink / raw)
  To: Isaac Nickaein; +Cc: linux-media

Hi Isaac,

On Saturday 06 September 2014 12:35:25 Isaac Nickaein wrote:
> Hi,
> 
> After patching the kernel, the rate that images are captured from the
> camera reduce by a factor of 2.5.

How have you patched the kernel ? If you have both a working and non-working 
version you could use git-bisect to find the commit that causes this breakage.

> Here are a list of frame rates I have tried followed by the resulted frame-
> rate:
> 
> 10 fps --> 4 fps
> 15 fps --> 6 fps
> 25 fps --> 10 fps
> 30 fps --> 12 fps
> 
> Note that all of the rates are consistently divided by 2.5. This seems
> to be a clocking issue to me. Is there any multipliers in V4L2 (or
> UVC?) code in framerate calculation which depends on the hardware and
> be cause of this?

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framerate is consistently divided by 2.5
  2014-09-10 13:41 ` Laurent Pinchart
@ 2014-09-13 21:27   ` Isaac Nickaein
  2014-09-16 12:38     ` Laurent Pinchart
  0 siblings, 1 reply; 5+ messages in thread
From: Isaac Nickaein @ 2014-09-13 21:27 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Ah sorry for the confusion. The USB camera was not working on the old
kernel of ARM board. After patching the kernel, I can grab images but
the framerate is 1/2.5 of expected framerate. The camera works without
any issue on my PC (with kernel 3.13) though.

On Wed, Sep 10, 2014 at 6:11 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Isaac,
>
> On Saturday 06 September 2014 12:35:25 Isaac Nickaein wrote:
>> Hi,
>>
>> After patching the kernel, the rate that images are captured from the
>> camera reduce by a factor of 2.5.
>
> How have you patched the kernel ? If you have both a working and non-working
> version you could use git-bisect to find the commit that causes this breakage.
>
>> Here are a list of frame rates I have tried followed by the resulted frame-
>> rate:
>>
>> 10 fps --> 4 fps
>> 15 fps --> 6 fps
>> 25 fps --> 10 fps
>> 30 fps --> 12 fps
>>
>> Note that all of the rates are consistently divided by 2.5. This seems
>> to be a clocking issue to me. Is there any multipliers in V4L2 (or
>> UVC?) code in framerate calculation which depends on the hardware and
>> be cause of this?
>
> --
> Regards,
>
> Laurent Pinchart
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framerate is consistently divided by 2.5
  2014-09-13 21:27   ` Isaac Nickaein
@ 2014-09-16 12:38     ` Laurent Pinchart
  2014-09-20 13:14       ` Isaac Nickaein
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2014-09-16 12:38 UTC (permalink / raw)
  To: Isaac Nickaein; +Cc: linux-media

Hi Isaac,

On Sunday 14 September 2014 01:57:02 Isaac Nickaein wrote:
> Ah sorry for the confusion. The USB camera was not working on the old
> kernel of ARM board. After patching the kernel, I can grab images but
> the framerate is 1/2.5 of expected framerate. The camera works without
> any issue on my PC (with kernel 3.13) though.

The uvcvideo driver drops erroneous frame by default. Could you please try 
turning that off by setting the nodrop module parameter to 1 and check if the 
frame rate changes ? Please use the yavta command line test application 
(http://git.ideasonboard.org/yavta.git) as other applications might not 
correctly handle frames with the error bit set, or might not take them into 
account to compute the frame rate.

The following command line should be all you need (you might want to change 
the resolution and video device to match your system).

yavta -c -f YUYV -s 640x480 /dev/video0

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framerate is consistently divided by 2.5
  2014-09-16 12:38     ` Laurent Pinchart
@ 2014-09-20 13:14       ` Isaac Nickaein
  0 siblings, 0 replies; 5+ messages in thread
From: Isaac Nickaein @ 2014-09-20 13:14 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

Even with "nodrop=1" the framerate is still stuck at ~12fps when it
should be ~30fps. I ran "/yavta -c -f Y800 -s 1280x960 /dev/video0" to
test the camera fps.

Here is the YAVTA output for nodrop=0: http://pastebin.com/bQZcJ0Fd
Here is the YAVTA output for nodrop=1: http://pastebin.com/cFYFUrvN

I used the following command to change the nodrop parameter (UVC is a
built-in kernel module):

echo 1 > /sys/module/uvcvideo/parameters/nodrop


I also tried enabling log for the uvcvideo module:

echo 0xffff > /sys/module/uvcvideo/parameters/trace

And here is the corresponding part of dmesg: http://pastebin.com/eWL3GbE1

There seems to be some errors in this log (e.g. Stream 1 error event
b5 e5 len 12.), but I'm not sure they could be the cause of issue or
not.


Thanks,
Isaac


On Tue, Sep 16, 2014 at 4:08 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Isaac,
>
> On Sunday 14 September 2014 01:57:02 Isaac Nickaein wrote:
>> Ah sorry for the confusion. The USB camera was not working on the old
>> kernel of ARM board. After patching the kernel, I can grab images but
>> the framerate is 1/2.5 of expected framerate. The camera works without
>> any issue on my PC (with kernel 3.13) though.
>
> The uvcvideo driver drops erroneous frame by default. Could you please try
> turning that off by setting the nodrop module parameter to 1 and check if the
> frame rate changes ? Please use the yavta command line test application
> (http://git.ideasonboard.org/yavta.git) as other applications might not
> correctly handle frames with the error bit set, or might not take them into
> account to compute the frame rate.
>
> The following command line should be all you need (you might want to change
> the resolution and video device to match your system).
>
> yavta -c -f YUYV -s 640x480 /dev/video0
>
> --
> Regards,
>
> Laurent Pinchart
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-20 13:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-06  8:05 Framerate is consistently divided by 2.5 Isaac Nickaein
2014-09-10 13:41 ` Laurent Pinchart
2014-09-13 21:27   ` Isaac Nickaein
2014-09-16 12:38     ` Laurent Pinchart
2014-09-20 13:14       ` Isaac Nickaein

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.