0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

mp_image: fix clearing to black with p010 format

Using vf_expand (which uses mp_image_clear()) with p010 cleared chroma
to green instead.
This commit is contained in:
wm4 2016-09-29 16:12:58 +02:00
parent f549cec0ac
commit c245d04c37

View File

@ -452,7 +452,7 @@ void mp_image_clear(struct mp_image *img, int x0, int y0, int x1, int y1)
plane_clear[0] = av_le2ne16(0x8000);
} else if (area.imgfmt == IMGFMT_UYVY) {
plane_clear[0] = av_le2ne16(0x0080);
} else if (area.imgfmt == IMGFMT_NV12 || area.imgfmt == IMGFMT_NV21) {
} else if (area.fmt.flags & MP_IMGFLAG_YUV_NV) {
plane_clear[1] = 0x8080;
} else if (area.fmt.flags & MP_IMGFLAG_YUV_P) {
uint16_t chroma_clear = (1 << area.fmt.plane_bits) / 2;