[Mplayer-cvslog] CVS: main spudec.c,1.40,1.41
Michael Niedermayer CVS
michael at mplayerhq.hu
Sun Feb 23 23:06:24 CET 2003
- Previous message: [Mplayer-cvslog] CVS: main/libvo vo_vesa.c,1.87,1.88 vo_x11.c,1.126,1.127
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vf_sab.c,1.1,1.2 vf_scale.c,1.32,1.33 vf_smartblur.c,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv23109
Modified Files:
spudec.c
Log Message:
sws_ prefix, more seperation between internal & external swscaler API
sws_scale() returns the number of outputed lines
Index: spudec.c
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- spudec.c 16 Feb 2003 15:26:30 -0000 1.40
+++ spudec.c 23 Feb 2003 22:05:35 -0000 1.41
@@ -724,27 +724,27 @@
void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh, int ds,
unsigned char *s1, unsigned char *s2, int sw, int sh, int ss)
{
- SwsContext *ctx;
+ struct SwsContext *ctx;
static SwsFilter filter;
static int firsttime = 1;
static float oldvar;
int i;
- if (!firsttime && oldvar != spu_gaussvar) freeVec(filter.lumH);
+ if (!firsttime && oldvar != spu_gaussvar) sws_freeVec(filter.lumH);
if (firsttime) {
filter.lumH = filter.lumV =
- filter.chrH = filter.chrV = getGaussianVec(spu_gaussvar, 3.0);
- normalizeVec(filter.lumH, 1.0);
+ filter.chrH = filter.chrV = sws_getGaussianVec(spu_gaussvar, 3.0);
+ sws_normalizeVec(filter.lumH, 1.0);
firsttime = 0;
oldvar = spu_gaussvar;
}
- ctx=getSwsContext(sw, sh, IMGFMT_Y800, dw, dh, IMGFMT_Y800, SWS_GAUSS, &filter, NULL);
- ctx->swScale(ctx,&s1,&ss,0,sh,&d1,&ds);
+ ctx=sws_getContext(sw, sh, IMGFMT_Y800, dw, dh, IMGFMT_Y800, SWS_GAUSS, &filter, NULL);
+ sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1;
- ctx->swScale(ctx,&s2,&ss,0,sh,&d2,&ds);
+ sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
for (i=ds*dh-1; i>=0; i--) if (d2[i]==0) d2[i] = 1; else if (d2[i]==255) d2[i] = 0;
- freeSwsContext(ctx);
+ sws_freeContext(ctx);
}
void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride))
- Previous message: [Mplayer-cvslog] CVS: main/libvo vo_vesa.c,1.87,1.88 vo_x11.c,1.126,1.127
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vf_sab.c,1.1,1.2 vf_scale.c,1.32,1.33 vf_smartblur.c,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list