aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-25 21:51:25 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2013-01-27 15:28:07 -0500
commit4eb93bed4e9b6daca7d3dd716a7517cd53dd5a95 (patch)
tree0c83aa474451868dd4aeb823b264eb606b5608a8 /libswscale/swscale.c
parent2026eb1408a718c37835eb4b258c63714ab3205e (diff)
downloadffmpeg-4eb93bed4e9b6daca7d3dd716a7517cd53dd5a95.tar.gz
swscale: GBRP output support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index dac8b37468..4fb6d6c6e3 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -380,6 +380,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
yuv2packed1_fn yuv2packed1 = c->yuv2packed1;
yuv2packed2_fn yuv2packed2 = c->yuv2packed2;
yuv2packedX_fn yuv2packedX = c->yuv2packedX;
+ yuv2anyX_fn yuv2anyX = c->yuv2anyX;
const int chrSrcSliceY = srcSliceY >> c->chrSrcVSubSample;
const int chrSrcSliceH = -((-srcSliceH) >> c->chrSrcVSubSample);
int should_dither = is9_OR_10BPS(c->srcFormat) ||
@@ -554,7 +555,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
/* hmm looks like we can't use MMX here without overwriting
* this array's tail */
ff_sws_init_output_funcs(c, &yuv2plane1, &yuv2planeX, &yuv2nv12cX,
- &yuv2packed1, &yuv2packed2, &yuv2packedX);
+ &yuv2packed1, &yuv2packed2, &yuv2packedX, &yuv2anyX);
}
{
@@ -651,7 +652,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
dstW, c->lumDither8, 0);
}
}
- } else {
+ } else if (yuv2packedX) {
if (c->yuv2packed1 && vLumFilterSize == 1 &&
vChrFilterSize <= 2) { // unscaled RGB
int chrAlpha = vChrFilterSize == 1 ? 0 : vChrFilter[2 * dstY + 1];
@@ -676,6 +677,12 @@ static int swScale(SwsContext *c, const uint8_t *src[],
chrUSrcPtr, chrVSrcPtr, vChrFilterSize,
alpSrcPtr, dest[0], dstW, dstY);
}
+ } else {
+ yuv2anyX(c, vLumFilter + dstY * vLumFilterSize,
+ lumSrcPtr, vLumFilterSize,
+ vChrFilter + dstY * vChrFilterSize,
+ chrUSrcPtr, chrVSrcPtr, vChrFilterSize,
+ alpSrcPtr, dest, dstW, dstY);
}
}
}
@@ -717,7 +724,7 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
ff_sws_init_output_funcs(c, &c->yuv2plane1, &c->yuv2planeX,
&c->yuv2nv12cX, &c->yuv2packed1,
- &c->yuv2packed2, &c->yuv2packedX);
+ &c->yuv2packed2, &c->yuv2packedX, &c->yuv2anyX);
ff_sws_init_input_funcs(c);