mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
draw_bmp: fix for yuy2 format
mp_get_chroma_shift() modifies its argument even if it fails, so we have to restore that. mp_image didn't set chroma shifts for yuy2.
This commit is contained in:
parent
f80a32a8eb
commit
4b4e4b5690
@ -196,6 +196,9 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
|
||||
mpi->flags|=MP_IMGFLAG_SWAPPED;
|
||||
case IMGFMT_YUY2:
|
||||
mpi->chroma_x_shift = 1;
|
||||
mpi->chroma_y_shift = 1;
|
||||
mpi->chroma_width=(mpi->width>>1);
|
||||
mpi->chroma_height=(mpi->height>>1);
|
||||
mpi->bpp=16;
|
||||
mpi->num_planes=1;
|
||||
return;
|
||||
|
@ -511,7 +511,8 @@ void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst,
|
||||
bits = 16;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else
|
||||
bits = 16;
|
||||
}
|
||||
#else
|
||||
int format = IMGFMT_444P;
|
||||
|
Loading…
Reference in New Issue
Block a user