Skip to content

Conversation

@deanlee
Copy link
Contributor

@deanlee deanlee commented Nov 14, 2021

No description provided.

@deanlee deanlee closed this Nov 14, 2021
@deanlee deanlee reopened this Nov 15, 2021
@deanlee deanlee force-pushed the ui_yuv_stream branch 3 times, most recently from b3159d5 to 1847f25 Compare November 18, 2021 02:58
@adeebshihadeh adeebshihadeh changed the title ui: remove RGB stream, use YUV vipc stream ui: use YUV vipc stream Nov 26, 2021
@adeebshihadeh
Copy link
Contributor

Is this ready for review? If not, what's missing?

@deanlee
Copy link
Contributor Author

deanlee commented Nov 26, 2021

The only problem is c2 , do we need to use rgb on c2 and yuv on other devices?
c2 is optimized for rgb

@pd0wm
Copy link
Contributor

pd0wm commented Nov 26, 2021

What do you mean by C2 is optimized for RGB?

We want all devices to run the same code.

@deanlee
Copy link
Contributor Author

deanlee commented Nov 26, 2021

how about EGLImageTexture? it's used for avoid rgb memory copy on C2, should we remove it?

@pd0wm
Copy link
Contributor

pd0wm commented Nov 26, 2021

You can remove it in this PR. We have to verify using the snapdragon profiler that the end result is the same or better.

You should still be able to skip the copy on C2 right?

@deanlee
Copy link
Contributor Author

deanlee commented Nov 26, 2021

let's keep it until find a general way to avoid copy

@deanlee
Copy link
Contributor Author

deanlee commented Nov 26, 2021

Now there is an additional VISIONSTREAM RGB MAP, Can it be changed to yuv format?

@pd0wm
Copy link
Contributor

pd0wm commented Nov 26, 2021

Not sure if it makes sense to convert that to YUV. Is it a problem to keep it as RGB for now? It's fine if displaying it in watch3 is inefficient, it only has to be viewed for debugging.

@deanlee
Copy link
Contributor Author

deanlee commented Nov 26, 2021

it can't be displayed after this Pr.

@pd0wm
Copy link
Contributor

pd0wm commented Nov 26, 2021

That's ok. I'll think of a way to display it again after merging this. Feel free to remove it from watch3 temporarily.

@deanlee
Copy link
Contributor Author

deanlee commented Nov 26, 2021

The cpu usage on c2 is almost the same as before after use YUV stream . I think it's ready for review now.

@deanlee deanlee marked this pull request as ready for review November 26, 2021 17:34
@deanlee deanlee marked this pull request as draft December 10, 2021 16:47
@jwooning
Copy link
Contributor

I did some profiling on this PR and it seems there is no real performance or memory benefit yet.

Can you also look into the openCL kernels in camerad to use the yuv buffers, this should then allow to remove some of the used rgb buffers.

@pd0wm
Copy link
Contributor

pd0wm commented Dec 17, 2021

To save on memory bandwidth we need to skip the intermediate step into an RGB buffer, and make the debayer step go straight to a YUV output buffer. Feel free to only do the C2 debayer kernel first, so we can profile and see it there are any actual benefits.

@deanlee deanlee closed this Feb 2, 2022
@deanlee deanlee deleted the ui_yuv_stream branch March 1, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants