summaryrefslogtreecommitdiff
path: root/libswscale/swscale_internal.h
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_internal.h
parent2026eb1408a718c37835eb4b258c63714ab3205e (diff)
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_internal.h')
-rw-r--r--libswscale/swscale_internal.h38
1 files changed, 37 insertions, 1 deletions
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);