[JPEG 2000] Add support for resetContextProbabilities (bug 1731483)
This commit is contained in:
parent
4157d771c0
commit
9b9609a6d8
@ -337,9 +337,6 @@ class JpxImage {
|
|||||||
if (cod.selectiveArithmeticCodingBypass) {
|
if (cod.selectiveArithmeticCodingBypass) {
|
||||||
unsupported.push("selectiveArithmeticCodingBypass");
|
unsupported.push("selectiveArithmeticCodingBypass");
|
||||||
}
|
}
|
||||||
if (cod.resetContextProbabilities) {
|
|
||||||
unsupported.push("resetContextProbabilities");
|
|
||||||
}
|
|
||||||
if (cod.terminationOnEachCodingPass) {
|
if (cod.terminationOnEachCodingPass) {
|
||||||
unsupported.push("terminationOnEachCodingPass");
|
unsupported.push("terminationOnEachCodingPass");
|
||||||
}
|
}
|
||||||
@ -1290,7 +1287,8 @@ function copyCoefficients(
|
|||||||
delta,
|
delta,
|
||||||
mb,
|
mb,
|
||||||
reversible,
|
reversible,
|
||||||
segmentationSymbolUsed
|
segmentationSymbolUsed,
|
||||||
|
resetContextProbabilities
|
||||||
) {
|
) {
|
||||||
const x0 = subband.tbx0;
|
const x0 = subband.tbx0;
|
||||||
const y0 = subband.tby0;
|
const y0 = subband.tby0;
|
||||||
@ -1356,6 +1354,11 @@ function copyCoefficients(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resetContextProbabilities) {
|
||||||
|
bitModel.reset();
|
||||||
|
}
|
||||||
|
|
||||||
currentCodingpassType = (currentCodingpassType + 1) % 3;
|
currentCodingpassType = (currentCodingpassType + 1) % 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1404,6 +1407,8 @@ function transformTile(context, tile, c) {
|
|||||||
const scalarExpounded = quantizationParameters.scalarExpounded;
|
const scalarExpounded = quantizationParameters.scalarExpounded;
|
||||||
const guardBits = quantizationParameters.guardBits;
|
const guardBits = quantizationParameters.guardBits;
|
||||||
const segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed;
|
const segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed;
|
||||||
|
const resetContextProbabilities =
|
||||||
|
codingStyleParameters.resetContextProbabilities;
|
||||||
const precision = context.components[c].precision;
|
const precision = context.components[c].precision;
|
||||||
|
|
||||||
const reversible = codingStyleParameters.reversibleTransformation;
|
const reversible = codingStyleParameters.reversibleTransformation;
|
||||||
@ -1455,7 +1460,8 @@ function transformTile(context, tile, c) {
|
|||||||
delta,
|
delta,
|
||||||
mb,
|
mb,
|
||||||
reversible,
|
reversible,
|
||||||
segmentationSymbolUsed
|
segmentationSymbolUsed,
|
||||||
|
resetContextProbabilities
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
subbandCoefficients.push({
|
subbandCoefficients.push({
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -303,6 +303,7 @@
|
|||||||
!issue14117.pdf
|
!issue14117.pdf
|
||||||
!issue5070.pdf
|
!issue5070.pdf
|
||||||
!issue5238.pdf
|
!issue5238.pdf
|
||||||
|
!jp2k-resetprob.pdf
|
||||||
!issue5244.pdf
|
!issue5244.pdf
|
||||||
!issue5291.pdf
|
!issue5291.pdf
|
||||||
!issue4398.pdf
|
!issue4398.pdf
|
||||||
|
BIN
test/pdfs/jp2k-resetprob.pdf
Normal file
BIN
test/pdfs/jp2k-resetprob.pdf
Normal file
Binary file not shown.
@ -4922,6 +4922,13 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "jpx-resetContextProbabilities",
|
||||||
|
"file": "pdfs/jp2k-resetprob.pdf",
|
||||||
|
"md5": "fc9fb23e0a08d985b70cfb32fa9e9ca1",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "eq",
|
||||||
|
"about": "Fixes one part of bug 1731483."
|
||||||
|
},
|
||||||
{ "id": "bug1140761",
|
{ "id": "bug1140761",
|
||||||
"file": "pdfs/bug1140761.pdf",
|
"file": "pdfs/bug1140761.pdf",
|
||||||
"md5": "b74eced7634d4f248dc6265f8225d432",
|
"md5": "b74eced7634d4f248dc6265f8225d432",
|
||||||
|
Loading…
Reference in New Issue
Block a user