mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
use stored dimensions instead of visible one when (vf_)get_image is called
let's see where does the cola goes :) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16019 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a51778c598
commit
d641bf0337
@ -507,7 +507,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
|||||||
if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
|
if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
|
||||||
// ok, we can do pp in-place (or pp disabled):
|
// ok, we can do pp in-place (or pp disabled):
|
||||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||||
mpi->type, mpi->flags, mpi->w, mpi->h);
|
mpi->type, mpi->flags, mpi->width, mpi->height);
|
||||||
mpi->planes[0]=vf->dmpi->planes[0];
|
mpi->planes[0]=vf->dmpi->planes[0];
|
||||||
mpi->stride[0]=vf->dmpi->stride[0];
|
mpi->stride[0]=vf->dmpi->stride[0];
|
||||||
mpi->width=vf->dmpi->width;
|
mpi->width=vf->dmpi->width;
|
||||||
@ -528,7 +528,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
|||||||
dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||||
MP_IMGTYPE_TEMP,
|
MP_IMGTYPE_TEMP,
|
||||||
MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
||||||
mpi->w,mpi->h);
|
mpi->width,mpi->height);
|
||||||
vf_clone_mpi_attributes(dmpi, mpi);
|
vf_clone_mpi_attributes(dmpi, mpi);
|
||||||
}else{
|
}else{
|
||||||
dmpi=vf->dmpi;
|
dmpi=vf->dmpi;
|
||||||
|
@ -97,7 +97,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||||||
return; // colorspace differ
|
return; // colorspace differ
|
||||||
// ok, we can do pp in-place (or pp disabled):
|
// ok, we can do pp in-place (or pp disabled):
|
||||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||||
mpi->type, mpi->flags | MP_IMGFLAG_READABLE, mpi->w, mpi->h);
|
mpi->type, mpi->flags | MP_IMGFLAG_READABLE, mpi->width, mpi->height);
|
||||||
mpi->planes[0]=vf->dmpi->planes[0];
|
mpi->planes[0]=vf->dmpi->planes[0];
|
||||||
mpi->stride[0]=vf->dmpi->stride[0];
|
mpi->stride[0]=vf->dmpi->stride[0];
|
||||||
mpi->width=vf->dmpi->width;
|
mpi->width=vf->dmpi->width;
|
||||||
@ -117,7 +117,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||||||
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
||||||
// MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
|
// MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
|
||||||
// mpi->w,mpi->h);
|
// mpi->w,mpi->h);
|
||||||
(mpi->w+7)&(~7),(mpi->h+7)&(~7));
|
(mpi->width+7)&(~7),(mpi->height+7)&(~7));
|
||||||
vf->dmpi->w=mpi->w; vf->dmpi->h=mpi->h; // display w;h
|
vf->dmpi->w=mpi->w; vf->dmpi->h=mpi->h; // display w;h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||||||
if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
|
if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
|
||||||
// ok, we can do pp in-place (or pp disabled):
|
// ok, we can do pp in-place (or pp disabled):
|
||||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||||
mpi->type, mpi->flags | MP_IMGFLAG_READABLE, mpi->w, mpi->h);
|
mpi->type, mpi->flags | MP_IMGFLAG_READABLE, mpi->width, mpi->height);
|
||||||
mpi->planes[0]=vf->dmpi->planes[0];
|
mpi->planes[0]=vf->dmpi->planes[0];
|
||||||
mpi->stride[0]=vf->dmpi->stride[0];
|
mpi->stride[0]=vf->dmpi->stride[0];
|
||||||
mpi->width=vf->dmpi->width;
|
mpi->width=vf->dmpi->width;
|
||||||
@ -379,7 +379,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||||||
dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||||
MP_IMGTYPE_TEMP,
|
MP_IMGTYPE_TEMP,
|
||||||
MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
||||||
mpi->w,mpi->h);
|
mpi->width,mpi->height);
|
||||||
vf_clone_mpi_attributes(dmpi, mpi);
|
vf_clone_mpi_attributes(dmpi, mpi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||||||
if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
|
if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
|
||||||
// ok, we can do pp in-place (or pp disabled):
|
// ok, we can do pp in-place (or pp disabled):
|
||||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||||
mpi->type, mpi->flags | MP_IMGFLAG_READABLE, mpi->w, mpi->h);
|
mpi->type, mpi->flags | MP_IMGFLAG_READABLE, mpi->width, mpi->height);
|
||||||
mpi->planes[0]=vf->dmpi->planes[0];
|
mpi->planes[0]=vf->dmpi->planes[0];
|
||||||
mpi->stride[0]=vf->dmpi->stride[0];
|
mpi->stride[0]=vf->dmpi->stride[0];
|
||||||
mpi->width=vf->dmpi->width;
|
mpi->width=vf->dmpi->width;
|
||||||
@ -474,7 +474,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
|||||||
dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||||
MP_IMGTYPE_TEMP,
|
MP_IMGTYPE_TEMP,
|
||||||
MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
|
||||||
mpi->w,mpi->h);
|
mpi->width,mpi->height);
|
||||||
vf_clone_mpi_attributes(dmpi, mpi);
|
vf_clone_mpi_attributes(dmpi, mpi);
|
||||||
}else{
|
}else{
|
||||||
dmpi=vf->dmpi;
|
dmpi=vf->dmpi;
|
||||||
|
Loading…
Reference in New Issue
Block a user