Browse code

swscale/alphablend: Fix big endian formats on LE

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Michael Niedermayer authored on 2015/08/09 22:59:12
Showing 1 changed files
... ...
@@ -44,7 +44,7 @@ int ff_sws_alphablendaway(SwsContext *c, const uint8_t *src[],
44 44
                     const uint16_t *a = src[plane_count] + srcStride[plane_count] * y;
45 45
                           uint16_t *d = dst[plane      ] + dstStride[plane] * y;
46 46
                     unsigned target = plane && !(desc->flags & AV_PIX_FMT_FLAG_RGB) ? 1<<desc->comp[0].depth_minus1 : 0;
47
-                    if ((!isBE(c->dstFormat)) == !HAVE_BIGENDIAN) {
47
+                    if ((!isBE(c->srcFormat)) == !HAVE_BIGENDIAN) {
48 48
                         for (x = 0; x < w; x++) {
49 49
                             unsigned u = s[x]*a[x] + target*(max-a[x]) + off;
50 50
                             d[x] = av_clip((u + (u >> shift)) >> shift, 0, max);