diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-23 22:05:55 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-23 22:05:55 +0000 |
commit | 41b847f6a8af2013338a63c1b7311f804b2bf5b7 (patch) | |
tree | d4dfb5b969edcaf963f4ca68030a3e16650b2589 /spudec.c | |
parent | 4bd87c35eb568740b2ae8e6c636d4e63622aa067 (diff) | |
download | mpv-41b847f6a8af2013338a63c1b7311f804b2bf5b7.tar.bz2 mpv-41b847f6a8af2013338a63c1b7311f804b2bf5b7.tar.xz |
sws_ prefix, more seperation between internal & external swscaler API
sws_scale() returns the number of outputed lines
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9495 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'spudec.c')
-rw-r--r-- | spudec.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -724,27 +724,27 @@ static void scale_image(int x, int y, scale_pixel* table_x, scale_pixel* table_y 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)) |