|
|
|
@@ -1417,7 +1417,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], |
|
|
|
if (!src[plane] || (plane == 1 && !src[2])) { |
|
|
|
if (is16BPS(c->dstFormat) || isNBPS(c->dstFormat)) { |
|
|
|
fillPlane16(dst[plane], dstStride[plane], length, height, y, |
|
|
|
plane == 3, desc_dst->comp[plane].depth_minus1, |
|
|
|
plane == 3, desc_dst->comp[plane].depth, |
|
|
|
isBE(c->dstFormat)); |
|
|
|
} else { |
|
|
|
fillPlane(dst[plane], dstStride[plane], length, height, y, |
|
|
|
@@ -1427,8 +1427,8 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], |
|
|
|
if(isNBPS(c->srcFormat) || isNBPS(c->dstFormat) |
|
|
|
|| (is16BPS(c->srcFormat) != is16BPS(c->dstFormat)) |
|
|
|
) { |
|
|
|
const int src_depth = desc_src->comp[plane].depth_minus1 + 1; |
|
|
|
const int dst_depth = desc_dst->comp[plane].depth_minus1 + 1; |
|
|
|
const int src_depth = desc_src->comp[plane].depth; |
|
|
|
const int dst_depth = desc_dst->comp[plane].depth; |
|
|
|
const uint16_t *srcPtr2 = (const uint16_t *) srcPtr; |
|
|
|
uint16_t *dstPtr2 = (uint16_t*)dstPtr; |
|
|
|
|
|
|
|
@@ -1543,7 +1543,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], |
|
|
|
} else { |
|
|
|
if (is16BPS(c->srcFormat) && is16BPS(c->dstFormat)) |
|
|
|
length *= 2; |
|
|
|
else if (!desc_src->comp[0].depth_minus1) |
|
|
|
else if (desc_src->comp[0].depth == 1) |
|
|
|
length >>= 3; // monowhite/black |
|
|
|
for (i = 0; i < height; i++) { |
|
|
|
memcpy(dstPtr, srcPtr, length); |
|
|
|
@@ -1648,7 +1648,7 @@ void ff_get_unscaled_swscale(SwsContext *c) |
|
|
|
dstFormat == AV_PIX_FMT_BGRA64LE || dstFormat == AV_PIX_FMT_BGRA64BE)) |
|
|
|
c->swscale = planarRgb16ToRgb16Wrapper; |
|
|
|
|
|
|
|
if (av_pix_fmt_desc_get(srcFormat)->comp[0].depth_minus1 == 7 && |
|
|
|
if (av_pix_fmt_desc_get(srcFormat)->comp[0].depth == 8 && |
|
|
|
isPackedRGB(srcFormat) && dstFormat == AV_PIX_FMT_GBRP) |
|
|
|
c->swscale = rgbToPlanarRgbWrapper; |
|
|
|
|
|
|
|
|