PR #25094 opened by romainhedouin URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25094 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25094.patch
Both branches wrote the same byte. <!-- If this PR requires new FATE test samples, attach them to the PR and list their target paths below (relative to the fate-suite root). Attached filenames must match the sample's filename: ```fate-samples # e.g. vorbis/new-sample.ogg ``` --> >From eae01677f47a200e841188322ad7982714594e34 Mon Sep 17 00:00:00 2001 From: romainhedouin <[email protected]> Date: Thu, 15 Oct 2026 13:02:31 +0200 Subject: [PATCH] avcodec/j2kenc: remove an if/else with identical branches Both branches wrote the same byte. Found during a code review sweep of ffmpeg using an LLM. --- libavcodec/j2kenc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index 6493ebe499..da777580a4 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -279,11 +279,7 @@ static int put_cod(Jpeg2000EncoderContext *s) // SGcod bytestream_put_byte(&s->buf, s->prog); // progression level bytestream_put_be16(&s->buf, s->nlayers); // num of layers - if(s->avctx->pix_fmt == AV_PIX_FMT_YUV444P){ - bytestream_put_byte(&s->buf, 0); // unspecified - }else{ - bytestream_put_byte(&s->buf, 0); // unspecified - } + bytestream_put_byte(&s->buf, 0); // unspecified // SPcod bytestream_put_byte(&s->buf, codsty->nreslevels - 1); // num of decomp. levels bytestream_put_byte(&s->buf, codsty->log2_cblk_width-2); // cblk width -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
