Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: WATANABE Osamu <owatanab@es.takushoku-u.ac.jp>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: fix HT block decoder
Date: Mon, 27 May 2024 07:25:53 +0000
Message-ID: <EA70EECF-5E21-4E44-A32C-B932F54EE889@es.takushoku-u.ac.jp> (raw)
In-Reply-To: <CAF_7JxB5hvGcr+_OS=yo3GdnjHWpXcE8R=g+8V=G+hvem3aaEQ@mail.gmail.com>

I suggest fixing Line 416 and 430 as follows.

> - int cond = stream->pos <= length;
> + int cond = stream->pos < length;

Those are also related to the issue (ticket 10905.)


> On May 20, 2024, at 1:09, Pierre-Anthony Lemieux <pal@sandflow.com> wrote:
> 
> On Sun, May 19, 2024 at 9:02?AM Andreas Rheinhardt
> <andreas.rheinhardt@outlook.com> wrote:
>> 
>> pal@sandflow.com:
>>> From: Pierre-Anthony Lemieux <pal@palemieux.com>
>>> 
>>> Addresses https://trac.ffmpeg.org/ticket/10905
>>> 
>>> Co-authored-by: Osamu Watanabe <owatanab@es.takushoku-u.ac.jp>
>>> Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
>>> --> @@ -1297,14 +1299,14 @@ ff_jpeg2000_decode_htj2k(const
>> Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c
>>>     for (int y = 0; y < height; y++) {
>>>         for (int x = 0; x < width; x++) {
>>>             n = x + (y * t1->stride);
>>> -            val = sample_buf[x + (y * width)];
>>> +            val = sample_buf[x + (y * quad_buf_width)];
>>>             /* Convert sign-magnitude to two's complement. */
>>>             val = val >> 31 ? 0x80000000 - val : val;
>>>             val >>= (pLSB - 1);
>>>             t1->data[n] = val;
>>>         }
>>>     }
>>> -free:
>>> +    free:
>> 
>> Spurious change. It also seems unintentional and undesirable.
> 
> Yes. Will fix before merging.
> 
>> 
>>>     av_freep(&sample_buf);
>>>     av_freep(&block_states);
>>>     return ret;
>> 
>> _______________________________________________
>> 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".


_______________________________________________
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".

      reply	other threads:[~2024-05-27  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19 15:07 pal
2024-05-19 16:01 ` Andreas Rheinhardt
2024-05-19 16:09   ` Pierre-Anthony Lemieux
2024-05-27  7:25     ` WATANABE Osamu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EA70EECF-5E21-4E44-A32C-B932F54EE889@es.takushoku-u.ac.jp \
    --to=owatanab@es.takushoku-u.ac.jp \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git