avcodec/j2kenc: Replace BGR48 / GRAY16 test by test for number of bits

BGR48 is not supported and this was probably meant to be RGB48 so this fixes
RGB48 a bit

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/389/head
Michael Niedermayer 2 years ago
parent 644d15716d
commit 7fb70d27a2
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavcodec/j2kenc.c

@ -1542,7 +1542,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->lambda = s->picture->quality * LAMBDA_SCALE;
if (avctx->pix_fmt == AV_PIX_FMT_BGR48 || avctx->pix_fmt == AV_PIX_FMT_GRAY16)
if (s->cbps[0] > 8)
copy_frame_16(s);
else
copy_frame_8(s);

Loading…
Cancel
Save