diff options
author | Philip Langdale <philipl@overt.org> | 2019-01-31 20:39:17 -0800 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-04-21 23:55:22 +0300 |
commit | ffb8ffdd5599822c8bb0b6993eca96babab3d279 (patch) | |
tree | 0fb3fd0db32c5feb3ca00c38bf09cbeeaec56035 /video/out | |
parent | 4c133f3b452ce4f013d805faf5de182414de93f8 (diff) | |
download | mpv-ffb8ffdd5599822c8bb0b6993eca96babab3d279.tar.bz2 mpv-ffb8ffdd5599822c8bb0b6993eca96babab3d279.tar.xz |
vo/gpu: ra_pl: Add helper to get pl_fmt from ra_format
When interacting directly with libplacebo, we may need to pass a
pl_fmt based on an ra_format. Although the mapping is currently
trivial, it's worth wrapping to make it easy to adapt if this
changes in the future.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/placebo/ra_pl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/placebo/ra_pl.h b/video/out/placebo/ra_pl.h index c1c0c16af5..4b3414bb28 100644 --- a/video/out/placebo/ra_pl.h +++ b/video/out/placebo/ra_pl.h @@ -7,6 +7,11 @@ struct ra *ra_create_pl(const struct pl_gpu *gpu, struct mp_log *log); const struct pl_gpu *ra_pl_get(const struct ra *ra); +static inline const struct pl_fmt *ra_pl_fmt_get(const struct ra_format *format) +{ + return format->priv; +} + // Wrap a pl_tex into a ra_tex struct, returns if successful bool mppl_wrap_tex(struct ra *ra, const struct pl_tex *pltex, struct ra_tex *out_tex); |