1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 17:42:17 +00:00

vo_opengl: rpi: use overlay for yuv420p too

The video code can deal fine with feeding software image formats to
hwdec interop drivers. In RPI's case, this is preferable for
performance, working around OpenGL bugs (see RPI firmware issue #666),
and because OpenGL rendering doesn't bring too many advantages due to
RPI supporting GLES 2.0 only.

Maybe a way to force the normal video path is needed later. But
currently, this can be tested by just not loading the hwdec interop
driver.

If you run command-line mpv and set --hwdec to something that does
not load the RPI interop layer, you'll even have to use --hwdec-preload
manually to get it enabled.
This commit is contained in:
wm4 2016-09-30 13:48:47 +02:00
parent 2aba6972cf
commit ab07caf39d

View File

@ -386,10 +386,15 @@ static int create(struct gl_hwdec *hw)
return 0;
}
static bool test_format(struct gl_hwdec *hw, int imgfmt)
{
return imgfmt == IMGFMT_MMAL || imgfmt == IMGFMT_420P;
}
const struct gl_hwdec_driver gl_hwdec_rpi_overlay = {
.name = "rpi-overlay",
.api = HWDEC_RPI,
.imgfmt = IMGFMT_MMAL,
.test_format = test_format,
.create = create,
.reinit = reinit,
.overlay_frame = overlay_frame,