mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibGfx: Implement YUV->RGBA color conversion for CPU painting
Using the Rust yuv crate, eagerly convert from YUV to RGBA on the CPU when a GPU context is unavailable. Time spent converting an 8-bit YUV frame with this crate is better than libyuv on ARM by about 20%, and on x86 with AVX2, it achieves similar numbers to libyuv.
This commit is contained in:
committed by
Gregory Bertilson
parent
f434b56ffa
commit
3cfe1f7542
Notes:
github-actions[bot]
2026-04-18 06:25:55 +00:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3cfe1f7542e
@@ -9,6 +9,8 @@
|
||||
#include <AK/Error.h>
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibGfx/Size.h>
|
||||
#include <LibMedia/Color/CodingIndependentCodePoints.h>
|
||||
#include <LibMedia/Subsampling.h>
|
||||
@@ -42,6 +44,8 @@ public:
|
||||
Bytes u_data();
|
||||
Bytes v_data();
|
||||
|
||||
ErrorOr<NonnullRefPtr<Bitmap>> to_bitmap() const;
|
||||
|
||||
SkYUVAPixmaps make_pixmaps() const;
|
||||
|
||||
void expand_samples_to_full_16_bit_range();
|
||||
|
||||
Reference in New Issue
Block a user