mirror of https://github.com/mpv-player/mpv
fixed palette support
based on patch by Joey Parrish <joey@nicewarrior.org> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9280 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
127530fe9f
commit
57c6546a5d
|
@ -78,6 +78,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||
dmpi->planes[0]=mpi->planes[0]+
|
||||
vf->priv->crop_y*mpi->stride[0]+
|
||||
vf->priv->crop_x*(mpi->bpp/8);
|
||||
dmpi->planes[1]=mpi->planes[1]; // passthrough rgb8 palette
|
||||
}
|
||||
dmpi->stride[0]=mpi->stride[0];
|
||||
dmpi->width=mpi->width;
|
||||
|
|
|
@ -228,6 +228,8 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||
if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);
|
||||
#endif
|
||||
// we've used DR, so we're ready...
|
||||
if(!(mpi->flags&MP_IMGFLAG_PLANAR))
|
||||
vf->priv->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
|
||||
return vf_next_put_image(vf,vf->priv->dmpi);
|
||||
}
|
||||
|
||||
|
@ -255,6 +257,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||
vf->priv->exp_y*vf->priv->dmpi->stride[0]+vf->priv->exp_x*(vf->priv->dmpi->bpp/8),
|
||||
mpi->planes[0], mpi->w*(vf->priv->dmpi->bpp/8), mpi->h,
|
||||
vf->priv->dmpi->stride[0],mpi->stride[0]);
|
||||
vf->priv->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
|
||||
}
|
||||
#ifdef OSD_SUPPORT
|
||||
if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);
|
||||
|
|
|
@ -48,6 +48,8 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
if(mpi->flags&MP_IMGFLAG_DIRECT){
|
||||
// we've used DR, so we're ready...
|
||||
if(!(mpi->flags&MP_IMGFLAG_PLANAR))
|
||||
((mp_image_t*)mpi->priv)->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
|
||||
return vf_next_put_image(vf,(mp_image_t*)mpi->priv);
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||
mirror(dmpi->planes[0],mpi->planes[0],
|
||||
dmpi->stride[0],mpi->stride[0],
|
||||
dmpi->w,dmpi->h,dmpi->bpp>>3,mpi->imgfmt);
|
||||
dmpi->planes[1]=mpi->planes[1]; // passthrough rgb8 palette
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
|
|
|
@ -91,6 +91,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||
rotate(dmpi->planes[0],mpi->planes[0],
|
||||
dmpi->stride[0],mpi->stride[0],
|
||||
dmpi->w,dmpi->h,dmpi->bpp>>3,vf->priv->direction);
|
||||
dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
|
|
Loading…
Reference in New Issue