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

Fix wrong read_rgb call in from_rgb8_source #71

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

seysn
Copy link
Contributor

@seysn seysn commented Feb 11, 2025

I saw that YUVBuffer::from_rgb_source and YUVBuffer::from_rgb8_source were very similar and had approximately the same time in benches. I believe this is a typo and the second one was supposed to call read_rgb8 instead of read_rgb.

By changing that, benches changes a lot :

Before

test convert_rgb8_to_yuv_512x512   ... bench:   1,282,626.91 ns/iter (+/- 255,071.37)
test convert_rgb_to_yuv_512x512    ... bench:   1,361,627.65 ns/iter (+/- 24,648.61)

After

test convert_rgb8_to_yuv_512x512   ... bench:     614,115.41 ns/iter (+/- 19,137.52)
test convert_rgb_to_yuv_512x512    ... bench:   1,235,944.20 ns/iter (+/- 173,681.31)

@ralfbiedert
Copy link
Owner

Thanks! Will look into this later today, CI apparently has deprecation issues.

@ralfbiedert ralfbiedert merged commit 0105aac into ralfbiedert:master Feb 11, 2025
0 of 15 checks passed
@ralfbiedert
Copy link
Owner

This is in 0.7.2

@seysn seysn deleted the fix-read-rgb8 branch February 12, 2025 08:59
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

Successfully merging this pull request may close these issues.

2 participants