summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-27 19:17:25 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-27 19:17:25 +0000
commit6148204f048cfc24a33a4dc619e809306cd306c9 (patch)
tree523fc41a4a5da45bbe5258269a3b40faed65d91c
parentbd682b07cb2a54fc87ebb01db3ab4f6b15ecf5da (diff)
downloadmpv-6148204f048cfc24a33a4dc619e809306cd306c9.tar.bz2
mpv-6148204f048cfc24a33a4dc619e809306cd306c9.tar.xz
-sws 6 (luma bicubic & chroma bilinear)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6581 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--postproc/swscale.c19
-rw-r--r--postproc/swscale.h1
2 files changed, 15 insertions, 5 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index 1e1eb46972..0f58c4d756 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -257,6 +257,8 @@ IMGFMT_BGR15,
IMGFMT_BGR16,
IMGFMT_BGR24,
IMGFMT_BGR32,
+IMGFMT_RGB24,
+IMGFMT_RGB32,
//IMGFMT_Y8,
IMGFMT_Y800,
//IMGFMT_YUY2,
@@ -940,6 +942,7 @@ void swsGetFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, Sws
case 3: *flags|= SWS_X; break;
case 4: *flags|= SWS_POINT; break;
case 5: *flags|= SWS_AREA; break;
+ case 6: *flags|= SWS_BICUBLIN; break;
default:*flags|= SWS_BILINEAR; break;
}
@@ -2251,10 +2254,12 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
const int filterAlign= cpuCaps.hasMMX ? 4 : 1;
initFilter(&c->hLumFilter, &c->hLumFilterPos, &c->hLumFilterSize, c->lumXInc,
- srcW , dstW, filterAlign, 1<<14, flags,
+ srcW , dstW, filterAlign, 1<<14,
+ (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC) : flags,
srcFilter->lumH, dstFilter->lumH);
initFilter(&c->hChrFilter, &c->hChrFilterPos, &c->hChrFilterSize, c->chrXInc,
- c->chrSrcW, c->chrDstW, filterAlign, 1<<14, flags,
+ c->chrSrcW, c->chrDstW, filterAlign, 1<<14,
+ (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags,
srcFilter->chrH, dstFilter->chrH);
#ifdef ARCH_X86
@@ -2276,11 +2281,13 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
/* precalculate vertical scaler filter coefficients */
initFilter(&c->vLumFilter, &c->vLumFilterPos, &c->vLumFilterSize, c->lumYInc,
- srcH , dstH, 1, (1<<12)-4, flags,
+ srcH , dstH, 1, (1<<12)-4,
+ (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC) : flags,
srcFilter->lumV, dstFilter->lumV);
initFilter(&c->vChrFilter, &c->vChrFilterPos, &c->vChrFilterSize, c->chrYInc,
- c->chrSrcH, c->chrDstH, 1, (1<<12)-4, flags,
- srcFilter->chrV, dstFilter->chrV);
+ c->chrSrcH, c->chrDstH, 1, (1<<12)-4,
+ (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags,
+ srcFilter->chrV, dstFilter->chrV);
// Calculate Buffer Sizes so that they wont run out while handling these damn slices
c->vLumBufSize= c->vLumFilterSize;
@@ -2344,6 +2351,8 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
MSG_INFO("\nSwScaler: Nearest Neighbor / POINT scaler, ");
else if(flags&SWS_AREA)
MSG_INFO("\nSwScaler: Area Averageing scaler, ");
+ else if(flags&SWS_BICUBLIN)
+ MSG_INFO("\nSwScaler: luma BICUBIC / chroma BILINEAR, ");
else
MSG_INFO("\nSwScaler: ehh flags invalid?! ");
diff --git a/postproc/swscale.h b/postproc/swscale.h
index 59e9160ec5..a3f5595aa4 100644
--- a/postproc/swscale.h
+++ b/postproc/swscale.h
@@ -23,6 +23,7 @@
#define SWS_X 8
#define SWS_POINT 0x10
#define SWS_AREA 0x20
+#define SWS_BICUBLIN 0x40
#define SWS_SRC_V_CHR_DROP_MASK 0x300
#define SWS_SRC_V_CHR_DROP_SHIFT 8