1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-15 19:47:32 +00:00

vo_opengl: fix passing along swizzle from hwdec interop

In theory this was needed for the previous commit (but wasn't in
practice, since for hwdec the LUMINANCE_ALPHA mangling is not applied
anymore, and ANGLE uses RG textures in absence of GL_ARB_texture_rg for
whatever crazy reasons).

In practice this caused funky colors on OSX with the uyvy422 format,
which is also fixed in this commit.
This commit is contained in:
wm4 2016-05-10 21:11:58 +02:00
parent a3d416c3d3
commit 1f6e71c7fa
2 changed files with 4 additions and 0 deletions

View File

@ -246,6 +246,8 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image,
.tex_w = IOSurfaceGetWidthOfPlane(surface, i),
.tex_h = IOSurfaceGetHeightOfPlane(surface, i),
};
snprintf(out_frame->planes[i].swizzle, sizeof(out_frame->planes[i].swizzle),
"%s", f->gl[i].swizzle);
}
return 0;

View File

@ -2571,6 +2571,8 @@ static void gl_video_upload_image(struct gl_video *p, struct mp_image *mpi)
.gl_target = plane->gl_target,
.gl_texture = plane->gl_texture,
};
snprintf(vimg->planes[n].swizzle, sizeof(vimg->planes[n].swizzle),
"%s", plane->swizzle);
}
} else {
MP_FATAL(p, "Mapping hardware decoded surface failed.\n");