diff options
author | Niklas Haas <git@haasn.xyz> | 2021-04-18 11:48:35 +0200 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2021-11-03 14:09:27 +0100 |
commit | 432581b60485433d5497d461730960fa3a2af402 (patch) | |
tree | 2500cf6d6f2e1abd9d3e8256c1843f9beb8a39c0 /video/out/gpu/lcms.h | |
parent | 5512f53722a46dd7b4844ca8f7e47b5fed2d7259 (diff) | |
download | mpv-432581b60485433d5497d461730960fa3a2af402.tar.bz2 mpv-432581b60485433d5497d461730960fa3a2af402.tar.xz |
vo_gpu: lift ra_ctx_* opts to a global struct
So I can re-use them for vo_gpu_next.
Diffstat (limited to 'video/out/gpu/lcms.h')
-rw-r--r-- | video/out/gpu/lcms.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/video/out/gpu/lcms.h b/video/out/gpu/lcms.h index 35bbd61fe0..62b2437194 100644 --- a/video/out/gpu/lcms.h +++ b/video/out/gpu/lcms.h @@ -40,4 +40,16 @@ bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **, bool gl_lcms_has_changed(struct gl_lcms *p, enum mp_csp_prim prim, enum mp_csp_trc trc, struct AVBufferRef *vid_profile); +static inline bool gl_parse_3dlut_size(const char *arg, int *p1, int *p2, int *p3) +{ + if (sscanf(arg, "%dx%dx%d", p1, p2, p3) != 3) + return false; + for (int n = 0; n < 3; n++) { + int s = ((int[]) { *p1, *p2, *p3 })[n]; + if (s < 2 || s > 512) + return false; + } + return true; +} + #endif |