From 185655c601cd893866fee42acab19a481f44941e Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 24 Nov 2011 10:40:05 -0800 Subject: swscale: add support for planar RGB input. --- libswscale/swscale_internal.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 7048265899..b20e0a34e0 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -427,6 +427,16 @@ typedef struct SwsContext { void (*chrToYV12)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *pal); ///< Unscaled conversion of chroma planes to YV12 for horizontal scaler. + + /** + * Functions to read planar input, such as planar RGB, and convert + * internally to Y/UV. + */ + /** @{ */ + void (*readLumPlanar)(uint8_t *dst, const uint8_t *src[4], int width); + void (*readChrPlanar)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width); + /** @} */ + /** * Scale one horizontal line of input data using a bilinear filter * to produce one line of output data. Compared to SwsContext->hScale(), @@ -594,6 +604,10 @@ const char *sws_format_name(enum PixelFormat format); (av_pix_fmt_descriptors[x].nb_components >= 2 && \ !(av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) +#define isPlanar(x) \ + (av_pix_fmt_descriptors[x].nb_components >= 2 && \ + (av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) + #define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_Y400A) extern const uint64_t ff_dither4[2]; -- cgit v1.2.3