Browse Source

j2kdec: remove pointless swapping

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Paul B Mahol Michael Niedermayer 13 years ago
parent
commit
0f3886fa7d
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      libavcodec/j2kdec.c

+ 1
- 4
libavcodec/j2kdec.c View File

@@ -269,7 +269,7 @@ static int get_siz(J2kDecoderContext *s)
} }
break; break;
case 4: case 4:
s->avctx->pix_fmt = PIX_FMT_BGRA;
s->avctx->pix_fmt = PIX_FMT_RGBA;
break; break;
} }


@@ -848,9 +848,6 @@ static int decode_tile(J2kDecoderContext *s, J2kTile *tile)
if (tile->codsty[0].mct) if (tile->codsty[0].mct)
mct_decode(s, tile); mct_decode(s, tile);


if (s->avctx->pix_fmt == PIX_FMT_BGRA) // RGBA -> BGRA
FFSWAP(int *, src[0], src[2]);

if (s->precision <= 8) { if (s->precision <= 8) {
for (compno = 0; compno < s->ncomponents; compno++){ for (compno = 0; compno < s->ncomponents; compno++){
y = tile->comp[compno].coord[1][0] - s->image_offset_y; y = tile->comp[compno].coord[1][0] - s->image_offset_y;


Loading…
Cancel
Save