diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-30 18:40:55 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-30 18:51:21 +0100 |
commit | 4d2f1d8c930a596f33cf3b26182e9098fe274967 (patch) | |
tree | f278fd8673b9961bfcd97ce3f2706cbba949551d | |
parent | 70c25c62051f018cb2d2c2b51bd2d631a4c61650 (diff) | |
download | ffmpeg-4d2f1d8c930a596f33cf3b26182e9098fe274967.tar.gz |
swscale.c:remove fill_plane9or10() use fillPlane16()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswscale/swscale.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 71fb9899c4..632e85a44f 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -62,28 +62,6 @@ static av_always_inline void fillPlane(uint8_t *plane, int stride, int width, } } -static void fill_plane9or10(uint8_t *plane, int stride, int width, - int height, int y, uint8_t val, - const int dst_depth, const int big_endian) -{ - int i, j; - uint16_t *dst = (uint16_t *) (plane + stride * y); -#define FILL8TO9_OR_10(wfunc) \ - for (i = 0; i < height; i++) { \ - for (j = 0; j < width; j++) { \ - wfunc(&dst[j], (val << (dst_depth - 8)) | \ - (val >> (16 - dst_depth))); \ - } \ - dst += stride / 2; \ - } - if (big_endian) { - FILL8TO9_OR_10(AV_WB16); - } else { - FILL8TO9_OR_10(AV_WL16); - } -} - - static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize) @@ -681,18 +659,15 @@ static int swScale(SwsContext *c, const uint8_t *src[], } } } - if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf) { int length = dstW; int height = dstY - lastDstY; - if (is16BPS(c->dstFormat)) - length *= 2; - if (is9_OR_10BPS(dstFormat)) { + if (is16BPS(dstFormat) || isNBPS(dstFormat)) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat); - fill_plane9or10(dst[3], dstStride[3], length, height, lastDstY, - 255, desc->comp[3].depth_minus1 + 1, - isBE(dstFormat)); + fillPlane16(dst[3], dstStride[3], length, height, lastDstY, + 1, desc->comp[3].depth_minus1, + isBE(dstFormat)); } else fillPlane(dst[3], dstStride[3], length, height, lastDstY, 255); } |