mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 10:57:34 +09:00
Issue #2101 - Part 2: Use stdint.h types instead of uint8 and friends
Required for upcoming libyuv update
This commit is contained in:
parent
c0c76cd455
commit
42f3296899
19 changed files with 431 additions and 451 deletions
|
|
@ -400,11 +400,11 @@ protected:
|
|||
int half_height = (size.height + 1) >> 1;
|
||||
int c_size = half_width * half_height;
|
||||
int buffer_size = YSIZE(size.width, size.height) + 2 * c_size;
|
||||
auto yuv_scoped = MakeUniqueFallible<uint8[]>(buffer_size);
|
||||
auto yuv_scoped = MakeUniqueFallible<uint8_t[]>(buffer_size);
|
||||
if (!yuv_scoped) {
|
||||
return;
|
||||
}
|
||||
uint8* yuv = yuv_scoped.get();
|
||||
uint8_t* yuv = yuv_scoped.get();
|
||||
|
||||
DataSourceSurface::ScopedMap map(data, DataSourceSurface::READ);
|
||||
if (!map.IsMapped()) {
|
||||
|
|
@ -420,7 +420,7 @@ protected:
|
|||
switch (surf->GetFormat()) {
|
||||
case SurfaceFormat::B8G8R8A8:
|
||||
case SurfaceFormat::B8G8R8X8:
|
||||
rv = libyuv::ARGBToI420(static_cast<uint8*>(map.GetData()),
|
||||
rv = libyuv::ARGBToI420(static_cast<uint8_t*>(map.GetData()),
|
||||
map.GetStride(),
|
||||
yuv, size.width,
|
||||
yuv + cb_offset, half_width,
|
||||
|
|
@ -428,7 +428,7 @@ protected:
|
|||
size.width, size.height);
|
||||
break;
|
||||
case SurfaceFormat::R5G6B5_UINT16:
|
||||
rv = libyuv::RGB565ToI420(static_cast<uint8*>(map.GetData()),
|
||||
rv = libyuv::RGB565ToI420(static_cast<uint8_t*>(map.GetData()),
|
||||
map.GetStride(),
|
||||
yuv, size.width,
|
||||
yuv + cb_offset, half_width,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue