mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
command: change properties added in previous commit
Make their meaning more exact, and don't pretend that there's a reasonable definition for "bits-per-pixel". Also make unset fields unavailable. average_depth still might be inconsistent: for example, 10 bit 4:2:0 is identified as 24 bits, but RGB 4:4:4 as 12 bits. So YUV formats seemingly drop the per-component padding, while RGB formats do not. Internally it's consistent though: 10 bit YUV components are read as 16 bit, and the padding must be 0 (it's basically like an odd fixed- point representation, rather than a bitfield).
This commit is contained in:
@@ -240,8 +240,10 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt)
|
||||
if ((desc.bpp[0] % 8) != 0)
|
||||
desc.align_x = 8 / desc.bpp[0]; // expect power of 2
|
||||
|
||||
if (pd->flags & AV_PIX_FMT_FLAG_HWACCEL)
|
||||
if (pd->flags & AV_PIX_FMT_FLAG_HWACCEL) {
|
||||
desc.flags |= MP_IMGFLAG_HWACCEL;
|
||||
desc.plane_bits = 8; // usually restricted to 8 bit; may change
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user