opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
75.69k stars 55.61k forks source link

imgcodecs: jpeg: refactoring for JpegEncoder #25453

Closed Kumataro closed 1 week ago

Kumataro commented 1 week ago

Close #25452

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

Kumataro commented 1 week ago

It is not expected result... Failed tests are for TIFFs.

Windows10-x64 / BuildAndTest failed 45 minutes ago in 1h 23m 51s

2024-04-19T07:17:18.0050147Z [ RUN      ] Imgcodecs_Tiff.readWrite_32FC1
2024-04-19T07:17:18.0200775Z C:\GHA-OCV-6\_work\opencv\opencv\opencv\modules\imgcodecs\test\test_tiff.cpp(714): error: Expected equality of these values:
2024-04-19T07:17:18.0203788Z   img2.type()
2024-04-19T07:17:18.0204643Z     Which is: 0
2024-04-19T07:17:18.0205457Z   img.type()
2024-04-19T07:17:18.0206247Z     Which is: 5
2024-04-19T07:17:18.0207360Z [  FAILED  ] Imgcodecs_Tiff.readWrite_32FC1 (15 ms)
2024-04-19T07:17:18.0208964Z [ RUN      ] Imgcodecs_Tiff.readWrite_64FC1
2024-04-19T07:17:18.0346506Z C:\GHA-OCV-6\_work\opencv\opencv\opencv\modules\imgcodecs\test\test_tiff.cpp(734): error: Expected equality of these values:
2024-04-19T07:17:18.0349609Z   0
2024-04-19T07:17:18.0351904Z   remove(filenameOutput.c_str())
2024-04-19T07:17:18.0353235Z     Which is: -1
2024-04-19T07:17:18.0354372Z [  FAILED  ] Imgcodecs_Tiff.readWrite_64FC1 (15 ms)
2024-04-19T07:17:18.0356036Z [ RUN      ] Imgcodecs_Tiff.readWrite_32FC3_SGILOG
2024-04-19T07:17:18.0575865Z C:\GHA-OCV-6\_work\opencv\opencv\opencv\modules\imgcodecs\test\test_tiff.cpp(751): error: Expected equality of these values:
2024-04-19T07:17:18.0580846Z   0
2024-04-19T07:17:18.0581659Z   remove(filenameOutput.c_str())
2024-04-19T07:17:18.0582991Z     Which is: -1
2024-04-19T07:17:18.0584248Z [  FAILED  ] Imgcodecs_Tiff.readWrite_32FC3_SGILOG (23 ms)
2024-04-19T07:17:18.0585984Z [ RUN      ] Imgcodecs_Tiff.readWrite_32FC3_RAW
2024-04-19T07:17:18.0721503Z C:\GHA-OCV-6\_work\opencv\opencv\opencv\modules\imgcodecs\test\test_tiff.cpp(769): error: Expected equality of these values:
2024-04-19T07:17:18.0724580Z   img2.type()
2024-04-19T07:17:18.0725446Z     Which is: 0
2024-04-19T07:17:18.0726287Z   img.type()
2024-04-19T07:17:18.0727143Z     Which is: 21
2024-04-19T07:17:18.0728375Z [  FAILED  ] Imgcodecs_Tiff.readWrite_32FC3_RAW (14 ms)
2024-04-19T07:17:18.0730146Z [ RUN      ] Imgcodecs_Tiff.read_palette_color_image
2024-04-19T07:17:18.0779836Z [       OK ] Imgcodecs_Tiff.read_palette_color_image (6 ms)
2024-04-19T07:17:18.0781849Z [ RUN      ] Imgcodecs_Tiff.read_4_bit_palette_color_image
2024-04-19T07:17:18.0835424Z [       OK ] Imgcodecs_Tiff.read_4_bit_palette_color_image (6 ms)
2024-04-19T07:17:18.0863618Z [ RUN      ] Imgcodecs_Tiff.readWrite_predictor
2024-04-19T07:17:18.1036308Z C:\GHA-OCV-6\_work\opencv\opencv\opencv\modules\imgcodecs\test\test_tiff.cpp(831): error: Value of: img.empty()
2024-04-19T07:17:18.1037359Z   Actual: true
2024-04-19T07:17:18.1037678Z Expected: false
2024-04-19T07:17:18.1038172Z [  FAILED  ] Imgcodecs_Tiff.readWrite_predictor (20 ms)

