]> git.sesse.net Git - ffmpeg/blobdiff - libswscale/swscale_internal.h
Merge remote-tracking branch 'hexene/stagefright'
[ffmpeg] / libswscale / swscale_internal.h
index 07ae72b236d9017919a10810e1fabc09ff02ea8d..0e62b38bcc61ba88c53afbeee264e533652b97b3 100644 (file)
@@ -418,12 +418,12 @@ typedef struct SwsContext {
     yuv2packed2_fn yuv2packed2;
     yuv2packedX_fn yuv2packedX;
 
-    void (*lumToYV12)(uint8_t *dst, const uint8_t *src,
+    void (*lumToYV12)(uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3,
                       int width, uint32_t *pal); ///< Unscaled conversion of luma plane to YV12 for horizontal scaler.
-    void (*alpToYV12)(uint8_t *dst, const uint8_t *src,
+    void (*alpToYV12)(uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3,
                       int width, uint32_t *pal); ///< Unscaled conversion of alpha plane to YV12 for horizontal scaler.
     void (*chrToYV12)(uint8_t *dstU, uint8_t *dstV,
-                      const uint8_t *src1, const uint8_t *src2,
+                      const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
                       int width, uint32_t *pal); ///< Unscaled conversion of chroma planes to YV12 for horizontal scaler.
     /**
      * Scale one horizontal line of input data using a bilinear filter
@@ -592,6 +592,12 @@ const char *sws_format_name(enum PixelFormat format);
         || (x)==PIX_FMT_YUV422P16BE \
         || (x)==PIX_FMT_YUV444P16BE \
     )
+
+#define isPlanar(x)  (              \
+        isPlanarYUV(x)              \
+        ||  (x)==PIX_FMT_GBR24P     \
+    )
+
 #define isYUV(x)        (           \
            (x)==PIX_FMT_UYVY422     \
         || (x)==PIX_FMT_YUYV422     \
@@ -668,6 +674,7 @@ const char *sws_format_name(enum PixelFormat format);
 #define isAnyRGB(x)     (           \
             isRGBinInt(x)           \
         ||  isBGRinInt(x)           \
+        ||  (x)==PIX_FMT_GBR24P     \
     )
 #define isALPHA(x)      (           \
            (x)==PIX_FMT_BGRA64BE    \
@@ -687,7 +694,8 @@ const char *sws_format_name(enum PixelFormat format);
         || (x)==PIX_FMT_YUYV422     \
         || (x)==PIX_FMT_UYVY422     \
         || (x)==PIX_FMT_Y400A       \
-        || isAnyRGB(x)              \
+        ||  isRGBinInt(x)           \
+        ||  isBGRinInt(x)           \
     )
 #define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_GRAY8A)