Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does uvc_frame_info structure represent #9

Open
sheraz045 opened this issue Aug 23, 2021 · 8 comments
Open

What does uvc_frame_info structure represent #9

sheraz045 opened this issue Aug 23, 2021 · 8 comments

Comments

@sheraz045
Copy link

Hi,
I wanted to understand uvc_frame_info structure

struct uvc_frame_info {
unsigned int width;
unsigned int height;
unsigned int intervals[8];
};

static const struct uvc_frame_info uvc_frames_yuyv[] = {
{
640,
360,
{666666, 10000000, 50000000, 0},
},

what does {666666, 10000000, 50000000, 0}, represent even though intervals has 8 values why only four are filled

@kbingham
Copy link

The intervals[8] represents a list of up to 8 possible frame intervals.

It's a value in 100ns units, but the '0' means the end of the list. So only the first three 'frame intervals' are valid.

@sheraz045
Copy link
Author

sheraz045 commented Aug 23, 2021

Okay So
666666 represents 15FPS ( 15 fps = 1 / 15 * 10 000 000 = 666 666 )

then what is fps for the below values
10000000, 50000000

@kbingham
Copy link

I believe so yes.

@kbingham
Copy link

kbingham commented Aug 23, 2021

That would make them 1 and ... 0.2 FPS ... So ... the values might all need validating
0.2 FPS would be one frame every 5 seconds ?

I guess that means a long exposure? ... Where are these values from ?

Aha, I see them being used here:

{666666, 10000000, 50000000, 0},

@sheraz045
Copy link
Author

I wanted to test 60FPS for that changing the below line from
{666666, 10000000, 50000000, 0},
to
{166666, 10000000, 50000000, 0},
is this sufficient or any other change required

@kbingham
Copy link

Test it and see.

But this wlhe version of the code is quite old I think. There might be a lot of other factors to consider.
Have you already got a successful stream set up?

@sheraz045
Copy link
Author

i am testing it, if you say it is quite old is there any new version of this code and i am working on Linux version 4.19.0

@wlhe
Copy link
Owner

wlhe commented Aug 31, 2021

i am testing it, if you say it is quite old is there any new version of this code and i am working on Linux version 4.19.0

Upstream repository latest version: https://git.ideasonboard.org/uvc-gadget.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants