diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-03-30 18:50:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-04-02 23:54:50 +0200 |
commit | 7fb70d27a26bb4072edf68857636fa4343ee24a3 (patch) | |
tree | cf6d3736c597faaa678250981ff185569b205a75 /libavcodec/j2kenc.c | |
parent | 644d15716d5cfb28e4ea0c0ada163f70807e9a5c (diff) | |
download | ffmpeg-7fb70d27a26bb4072edf68857636fa4343ee24a3.tar.gz |
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>
Diffstat (limited to 'libavcodec/j2kenc.c')
-rw-r--r-- | libavcodec/j2kenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index c3a7a264dc..d837b8b949 100644 --- a/libavcodec/j2kenc.c +++ b/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); |