2024-04-19T07:18:04.1195865Z [==========] 456 tests from 26 test cases ran. (56019 ms total)
2024-04-19T07:18:04.1197361Z [  PASSED  ] 451 tests.
2024-04-19T07:18:04.1198406Z [  FAILED  ] 5 tests, listed below:
2024-04-19T07:18:04.1199773Z [  FAILED  ] Imgcodecs_Tiff.readWrite_32FC1
2024-04-19T07:18:04.1201224Z [  FAILED  ] Imgcodecs_Tiff.readWrite_64FC1
2024-04-19T07:18:04.1202763Z [  FAILED  ] Imgcodecs_Tiff.readWrite_32FC3_SGILOG
2024-04-19T07:18:04.1204386Z [  FAILED  ] Imgcodecs_Tiff.readWrite_32FC3_RAW
2024-04-19T07:18:04.1205925Z [  FAILED  ] Imgcodecs_Tiff.readWrite_predictor
2024-04-19T07:18:04.1207006Z 
2024-04-19T07:18:04.1207314Z  5 FAILED TESTS
2024-04-19T07:18:04.1208206Z   YOU HAVE 224 DISABLED TESTS
Kumataro commented 1 week ago

I believe it is not logical bug, maybe it related environment and/or contingency problem. Because this trouble occured only 1 environmen, other environments are OK. And other pull request has been succeeded in same condition.

I made new pull to enhance tiff-test. I hope it will help to investigate this problem.

Kumataro commented 1 week ago

Thank you for your review !

It seems that CI result for this pull request is strange. I report it.

We can see this Pull Request run these build and test from CI summary page ( https://pullrequest.opencv.org/#/summary/opencv ).

Linux x64 - 107083 / success
not_queued
not_queued
Win64 - 105189 / building
not_queued
not_queued
not_queued
Linux x64 Debug - 105405 / building
Doc - 106896 / success

Linux x64 and Docs are finished. I think they are correct.

opencv_merge
Repository  https://github.com/Kumataro/opencv.git
Branch  fix25452
Revision    fb194a4582d3df6fa01bd7c07025bcec6e0636eb

pullrequest 25453

However, Win64 is not finished at summary page https://pullrequest.opencv.org/#/summary/opencv . I think this test is for pull request 25454 .

https://pullrequest.opencv.org/buildbot/builders/precommit_windows64/builds/105189 .

opencv_merge
Repository  https://github.com/fengyuentau/opencv.git
Branch  fix_core_gemm_acc
Revision    4ef5986d4de9657ca6e86703d474d20789d739ca

pullrequest  25454

At Linux x64 Debug, it is same as Win64 I think this test is for pull request 25324

https://pullrequest.opencv.org/buildbot/builders/precommit_linux64_no_opt/builds/105405

opencv_merge
Repository  https://github.com/kaingwade/opencv.git
Branch  clean_haarcascades_jsbindings
Revision    6447a5399011b6e161017491e2dacc46680f795d

pullrequest 25324
asmorkalov commented 1 week ago

@opencv-alalek something strange happens on Buildbot.

opencv-alalek commented 1 week ago

Win64 - 105189 / building

Buildbot was unexpectedly restarted on April 19. So active builds were lost ("building" status) and PR statuses become inaccurate (build id was reused for other builds). Unfortunately logs are rotated (weekly builds are heavy), so there are no useful information at this moment.

Kumataro commented 1 week ago

@opencv-alalek I undestand it, I would like to close this strange test status problem. Thank you very much for your confirmation !