summaryrefslogtreecommitdiff
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-11-24 10:40:05 -0800
committerRonald S. Bultje <rsbultje@gmail.com>2011-11-24 10:40:05 -0800
commit185655c601cd893866fee42acab19a481f44941e (patch)
tree141b0f9554fc8a3232e9421f4643a0a6ec3c38d6 /libswscale/swscale_internal.h
parentdb431f7efec7467219ab370f796e01bd23bc2639 (diff)
swscale: add support for planar RGB input.
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r--libswscale/swscale_internal.h14
1 files changed, 14 insertions, 0 deletions
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];