summaryrefslogtreecommitdiff
path: root/media-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-19 12:05:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-19 12:05:02 +0100
commitb6cfc0c19effe2d9f7b8ab303cd00636f16da253 (patch)
treea0158050dac0a7ebfb9df4f667ec6ad2dd185538 /media-libs
parent2d01b3d133c0fbf17de8d7b47905585af88bd6e4 (diff)
gentoo auto-resync : 19:04:2024 - 12:05:02
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/Manifest.gzbin69496 -> 69500 bytes
-rw-r--r--media-libs/netpbm/Manifest1
-rw-r--r--media-libs/netpbm/files/netpbm-11.5.2-fix-tests-musl.patch157
-rw-r--r--media-libs/openh264/Manifest2
-rw-r--r--media-libs/openh264/files/openh264-2.4.0-fix-off-by-one-decode-regression.patch26
-rw-r--r--media-libs/openh264/files/openh264-2.4.0-unordered-frame-glitches.patch264
6 files changed, 0 insertions, 450 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz
index 06fdbed0ae97..2679227e8eea 100644
--- a/media-libs/Manifest.gz
+++ b/media-libs/Manifest.gz
Binary files differ
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index dbc474bd50ff..df62c8b2299d 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -3,7 +3,6 @@ AUX netpbm-10.86.21-build.patch 2319 BLAKE2B b22150c8683790c9ac31abc00b8f3f5b55c
AUX netpbm-11.0.0-misc-deps.patch 1446 BLAKE2B 721e926a83d50d04d4a407051ee077db5e5bf8fb1ae9aff1ff1d7859cf1bb0d5f74fa1143681b451d36323f93d5e7fa3876e485d6538958e30779cac081df5b8 SHA512 7135533660b15a113df5a38298725f895e8cbd6ac4695eb5f2d40bd214c43cb9d1c261063e0cea162a6ca6071cda5f4e0380d29eefa6af57e7d67ce319fe2216
AUX netpbm-11.1.0-fix-clang-O2.patch 773 BLAKE2B a8d2bef659d384b0f94560fec847d37731315f5cdb67e5474efb596672d146446c6d545caa816d74f9d4c32fe486ce49f8cb55f38e9706bae6b0ba79c0dbbb5e SHA512 0a0049415d5c252603c47325d69ae582bec76ac15f442682ef0a2ff8c5a8cd19e28543644883bde891f2a376a401f43ed923b184112f49c67d295b9215d519de
AUX netpbm-11.2.7-fix-pnmcolormap2-test.patch 7051 BLAKE2B 741d4943b2e9eab1fb0061d6265271df8e25e458c1eb39f50aed8a392edf8369c9f0f3c43fc6ca0b940dd376166c9419c5039ddeaf10487859a7ea9bec4e6075 SHA512 4c7be95b582db27e3ce542b8f53bfdad2e6882b22ccc383aa7ca480cb5ba2a6aa000724dae3c5107efd1071bb87fac0648061dd46b0b75f1072ef05b7e128a68
-AUX netpbm-11.5.2-fix-tests-musl.patch 4779 BLAKE2B 049b20cecdaf40e77c37ad01cfe4e17b8006c3788f47971319e553bfbab760e7e0bb3a970060e74860a7c3326945f5505680519efe7c2feee5fa6ee08ba45202 SHA512 260f4282dcfd6dd0922b62e4c3f217e33d159ab2df779ec0c1df27f16c8075fb77927ce2aadd34c20475d38b7482506758e38b7571df7c3d5a92de9c5cc496d6
AUX netpbm-11.6.1-incompatible-pointer-types.patch 514 BLAKE2B 0ea8a3c50838776ee645e61accc13645a690dc7e75cde2c33afd1ac7f07abbcb85a97b7e113217af12617ec5ad314eca0324c7bfbe7beb445aee85de47649ffb SHA512 a3a46607904c8ff9757f0a136aa2336382033760bc69bcca5a5d7662ca824f9a7d4281fe3996efc57456c3b30ddf7319fb70a1cb950ef974507f82340a226abb
DIST netpbm-11.2.7.tar.xz 3780372 BLAKE2B 8a6a75bd0358acf21faa3defd2b3ca886aacd38a28a1f8b65280a9d6c1667102a47efb734fe2ff2dfae38a5d0995b5efaa4b3ec70138bac7ad07e3e6e79c6063 SHA512 3fb00524b958d97304066749d4117b11ce5e23b7c8e08e68bfb5109575cc40a52dbe0f44559e6c0832a4397298efbea50a8ed0b9d2b57e41a09275729574bace
DIST netpbm-11.2.9.tar.xz 3782172 BLAKE2B b5acec8306c820e7b0ac2dec21ab5df8f2cdbec01d3d59f82b307d90111954e81e1b01ad7d8e25e8fbd0ea7cf61e8b023e3dfaed6d1cab71b51f7e367d792e56 SHA512 02961bb2ac4a4292e028ed5dbd05daf89ac795f50d36d97be67c49a61be0cbd977e954aa9266c4649d9a46de3fbe7c4b2b51c8363cc7bee322926dd4a9af2ab1
diff --git a/media-libs/netpbm/files/netpbm-11.5.2-fix-tests-musl.patch b/media-libs/netpbm/files/netpbm-11.5.2-fix-tests-musl.patch
deleted file mode 100644
index 4d8bd6c3b74d..000000000000
--- a/media-libs/netpbm/files/netpbm-11.5.2-fix-tests-musl.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-Some tests are broken on musl.
-
-https://sourceforge.net/p/netpbm/code/4843/
-pnmindex, ppmtomitsu tests that don't use pnmcolormap
-
-So far, this only fixed ppmtomitsu.
-
-See also https://bugs.gentoo.org/907295
-
---- a/test/pnmindex.ok
-+++ b/test/pnmindex.ok
-@@ -7,12 +7,18 @@
- 3099638253 5290
- Test 4. Should print 1397700642 3160
- 1397700642 3160
--Test 5. Should print 2303488589 28514
--2303488589 28514
--Test 6. Should print 1706277976 100455
--1706277976 100455
--Test 7. Should print 801388440 100455
-+Test 5. Should print 243472565 28514
-+243472565 28514
-+Test 6. Should print 801388440 100455
- 801388440 100455
-+Test 7. Should print 256 twice
-+256
-+256
-+Test 8. Should print 100 twice
-+100
-+100
-+Test 9. Should print match
-+match
- Test Invalid
- Expected failure 1 (no output)
- Expected failure 2 (no output)
---- a/test/pnmindex.test
-+++ b/test/pnmindex.test
-@@ -3,6 +3,9 @@
- # Also requires: pamcat pamscale pbmtext pnmcolormap pnmindex
- # Also requires: pnminvert pnmquant pnmremap
-
-+tmpdir=${tmpdir:-/tmp}
-+pnmindex256_ppm=${tmpdir}/pnmindex256.ppm
-+
- echo "Test 1. Should print 3391481002 889"
- pnmindex maze.pbm | cksum
-
-@@ -17,18 +20,28 @@
- pnmindex -size 20 -across=3 testgrid.pbm testgrid.pbm testgrid.pbm \
- testgrid.pbm testgrid.pbm testgrid.pbm | cksum
-
--echo "Test 5. Should print 2303488589 28514"
--pnmindex testimg.ppm | cksum
-+echo "Test 5. Should print 243472565 28514"
-+pnmindex -noquant testimg.ppm | cksum
-
--echo "Test 6. Should print 1706277976 100455"
--pnmindex -size 50 -across=2 testimg.ppm testimg.ppm testimg.ppm \
-- testimg.ppm testimg.ppm testimg.ppm | cksum
--
--echo "Test 7. Should print 801388440 100455"
-+echo "Test 6. Should print 801388440 100455"
- pnmindex -size 50 -across=2 -noquant testimg.ppm testimg.ppm testimg.ppm \
-- testimg.ppm testimg.ppm testimg.ppm | cksum
-+ testimg.ppm testimg.ppm testimg.ppm | tee ${pnmindex256_ppm} | cksum
-
-+echo "Test 7. Should print 256 twice"
-+pnmindex testimg.ppm | ppmhist -nomap -noheader | wc -l
-+pnmindex -colors 256 testimg.ppm | ppmhist -nomap -noheader | wc -l
-
-+echo "Test 8. Should print 100 twice"
-+pnmindex -colors 100 testimg.ppm | ppmhist -nomap -noheader | wc -l
-+pnmindex -colors 100 testimg.ppm testimg.ppm | ppmhist -nomap -noheader | wc -l
-+
-+
-+echo "Test 9. Should print match"
-+pnmindex -size 50 -across=2 -quant -colors=256 testimg.ppm testimg.ppm testimg.ppm \
-+ testimg.ppm testimg.ppm testimg.ppm |\
-+ pnmpsnr -rgb -target1=41.31 -target2=40.76 -target3=40.71 ${pnmindex256_ppm} -
-+
-+
- echo "Test Invalid"
-
- . ${srcdir}/test-invalid.inc
---- a/test/ppmtomitsu.ok
-+++ b/test/ppmtomitsu.ok
-@@ -1,9 +1,9 @@
--Test 0. Should print 458455366 101484
--458455366 101484
-+Test 0. Should print 668243897 101532
-+668243897 101532
- Test 1. Should print 3110813682 101562
- 3110813682 101562
--Test 2. Should print 4168174994 34399
--4168174994 34399
-+Test 2. Should print 825518840 34209
-+825518840 34209
- Test 3. Should print 3201293405 310
- 3201293405 310
- Test 4. Should print 3354679572 752
-@@ -10,5 +10,5 @@
- 3354679572 752
- Test 5. Should print 3999654426 101549
- 3999654426 101549
--Test 6. Should print 4201246884 101549
--4201246884 101549
-+Test 6. Should print 3103038403 101549
-+3103038403 101549
---- a/test/ppmtomitsu.test
-+++ b/test/ppmtomitsu.test
-@@ -1,31 +1,31 @@
- #! /bin/sh
- # This script tests: ppmtomitsu
--# Also requires: pnmcolormap pnmremap
-+# Also requires: pamseq pamdepth
-
- tmpdir=${tmpdir:-/tmp}
--testimg100_ppm=${tmpdir}/testimg100.ppm
-+testimg216_ppm=${tmpdir}/testimg216.ppm
-
--echo "Test 0. Should print 458455366 101484"
--# equivalent to: Pnmquant 100 testimg.ppm
--pnmcolormap 100 testimg.ppm | pnmremap -nofloyd -mapfile=- testimg.ppm |\
-- tee ${testimg100_ppm} | cksum
-+echo "Test 0. Should print 668243897 101532"
-
-+pamseq 3 5 -tupletype=RGB | pamdepth 255 | pnmremap -nofloyd -mapfile=- testimg.ppm |\
-+ tee ${testimg216_ppm} | cksum
-+
- echo "Test 1. Should print 3110813682 101562"
--ppmtomitsu testimg.ppm | cksum
-+ppmtomitsu testimg.ppm | cksum
-
--echo "Test 2. Should print 4168174994 34399"
--ppmtomitsu ${testimg100_ppm} | cksum
-+echo "Test 2. Should print 825518840 34209"
-+ppmtomitsu ${testimg216_ppm} | cksum
-
- echo "Test 3. Should print 3201293405 310"
--ppmtomitsu testgrid.pbm | cksum
-+ppmtomitsu testgrid.pbm | cksum
-
- echo "Test 4. Should print 3354679572 752"
--ppmtomitsu -tiny testgrid.pbm | cksum
-+ppmtomitsu -tiny testgrid.pbm | cksum
-
- echo "Test 5. Should print 3999654426 101549"
--ppmtomitsu -tiny testimg.ppm | cksum
-+ppmtomitsu -tiny testimg.ppm | cksum
-
--echo "Test 6. Should print 4201246884 101549"
--ppmtomitsu -tiny ${testimg100_ppm} | cksum
-+echo "Test 6. Should print 3103038403 101549"
-+ppmtomitsu -tiny ${testimg216_ppm} | cksum
-
--rm ${testimg100_ppm}
-+rm ${testimg216_ppm}
diff --git a/media-libs/openh264/Manifest b/media-libs/openh264/Manifest
index d7b4920b3e17..c139cf151df7 100644
--- a/media-libs/openh264/Manifest
+++ b/media-libs/openh264/Manifest
@@ -1,7 +1,5 @@
AUX openh264-2.3.0-pkgconfig-pathfix.patch 2023 BLAKE2B 9d380302efe14b45959123f69591aed9f552a954dd9f2f079ba1dc95edfc59869db9ece0ea65d52e58201829e0e4bb791f0380b36b35d288b40769c1c144005e SHA512 24fb7e1bf54d5c1512dab9f5b6cbd61863022d99a1a5d07d5a69037ad3b3857f2ac01fdfae4a1477f1b200c8a4b107247fb9f46af1219e71220e55167f1620ec
AUX openh264-2.3.1-pr3630.patch 5566 BLAKE2B 06e6ff75ccbcb287413752283d3b192ccd9ff6172bf2245f28eb219b3c8384f900a54e0d0992589b234e14080dfcdc3c026635ba6070597197f93e8514a77fd8 SHA512 7acc909c8d78e8b9cb366d822b970d4e164d40e0224fe3a07d7750b3b7c3a30ac40afc1bbaac4844d6fbdb6c144830004b12dc3bd64d2574338cebea952648a0
-AUX openh264-2.4.0-fix-off-by-one-decode-regression.patch 1269 BLAKE2B 1b7e87e6e1a52e6a69c247a1c534e0e43f71a9037dc54f6e109decbf91b8e2e29f00479e12eeb4e134eef9f7b00a321a9a920770a44c85944515c6cfaf365107 SHA512 a1bcd6ead4f0b30130232d2936101a5b299849411df478d6b7805ae3f3e046ac6485662372dd4014f5de3e7f9ecd4d7754c8446e9ade17869ae0f67aa97c593a
-AUX openh264-2.4.0-unordered-frame-glitches.patch 11895 BLAKE2B 3779c770b04ef44c8b57a21dd9c7ac1292de633f57a0ee41498fdff12b9cb9a38d7fdb2f55f4eb6ff72ce9e9cbd38669ebdc7b83722bac483ecacc274a8bb54c SHA512 2771c6a783184f7dcf17f9604d0a62ae153c7e9bcb11e2b2af09e064607627c87c6524a8a8f772be8bc3730957a8c3dd5760e8c373d1f20b2470a7154eb2267b
DIST gmp-api-Firefox114_2-e7d30b921df736a1121a0c8e0cf3ab1ce5b8a4b7.tar.gz 10915 BLAKE2B aa4b82baebbd990d94f381be4516e8780f6bc3a2104c4b899f091a9e6ec91dff9788ee6ef548d3bc07c7bf50f56347c44d01e51805f96cf9b59494889a5f7b61 SHA512 f1c75007d4f1e1ef3a11b8eb9c703935408a5e4051c8eab408e4edc09f265a71f172025269442fdab9d4c2a8b108fa69397bfbd84af4ecda22881b50de804de9
DIST openh264-2.3.1.tar.gz 60290897 BLAKE2B b4480150cfe7c44b89c7b294698db06f93d96f5f9f3ef4345108c4e360e99bc6133407cead54e720e6e74aa17ab9f2e4342287a42f19463a54eb44c9d3141c80 SHA512 fd59c767794cdfb934d692d5929e4500d78606cbf1e403bc7c7dce048cc07e40daa0794357adb856d29479427a53460c76338e156b6bbeaa36139afcd603c8e1
DIST openh264-2.4.1.tar.gz 60297304 BLAKE2B c66dbe8003072c406641b3f1453df6d8e574b5526d6748d5f4efa4921ca6a438df2e491143dc07c8f9297d253e97cd4ee2dada450845e7d9323cb31dddc6fff4 SHA512 eb99144addd2e9c352bb95e752366e104ac6b0ddc84311dc7c87dafb803f8e7fe4d1e726833d49f8cc6d3914508e19c3a25ef82637a4993e8af3f504aa005baf
diff --git a/media-libs/openh264/files/openh264-2.4.0-fix-off-by-one-decode-regression.patch b/media-libs/openh264/files/openh264-2.4.0-fix-off-by-one-decode-regression.patch
deleted file mode 100644
index 0ef8e3dc56f2..000000000000
--- a/media-libs/openh264/files/openh264-2.4.0-fix-off-by-one-decode-regression.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ff7cc30b59bea581b3a9455009cc0deb67fee98c Mon Sep 17 00:00:00 2001
-From: Kalev Lember <klember@redhat.com>
-Date: Wed, 29 Nov 2023 13:40:53 +0100
-Subject: [PATCH] Fix off by one regression in decoder
-
-Fix iPicBuffIdx bounds check introduced in commit
-986bd65b711191d4883c54ace32a9879e17729c2 and allow 0 as an index value.
-
-This fixes Big_Buck_Bunny_720_10s_30MB.mp4 playback with gst-play-1.0.
----
- codec/decoder/plus/src/welsDecoderExt.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp
-index 170d17dec..457effb68 100644
---- a/codec/decoder/plus/src/welsDecoderExt.cpp
-+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
-@@ -1136,7 +1136,7 @@ void CWelsDecoder::ReleaseBufferedReadyPictureReorder (PWelsDecoderContext pCtx,
- m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPOC = IMinInt32;
- int32_t iPicBuffIdx = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPicBuffIdx;
- if (pPicBuff != NULL) {
-- if (iPicBuffIdx > 0 && iPicBuffIdx < pPicBuff->iCapacity)
-+ if (iPicBuffIdx >= 0 && iPicBuffIdx < pPicBuff->iCapacity)
- {
- PPicture pPic = pPicBuff->ppPic[iPicBuffIdx];
- --pPic->iRefCount;
diff --git a/media-libs/openh264/files/openh264-2.4.0-unordered-frame-glitches.patch b/media-libs/openh264/files/openh264-2.4.0-unordered-frame-glitches.patch
deleted file mode 100644
index 373fac95f940..000000000000
--- a/media-libs/openh264/files/openh264-2.4.0-unordered-frame-glitches.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-From 56d3ec4c7bfdc545a840512a8f2c72545889c538 Mon Sep 17 00:00:00 2001
-From: Takashi Yano <takashi.yano@nifty.ne.jp>
-Date: Tue, 5 Dec 2023 21:48:40 +0900
-Subject: [PATCH 1/3] Add missing iLastWrittenPOC setting in unbuffered
- reordering.
-
-In CWelsDecoder::ReorderPicturesInDisplay(), iLastWrittenPOC was
-not set in unbuffered-reordering case. Due to this problem, it
-sometimes reordered the frames incorrectly. This patch fixes the
-issue.
----
- codec/decoder/plus/src/welsDecoderExt.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp
-index 457effb68..a1b26c2cb 100644
---- a/codec/decoder/plus/src/welsDecoderExt.cpp
-+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
-@@ -1206,6 +1206,7 @@ DECODING_STATE CWelsDecoder::ReorderPicturesInDisplay(PWelsDecoderContext pDecCo
- if (pDstInfo->iBufferStatus == 1) {
- if (m_sReoderingStatus.iLastGOPRemainPicts == 0 && pDecContext->pSliceHeader->eSliceType == B_SLICE &&
- pDecContext->pSliceHeader->iPicOrderCntLsb <= m_sReoderingStatus.iLastWrittenPOC + 2) {
-+ m_sReoderingStatus.iLastWrittenPOC = pDecContext->pSliceHeader->iPicOrderCntLsb;
- //issue #3478, use b-slice type to determine correct picture order as the first priority as POC order is not as reliable as based on b-slice
- ppDst[0] = pDstInfo->pDst[0];
- ppDst[1] = pDstInfo->pDst[1];
-
-From 10d0998a966dc98ba1a93122f214c2aef5bcd33f Mon Sep 17 00:00:00 2001
-From: Takashi Yano <takashi.yano@nifty.ne.jp>
-Date: Wed, 6 Dec 2023 02:08:19 +0900
-Subject: [PATCH 2/3] Prevent frame buffer from overwrite at GOP change.
-
-When bNewSeqBegin got true, iRefCount was forcibly reset even if the
-buffer was still used for reordering. Due to this problem, the buffer
-in use was sometimes overwritten with newly decoded frame. This commit
-is for fixing that problem.
----
- codec/decoder/core/src/manage_dec_ref.cpp | 37 ++++++++++++-----------
- codec/decoder/plus/src/welsDecoderExt.cpp | 4 +++
- 2 files changed, 24 insertions(+), 17 deletions(-)
-
-diff --git a/codec/decoder/core/src/manage_dec_ref.cpp b/codec/decoder/core/src/manage_dec_ref.cpp
-index 88099b60e..c3c983129 100644
---- a/codec/decoder/core/src/manage_dec_ref.cpp
-+++ b/codec/decoder/core/src/manage_dec_ref.cpp
-@@ -66,8 +66,10 @@ int32_t GetLTRFrameIndex (PRefPic pRefPic, int32_t iAncLTRFrameNum);
- #endif
- static int32_t RemainOneBufferInDpbForEC (PWelsDecoderContext pCtx, PRefPic pRefPic);
-
--static void SetUnRef (PPicture pRef) {
-- if (NULL != pRef) {
-+static void SetUnRef (PPicture pRef, bool bNewSeqBegin) {
-+ if (pRef == NULL) return;
-+
-+ if (pRef->iRefCount <= 0 && (!pRef->bUsedAsRef || bNewSeqBegin)) {
- pRef->bUsedAsRef = false;
- pRef->bIsLongRef = false;
- pRef->iFrameNum = -1;
-@@ -81,17 +83,18 @@ static void SetUnRef (PPicture pRef) {
- pRef->iSpsId = -1;
- pRef->bIsComplete = false;
- pRef->iRefCount = 0;
-+ }
-
-- if (pRef->eSliceType == I_SLICE) {
-- return;
-- }
-- int32_t lists = pRef->eSliceType == P_SLICE ? 1 : 2;
-- for (int32_t i = 0; i < MAX_DPB_COUNT; ++i) {
-- for (int32_t list = 0; list < lists; ++list) {
-- if (pRef->pRefPic[list][i] != NULL) {
-- pRef->pRefPic[list][i]->iRefCount = 0;
-- pRef->pRefPic[list][i] = NULL;
-- }
-+ if (pRef->eSliceType == I_SLICE) {
-+ return;
-+ }
-+ int32_t lists = pRef->eSliceType == P_SLICE ? 1 : 2;
-+ for (int32_t i = 0; i < MAX_DPB_COUNT; ++i) {
-+ for (int32_t list = 0; list < lists; ++list) {
-+ if (pRef->pRefPic[list][i] != NULL) {
-+ if (pRef->pRefPic[list][i]->iRefCount > 0) continue;
-+ pRef->pRefPic[list][i]->iRefCount = 0;
-+ pRef->pRefPic[list][i] = NULL;
- }
- }
- }
-@@ -111,7 +114,7 @@ void WelsResetRefPic (PWelsDecoderContext pCtx) {
-
- for (i = 0; i < MAX_DPB_COUNT; i++) {
- if (pRefPic->pShortRefList[LIST_0][i] != NULL) {
-- SetUnRef (pRefPic->pShortRefList[LIST_0][i]);
-+ SetUnRef (pRefPic->pShortRefList[LIST_0][i], pCtx->bNewSeqBegin);
- pRefPic->pShortRefList[LIST_0][i] = NULL;
- }
- }
-@@ -119,7 +122,7 @@ void WelsResetRefPic (PWelsDecoderContext pCtx) {
-
- for (i = 0; i < MAX_DPB_COUNT; i++) {
- if (pRefPic->pLongRefList[LIST_0][i] != NULL) {
-- SetUnRef (pRefPic->pLongRefList[LIST_0][i]);
-+ SetUnRef (pRefPic->pLongRefList[LIST_0][i], pCtx->bNewSeqBegin);
- pRefPic->pLongRefList[LIST_0][i] = NULL;
- }
- }
-@@ -767,7 +770,7 @@ static int32_t SlidingWindow (PWelsDecoderContext pCtx, PRefPic pRefPic) {
- for (i = pRefPic->uiShortRefCount[LIST_0] - 1; i >= 0; i--) {
- pPic = WelsDelShortFromList (pRefPic, pRefPic->pShortRefList[LIST_0][i]->iFrameNum);
- if (pPic) {
-- SetUnRef (pPic);
-+ SetUnRef (pPic, pCtx->bNewSeqBegin);
- break;
- } else {
- return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
-@@ -803,7 +806,7 @@ static PPicture WelsDelShortFromList (PRefPic pRefPic, int32_t iFrameNum) {
- static PPicture WelsDelShortFromListSetUnref (PRefPic pRefPic, int32_t iFrameNum) {
- PPicture pPic = WelsDelShortFromList (pRefPic, iFrameNum);
- if (pPic) {
-- SetUnRef (pPic);
-+ SetUnRef (pPic, false);
- }
- return pPic;
- }
-@@ -832,7 +835,7 @@ static PPicture WelsDelLongFromList (PRefPic pRefPic, uint32_t uiLongTermFrameId
- static PPicture WelsDelLongFromListSetUnref (PRefPic pRefPic, uint32_t uiLongTermFrameIdx) {
- PPicture pPic = WelsDelLongFromList (pRefPic, uiLongTermFrameIdx);
- if (pPic) {
-- SetUnRef (pPic);
-+ SetUnRef (pPic, false);
- }
- return pPic;
- }
-diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp
-index a1b26c2cb..14257afff 100644
---- a/codec/decoder/plus/src/welsDecoderExt.cpp
-+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
-@@ -1084,6 +1084,8 @@ void CWelsDecoder::ReleaseBufferedReadyPictureReorder (PWelsDecoderContext pCtx,
- if (pPicBuff != NULL) {
- PPicture pPic = pPicBuff->ppPic[m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPicBuffIdx];
- --pPic->iRefCount;
-+ if (m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP)
-+ pPic->bUsedAsRef = false;
- }
- m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP = false;
- m_sReoderingStatus.iMinPOC = IMinInt32;
-@@ -1187,6 +1189,8 @@ void CWelsDecoder::ReleaseBufferedReadyPictureNoReorder(PWelsDecoderContext pCtx
- PPicBuff pPicBuff = pCtx ? pCtx->pPicBuff : m_pPicBuff;
- PPicture pPic = pPicBuff->ppPic[m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPicBuffIdx];
- --pPic->iRefCount;
-+ if (m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP)
-+ pPic->bUsedAsRef = false;
- }
- if (m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP) {
- --m_sReoderingStatus.iLastGOPRemainPicts;
-
-From f82abc09a3e7d723e21a06ec7e5f38afc218357f Mon Sep 17 00:00:00 2001
-From: Takashi Yano <takashi.yano@nifty.ne.jp>
-Date: Tue, 12 Dec 2023 19:23:32 +0900
-Subject: [PATCH 3/3] Fix test failure due to the issue of the previous commit.
-
----
- codec/decoder/core/src/manage_dec_ref.cpp | 14 +++++++-------
- codec/decoder/plus/src/welsDecoderExt.cpp | 9 +++++++--
- 2 files changed, 14 insertions(+), 9 deletions(-)
-
-diff --git a/codec/decoder/core/src/manage_dec_ref.cpp b/codec/decoder/core/src/manage_dec_ref.cpp
-index c3c983129..410b9c47f 100644
---- a/codec/decoder/core/src/manage_dec_ref.cpp
-+++ b/codec/decoder/core/src/manage_dec_ref.cpp
-@@ -66,10 +66,10 @@ int32_t GetLTRFrameIndex (PRefPic pRefPic, int32_t iAncLTRFrameNum);
- #endif
- static int32_t RemainOneBufferInDpbForEC (PWelsDecoderContext pCtx, PRefPic pRefPic);
-
--static void SetUnRef (PPicture pRef, bool bNewSeqBegin) {
-+static void SetUnRef (PPicture pRef) {
- if (pRef == NULL) return;
-
-- if (pRef->iRefCount <= 0 && (!pRef->bUsedAsRef || bNewSeqBegin)) {
-+ if (pRef->iRefCount <= 0) {
- pRef->bUsedAsRef = false;
- pRef->bIsLongRef = false;
- pRef->iFrameNum = -1;
-@@ -114,7 +114,7 @@ void WelsResetRefPic (PWelsDecoderContext pCtx) {
-
- for (i = 0; i < MAX_DPB_COUNT; i++) {
- if (pRefPic->pShortRefList[LIST_0][i] != NULL) {
-- SetUnRef (pRefPic->pShortRefList[LIST_0][i], pCtx->bNewSeqBegin);
-+ SetUnRef (pRefPic->pShortRefList[LIST_0][i]);
- pRefPic->pShortRefList[LIST_0][i] = NULL;
- }
- }
-@@ -122,7 +122,7 @@ void WelsResetRefPic (PWelsDecoderContext pCtx) {
-
- for (i = 0; i < MAX_DPB_COUNT; i++) {
- if (pRefPic->pLongRefList[LIST_0][i] != NULL) {
-- SetUnRef (pRefPic->pLongRefList[LIST_0][i], pCtx->bNewSeqBegin);
-+ SetUnRef (pRefPic->pLongRefList[LIST_0][i]);
- pRefPic->pLongRefList[LIST_0][i] = NULL;
- }
- }
-@@ -770,7 +770,7 @@ static int32_t SlidingWindow (PWelsDecoderContext pCtx, PRefPic pRefPic) {
- for (i = pRefPic->uiShortRefCount[LIST_0] - 1; i >= 0; i--) {
- pPic = WelsDelShortFromList (pRefPic, pRefPic->pShortRefList[LIST_0][i]->iFrameNum);
- if (pPic) {
-- SetUnRef (pPic, pCtx->bNewSeqBegin);
-+ SetUnRef (pPic);
- break;
- } else {
- return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
-@@ -806,7 +806,7 @@ static PPicture WelsDelShortFromList (PRefPic pRefPic, int32_t iFrameNum) {
- static PPicture WelsDelShortFromListSetUnref (PRefPic pRefPic, int32_t iFrameNum) {
- PPicture pPic = WelsDelShortFromList (pRefPic, iFrameNum);
- if (pPic) {
-- SetUnRef (pPic, false);
-+ SetUnRef (pPic);
- }
- return pPic;
- }
-@@ -835,7 +835,7 @@ static PPicture WelsDelLongFromList (PRefPic pRefPic, uint32_t uiLongTermFrameId
- static PPicture WelsDelLongFromListSetUnref (PRefPic pRefPic, uint32_t uiLongTermFrameIdx) {
- PPicture pPic = WelsDelLongFromList (pRefPic, uiLongTermFrameIdx);
- if (pPic) {
-- SetUnRef (pPic, false);
-+ SetUnRef (pPic);
- }
- return pPic;
- }
-diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp
-index 14257afff..b0936a7d8 100644
---- a/codec/decoder/plus/src/welsDecoderExt.cpp
-+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
-@@ -1083,8 +1083,9 @@ void CWelsDecoder::ReleaseBufferedReadyPictureReorder (PWelsDecoderContext pCtx,
- m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPOC = IMinInt32;
- if (pPicBuff != NULL) {
- PPicture pPic = pPicBuff->ppPic[m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPicBuffIdx];
-+ bool bLastGOP = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP;
- --pPic->iRefCount;
-- if (m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP)
-+ if (pPic->iRefCount <= 0 && bLastGOP)
- pPic->bUsedAsRef = false;
- }
- m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP = false;
-@@ -1141,7 +1142,10 @@ void CWelsDecoder::ReleaseBufferedReadyPictureReorder (PWelsDecoderContext pCtx,
- if (iPicBuffIdx >= 0 && iPicBuffIdx < pPicBuff->iCapacity)
- {
- PPicture pPic = pPicBuff->ppPic[iPicBuffIdx];
-+ bool bLastGOP = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP;
- --pPic->iRefCount;
-+ if (pPic->iRefCount <= 0 && bLastGOP)
-+ pPic->bUsedAsRef = false;
- }
- }
- m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP = false;
-@@ -1188,8 +1192,9 @@ void CWelsDecoder::ReleaseBufferedReadyPictureNoReorder(PWelsDecoderContext pCtx
- if (pCtx || m_pPicBuff) {
- PPicBuff pPicBuff = pCtx ? pCtx->pPicBuff : m_pPicBuff;
- PPicture pPic = pPicBuff->ppPic[m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPicBuffIdx];
-+ bool bLastGOP = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP;
- --pPic->iRefCount;
-- if (m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP)
-+ if (pPic->iRefCount <= 0 && bLastGOP)
- pPic->bUsedAsRef = false;
- }
- if (m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].bLastGOP) {