mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 13:41:49 +00:00
vo_opengl: add FBOTEX_FUZZY alias
Minor reusability factor
This commit is contained in:
parent
6e1c950069
commit
a60e725113
@ -84,6 +84,7 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h,
|
||||
GLenum iformat, int flags);
|
||||
#define FBOTEX_FUZZY_W 1
|
||||
#define FBOTEX_FUZZY_H 2
|
||||
#define FBOTEX_FUZZY (FBOTEX_FUZZY_W | FBOTEX_FUZZY_H)
|
||||
void fbotex_set_filter(struct fbotex *fbo, GLenum gl_filter);
|
||||
|
||||
// A 3x2 matrix, with the translation part separate.
|
||||
|
@ -1769,8 +1769,7 @@ static void pass_render_frame(struct gl_video *p)
|
||||
get_scale_factors(p, scale);
|
||||
rect.ml *= scale[0]; rect.mr *= scale[0];
|
||||
rect.mt *= scale[1]; rect.mb *= scale[1];
|
||||
finish_pass_fbo(p, &p->blend_subs_fbo, vp_w, vp_h, 0,
|
||||
FBOTEX_FUZZY_W | FBOTEX_FUZZY_H);
|
||||
finish_pass_fbo(p, &p->blend_subs_fbo, vp_w, vp_h, 0, FBOTEX_FUZZY);
|
||||
double vpts = p->image.mpi->pts;
|
||||
if (vpts == MP_NOPTS_VALUE)
|
||||
vpts = p->osd_pts;
|
||||
@ -1794,15 +1793,14 @@ static void gl_video_interpolate_frame(struct gl_video *p, int fbo,
|
||||
struct frame_timing *t)
|
||||
{
|
||||
int vp_w = p->dst_rect.x1 - p->dst_rect.x0,
|
||||
vp_h = p->dst_rect.y1 - p->dst_rect.y0,
|
||||
fuzz = FBOTEX_FUZZY_W | FBOTEX_FUZZY_H;
|
||||
vp_h = p->dst_rect.y1 - p->dst_rect.y0;
|
||||
|
||||
// First of all, figure out if we have a frame availble at all, and draw
|
||||
// it manually + reset the queue if not
|
||||
if (!p->surfaces[p->surface_now].pts) {
|
||||
pass_render_frame(p);
|
||||
finish_pass_fbo(p, &p->surfaces[p->surface_now].fbotex,
|
||||
vp_w, vp_h, 0, fuzz);
|
||||
vp_w, vp_h, 0, FBOTEX_FUZZY);
|
||||
p->surfaces[p->surface_now].pts = t ? t->pts : 0;
|
||||
p->surfaces[p->surface_now].vpts = p->image.mpi->pts;
|
||||
p->surface_idx = p->surface_now;
|
||||
@ -1838,7 +1836,7 @@ static void gl_video_interpolate_frame(struct gl_video *p, int fbo,
|
||||
MP_STATS(p, "new-pts");
|
||||
pass_render_frame(p);
|
||||
finish_pass_fbo(p, &p->surfaces[surface_dst].fbotex,
|
||||
vp_w, vp_h, 0, fuzz);
|
||||
vp_w, vp_h, 0, FBOTEX_FUZZY);
|
||||
p->surfaces[surface_dst].pts = t->pts;
|
||||
p->surfaces[surface_dst].vpts = p->image.mpi->pts;
|
||||
p->surface_idx = surface_dst;
|
||||
|
Loading…
Reference in New Issue
Block a user