24 std::unique_ptr<CJBig2_Image> HSKIP;
27 for (uint32_t mg = 0; mg <
HGH; ++mg) {
28 for (uint32_t ng = 0; ng <
HGW; ++ng) {
29 int32_t x = (
HGX + mg *
HRY + ng *
HRX) >> 8;
30 int32_t y = (
HGY + mg *
HRX - ng *
HRY) >> 8;
31 if ((x +
HPW <= 0) | (x >=
static_cast<int32_t>(
HBW)) | (y +
HPH <= 0) |
32 (y >=
static_cast<int32_t>(
HPH))) {
33 HSKIP->SetPixel(ng, mg, 1);
35 HSKIP->SetPixel(ng, mg, 0);
41 while (
static_cast<uint32_t>(1 << HBPP) <
HNUMPATS)
51 GRD.SKIP = HSKIP.get();
66 uint8_t GSBPP =
static_cast<uint8_t>(HBPP);
67 std::vector<std::unique_ptr<CJBig2_Image>> GSPLANES(GSBPP);
68 for (int32_t i = GSBPP - 1; i >= 0; --i) {
69 std::unique_ptr<CJBig2_Image> pImage;
71 state.pImage = &pImage;
72 state.pArithDecoder = pArithDecoder;
73 state.gbContext = gbContext;
74 state.pPause =
nullptr;
76 state.pPause = pPause;
82 GSPLANES[i] =
std::move(pImage);
86 return DecodeImage(GSPLANES);
92 while (
static_cast<uint32_t>(1 << HBPP) <
HNUMPATS)
100 uint8_t GSBPP =
static_cast<uint8_t>(HBPP);
101 std::vector<std::unique_ptr<CJBig2_Image>> GSPLANES(GSBPP);
102 GRD.StartDecodeMMR(&GSPLANES[GSBPP - 1], pStream);
103 if (!GSPLANES[GSBPP - 1])
108 for (int32_t J = GSBPP - 2; J >= 0; --J) {
109 GRD.StartDecodeMMR(&GSPLANES[J], pStream);
117 return DecodeImage(GSPLANES);
135 (*HPATS)[pat_index]->ComposeTo(HTREG.get(), out_x, out_y, HCOMBOP);