diff options
author | wm4 <wm4@nowhere> | 2015-01-10 19:11:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-10 19:13:16 +0100 |
commit | e5f2072364ac450e0f593f534ddee2ae1a8f2176 (patch) | |
tree | c514d8966aca2f8992822e4c35638655fac82da3 /video | |
parent | 242558bec1a91b1c04dd0fe346ea6daa628ef710 (diff) | |
download | mpv-e5f2072364ac450e0f593f534ddee2ae1a8f2176.tar.bz2 mpv-e5f2072364ac450e0f593f534ddee2ae1a8f2176.tar.xz |
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).
Diffstat (limited to 'video')
-rw-r--r-- | video/img_format.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/img_format.c b/video/img_format.c index 7df0923cfe..9f7bf32779 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -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; } |