From 4eb93bed4e9b6daca7d3dd716a7517cd53dd5a95 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 25 Jan 2013 21:51:25 +0100 Subject: swscale: GBRP output support Signed-off-by: Michael Niedermayer Signed-off-by: Derek Buitenhuis --- libswscale/swscale_internal.h | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 8752672536..f9f023f1cf 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -218,6 +218,40 @@ typedef void (*yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter, const int16_t **alpSrc, uint8_t *dest, int dstW, int y); +/** + * Write one line of horizontally scaled Y/U/V/A to YUV/RGB + * output by doing multi-point vertical scaling between input pixels. + * + * @param c SWS scaling context + * @param lumFilter vertical luma/alpha scaling coefficients, 12bit [0,4096] + * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param lumFilterSize number of vertical luma/alpha input lines to scale + * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096] + * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrFilterSize number of vertical chroma input lines to scale + * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param dest pointer to the output planes. For 16bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * or some output formats. + */ +typedef void (*yuv2anyX_fn)(struct SwsContext *c, const int16_t *lumFilter, + const int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, + const int16_t **chrUSrc, + const int16_t **chrVSrc, int chrFilterSize, + const int16_t **alpSrc, uint8_t **dest, + int dstW, int y); + /* This struct should be aligned on at least a 32-byte boundary. */ typedef struct SwsContext { /** @@ -427,6 +461,7 @@ typedef struct SwsContext { yuv2packed1_fn yuv2packed1; yuv2packed2_fn yuv2packed2; yuv2packedX_fn yuv2packedX; + yuv2anyX_fn yuv2anyX; /// Unscaled conversion of luma plane to YV12 for horizontal scaler. void (*lumToYV12)(uint8_t *dst, const uint8_t *src, @@ -708,7 +743,8 @@ void ff_sws_init_output_funcs(SwsContext *c, yuv2interleavedX_fn *yuv2nv12cX, yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2, - yuv2packedX_fn *yuv2packedX); + yuv2packedX_fn *yuv2packedX, + yuv2anyX_fn *yuv2anyX); void ff_sws_init_swScale_altivec(SwsContext *c); void ff_sws_init_swScale_mmx(SwsContext *c); -- cgit v1.2.3