diff options
author | Niklas Haas <git@nand.wakku.to> | 2015-03-12 22:18:16 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-12 23:20:21 +0100 |
commit | 3974a5ca5e55ce00e8177a672e0627bfabee4118 (patch) | |
tree | 382713c02863c460e5c9b4007bf4bf8b4d89e49e /video/out/gl_osd.c | |
parent | e74a4d5bc0b101fbfb371942c00d3a77267dc4a6 (diff) | |
download | mpv-3974a5ca5e55ce00e8177a672e0627bfabee4118.tar.bz2 mpv-3974a5ca5e55ce00e8177a672e0627bfabee4118.tar.xz |
vo_opengl: refactor shader generation (part 2)
This adds stuff related to gamma, linear light, sigmoid, BT.2020-CL,
etc, as well as color management. Also adds a new gamma function (gamma22).
This adds new parameters to configure the CMS settings, in particular
letting us target simple colorspaces without requiring usage of a 3DLUT.
This adds smoothmotion. Mostly working, but it's still sensitive to
timing issues. It's based on an actual queue now, but the queue size
is kept small to avoid larger amounts of latency.
Also makes “upscale before blending” the default strategy.
This is justified because the "render after blending" thing doesn't seme
to work consistently any way (introduces stutter due to the way vsync
timing works, or something), so this behavior is a bit closer to master
and makes pausing/unpausing less weird/jumpy.
This adds the remaining scalers, including bicubic_fast, sharpen3,
sharpen5, polar filters and antiringing. Apparently, sharpen3/5 also
consult scale-param1, which was undocumented in master.
This also implements cropping and chroma transformation, plus
rotation/flipping. These are inherently part of the same logic, although
it's a bit rough around the edges in some case, mainly due to the fallback
code paths (for bilinear scaling without indirection).
Diffstat (limited to 'video/out/gl_osd.c')
-rw-r--r-- | video/out/gl_osd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/gl_osd.c b/video/out/gl_osd.c index 0ab85f59c4..7a9532d416 100644 --- a/video/out/gl_osd.c +++ b/video/out/gl_osd.c @@ -294,7 +294,7 @@ static void gen_osd_cb(void *pctx, struct sub_bitmaps *imgs) osd->num_subparts * sizeof(osd->subparts[0])); } -static void write_quad(struct vertex *va, float matrix[3][3], +static void write_quad(struct vertex *va, float matrix[3][2], float x0, float y0, float x1, float y1, float tx0, float ty0, float tx1, float ty1, float tex_w, float tex_h, const uint8_t color[4]) @@ -312,7 +312,7 @@ static void write_quad(struct vertex *va, float matrix[3][3], #undef COLOR_INIT } -static int generate_verts(struct mpgl_osd_part *part, float matrix[3][3]) +static int generate_verts(struct mpgl_osd_part *part, float matrix[3][2]) { int num_vertices = part->num_subparts * 6; MP_TARRAY_GROW(part, part->vertices, num_vertices); @@ -337,7 +337,7 @@ static int generate_verts(struct mpgl_osd_part *part, float matrix[3][3]) return num_vertices; } -static void draw_part(struct mpgl_osd *ctx, int index, float matrix[3][3]) +static void draw_part(struct mpgl_osd *ctx, int index, float matrix[3][2]) { GL *gl = ctx->gl; struct mpgl_osd_part *part = ctx->parts[index]; @@ -377,7 +377,7 @@ void mpgl_osd_draw_part(struct mpgl_osd *ctx, int vp_w, int vp_h, int index) for (int x = 0; x < div[0]; x++) { for (int y = 0; y < div[1]; y++) { - float matrix[3][3]; + float matrix[3][2]; gl_matrix_ortho2d(matrix, 0, vp_w, 0, vp_h); |