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

cuOSD stb font backend memory too big #209

Open
zxpshadow opened this issue Oct 30, 2023 · 5 comments
Open

cuOSD stb font backend memory too big #209

zxpshadow opened this issue Oct 30, 2023 · 5 comments
Assignees

Comments

@zxpshadow
Copy link

In order to perform asynchronous operations using multiple contexts, it was found that the OSD physical memory was heavily occupied. However, it was found that the backend of the font was heavily occupied, mainly due to measurement_ Text is occupied, so could you please help confirm

  1. Does asynchronous operation require multiple contexts

  2. Can multiple contexts share font backend

  3. Inaccurate measurement of font backend STB font (font set to 10, return height is 12)

@hopef hopef self-assigned this Oct 30, 2023
@zxpshadow
Copy link
Author

thanks, Keep On Waiting

@hopef
Copy link
Collaborator

hopef commented Nov 1, 2023

it was found that the OSD physical memory was heavily occupied
-> Could you expand on this?

@hopef
Copy link
Collaborator

hopef commented Nov 1, 2023

Inaccurate measurement of font backend STB font (font set to 10, return height is 12)
-> The measurement function is designed to return the size of the area needed for the rendering. It may include the background area(like a filled background), not just text.

@zxpshadow
Copy link
Author

Inaccurate measurement of font backend STB font (font set to 10, return height is 12) -> The measurement function is designed to return the size of the area needed for the rendering. It may include the background area(like a filled background), not just text.

pic 1
54ef69ce5b49e25a7f84babbaee2349
pic 2
4dcb9a04cc737bfc332a308c2510552

Sorry for the delay in other matters last week and not responding in a timely manner。
pic 1 shows the actual drawn font height of approximately 19 pixels
pic 2 shows that the font height returned by cuosd_measure_text is 10 pixels
My understanding is cuosd_ Measure_ Text returns the font height occupied by the drawing

@zxpshadow
Copy link
Author

thanks, Keep On Waiting

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

No branches or pull requests

2 participants