[FFmpeg-devel] [PATCH 1/2] avcodec/jpeg2000dec: fix HT block decoder issue #10905

2024-05-17 Thread WATANABE Osamu
Signed-off-by: Pierre-Anthony Lemieux --- libavcodec/jpeg2000htdec.c | 122 +++-- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c index fa704b665e..62f70c32a8 100644 --- a/libavcodec/jpeg2000htde

[FFmpeg-devel] [PATCH 2/2] test/jpeg2000dec: regenerate ds0_ht_01_b11 (HTJ2K lossless)

2024-05-17 Thread WATANABE Osamu
Signed-off-by: Pierre-Anthony Lemieux --- tests/ref/fate/jpeg2000dec-ds0_ht_01_b11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ref/fate/jpeg2000dec-ds0_ht_01_b11 b/tests/ref/fate/jpeg2000dec-ds0_ht_01_b11 index af3eaa086d..d923cc2109 100644 --- a/tests/ref/fate/jpeg20

[FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: fix HT block decoder issue #10905

2024-05-17 Thread WATANABE Osamu
Signed-off-by: Pierre-Anthony Lemieux --- libavcodec/jpeg2000htdec.c | 122 --- tests/ref/fate/jpeg2000dec-ds0_ht_01_b11 | 2 +- 2 files changed, 63 insertions(+), 61 deletions(-) diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c index fa704b66

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: fix HT block decoder

2024-05-27 Thread WATANABE Osamu
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 wrote: > > On Sun, May 19, 2024 at 9:02?AM Andreas Rheinhardt > wrot

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/jpeg2000dec: Add support for placeholder passes, CAP, and CPF markers

2024-06-15 Thread WATANABE Osamu
Hi Pierre, Here is the list of supported J2K reference codestreams. p0_10.j2k p1_01.j2k p1_02.j2k p1_03.j2k p1_04.j2k p1_05.j2k p1_06.j2k ds0_hm_15_b8.j2k ds0_ht_02_b11.j2k ds0_ht_02_b12.j2k ds0_ht_03_b11.j2k ds0_ht_03_b14.j2k ds0_ht_04_b11.j2k ds0_ht_04_b12.j2k ds0_ht_05_b11.j2k ds0_ht_05_b12.j2k

Re: [FFmpeg-devel] [PATCH v2] avcodec/jpeg2000dec: Add support for placeholder passes, CAP, and CPF markers

2024-06-18 Thread WATANABE Osamu
First of all, I appreciate your kind review. I'm writing to discuss the changes and would like to hear your feedback on these. > On Jun 18, 2024, at 23:20, Tomas Hardin wrote: > > > It seems this patch combines a lot of things that might be better to > split into separate patches for easier r

Re: [FFmpeg-devel] [PATCH v2] avcodec/jpeg2000dec: Add support for placeholder passes, CAP, and CPF markers

2024-06-20 Thread WATANABE Osamu
> On Jun 19, 2024, at 17:27, Tomas Hardin wrote: > > ons 2024-06-19 klockan 05:51 +0000 skrev WATANABE Osamu: >> First of all, I appreciate your kind review. >> I'm writing to discuss the changes and would like to hear your >> feedback on these. >> &g

Re: [FFmpeg-devel] [PATCH v3 2/3] avcodec/jpeg2000dec: Add support for placeholder passes

2024-06-24 Thread WATANABE Osamu
Placeholder pass is a coding pass having zero length. It is necessary to keep pass boundaries of layers for the transcoding from HT to non HT codestream. It is defined in the spec of HTJ2K. A detaled explanation is available at https://ds.jpeg.org/documents/jpeg2000/wg1n100680-101-COM-Guideline

Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-07-13 Thread WATANABE Osamu
> @Osamu, did you check if the decoded images fall within the tolerances > specified in 15444-4? Yes, I did. It has been confirmed that the decoder passes all the test cases defined in 15444-4. The errors (PAE and MSE) in the reconstructed images are within the allowable tolerances. > On Jul

Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-07-29 Thread WATANABE Osamu
> @Osamu Watanabe Can you update the patch to make FFMPEG exit when > encountering an illegal codestream, even if FFMPEG can theoretically > decode it? I will update the patch in a few days. > On Jul 27, 2024, at 6:11, Pierre-Anthony Lemieux wrote: > > On Fri, Jul 26, 2024 at 1:04?AM Tomas Har

Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-07-31 Thread WATANABE Osamu
According to the suggestions for v4, I have posted the patch set v5. It is confirmed that the decoder with v5 passes all the conformance testing defined in ISO/IEC 15444-4. Best, Osamu > On Jul 31, 2024, at 6:39, Michael Niedermayer wrote: > > On Tue, Jul 30, 2024 at 10:22:37PM +0200, Tomas

Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-07-31 Thread WATANABE Osamu
I found that the subject for this v5 set of patches was wrong. I have posted the v6 with the correction. > On Aug 1, 2024, at 10:58, WATANABE Osamu > wrote: > > According to the suggestions for v4, I have posted the patch set v5. > > It is confirmed that the decoder with

Re: [FFmpeg-devel] [PATCH v7 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-08-06 Thread WATANABE Osamu
Hi Pierre, Thanks for suggesting the improvements. All the suggestions have been reflected in version 8 of the patch set. Best, Osamu > On Aug 6, 2024, at 2:28, Pierre-Anthony Lemieux wrote: > > Hi Osamu, > > Below are suggested improvements to error messages. > > There are also a couple of

Re: [FFmpeg-devel] [PATCH] fate/jpeg2000dec: add selected conformance codestreams from ISO/IEC 15444-4

2024-08-21 Thread WATANABE Osamu
Hi Pierre, Tomas, For lossy codestreams, I found a potential problem on the current 9x7 integer IDWT (which will be activated with the +bitexact flag.) I have confirmed that FFMPEG passes all the test cases without the flag. The problem has been locally solved with the updated code, however, th

Re: [FFmpeg-devel] [PATCH] fate/jpeg2000dec: add selected conformance codestreams from ISO/IEC 15444-4

2024-08-26 Thread WATANABE Osamu
nary point. > On Aug 23, 2024, at 1:36, Pierre-Anthony Lemieux wrote: > > On Thu, Aug 22, 2024 at 2:24?AM WATANABE Osamu > wrote: >> >> Hi Pierre, Tomas, >> >> For lossy codestreams, I found a potential problem on the current 9x7 >> integer I

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/jpeg2000dec: Update FATE refs for conformance testing defined in ISO/IEC 15444-4

2024-08-29 Thread WATANABE Osamu
Hi Pierre, Thanks for pointing it out. I will include them and then submit v2 of the patch set. Best, Osamu > 2024/08/30 1:52、Pierre-Anthony Lemieux のメール: > > ?On Thu, Aug 29, 2024 at 1:29?AM Osamu Watanabe > wrote: >> >> The FATE refs are updated to reflect changes in the [PATCH 1/2]. > > I

Re: [FFmpeg-devel] [PATCH v3 1/2] avcodec/jpeg2000dec: Fix FF_DWT97_INT to pass the conformance testing defined in ISO/IEC 15444-4.

2024-09-05 Thread WATANABE Osamu
Some typos and trailing white spaces are found. Those will be corrected in the upcoming v4. > On Sep 5, 2024, at 10:54, WATANABE Osamu > wrote: > > This commit fixes the problem described below on the integer version of the > inverse DWT processing (FF_DWT97_INT, https://

Re: [FFmpeg-devel] [PATCH] jpeg200dec: reset in_tile_headers flag between frames

2024-10-24 Thread WATANABE Osamu
It looks good to me. Thank you for catching this. FYI - The patch has been confirmed to pass all the test cases defined in ISO/IEC 15444-4. > On Oct 25, 2024, at 9:28, Pierre-Anthony Lemieux wrote: > > Fixes https://trac.ffmpeg.org/ticket/11266 > > On Thu, Oct 24, 2024 at 5:23?PM wrote: >> >

Re: [FFmpeg-devel] [PATCH] fate/jpeg2000dec: add missing ISO/IEC 15444-4 conformance tests

2024-11-08 Thread WATANABE Osamu
Hi Pierre, LGTM. I have also confirmed that this patch passes all the test cases defined in ISO/IEC 15444-4 conformance testing. That means the PAE and MSE values with the reconstructed images are under allowable tolerance. Best, Osamu > On Nov 9, 2024, at 6:09, p...@sandflow.com wrote: > >

Re: [FFmpeg-devel] [PATCH] fate/jpeg2000dec: add missing ISO/IEC 15444-4 conformance tests

2024-11-11 Thread WATANABE Osamu
I have confirmed that these failures in FATE were due to the insufficient floating point precision of a 32-bit environment. The commit 82467b635efced67c1767cb810af1f3c31a2e493 introduces the improved dequantization in FF_DWT97_INT path and makes FFmpeg compliant for ISO/IEC 15444-4 (Conformance

Re: [FFmpeg-devel] [PATCH v7] avcodec/jpeg2000: Fix FF_DWT97_INT to pass the conformance testing defined in ISO/IEC 15444-4

2024-11-11 Thread WATANABE Osamu
Thanks. I found the cause of these UBSAN errors. I will send a patch to fix those soon. > On Nov 10, 2024, at 0:54, James Almer wrote: > > On 11/8/2024 2:23 AM, Pierre-Anthony Lemieux wrote: >> Ok will merge the patch below. > > src/libavcodec/jpeg2000dec.c:1972:117: runtime error: left shift

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000: Fix undefined behaviour in left shift operations

2024-11-12 Thread WATANABE Osamu
This patch is incomplete because the UBSAN error in libavcodec/tests/jpeg2000dwt.c has not been fixed. I will send the v2 patch soon. > On Nov 11, 2024, at 17:34, WATANABE Osamu > wrote: > > This patch fixes undefined behaviour error in left shift > operations in jp

Re: [FFmpeg-devel] [PATCH v7] avcodec/jpeg2000: Fix FF_DWT97_INT to pass the conformance testing defined in ISO/IEC 15444-4

2024-11-07 Thread WATANABE Osamu
Hi Pierre, This message is not an error but a warning that stays there before this patch. I think the warning is a separate issue. Best, Osamu > 2024/11/08 9:02、Pierre-Anthony Lemieux のメール: > > ?I get with the following error with > jpeg2000/itu-iso/codestreams_profile1/p1_03.j2k: > > `[jpeg

Re: [FFmpeg-devel] [PATCH v7] avcodec/jpeg2000: Fix FF_DWT97_INT to pass the conformance testing defined in ISO/IEC 15444-4

2024-11-07 Thread WATANABE Osamu
Thank you! > 2024/11/08 14:23、Pierre-Anthony Lemieux のメール: > > ?Ok will merge the patch below. > >> On Thu, Nov 7, 2024 at 9:21?PM WATANABE Osamu >> wrote: >> >> Hi Pierre, >> >> This message is not an error but a warning that stays there befo

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000: Fix undefined behaviour in left shift operations

2024-12-04 Thread WATANABE Osamu
Sorry, this is a mistake. Please ignore this. > On Dec 5, 2024, at 15:37, WATANABE Osamu > wrote: > > This patch fixes undefined behaviour error in left shift > operations in jpeg2000dec.c and jpeg2000htdec.c. > > Signed-off-by: Osamu Watanabe > --- > lib