From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 145754124A for ; Tue, 19 Apr 2022 20:53:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5543668B301; Tue, 19 Apr 2022 23:53:10 +0300 (EEST) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8492968AE4E for ; Tue, 19 Apr 2022 23:53:03 +0300 (EEST) Received: by mail-il1-f171.google.com with SMTP id d3so11331311ilr.10 for ; Tue, 19 Apr 2022 13:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandflow-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5WQn96VkTWGPQ1O5jb8lE4LUZdx255G16ihyKjJOlU0=; b=fB46z62S/NyX0mB2Q7CII4d4yHwDLXaJIvJs5rFkstIHVB6wI0wUDYVE/DUse1nkzI naAVNf5QXq2NfSE6cs16sBDl/AQUWO7G6Fc9PFCMYXoteb/A64QEP84y6bVO574qZRqb /VZi1SImw43CUlcpzNi3qHmPgHp/e4opQ+93cG0OS30by+VGdcFNHrWh+ZsRwK+eOm26 DaX3jgRd1Vcgo9NjHWamCDlVl82OZn/tkCsZEDGg2S6ETGE2ahhg+vjwlOd1thbE7+1z GpmrCJXhF9qZCj/1VGwLqcO3ctnW7iF2LKtdzOSGcBzMmN1/947ZNbJhev0uTYhGP8C4 oeTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5WQn96VkTWGPQ1O5jb8lE4LUZdx255G16ihyKjJOlU0=; b=SM0EWzLSt5pA2IHzFtTcpgB5cU1+Bz1aROzbt/5aJbXpU9GWLxoGfW/wB9lrStR9Wb oJ+TZUW8m9rk6SVO7iIEpUftFsBOK9umOyZupddZ+9n4NmaSj+PbEl0ieNgJM0ELxH39 NiPBkxKzcwlbtHPTpHmbk6tlv/vTlVWybHn4e/GRXQ2CrPouTYA3Zqmd1R9Yi3FckSGC YTKL590HWaT87stUC+oGO7DyA72V/mzOx1vRLtbDpDCn1xO8KG/bTUsue4BO5G/HHZdc xtUgOx1CTqcB6NKpUZ2A6Rl6lME190Bg159cXbgk68BWd6SuRmtjvSDC2WI2i/RiieZb wFWA== X-Gm-Message-State: AOAM532xySDUz7IOc2BH/fzYQ8Qbx95emH2p489cCGxL6q3C253X210a j11ejwBYOyldRl9m9akbT8qy3xBvqEGMyg== X-Google-Smtp-Source: ABdhPJzgJYdPrqBZcOb7DxE8yzTTEmV7t/30Ep74DPbIfQPafEc1jqANraSDn/vcvc3LWZvYBOuGCQ== X-Received: by 2002:a05:6e02:1be4:b0:2cb:e685:cd15 with SMTP id y4-20020a056e021be400b002cbe685cd15mr7553077ilv.307.1650401581860; Tue, 19 Apr 2022 13:53:01 -0700 (PDT) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com. [209.85.166.49]) by smtp.gmail.com with ESMTPSA id ay18-20020a5d9d92000000b0064c77f6aaecsm10913156iob.3.2022.04.19.13.53.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Apr 2022 13:53:01 -0700 (PDT) Received: by mail-io1-f49.google.com with SMTP id q22so12542801iod.2 for ; Tue, 19 Apr 2022 13:53:01 -0700 (PDT) X-Received: by 2002:a05:6602:2c4c:b0:64f:a897:80cb with SMTP id x12-20020a0566022c4c00b0064fa89780cbmr7737653iov.139.1650401580972; Tue, 19 Apr 2022 13:53:00 -0700 (PDT) MIME-Version: 1.0 References: <20220419081701.8021-1-etemesicaleb@gmail.com> In-Reply-To: <20220419081701.8021-1-etemesicaleb@gmail.com> From: Pierre-Anthony Lemieux Date: Tue, 19 Apr 2022 13:52:49 -0700 X-Gmail-Original-Message-ID: Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000:fast-fail if HTJ2K codeblocks are present X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: caleb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: FYI. This is the qualification task for the GSOC project at [1]. [1] https://trac.ffmpeg.org/wiki/SponsoringPrograms/GSoC/2022#AddsupportforPart15totheJPEG2000decoder On Tue, Apr 19, 2022 at 1:17 AM caleb wrote: > > --- > This patch adds support for detecting Part 15 codeblocks to JPEG2000 specified in (Rec. ITU-T T.814 | ISO/IEC 15444-15). > > The decoder on detecting Part 15 codeblocks now fails gracefully with a AVERROR_PATCHWELCOME return code > > libavcodec/jpeg2000.h | 2 ++ > libavcodec/jpeg2000dec.c | 9 +++++++++ > 2 files changed, 11 insertions(+) > > diff --git a/libavcodec/jpeg2000.h b/libavcodec/jpeg2000.h > index d06313425e..e5ecb4cbf9 100644 > --- a/libavcodec/jpeg2000.h > +++ b/libavcodec/jpeg2000.h > @@ -110,6 +110,8 @@ enum Jpeg2000Quantsty { // quantization style > #define JPEG2000_CSTY_PREC 0x01 // Precincts defined in coding style > #define JPEG2000_CSTY_SOP 0x02 // SOP marker present > #define JPEG2000_CSTY_EPH 0x04 // EPH marker present > +#define JPEG2000_CTSY_HTJ2K_F 0x40 // Only HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) are present > +#define JPEG2000_CTSY_HTJ2K_M 0xC0 // HT code blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) can be present > > // Progression orders > #define JPEG2000_PGOD_LRCP 0x00 // Layer-resolution level-component-position progression > diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c > index 92966b11f5..ef4a653afe 100644 > --- a/libavcodec/jpeg2000dec.c > +++ b/libavcodec/jpeg2000dec.c > @@ -521,6 +521,15 @@ static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c) > > c->cblk_style = bytestream2_get_byteu(&s->g); > if (c->cblk_style != 0) { // cblk style > + if (c->cblk_style & JPEG2000_CTSY_HTJ2K_M || c->cblk_style & JPEG2000_CTSY_HTJ2K_F) { > + /* > + * HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) bit-stream > + * Not yet supported in ffmpeg, cannot continue. > + */ > + av_log(s->avctx, AV_LOG_FATAL, "Support for High throughput JPEG 2000 is not yet available\n"); > + return AVERROR_PATCHWELCOME; > + } > + > av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style); > if (c->cblk_style & JPEG2000_CBLK_BYPASS) > av_log(s->avctx, AV_LOG_WARNING, "Selective arithmetic coding bypass\n"); > -- > 2.34.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".