mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 14:56:55 +00:00
vo_gpu_next: use correct pixel size when mapping formats
`total_bits` may be less than the true pixel stride (`bpp`) for formats which contain extra ignored components (e.g. rgb0).
This commit is contained in:
parent
38a7562ebe
commit
7a6dc79e29
@ -401,7 +401,7 @@ static int plane_data_from_imgfmt(struct pl_plane_data out_data[4],
|
||||
if (total_bits % 8)
|
||||
return 0; // pixel size is not byte-aligned
|
||||
|
||||
data->pixel_stride = total_bits / 8;
|
||||
data->pixel_stride = desc.bpp[p] / 8;
|
||||
data->type = (desc.flags & MP_IMGFLAG_TYPE_FLOAT)
|
||||
? PL_FMT_FLOAT
|
||||
: PL_FMT_UNORM;
|
||||
|
Loading…
Reference in New Issue
Block a user