Mercurial > mplayer.hg
comparison libmpcodecs/vf_qp.c @ 30642:a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
author | diego |
---|---|
date | Sun, 21 Feb 2010 15:48:03 +0000 |
parents | a7b908875c14 |
children | 686241d65b86 |
comparison
equal
deleted
inserted
replaced
30641:b14b32c20935 | 30642:a972c1a4a012 |
---|---|
40 int8_t *qp; | 40 int8_t *qp; |
41 int8_t lut[257]; | 41 int8_t lut[257]; |
42 int qp_stride; | 42 int qp_stride; |
43 }; | 43 }; |
44 | 44 |
45 static int config(struct vf_instance_s* vf, | 45 static int config(struct vf_instance *vf, |
46 int width, int height, int d_width, int d_height, | 46 int width, int height, int d_width, int d_height, |
47 unsigned int flags, unsigned int outfmt){ | 47 unsigned int flags, unsigned int outfmt){ |
48 int h= (height+15)>>4; | 48 int h= (height+15)>>4; |
49 int i; | 49 int i; |
50 | 50 |
74 } | 74 } |
75 | 75 |
76 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); | 76 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); |
77 } | 77 } |
78 | 78 |
79 static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){ | 79 static void get_image(struct vf_instance *vf, mp_image_t *mpi){ |
80 if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change | 80 if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change |
81 // ok, we can do pp in-place (or pp disabled): | 81 // ok, we can do pp in-place (or pp disabled): |
82 vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, | 82 vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, |
83 mpi->type, mpi->flags, mpi->w, mpi->h); | 83 mpi->type, mpi->flags, mpi->w, mpi->h); |
84 mpi->planes[0]=vf->dmpi->planes[0]; | 84 mpi->planes[0]=vf->dmpi->planes[0]; |
91 mpi->stride[2]=vf->dmpi->stride[2]; | 91 mpi->stride[2]=vf->dmpi->stride[2]; |
92 } | 92 } |
93 mpi->flags|=MP_IMGFLAG_DIRECT; | 93 mpi->flags|=MP_IMGFLAG_DIRECT; |
94 } | 94 } |
95 | 95 |
96 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ | 96 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ |
97 mp_image_t *dmpi; | 97 mp_image_t *dmpi; |
98 int x,y; | 98 int x,y; |
99 | 99 |
100 if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ | 100 if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ |
101 // no DR, so get a new image! hope we'll get DR buffer: | 101 // no DR, so get a new image! hope we'll get DR buffer: |
134 } | 134 } |
135 | 135 |
136 return vf_next_put_image(vf,dmpi, pts); | 136 return vf_next_put_image(vf,dmpi, pts); |
137 } | 137 } |
138 | 138 |
139 static void uninit(struct vf_instance_s* vf){ | 139 static void uninit(struct vf_instance *vf){ |
140 if(!vf->priv) return; | 140 if(!vf->priv) return; |
141 | 141 |
142 if(vf->priv->qp) av_free(vf->priv->qp); | 142 if(vf->priv->qp) av_free(vf->priv->qp); |
143 vf->priv->qp= NULL; | 143 vf->priv->qp= NULL; |
144 | 144 |