diff mbox series

[FFmpeg-devel,4/5] libavcodec/jpeg2000dec.c: Enable image offsets

Message ID 20200621184208.27665-4-gautamramk@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/5] libavcodec/jpeg2000.c: Precinct size check removed | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Gautam Ramakrishnan June 21, 2020, 6:42 p.m. UTC
From: Gautam Ramakrishnan <gautamramk@gmail.com>

This patch enables support for image offsets.
---
 libavcodec/jpeg2000dec.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Michael Niedermayer June 22, 2020, 9:16 p.m. UTC | #1
On Mon, Jun 22, 2020 at 12:12:07AM +0530, gautamramk@gmail.com wrote:
> From: Gautam Ramakrishnan <gautamramk@gmail.com>
> 
> This patch enables support for image offsets.
> ---
>  libavcodec/jpeg2000dec.c | 4 ----
>  1 file changed, 4 deletions(-)

Is there a testcase for this ? (a file using this)

[...]
Carl Eugen Hoyos June 22, 2020, 9:29 p.m. UTC | #2
Am Mo., 22. Juni 2020 um 23:16 Uhr schrieb Michael Niedermayer
<michael@niedermayer.cc>:
>
> On Mon, Jun 22, 2020 at 12:12:07AM +0530, gautamramk@gmail.com wrote:
> > From: Gautam Ramakrishnan <gautamramk@gmail.com>
> >
> > This patch enables support for image offsets.
> > ---
> >  libavcodec/jpeg2000dec.c | 4 ----
> >  1 file changed, 4 deletions(-)
>
> Is there a testcase for this ? (a file using this)

p1_01.j2k (one component) and p1_07.j2k (which has two different components)

Carl Eugen
Michael Niedermayer June 23, 2020, 11:02 p.m. UTC | #3
On Mon, Jun 22, 2020 at 11:29:44PM +0200, Carl Eugen Hoyos wrote:
> Am Mo., 22. Juni 2020 um 23:16 Uhr schrieb Michael Niedermayer
> <michael@niedermayer.cc>:
> >
> > On Mon, Jun 22, 2020 at 12:12:07AM +0530, gautamramk@gmail.com wrote:
> > > From: Gautam Ramakrishnan <gautamramk@gmail.com>
> > >
> > > This patch enables support for image offsets.
> > > ---
> > >  libavcodec/jpeg2000dec.c | 4 ----
> > >  1 file changed, 4 deletions(-)
> >
> > Is there a testcase for this ? (a file using this)
> 
> p1_01.j2k (one component) and p1_07.j2k (which has two different components)

ok, if this is used, then of course we cant just leave these
checks that error out on these files

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 546a646668..c8c89803ac 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -288,10 +288,6 @@  static int get_siz(Jpeg2000DecoderContext *s)
     s->tile_offset_y  = bytestream2_get_be32u(&s->g); // YT0Siz
     ncomponents       = bytestream2_get_be16u(&s->g); // CSiz
 
-    if (s->image_offset_x || s->image_offset_y) {
-        avpriv_request_sample(s->avctx, "Support for image offsets");
-        return AVERROR_PATCHWELCOME;
-    }
     if (av_image_check_size2(s->width, s->height, s->avctx->max_pixels, AV_PIX_FMT_NONE, 0, s->avctx)) {
         avpriv_request_sample(s->avctx, "Large Dimensions");
         return AVERROR_PATCHWELCOME;