summaryrefslogtreecommitdiff
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-06-29 09:39:43 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2011-06-29 09:45:52 -0700
commitef1ee362b36893cd1cc1e9c7de378e9cb239b0e8 (patch)
tree22cef8fbcaf058673d151ca32ad157c2445d6d95 /libswscale/swscale_internal.h
parentf68069868bd17a46f2dd80f87b712845f2fcfa56 (diff)
swscale: implement >8bit scaling support.
This means that precision is retained when scaling between sample formats with >8 bits per component (48bit RGB, 16bit grayscale, 9/10/16bit YUV).
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r--libswscale/swscale_internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index c1eed8ac96..cfb19d9c13 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -205,6 +205,7 @@ typedef struct SwsContext {
enum PixelFormat srcFormat; ///< Source pixel format.
int dstFormatBpp; ///< Number of bits per pixel of the destination pixel format.
int srcFormatBpp; ///< Number of bits per pixel of the source pixel format.
+ int scalingBpp;
int chrSrcHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in source image.
int chrSrcVSubSample; ///< Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in source image.
int chrDstHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in destination image.
@@ -446,6 +447,15 @@ typedef struct SwsContext {
void (*lumConvertRange)(int16_t *dst, int width); ///< Color range conversion function for luma plane if needed.
void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); ///< Color range conversion function for chroma planes if needed.
+ /**
+ * dst[..] = (src[..] << 8) | src[..];
+ */
+ void (*scale8To16Rv)(uint16_t *dst, const uint8_t *src, int len);
+ /**
+ * dst[..] = src[..] >> 4;
+ */
+ void (*scale19To15Fw)(int16_t *dst, const int32_t *src, int len);
+
int needs_hcscale; ///< Set if there are chroma planes to be converted.
} SwsContext;