diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 12:53:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 12:53:26 +0200 |
commit | 2dbc93455c148bbd051549a7ed5c88fb08c853c5 (patch) | |
tree | 41461a4365556582fe991c06ed4624d4767ef05d /libswscale/swscale_unscaled.c | |
parent | cccb45751e93142d71be78f6bb90bbfb50ee13be (diff) | |
parent | 80521c1997a23e148edf89e11b939ab8646297ca (diff) | |
download | ffmpeg-streaming-2dbc93455c148bbd051549a7ed5c88fb08c853c5.zip ffmpeg-streaming-2dbc93455c148bbd051549a7ed5c88fb08c853c5.tar.gz |
Merge commit '80521c1997a23e148edf89e11b939ab8646297ca'
* commit '80521c1997a23e148edf89e11b939ab8646297ca':
build: allow targets to specify extra objects to link with executables
swscale: avoid pointless use of compound literals
libm: add fallbacks for various single-precision functions
network: use getservbyport() only if available
network: add fallbacks for INADDR_LOOPBACK and INET_ADDRSTRLEN
Include sys/time.h before sys/resource.h
Conflicts:
Makefile
configure
libavutil/libm.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/swscale_unscaled.c')
-rw-r--r-- | libswscale/swscale_unscaled.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index e27eaa1..0fe974f 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -451,6 +451,11 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t *src[], uint8_t *dst[], int dstStride[]) { int alpha_first = 0; + const uint8_t *src102[] = { src[1], src[0], src[2] }; + const uint8_t *src201[] = { src[2], src[0], src[1] }; + int stride102[] = { srcStride[1], srcStride[0], srcStride[2] }; + int stride201[] = { srcStride[2], srcStride[0], srcStride[1] }; + if (c->srcFormat != AV_PIX_FMT_GBRP) { av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n", av_get_pix_fmt_name(c->srcFormat), @@ -460,15 +465,13 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t *src[], switch (c->dstFormat) { case AV_PIX_FMT_BGR24: - gbr24ptopacked24((const uint8_t *[]) { src[1], src[0], src[2] }, - (int []) { srcStride[1], srcStride[0], srcStride[2] }, + gbr24ptopacked24(src102, stride102, dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW); break; case AV_PIX_FMT_RGB24: - gbr24ptopacked24((const uint8_t *[]) { src[2], src[0], src[1] }, - (int []) { srcStride[2], srcStride[0], srcStride[1] }, + gbr24ptopacked24(src201, stride201, dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW); break; @@ -476,8 +479,7 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t *src[], case AV_PIX_FMT_ARGB: alpha_first = 1; case AV_PIX_FMT_RGBA: - gbr24ptopacked32((const uint8_t *[]) { src[2], src[0], src[1] }, - (int []) { srcStride[2], srcStride[0], srcStride[1] }, + gbr24ptopacked32(src201, stride201, dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW); break; @@ -485,8 +487,7 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t *src[], case AV_PIX_FMT_ABGR: alpha_first = 1; case AV_PIX_FMT_BGRA: - gbr24ptopacked32((const uint8_t *[]) { src[1], src[0], src[2] }, - (int []) { srcStride[1], srcStride[0], srcStride[2] }, + gbr24ptopacked32(src102, stride102, dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW); break; |