swscale: add support for planar RGB input.

This commit is contained in:
Ronald S. Bultje
2011-11-24 10:40:05 -08:00
parent db431f7efe
commit 185655c601
4 changed files with 147 additions and 9 deletions

View File

@@ -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];