1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-27 22:33:03 +04:00

Merge pull request #26849 from sturkmen72:apng-writeanimation

APNG encoding optimization #26849

related #26840

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Suleyman TURKMEN
2025-03-05 10:42:43 +03:00
committed by GitHub
parent 97abffbdac
commit dbd4e4549d
10 changed files with 155 additions and 72 deletions
@@ -101,7 +101,7 @@ PERF_TEST_P(Encode, bgr, testing::ValuesIn(exts))
TEST_CYCLE() imencode(GetParam(), src, buf);
std::cout << "Encoded buffer size: " << buf.size()
std::cout << " Encoded buffer size: " << buf.size()
<< " bytes, Compression ratio: " << std::fixed << std::setprecision(2)
<< (static_cast<double>(buf.size()) / (src.total() * src.channels())) * 100.0 << "%" << std::endl;
@@ -120,7 +120,7 @@ PERF_TEST_P(Encode, multi, testing::ValuesIn(exts_multi))
TEST_CYCLE() imencode(GetParam(), vec, buf);
std::cout << "Encoded buffer size: " << buf.size()
std::cout << " Encoded buffer size: " << buf.size()
<< " bytes, Compression ratio: " << std::fixed << std::setprecision(2)
<< (static_cast<double>(buf.size()) / (vec[0].total() * vec[0].channels())) * 100.0 << "%" << std::endl;