mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
std/jpeg: stash mcu_blocks during progressive IDCT
This commit is contained in:
1 parent
4417dcea4e
commit
80e847dceb
3 files changed
+13
-2
No files matched your search
@@ -43821,7 +43821,9 @@ wuffs_jpeg__decoder__apply_progressive_idct(
|
|||||||
uint32_t v_mx = 0;
|
uint32_t v_mx = 0;
|
||||||
uint64_t v_stride = 0;
|
uint64_t v_stride = 0;
|
||||||
uint64_t v_offset = 0;
|
uint64_t v_offset = 0;
|
||||||
|
uint8_t v_stashed_mcu_blocks_0[128] = {0};
|
||||||
|
|
||||||
|
wuffs_base__bulk_save_host_endian(&self->private_data.f_mcu_blocks[0], 1u * (size_t)128u, wuffs_base__make_slice_u8(v_stashed_mcu_blocks_0, 128));
|
||||||
v_block_smoothing_applicable = true;
|
v_block_smoothing_applicable = true;
|
||||||
v_csel = 0u;
|
v_csel = 0u;
|
||||||
while (v_csel < self->private_impl.f_num_components) {
|
while (v_csel < self->private_impl.f_num_components) {
|
||||||
@@ -43873,6 +43875,7 @@ wuffs_jpeg__decoder__apply_progressive_idct(
|
|||||||
}
|
}
|
||||||
v_csel += 1u;
|
v_csel += 1u;
|
||||||
}
|
}
|
||||||
|
wuffs_base__bulk_load_host_endian(&self->private_data.f_mcu_blocks[0], 1u * (size_t)128u, wuffs_base__make_slice_u8(v_stashed_mcu_blocks_0, 128));
|
||||||
return wuffs_base__make_empty_struct();
|
return wuffs_base__make_empty_struct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1825,6 +1825,12 @@ pri func decoder.apply_progressive_idct!(workbuf: slice base.u8) {
|
|||||||
var stride : base.u64[..= 0x1_0008]
|
var stride : base.u64[..= 0x1_0008]
|
||||||
var offset : base.u64
|
var offset : base.u64
|
||||||
|
|
||||||
|
// Copies mcu_blocks[0], which load_mcu_blocks_for_single_component might
|
||||||
|
// overwrite, as decode_mcu may be suspended (due to a "$short read").
|
||||||
|
var stashed_mcu_blocks_0 : array[128] base.u8
|
||||||
|
|
||||||
|
this.mcu_blocks[.. 1].bulk_save_host_endian!(dst: stashed_mcu_blocks_0[..])
|
||||||
|
|
||||||
block_smoothing_applicable = true
|
block_smoothing_applicable = true
|
||||||
csel = 0
|
csel = 0
|
||||||
while csel < this.num_components {
|
while csel < this.num_components {
|
||||||
@@ -1900,6 +1906,8 @@ pri func decoder.apply_progressive_idct!(workbuf: slice base.u8) {
|
|||||||
|
|
||||||
csel += 1
|
csel += 1
|
||||||
} endwhile
|
} endwhile
|
||||||
|
|
||||||
|
this.mcu_blocks[.. 1].bulk_load_host_endian!(src: stashed_mcu_blocks_0[..])
|
||||||
}
|
}
|
||||||
|
|
||||||
pri func decoder.swizzle_gray!(dst: ptr base.pixel_buffer, workbuf: slice base.u8) base.status {
|
pri func decoder.swizzle_gray!(dst: ptr base.pixel_buffer, workbuf: slice base.u8) base.status {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ d97ce4e8 test/3pdata/blinksuite/cs-uma-ycbcr-other.jpg
|
|||||||
a2a940bc test/3pdata/blinksuite/cs-uma-ycck.jpg
|
a2a940bc test/3pdata/blinksuite/cs-uma-ycck.jpg
|
||||||
b6000be6 test/3pdata/blinksuite/dice.png
|
b6000be6 test/3pdata/blinksuite/dice.png
|
||||||
1023c20a test/3pdata/blinksuite/empty-frame.png
|
1023c20a test/3pdata/blinksuite/empty-frame.png
|
||||||
32a03152 test/3pdata/blinksuite/flowchart.jpg
|
eff36075 test/3pdata/blinksuite/flowchart.jpg
|
||||||
20ff1df8 test/3pdata/blinksuite/full2loop.gif
|
20ff1df8 test/3pdata/blinksuite/full2loop.gif
|
||||||
dc814e29 test/3pdata/blinksuite/gif-loop-count.gif
|
dc814e29 test/3pdata/blinksuite/gif-loop-count.gif
|
||||||
7306cefe test/3pdata/blinksuite/gif-loop-count.png
|
7306cefe test/3pdata/blinksuite/gif-loop-count.png
|
||||||
@@ -91,7 +91,7 @@ f37cea44 test/3pdata/blinksuite/icc-v2-gbr-422-whole-mcus.jpg
|
|||||||
1de5a906 test/3pdata/blinksuite/icc-v2-gbr.jpg
|
1de5a906 test/3pdata/blinksuite/icc-v2-gbr.jpg
|
||||||
0da5f37e test/3pdata/blinksuite/jpeg-height-exif-orientation.jpg
|
0da5f37e test/3pdata/blinksuite/jpeg-height-exif-orientation.jpg
|
||||||
4409dca6 test/3pdata/blinksuite/large-gif-checkerboard.gif
|
4409dca6 test/3pdata/blinksuite/large-gif-checkerboard.gif
|
||||||
9a1b1c39 test/3pdata/blinksuite/missing-eoi.jpg
|
2f310e57 test/3pdata/blinksuite/missing-eoi.jpg
|
||||||
72bbe2b6 test/3pdata/blinksuite/motion-jpeg-single-frame.jpg
|
72bbe2b6 test/3pdata/blinksuite/motion-jpeg-single-frame.jpg
|
||||||
0268284a test/3pdata/blinksuite/mu.png
|
0268284a test/3pdata/blinksuite/mu.png
|
||||||
263cb2b3 test/3pdata/blinksuite/non-interleaved_progressive-1.jpg
|
263cb2b3 test/3pdata/blinksuite/non-interleaved_progressive-1.jpg
|
||||||
|
|||||||
Reference in new issue
Block a user