@woosh/meep-engine 3.9.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -152
- package/build/bundle-worker-image-decoder.js +1 -1
- package/build/bundle-worker-terrain.js +1 -1
- package/package.json +3 -2
- package/src/REVIEW_2026_08_06.md +610 -610
- package/src/avif/encode_image_source.d.ts +70 -0
- package/src/avif/encode_image_source.d.ts.map +1 -0
- package/src/avif/encode_image_source.js +117 -0
- package/src/avif/encoder_worker.js +15 -126
- package/src/avif/index.d.ts +4 -2
- package/src/avif/index.js +21 -2
- package/src/avif/native/DECISIONS.md +537 -0
- package/src/avif/native/NOTICE.md +61 -0
- package/src/avif/native/api/AvifDecoder.d.ts +67 -0
- package/src/avif/native/api/AvifDecoder.d.ts.map +1 -0
- package/src/avif/native/api/AvifDecoder.js +121 -0
- package/src/avif/native/api/apply_transformations.d.ts +30 -0
- package/src/avif/native/api/apply_transformations.d.ts.map +1 -0
- package/src/avif/native/api/apply_transformations.js +120 -0
- package/src/avif/native/api/avif_to_sampler2d.d.ts +25 -0
- package/src/avif/native/api/avif_to_sampler2d.d.ts.map +1 -0
- package/src/avif/native/api/avif_to_sampler2d.js +42 -0
- package/src/avif/native/api/convert_to_rgba.d.ts +54 -0
- package/src/avif/native/api/convert_to_rgba.d.ts.map +1 -0
- package/src/avif/native/api/convert_to_rgba.js +204 -0
- package/src/avif/native/api/decode_avif.d.ts +24 -0
- package/src/avif/native/api/decode_avif.d.ts.map +1 -0
- package/src/avif/native/api/decode_avif.js +111 -0
- package/src/avif/native/api/decode_image_item.d.ts +18 -0
- package/src/avif/native/api/decode_image_item.d.ts.map +1 -0
- package/src/avif/native/api/decode_image_item.js +234 -0
- package/src/avif/native/api/encode_avif.d.ts +73 -0
- package/src/avif/native/api/encode_avif.d.ts.map +1 -0
- package/src/avif/native/api/encode_avif.js +488 -0
- package/src/avif/native/api/sampler2d_to_avif.d.ts +22 -0
- package/src/avif/native/api/sampler2d_to_avif.d.ts.map +1 -0
- package/src/avif/native/api/sampler2d_to_avif.js +108 -0
- package/src/avif/native/av1/decode/Av1FrameContext.d.ts +286 -0
- package/src/avif/native/av1/decode/Av1FrameContext.d.ts.map +1 -0
- package/src/avif/native/av1/decode/Av1FrameContext.js +622 -0
- package/src/avif/native/av1/decode/block_decoded.d.ts +27 -0
- package/src/avif/native/av1/decode/block_decoded.d.ts.map +1 -0
- package/src/avif/native/av1/decode/block_decoded.js +59 -0
- package/src/avif/native/av1/decode/decode_av1_still.d.ts +22 -0
- package/src/avif/native/av1/decode/decode_av1_still.d.ts.map +1 -0
- package/src/avif/native/av1/decode/decode_av1_still.js +309 -0
- package/src/avif/native/av1/decode/decode_coefficients.d.ts +20 -0
- package/src/avif/native/av1/decode/decode_coefficients.d.ts.map +1 -0
- package/src/avif/native/av1/decode/decode_coefficients.js +259 -0
- package/src/avif/native/av1/decode/decode_palette.d.ts +28 -0
- package/src/avif/native/av1/decode/decode_palette.d.ts.map +1 -0
- package/src/avif/native/av1/decode/decode_palette.js +442 -0
- package/src/avif/native/av1/decode/decode_tile.d.ts +14 -0
- package/src/avif/native/av1/decode/decode_tile.d.ts.map +1 -0
- package/src/avif/native/av1/decode/decode_tile.js +1213 -0
- package/src/avif/native/av1/decode/get_scan.d.ts +16 -0
- package/src/avif/native/av1/decode/get_scan.d.ts.map +1 -0
- package/src/avif/native/av1/decode/get_scan.js +138 -0
- package/src/avif/native/av1/decode/read_lr.d.ts +35 -0
- package/src/avif/native/av1/decode/read_lr.d.ts.map +1 -0
- package/src/avif/native/av1/decode/read_lr.js +277 -0
- package/src/avif/native/av1/decode/read_transform_type.d.ts +19 -0
- package/src/avif/native/av1/decode/read_transform_type.d.ts.map +1 -0
- package/src/avif/native/av1/decode/read_transform_type.js +92 -0
- package/src/avif/native/av1/decode/reconstruct.d.ts +36 -0
- package/src/avif/native/av1/decode/reconstruct.d.ts.map +1 -0
- package/src/avif/native/av1/decode/reconstruct.js +241 -0
- package/src/avif/native/av1/decode/transform_type.d.ts +49 -0
- package/src/avif/native/av1/decode/transform_type.d.ts.map +1 -0
- package/src/avif/native/av1/decode/transform_type.js +137 -0
- package/src/avif/native/av1/encode/Av1BlockSnapshot.d.ts +81 -0
- package/src/avif/native/av1/encode/Av1BlockSnapshot.d.ts.map +1 -0
- package/src/avif/native/av1/encode/Av1BlockSnapshot.js +299 -0
- package/src/avif/native/av1/encode/Av1EncodeContext.d.ts +384 -0
- package/src/avif/native/av1/encode/Av1EncodeContext.d.ts.map +1 -0
- package/src/avif/native/av1/encode/Av1EncodeContext.js +590 -0
- package/src/avif/native/av1/encode/build_headers.d.ts +50 -0
- package/src/avif/native/av1/encode/build_headers.d.ts.map +1 -0
- package/src/avif/native/av1/encode/build_headers.js +359 -0
- package/src/avif/native/av1/encode/choose_chroma_alpha.d.ts +26 -0
- package/src/avif/native/av1/encode/choose_chroma_alpha.d.ts.map +1 -0
- package/src/avif/native/av1/encode/choose_chroma_alpha.js +90 -0
- package/src/avif/native/av1/encode/choose_filters.d.ts +21 -0
- package/src/avif/native/av1/encode/choose_filters.d.ts.map +1 -0
- package/src/avif/native/av1/encode/choose_filters.js +318 -0
- package/src/avif/native/av1/encode/choose_restoration.d.ts +35 -0
- package/src/avif/native/av1/encode/choose_restoration.d.ts.map +1 -0
- package/src/avif/native/av1/encode/choose_restoration.js +616 -0
- package/src/avif/native/av1/encode/decode_effort.d.ts +57 -0
- package/src/avif/native/av1/encode/decode_effort.d.ts.map +1 -0
- package/src/avif/native/av1/encode/decode_effort.js +59 -0
- package/src/avif/native/av1/encode/encode_av1_still.d.ts +17 -0
- package/src/avif/native/av1/encode/encode_av1_still.d.ts.map +1 -0
- package/src/avif/native/av1/encode/encode_av1_still.js +194 -0
- package/src/avif/native/av1/encode/encode_effort.d.ts +56 -0
- package/src/avif/native/av1/encode/encode_effort.d.ts.map +1 -0
- package/src/avif/native/av1/encode/encode_effort.js +97 -0
- package/src/avif/native/av1/encode/encode_tile.d.ts +26 -0
- package/src/avif/native/av1/encode/encode_tile.d.ts.map +1 -0
- package/src/avif/native/av1/encode/encode_tile.js +2331 -0
- package/src/avif/native/av1/encode/quantise.d.ts +51 -0
- package/src/avif/native/av1/encode/quantise.d.ts.map +1 -0
- package/src/avif/native/av1/encode/quantise.js +212 -0
- package/src/avif/native/av1/encode/write_coefficients.d.ts +42 -0
- package/src/avif/native/av1/encode/write_coefficients.d.ts.map +1 -0
- package/src/avif/native/av1/encode/write_coefficients.js +367 -0
- package/src/avif/native/av1/encode/write_lr.d.ts +33 -0
- package/src/avif/native/av1/encode/write_lr.d.ts.map +1 -0
- package/src/avif/native/av1/encode/write_lr.js +174 -0
- package/src/avif/native/av1/encode/write_transform_type.d.ts +21 -0
- package/src/avif/native/av1/encode/write_transform_type.d.ts.map +1 -0
- package/src/avif/native/av1/encode/write_transform_type.js +70 -0
- package/src/avif/native/av1/entropy/CdfContext.d.ts +167 -0
- package/src/avif/native/av1/entropy/CdfContext.d.ts.map +1 -0
- package/src/avif/native/av1/entropy/CdfContext.js +433 -0
- package/src/avif/native/av1/entropy/SymbolReader.d.ts +103 -0
- package/src/avif/native/av1/entropy/SymbolReader.d.ts.map +1 -0
- package/src/avif/native/av1/entropy/SymbolReader.js +317 -0
- package/src/avif/native/av1/entropy/SymbolWriter.d.ts +107 -0
- package/src/avif/native/av1/entropy/SymbolWriter.d.ts.map +1 -0
- package/src/avif/native/av1/entropy/SymbolWriter.js +352 -0
- package/src/avif/native/av1/entropy/coefficient_context.d.ts +71 -0
- package/src/avif/native/av1/entropy/coefficient_context.d.ts.map +1 -0
- package/src/avif/native/av1/entropy/coefficient_context.js +325 -0
- package/src/avif/native/av1/entropy/partition_cdf.d.ts +54 -0
- package/src/avif/native/av1/entropy/partition_cdf.d.ts.map +1 -0
- package/src/avif/native/av1/entropy/partition_cdf.js +98 -0
- package/src/avif/native/av1/entropy/symbol_cost.d.ts +37 -0
- package/src/avif/native/av1/entropy/symbol_cost.d.ts.map +1 -0
- package/src/avif/native/av1/entropy/symbol_cost.js +76 -0
- package/src/avif/native/av1/filter/cdef.d.ts +15 -0
- package/src/avif/native/av1/filter/cdef.d.ts.map +1 -0
- package/src/avif/native/av1/filter/cdef.js +313 -0
- package/src/avif/native/av1/filter/loop_filter.d.ts +14 -0
- package/src/avif/native/av1/filter/loop_filter.d.ts.map +1 -0
- package/src/avif/native/av1/filter/loop_filter.js +377 -0
- package/src/avif/native/av1/filter/loop_restoration.d.ts +42 -0
- package/src/avif/native/av1/filter/loop_restoration.d.ts.map +1 -0
- package/src/avif/native/av1/filter/loop_restoration.js +451 -0
- package/src/avif/native/av1/filter/superres.d.ts +18 -0
- package/src/avif/native/av1/filter/superres.d.ts.map +1 -0
- package/src/avif/native/av1/filter/superres.js +86 -0
- package/src/avif/native/av1/grain/FilmGrainState.d.ts +62 -0
- package/src/avif/native/av1/grain/FilmGrainState.d.ts.map +1 -0
- package/src/avif/native/av1/grain/FilmGrainState.js +87 -0
- package/src/avif/native/av1/grain/film_grain.d.ts +16 -0
- package/src/avif/native/av1/grain/film_grain.d.ts.map +1 -0
- package/src/avif/native/av1/grain/film_grain.js +623 -0
- package/src/avif/native/av1/obu/FrameHeader.d.ts +248 -0
- package/src/avif/native/av1/obu/FrameHeader.d.ts.map +1 -0
- package/src/avif/native/av1/obu/FrameHeader.js +381 -0
- package/src/avif/native/av1/obu/ObuHeader.d.ts +53 -0
- package/src/avif/native/av1/obu/ObuHeader.d.ts.map +1 -0
- package/src/avif/native/av1/obu/ObuHeader.js +62 -0
- package/src/avif/native/av1/obu/SequenceHeader.d.ts +157 -0
- package/src/avif/native/av1/obu/SequenceHeader.d.ts.map +1 -0
- package/src/avif/native/av1/obu/SequenceHeader.js +225 -0
- package/src/avif/native/av1/obu/for_each_obu.d.ts +24 -0
- package/src/avif/native/av1/obu/for_each_obu.d.ts.map +1 -0
- package/src/avif/native/av1/obu/for_each_obu.js +50 -0
- package/src/avif/native/av1/obu/parse_frame_header.d.ts +18 -0
- package/src/avif/native/av1/obu/parse_frame_header.d.ts.map +1 -0
- package/src/avif/native/av1/obu/parse_frame_header.js +841 -0
- package/src/avif/native/av1/obu/parse_obu_header.d.ts +23 -0
- package/src/avif/native/av1/obu/parse_obu_header.d.ts.map +1 -0
- package/src/avif/native/av1/obu/parse_obu_header.js +69 -0
- package/src/avif/native/av1/obu/parse_sequence_header.d.ts +17 -0
- package/src/avif/native/av1/obu/parse_sequence_header.d.ts.map +1 -0
- package/src/avif/native/av1/obu/parse_sequence_header.js +263 -0
- package/src/avif/native/av1/obu/write_frame_header.d.ts +16 -0
- package/src/avif/native/av1/obu/write_frame_header.d.ts.map +1 -0
- package/src/avif/native/av1/obu/write_frame_header.js +579 -0
- package/src/avif/native/av1/obu/write_sequence_header.d.ts +17 -0
- package/src/avif/native/av1/obu/write_sequence_header.d.ts.map +1 -0
- package/src/avif/native/av1/obu/write_sequence_header.js +189 -0
- package/src/avif/native/av1/predict/IntraPredictionState.d.ts +49 -0
- package/src/avif/native/av1/predict/IntraPredictionState.d.ts.map +1 -0
- package/src/avif/native/av1/predict/IntraPredictionState.js +58 -0
- package/src/avif/native/av1/predict/intra_filter_type.d.ts +17 -0
- package/src/avif/native/av1/predict/intra_filter_type.d.ts.map +1 -0
- package/src/avif/native/av1/predict/intra_filter_type.js +79 -0
- package/src/avif/native/av1/predict/predict_chroma_from_luma.d.ts +50 -0
- package/src/avif/native/av1/predict/predict_chroma_from_luma.d.ts.map +1 -0
- package/src/avif/native/av1/predict/predict_chroma_from_luma.js +153 -0
- package/src/avif/native/av1/predict/predict_intra.d.ts +42 -0
- package/src/avif/native/av1/predict/predict_intra.d.ts.map +1 -0
- package/src/avif/native/av1/predict/predict_intra.js +803 -0
- package/src/avif/native/av1/predict/predict_palette.d.ts +23 -0
- package/src/avif/native/av1/predict/predict_palette.d.ts.map +1 -0
- package/src/avif/native/av1/predict/predict_palette.js +36 -0
- package/src/avif/native/av1/tables/av1_symbols.d.ts +411 -0
- package/src/avif/native/av1/tables/av1_symbols.d.ts.map +1 -0
- package/src/avif/native/av1/tables/av1_symbols.js +419 -0
- package/src/avif/native/av1/tables/block_tables.d.ts +181 -0
- package/src/avif/native/av1/tables/block_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/block_tables.js +270 -0
- package/src/avif/native/av1/tables/cdf_tables.d.ts +961 -0
- package/src/avif/native/av1/tables/cdf_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/cdf_tables.js +1893 -0
- package/src/avif/native/av1/tables/coefficient_tables.d.ts +41 -0
- package/src/avif/native/av1/tables/coefficient_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/coefficient_tables.js +82 -0
- package/src/avif/native/av1/tables/derived_block_tables.d.ts +15 -0
- package/src/avif/native/av1/tables/derived_block_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/derived_block_tables.js +23 -0
- package/src/avif/native/av1/tables/filter_tables.d.ts +171 -0
- package/src/avif/native/av1/tables/filter_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/filter_tables.js +313 -0
- package/src/avif/native/av1/tables/grain_tables.d.ts +11 -0
- package/src/avif/native/av1/tables/grain_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/grain_tables.js +190 -0
- package/src/avif/native/av1/tables/prediction_tables.d.ts +141 -0
- package/src/avif/native/av1/tables/prediction_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/prediction_tables.js +223 -0
- package/src/avif/native/av1/tables/quantizer_matrix_tables.d.ts +21 -0
- package/src/avif/native/av1/tables/quantizer_matrix_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/quantizer_matrix_tables.js +38 -0
- package/src/avif/native/av1/tables/quantizer_tables.d.ts +21 -0
- package/src/avif/native/av1/tables/quantizer_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/quantizer_tables.js +160 -0
- package/src/avif/native/av1/tables/scan_tables.d.ts +321 -0
- package/src/avif/native/av1/tables/scan_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/scan_tables.js +727 -0
- package/src/avif/native/av1/tables/segmentation_tables.d.ts +31 -0
- package/src/avif/native/av1/tables/segmentation_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/segmentation_tables.js +48 -0
- package/src/avif/native/av1/tables/transform_tables.d.ts +91 -0
- package/src/avif/native/av1/tables/transform_tables.d.ts.map +1 -0
- package/src/avif/native/av1/tables/transform_tables.js +140 -0
- package/src/avif/native/av1/tables/unpack_table.d.ts +33 -0
- package/src/avif/native/av1/tables/unpack_table.d.ts.map +1 -0
- package/src/avif/native/av1/tables/unpack_table.js +73 -0
- package/src/avif/native/av1/transform/forward_transform_2d.d.ts +61 -0
- package/src/avif/native/av1/transform/forward_transform_2d.d.ts.map +1 -0
- package/src/avif/native/av1/transform/forward_transform_2d.js +574 -0
- package/src/avif/native/av1/transform/inverse_transform_1d.d.ts +76 -0
- package/src/avif/native/av1/transform/inverse_transform_1d.d.ts.map +1 -0
- package/src/avif/native/av1/transform/inverse_transform_1d.js +590 -0
- package/src/avif/native/av1/transform/inverse_transform_2d.d.ts +46 -0
- package/src/avif/native/av1/transform/inverse_transform_2d.d.ts.map +1 -0
- package/src/avif/native/av1/transform/inverse_transform_2d.js +180 -0
- package/src/avif/native/av1/util/ceil_log2.d.ts +13 -0
- package/src/avif/native/av1/util/ceil_log2.d.ts.map +1 -0
- package/src/avif/native/av1/util/ceil_log2.js +18 -0
- package/src/avif/native/av1/util/floor_log2.d.ts +20 -0
- package/src/avif/native/av1/util/floor_log2.d.ts.map +1 -0
- package/src/avif/native/av1/util/floor_log2.js +20 -0
- package/src/avif/native/av1/util/round2.d.ts +22 -0
- package/src/avif/native/av1/util/round2.d.ts.map +1 -0
- package/src/avif/native/av1/util/round2.js +27 -0
- package/src/avif/native/av1/util/round2_signed.d.ts +14 -0
- package/src/avif/native/av1/util/round2_signed.d.ts.map +1 -0
- package/src/avif/native/av1/util/round2_signed.js +17 -0
- package/src/avif/native/av1/util/tile_log2.d.ts +16 -0
- package/src/avif/native/av1/util/tile_log2.d.ts.map +1 -0
- package/src/avif/native/av1/util/tile_log2.js +23 -0
- package/src/avif/native/bitstream/BitReader.d.ts +174 -0
- package/src/avif/native/bitstream/BitReader.d.ts.map +1 -0
- package/src/avif/native/bitstream/BitReader.js +391 -0
- package/src/avif/native/bitstream/BitWriter.d.ts +122 -0
- package/src/avif/native/bitstream/BitWriter.d.ts.map +1 -0
- package/src/avif/native/bitstream/BitWriter.js +351 -0
- package/src/avif/native/color/ColourTransform.d.ts +62 -0
- package/src/avif/native/color/ColourTransform.d.ts.map +1 -0
- package/src/avif/native/color/ColourTransform.js +189 -0
- package/src/avif/native/color/YuvImage.d.ts +51 -0
- package/src/avif/native/color/YuvImage.d.ts.map +1 -0
- package/src/avif/native/color/YuvImage.js +66 -0
- package/src/avif/native/color/clamp_sample.d.ts +18 -0
- package/src/avif/native/color/clamp_sample.d.ts.map +1 -0
- package/src/avif/native/color/clamp_sample.js +25 -0
- package/src/avif/native/color/linear_to_transfer.d.ts +24 -0
- package/src/avif/native/color/linear_to_transfer.d.ts.map +1 -0
- package/src/avif/native/color/linear_to_transfer.js +126 -0
- package/src/avif/native/color/primaries.d.ts +20 -0
- package/src/avif/native/color/primaries.d.ts.map +1 -0
- package/src/avif/native/color/primaries.js +94 -0
- package/src/avif/native/color/rgb_row_to_ycbcr.d.ts +20 -0
- package/src/avif/native/color/rgb_row_to_ycbcr.d.ts.map +1 -0
- package/src/avif/native/color/rgb_row_to_ycbcr.js +78 -0
- package/src/avif/native/color/transfer_to_linear.d.ts +49 -0
- package/src/avif/native/color/transfer_to_linear.d.ts.map +1 -0
- package/src/avif/native/color/transfer_to_linear.js +171 -0
- package/src/avif/native/color/upsample_chroma_row.d.ts +35 -0
- package/src/avif/native/color/upsample_chroma_row.d.ts.map +1 -0
- package/src/avif/native/color/upsample_chroma_row.js +89 -0
- package/src/avif/native/color/ycbcr_row_to_rgb.d.ts +23 -0
- package/src/avif/native/color/ycbcr_row_to_rgb.d.ts.map +1 -0
- package/src/avif/native/color/ycbcr_row_to_rgb.js +78 -0
- package/src/avif/native/heif/AvifFile.d.ts +112 -0
- package/src/avif/native/heif/AvifFile.d.ts.map +1 -0
- package/src/avif/native/heif/AvifFile.js +142 -0
- package/src/avif/native/heif/ItemProperty.d.ts +244 -0
- package/src/avif/native/heif/ItemProperty.d.ts.map +1 -0
- package/src/avif/native/heif/ItemProperty.js +321 -0
- package/src/avif/native/heif/find_item_property.d.ts +17 -0
- package/src/avif/native/heif/find_item_property.d.ts.map +1 -0
- package/src/avif/native/heif/find_item_property.js +28 -0
- package/src/avif/native/heif/find_item_references.d.ts +16 -0
- package/src/avif/native/heif/find_item_references.d.ts.map +1 -0
- package/src/avif/native/heif/find_item_references.js +29 -0
- package/src/avif/native/heif/find_items_referencing.d.ts +17 -0
- package/src/avif/native/heif/find_items_referencing.d.ts.map +1 -0
- package/src/avif/native/heif/find_items_referencing.js +36 -0
- package/src/avif/native/heif/parse_avif_file.d.ts +15 -0
- package/src/avif/native/heif/parse_avif_file.d.ts.map +1 -0
- package/src/avif/native/heif/parse_avif_file.js +383 -0
- package/src/avif/native/heif/parse_image_grid.d.ts +18 -0
- package/src/avif/native/heif/parse_image_grid.d.ts.map +1 -0
- package/src/avif/native/heif/parse_image_grid.js +48 -0
- package/src/avif/native/heif/parse_item_property.d.ts +18 -0
- package/src/avif/native/heif/parse_item_property.d.ts.map +1 -0
- package/src/avif/native/heif/parse_item_property.js +243 -0
- package/src/avif/native/heif/read_item_data.d.ts +22 -0
- package/src/avif/native/heif/read_item_data.d.ts.map +1 -0
- package/src/avif/native/heif/read_item_data.js +97 -0
- package/src/avif/native/heif/write_avif_file.d.ts +50 -0
- package/src/avif/native/heif/write_avif_file.d.ts.map +1 -0
- package/src/avif/native/heif/write_avif_file.js +348 -0
- package/src/avif/native/heif/write_item_property.d.ts +16 -0
- package/src/avif/native/heif/write_item_property.d.ts.map +1 -0
- package/src/avif/native/heif/write_item_property.js +182 -0
- package/src/avif/native/index.d.ts +14 -0
- package/src/avif/native/index.d.ts.map +1 -0
- package/src/avif/native/index.js +56 -0
- package/src/avif/native/isobmff/BoxHeader.d.ts +50 -0
- package/src/avif/native/isobmff/BoxHeader.d.ts.map +1 -0
- package/src/avif/native/isobmff/BoxHeader.js +57 -0
- package/src/avif/native/isobmff/BoxWriter.d.ts +118 -0
- package/src/avif/native/isobmff/BoxWriter.d.ts.map +1 -0
- package/src/avif/native/isobmff/BoxWriter.js +264 -0
- package/src/avif/native/isobmff/ByteCursor.d.ts +125 -0
- package/src/avif/native/isobmff/ByteCursor.d.ts.map +1 -0
- package/src/avif/native/isobmff/ByteCursor.js +298 -0
- package/src/avif/native/isobmff/for_each_box.d.ts +23 -0
- package/src/avif/native/isobmff/for_each_box.d.ts.map +1 -0
- package/src/avif/native/isobmff/for_each_box.js +39 -0
- package/src/avif/native/isobmff/read_box_header.d.ts +22 -0
- package/src/avif/native/isobmff/read_box_header.d.ts.map +1 -0
- package/src/avif/native/isobmff/read_box_header.js +59 -0
- package/src/avif/native/isobmff/read_full_box_header.d.ts +26 -0
- package/src/avif/native/isobmff/read_full_box_header.d.ts.map +1 -0
- package/src/avif/native/isobmff/read_full_box_header.js +33 -0
- package/src/avif/threaded_image_encoder.d.ts +7 -2
- package/src/avif/threaded_image_encoder.d.ts.map +1 -1
- package/src/avif/threaded_image_encoder.js +107 -21
- package/src/core/binary/BinaryBuffer.d.ts +40 -0
- package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
- package/src/core/binary/BinaryBuffer.js +100 -0
- package/src/core/binary/hash/crc32.d.ts +16 -0
- package/src/core/binary/hash/crc32.d.ts.map +1 -0
- package/src/core/binary/hash/crc32.js +96 -0
- package/src/core/binary/utf8/utf8_decode.d.ts +21 -0
- package/src/core/binary/utf8/utf8_decode.d.ts.map +1 -0
- package/src/core/binary/utf8/utf8_decode.js +43 -0
- package/src/core/binary/utf8/utf8_encode_into.d.ts +20 -0
- package/src/core/binary/utf8/utf8_encode_into.d.ts.map +1 -0
- package/src/core/binary/utf8/utf8_encode_into.js +48 -0
- package/src/core/binary/utf8/utf8_encoded_length.d.ts +14 -0
- package/src/core/binary/utf8/utf8_encoded_length.d.ts.map +1 -0
- package/src/core/binary/utf8/utf8_encoded_length.js +36 -0
- package/src/core/color/COLOR_FIX_PLAN_2026_08_28.md +417 -0
- package/src/core/color/COLOR_REVIEW_2026_08_28.md +779 -0
- package/src/core/color/Color.d.ts +128 -20
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/color/Color.js +959 -866
- package/src/core/color/PQ/PQ_constants.d.ts +10 -0
- package/src/core/color/PQ/PQ_constants.d.ts.map +1 -1
- package/src/core/color/PQ/PQ_constants.js +10 -0
- package/src/core/color/PQ/linear_to_PQ.d.ts.map +1 -1
- package/src/core/color/PQ/linear_to_PQ.js +6 -0
- package/src/core/color/REC709_PRIMARIES.d.ts +50 -0
- package/src/core/color/REC709_PRIMARIES.d.ts.map +1 -0
- package/src/core/color/REC709_PRIMARIES.js +53 -0
- package/src/core/color/construct/color_from_hex.d.ts +21 -0
- package/src/core/color/construct/color_from_hex.d.ts.map +1 -0
- package/src/core/color/construct/color_from_hex.js +33 -0
- package/src/core/color/construct/color_from_temperature.d.ts +22 -0
- package/src/core/color/construct/color_from_temperature.d.ts.map +1 -0
- package/src/core/color/construct/color_from_temperature.js +33 -0
- package/src/core/color/construct/color_from_uint24.d.ts +19 -0
- package/src/core/color/construct/color_from_uint24.d.ts.map +1 -0
- package/src/core/color/construct/color_from_uint24.js +26 -0
- package/src/core/color/construct/color_from_uint32.d.ts +20 -0
- package/src/core/color/construct/color_from_uint32.d.ts.map +1 -0
- package/src/core/color/construct/color_from_uint32.js +39 -0
- package/src/core/color/construct/color_gray.d.ts +17 -0
- package/src/core/color/construct/color_gray.d.ts.map +1 -0
- package/src/core/color/construct/color_gray.js +22 -0
- package/src/core/color/hex/hex2rgb.d.ts +1 -11
- package/src/core/color/hex/hex2rgb.d.ts.map +1 -1
- package/src/core/color/hex/hex2rgb.js +7 -24
- package/src/core/color/hex/hex_to_rgb.d.ts +18 -0
- package/src/core/color/hex/hex_to_rgb.d.ts.map +1 -0
- package/src/core/color/hex/hex_to_rgb.js +62 -0
- package/src/core/color/hex/rgb2hex.d.ts +1 -8
- package/src/core/color/hex/rgb2hex.d.ts.map +1 -1
- package/src/core/color/hex/rgb2hex.js +7 -13
- package/src/core/color/hex/rgb_to_hex.d.ts +9 -0
- package/src/core/color/hex/rgb_to_hex.d.ts.map +1 -0
- package/src/core/color/hex/rgb_to_hex.js +13 -0
- package/src/core/color/hex/rgba_to_hex.d.ts +19 -0
- package/src/core/color/hex/rgba_to_hex.d.ts.map +1 -0
- package/src/core/color/hex/rgba_to_hex.js +23 -0
- package/src/core/color/hsv/hsv2rgb.d.ts +1 -12
- package/src/core/color/hsv/hsv2rgb.d.ts.map +1 -1
- package/src/core/color/hsv/hsv2rgb.js +8 -21
- package/src/core/color/hsv/hsv2rgb_float.d.ts +1 -12
- package/src/core/color/hsv/hsv2rgb_float.d.ts.map +1 -1
- package/src/core/color/hsv/hsv2rgb_float.js +8 -56
- package/src/core/color/hsv/hsv_to_rgb.d.ts +13 -0
- package/src/core/color/hsv/hsv_to_rgb.d.ts.map +1 -0
- package/src/core/color/hsv/hsv_to_rgb.js +39 -0
- package/src/core/color/hsv/hsv_to_rgb_uint8.d.ts +13 -0
- package/src/core/color/hsv/hsv_to_rgb_uint8.d.ts.map +1 -0
- package/src/core/color/hsv/hsv_to_rgb_uint8.js +21 -0
- package/src/core/color/hsv/hue_to_rgb_sextant.d.ts +24 -0
- package/src/core/color/hsv/hue_to_rgb_sextant.d.ts.map +1 -0
- package/src/core/color/hsv/hue_to_rgb_sextant.js +67 -0
- package/src/core/color/hsv/rgb2hsv.d.ts +1 -12
- package/src/core/color/hsv/rgb2hsv.d.ts.map +1 -1
- package/src/core/color/hsv/rgb2hsv.js +7 -42
- package/src/core/color/hsv/rgb_to_hsv.d.ts +13 -0
- package/src/core/color/hsv/rgb_to_hsv.d.ts.map +1 -0
- package/src/core/color/hsv/rgb_to_hsv.js +42 -0
- package/src/core/color/hunt/hpe_to_xyz.d.ts +2 -0
- package/src/core/color/hunt/hpe_to_xyz.d.ts.map +1 -0
- package/src/core/color/hunt/hpe_to_xyz.js +4 -0
- package/src/core/color/hunt/xyz_to_hpe.d.ts +1 -6
- package/src/core/color/hunt/xyz_to_hpe.d.ts.map +1 -1
- package/src/core/color/hunt/xyz_to_hpe.js +12 -15
- package/src/core/color/illuminant/D65_spd_tabulated.d.ts.map +1 -1
- package/src/core/color/illuminant/D65_spd_tabulated.js +107 -104
- package/src/core/color/int2rgb.d.ts +1 -10
- package/src/core/color/int2rgb.d.ts.map +1 -1
- package/src/core/color/int2rgb.js +7 -12
- package/src/core/color/int_to_rgb.d.ts +21 -0
- package/src/core/color/int_to_rgb.d.ts.map +1 -0
- package/src/core/color/int_to_rgb.js +33 -0
- package/src/core/color/kelvin/kelvin_to_rgb.d.ts.map +1 -1
- package/src/core/color/kelvin/kelvin_to_rgb.js +22 -2
- package/src/core/color/kelvin/rgb_to_kelvin.d.ts +22 -2
- package/src/core/color/kelvin/rgb_to_kelvin.d.ts.map +1 -1
- package/src/core/color/kelvin/rgb_to_kelvin.js +22 -2
- package/src/core/color/lab/lab_to_xyz.d.ts +20 -0
- package/src/core/color/lab/lab_to_xyz.d.ts.map +1 -0
- package/src/core/color/lab/lab_to_xyz.js +69 -0
- package/src/core/color/oklab/gamut_clip_adaptive_l0.d.ts +34 -0
- package/src/core/color/oklab/gamut_clip_adaptive_l0.d.ts.map +1 -0
- package/src/core/color/oklab/gamut_clip_adaptive_l0.js +46 -0
- package/src/core/color/oklab/gamut_clip_at_l0.d.ts +33 -0
- package/src/core/color/oklab/gamut_clip_at_l0.d.ts.map +1 -0
- package/src/core/color/oklab/gamut_clip_at_l0.js +84 -0
- package/src/core/color/oklab/gamut_clip_preserve_chroma.d.ts +24 -0
- package/src/core/color/oklab/gamut_clip_preserve_chroma.d.ts.map +1 -0
- package/src/core/color/oklab/gamut_clip_preserve_chroma.js +37 -0
- package/src/core/color/oklab/gamut_clip_project_to_lcusp.d.ts +23 -0
- package/src/core/color/oklab/gamut_clip_project_to_lcusp.d.ts.map +1 -0
- package/src/core/color/oklab/gamut_clip_project_to_lcusp.js +46 -0
- package/src/core/color/oklab/linear_srgb_to_okhsl.d.ts +19 -0
- package/src/core/color/oklab/linear_srgb_to_okhsl.d.ts.map +1 -0
- package/src/core/color/oklab/linear_srgb_to_okhsl.js +93 -0
- package/src/core/color/oklab/linear_srgb_to_okhsv.d.ts +12 -4
- package/src/core/color/oklab/linear_srgb_to_okhsv.d.ts.map +1 -1
- package/src/core/color/oklab/linear_srgb_to_okhsv.js +108 -84
- package/src/core/color/oklab/linear_srgb_to_oklab.d.ts +13 -4
- package/src/core/color/oklab/linear_srgb_to_oklab.d.ts.map +1 -1
- package/src/core/color/oklab/linear_srgb_to_oklab.js +28 -19
- package/src/core/color/oklab/okhsl_chroma_bounds.d.ts +51 -0
- package/src/core/color/oklab/okhsl_chroma_bounds.d.ts.map +1 -0
- package/src/core/color/oklab/okhsl_chroma_bounds.js +128 -0
- package/src/core/color/oklab/okhsl_to_linear_srgb.d.ts +19 -0
- package/src/core/color/oklab/okhsl_to_linear_srgb.d.ts.map +1 -0
- package/src/core/color/oklab/okhsl_to_linear_srgb.js +85 -0
- package/src/core/color/oklab/oklab_to_oklch.d.ts +24 -0
- package/src/core/color/oklab/oklab_to_oklch.d.ts.map +1 -0
- package/src/core/color/oklab/oklab_to_oklch.js +35 -0
- package/src/core/color/oklab/oklch_to_oklab.d.ts +18 -0
- package/src/core/color/oklab/oklch_to_oklab.d.ts.map +1 -0
- package/src/core/color/oklab/oklch_to_oklab.js +26 -0
- package/src/core/color/oklab/toe.d.ts +12 -0
- package/src/core/color/oklab/toe.d.ts.map +1 -1
- package/src/core/color/oklab/toe.js +34 -22
- package/src/core/color/operations/color_add.d.ts +21 -0
- package/src/core/color/operations/color_add.d.ts.map +1 -0
- package/src/core/color/operations/color_add.js +23 -0
- package/src/core/color/operations/color_add_scaled.d.ts +20 -0
- package/src/core/color/operations/color_add_scaled.d.ts.map +1 -0
- package/src/core/color/operations/color_add_scaled.js +30 -0
- package/src/core/color/operations/color_clamp.d.ts +22 -0
- package/src/core/color/operations/color_clamp.d.ts.map +1 -0
- package/src/core/color/operations/color_clamp.js +25 -0
- package/src/core/color/operations/color_darken.d.ts +2 -1
- package/src/core/color/operations/color_darken.d.ts.map +1 -1
- package/src/core/color/operations/color_darken.js +25 -24
- package/src/core/color/operations/color_desaturate.d.ts +2 -1
- package/src/core/color/operations/color_desaturate.d.ts.map +1 -1
- package/src/core/color/operations/color_desaturate.js +25 -24
- package/src/core/color/operations/color_get_hsl.d.ts +18 -0
- package/src/core/color/operations/color_get_hsl.d.ts.map +1 -0
- package/src/core/color/operations/color_get_hsl.js +60 -0
- package/src/core/color/operations/color_is_in_gamut.d.ts +20 -0
- package/src/core/color/operations/color_is_in_gamut.d.ts.map +1 -0
- package/src/core/color/operations/color_is_in_gamut.js +30 -0
- package/src/core/color/operations/color_lerp.d.ts +12 -3
- package/src/core/color/operations/color_lerp.d.ts.map +1 -1
- package/src/core/color/operations/color_lerp.js +55 -46
- package/src/core/color/operations/color_lighten.d.ts +9 -5
- package/src/core/color/operations/color_lighten.d.ts.map +1 -1
- package/src/core/color/operations/color_lighten.js +29 -24
- package/src/core/color/operations/color_mix_okhsv_channel.d.ts +24 -0
- package/src/core/color/operations/color_mix_okhsv_channel.d.ts.map +1 -0
- package/src/core/color/operations/color_mix_okhsv_channel.js +48 -0
- package/src/core/color/operations/color_multiply_rgb.d.ts +21 -0
- package/src/core/color/operations/color_multiply_rgb.d.ts.map +1 -0
- package/src/core/color/operations/color_multiply_rgb.js +26 -0
- package/src/core/color/operations/color_saturate.d.ts +9 -5
- package/src/core/color/operations/color_saturate.d.ts.map +1 -1
- package/src/core/color/operations/color_saturate.js +29 -24
- package/src/core/color/operations/color_scale_okhsv_channel.d.ts +1 -1
- package/src/core/color/operations/color_scale_okhsv_channel.d.ts.map +1 -1
- package/src/core/color/operations/color_scale_okhsv_channel.js +58 -45
- package/src/core/color/operations/color_srgb_apply.d.ts +28 -0
- package/src/core/color/operations/color_srgb_apply.d.ts.map +1 -0
- package/src/core/color/operations/color_srgb_apply.js +40 -0
- package/src/core/color/operations/color_sub.d.ts +16 -0
- package/src/core/color/operations/color_sub.d.ts.map +1 -0
- package/src/core/color/operations/color_sub.js +18 -0
- package/src/core/color/parse_color.d.ts +10 -1
- package/src/core/color/parse_color.d.ts.map +1 -1
- package/src/core/color/parse_color.js +100 -84
- package/src/core/color/parse_color_normalized.d.ts +24 -0
- package/src/core/color/parse_color_normalized.d.ts.map +1 -0
- package/src/core/color/parse_color_normalized.js +38 -0
- package/src/core/color/rgb2uint24.d.ts +1 -8
- package/src/core/color/rgb2uint24.d.ts.map +1 -1
- package/src/core/color/rgb2uint24.js +7 -20
- package/src/core/color/rgb2uint32.d.ts +1 -9
- package/src/core/color/rgb2uint32.d.ts.map +1 -1
- package/src/core/color/rgb2uint32.js +7 -18
- package/src/core/color/rgb_to_luminance.d.ts +14 -5
- package/src/core/color/rgb_to_luminance.d.ts.map +1 -1
- package/src/core/color/rgb_to_luminance.js +24 -13
- package/src/core/color/rgb_to_uint24.d.ts +9 -0
- package/src/core/color/rgb_to_uint24.d.ts.map +1 -0
- package/src/core/color/rgb_to_uint24.js +20 -0
- package/src/core/color/rgb_to_uint32.d.ts +10 -0
- package/src/core/color/rgb_to_uint32.d.ts.map +1 -0
- package/src/core/color/rgb_to_uint32.js +21 -0
- package/src/core/color/sRGB/linear_to_sRGB.d.ts +7 -0
- package/src/core/color/sRGB/linear_to_sRGB.d.ts.map +1 -1
- package/src/core/color/sRGB/linear_to_sRGB.js +39 -32
- package/src/core/color/xyz/hpe_to_xyz.d.ts +24 -0
- package/src/core/color/xyz/hpe_to_xyz.d.ts.map +1 -0
- package/src/core/color/xyz/hpe_to_xyz.js +39 -0
- package/src/core/color/xyz/rgb_to_xyz.d.ts +17 -2
- package/src/core/color/xyz/rgb_to_xyz.d.ts.map +1 -1
- package/src/core/color/xyz/rgb_to_xyz.js +44 -18
- package/src/core/color/xyz/xyz_cmf_tabulated.d.ts.map +1 -1
- package/src/core/color/xyz/xyz_cmf_tabulated.js +217 -211
- package/src/core/color/xyz/xyz_cmf_wyman.d.ts +4 -0
- package/src/core/color/xyz/xyz_cmf_wyman.d.ts.map +1 -1
- package/src/core/color/xyz/xyz_cmf_wyman.js +74 -65
- package/src/core/color/xyz/xyz_to_hpe.d.ts +18 -0
- package/src/core/color/xyz/xyz_to_hpe.d.ts.map +1 -0
- package/src/core/color/xyz/xyz_to_hpe.js +33 -0
- package/src/core/color/xyz/xyz_to_rgb.d.ts +17 -2
- package/src/core/color/xyz/xyz_to_rgb.d.ts.map +1 -1
- package/src/core/color/xyz/xyz_to_rgb.js +39 -16
- package/src/core/color/ycxcz/xyz_to_ycxcz.d.ts +7 -2
- package/src/core/color/ycxcz/xyz_to_ycxcz.d.ts.map +1 -1
- package/src/core/color/ycxcz/xyz_to_ycxcz.js +33 -28
- package/src/core/events/signal/Signal.js +820 -820
- package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/ConvexHullShape3D.js +28 -4
- package/src/core/math/clamp_index.d.ts +18 -0
- package/src/core/math/clamp_index.d.ts.map +1 -0
- package/src/core/math/clamp_index.js +23 -0
- package/src/engine/asset/loaders/image/IMAGE_CODEC_REVIEW_2026_08_28.md +803 -0
- package/src/engine/asset/loaders/image/jpeg/JpegFrame.d.ts +5 -3
- package/src/engine/asset/loaders/image/jpeg/JpegFrame.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/jpeg/JpegFrame.js +5 -3
- package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.d.ts +2 -1
- package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.js +2 -1
- package/src/engine/asset/loaders/image/jpeg/JpegImage.d.ts +17 -0
- package/src/engine/asset/loaders/image/jpeg/JpegImage.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/jpeg/JpegImage.js +197 -157
- package/src/engine/asset/loaders/image/jpeg/idct8x8_float.d.ts +0 -1
- package/src/engine/asset/loaders/image/jpeg/idct8x8_float.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/jpeg/idct8x8_float.js +0 -1
- package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.d.ts +28 -0
- package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.js +31 -0
- package/src/engine/asset/loaders/image/png/PNG.d.ts +3 -18
- package/src/engine/asset/loaders/image/png/PNG.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/PNG.js +3 -139
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts +16 -16
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/PNGReader.js +143 -160
- package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_iTXt.js +3 -3
- package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_zTXt.js +3 -3
- package/src/engine/asset/loaders/image/png/crc32.d.ts +1 -15
- package/src/engine/asset/loaders/image/png/crc32.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/crc32.js +5 -89
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.d.ts +12 -10
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.js +20 -45
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.d.ts +2 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.js +2 -0
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.d.ts +2 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.js +2 -0
- package/src/engine/asset/loaders/image/png/filter/png_unfilter.d.ts +22 -0
- package/src/engine/asset/loaders/image/png/filter/png_unfilter.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/png/filter/png_unfilter.js +68 -0
- package/src/engine/asset/loaders/image/png/png_inflate.d.ts +20 -0
- package/src/engine/asset/loaders/image/png/png_inflate.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/png/png_inflate.js +85 -0
- package/src/engine/asset/loaders/image/png/png_unpack_samples.d.ts +22 -0
- package/src/engine/asset/loaders/image/png/png_unpack_samples.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/png/png_unpack_samples.js +38 -0
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +1 -1
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +135 -132
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +16 -3
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +1157 -1149
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +26 -0
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/FrameGraph.js +947 -900
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +69 -81
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +83 -77
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/device/IMMEDIATE_DATA_PLAN_2026_08_28.md +451 -0
- package/src/shade/device/ShadeGPUCommandContext.d.ts +21 -0
- package/src/shade/device/ShadeGPUCommandContext.d.ts.map +1 -1
- package/src/shade/device/ShadeGPUCommandContext.js +940 -749
- package/src/shade/device/timing/GPUTimerArray.d.ts +22 -4
- package/src/shade/device/timing/GPUTimerArray.d.ts.map +1 -1
- package/src/shade/device/timing/GPUTimerArray.js +88 -14
- package/src/shade/device/timing/GPU_PROFILER_PROPOSAL_2026_08_28.md +876 -0
- package/src/shade/device/timing/profile/GPUFrameRecorder.d.ts +93 -0
- package/src/shade/device/timing/profile/GPUFrameRecorder.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUFrameRecorder.js +297 -0
- package/src/shade/device/timing/profile/GPUProfileCapture.d.ts +62 -0
- package/src/shade/device/timing/profile/GPUProfileCapture.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileCapture.js +77 -0
- package/src/shade/device/timing/profile/GPUProfileFrame.d.ts +73 -0
- package/src/shade/device/timing/profile/GPUProfileFrame.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileFrame.js +88 -0
- package/src/shade/device/timing/profile/GPUProfileLevel.d.ts +20 -0
- package/src/shade/device/timing/profile/GPUProfileLevel.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileLevel.js +50 -0
- package/src/shade/device/timing/profile/GPUProfileMeta.d.ts +63 -0
- package/src/shade/device/timing/profile/GPUProfileMeta.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileMeta.js +73 -0
- package/src/shade/device/timing/profile/GPUProfileSession.d.ts +173 -0
- package/src/shade/device/timing/profile/GPUProfileSession.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileSession.js +470 -0
- package/src/shade/device/timing/profile/GPUProfileSpan.d.ts +60 -0
- package/src/shade/device/timing/profile/GPUProfileSpan.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileSpan.js +65 -0
- package/src/shade/device/timing/profile/GPUProfileSpanKind.d.ts +19 -0
- package/src/shade/device/timing/profile/GPUProfileSpanKind.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileSpanKind.js +25 -0
- package/src/shade/device/timing/profile/GPUProfileTopology.d.ts +159 -0
- package/src/shade/device/timing/profile/GPUProfileTopology.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileTopology.js +202 -0
- package/src/shade/device/timing/profile/GPUProfileWork.d.ts +90 -0
- package/src/shade/device/timing/profile/GPUProfileWork.d.ts.map +1 -0
- package/src/shade/device/timing/profile/GPUProfileWork.js +115 -0
- package/src/shade/device/timing/profile/SGPTDefect.d.ts +43 -0
- package/src/shade/device/timing/profile/SGPTDefect.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPTDefect.js +65 -0
- package/src/shade/device/timing/profile/SGPTHeader.d.ts +38 -0
- package/src/shade/device/timing/profile/SGPTHeader.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPTHeader.js +46 -0
- package/src/shade/device/timing/profile/SGPTRecordRef.d.ts +37 -0
- package/src/shade/device/timing/profile/SGPTRecordRef.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPTRecordRef.js +45 -0
- package/src/shade/device/timing/profile/SGPTWriteStream.d.ts +103 -0
- package/src/shade/device/timing/profile/SGPTWriteStream.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPTWriteStream.js +287 -0
- package/src/shade/device/timing/profile/SGPT_DEFECT.d.ts +19 -0
- package/src/shade/device/timing/profile/SGPT_DEFECT.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_DEFECT.js +26 -0
- package/src/shade/device/timing/profile/SGPT_FLAG.d.ts +8 -0
- package/src/shade/device/timing/profile/SGPT_FLAG.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_FLAG.js +15 -0
- package/src/shade/device/timing/profile/SGPT_FORMAT.md +345 -0
- package/src/shade/device/timing/profile/SGPT_FORMAT_VERSION.d.ts +10 -0
- package/src/shade/device/timing/profile/SGPT_FORMAT_VERSION.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_FORMAT_VERSION.js +9 -0
- package/src/shade/device/timing/profile/SGPT_FRAME_SLACK.d.ts +17 -0
- package/src/shade/device/timing/profile/SGPT_FRAME_SLACK.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_FRAME_SLACK.js +16 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_CHECKSUM_COVERAGE.d.ts +16 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_CHECKSUM_COVERAGE.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_CHECKSUM_COVERAGE.js +15 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_OFFSET.d.ts +15 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_OFFSET.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_OFFSET.js +29 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_SIZE.d.ts +7 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_SIZE.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_HEADER_SIZE.js +6 -0
- package/src/shade/device/timing/profile/SGPT_MAGIC.d.ts +7 -0
- package/src/shade/device/timing/profile/SGPT_MAGIC.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_MAGIC.js +6 -0
- package/src/shade/device/timing/profile/SGPT_MIN_READER_VERSION.d.ts +16 -0
- package/src/shade/device/timing/profile/SGPT_MIN_READER_VERSION.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_MIN_READER_VERSION.js +15 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_HEADER_SIZE.d.ts +7 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_HEADER_SIZE.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_HEADER_SIZE.js +6 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_OFFSET.d.ts +13 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_OFFSET.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_OFFSET.js +23 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_SYNC.d.ts +12 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_SYNC.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_SYNC.js +11 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_TYPE.d.ts +18 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_TYPE.d.ts.map +1 -0
- package/src/shade/device/timing/profile/SGPT_RECORD_TYPE.js +46 -0
- package/src/shade/device/timing/profile/frame_graph_extract_topology.d.ts +20 -0
- package/src/shade/device/timing/profile/frame_graph_extract_topology.d.ts.map +1 -0
- package/src/shade/device/timing/profile/frame_graph_extract_topology.js +174 -0
- package/src/shade/device/timing/profile/make_profiling_pass_encoder.d.ts +21 -0
- package/src/shade/device/timing/profile/make_profiling_pass_encoder.d.ts.map +1 -0
- package/src/shade/device/timing/profile/make_profiling_pass_encoder.js +114 -0
- package/src/shade/device/timing/profile/parse_workgroup_size.d.ts +20 -0
- package/src/shade/device/timing/profile/parse_workgroup_size.d.ts.map +1 -0
- package/src/shade/device/timing/profile/parse_workgroup_size.js +43 -0
- package/src/shade/device/timing/profile/sgpt_fourcc.d.ts +18 -0
- package/src/shade/device/timing/profile/sgpt_fourcc.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_fourcc.js +34 -0
- package/src/shade/device/timing/profile/sgpt_frame_codec.d.ts +42 -0
- package/src/shade/device/timing/profile/sgpt_frame_codec.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_frame_codec.js +172 -0
- package/src/shade/device/timing/profile/sgpt_meta_codec.d.ts +20 -0
- package/src/shade/device/timing/profile/sgpt_meta_codec.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_meta_codec.js +65 -0
- package/src/shade/device/timing/profile/sgpt_read_capture.d.ts +19 -0
- package/src/shade/device/timing/profile/sgpt_read_capture.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_read_capture.js +134 -0
- package/src/shade/device/timing/profile/sgpt_read_header.d.ts +22 -0
- package/src/shade/device/timing/profile/sgpt_read_header.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_read_header.js +94 -0
- package/src/shade/device/timing/profile/sgpt_read_records.d.ts +27 -0
- package/src/shade/device/timing/profile/sgpt_read_records.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_read_records.js +153 -0
- package/src/shade/device/timing/profile/sgpt_topology_codec.d.ts +54 -0
- package/src/shade/device/timing/profile/sgpt_topology_codec.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_topology_codec.js +329 -0
- package/src/shade/device/timing/profile/sgpt_write_header.d.ts +22 -0
- package/src/shade/device/timing/profile/sgpt_write_header.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_write_header.js +47 -0
- package/src/shade/device/timing/profile/sgpt_write_record.d.ts +23 -0
- package/src/shade/device/timing/profile/sgpt_write_record.d.ts.map +1 -0
- package/src/shade/device/timing/profile/sgpt_write_record.js +62 -0
- package/src/shade/renderer/Renderer.d.ts +21 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +2513 -2455
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/scene/serialization/decode_image_source_hdr.d.ts +14 -3
- package/src/shade/renderer/scene/serialization/decode_image_source_hdr.d.ts.map +1 -1
- package/src/shade/renderer/scene/serialization/decode_image_source_hdr.js +50 -51
- package/src/shade/renderer/scene/serialization/deserialize_scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/serialization/deserialize_scene.js +531 -521
- package/src/shade/renderer/scene/serialization/write_image_source.d.ts.map +1 -1
- package/src/shade/renderer/scene/serialization/write_image_source.js +6 -4
- package/src/shade/renderer/shader/chunk/color/chunk_rgb_to_luminance.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/chunk_rgb_to_luminance.js +34 -32
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts +31 -0
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.js +62 -31
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.d.ts +10 -0
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.js +32 -22
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_sRGBTransferOETF.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_sRGBTransferOETF.js +22 -21
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts +6 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.js +110 -104
- package/src/shade/renderer/shader/chunk/color/xyz/chunk_rgb_to_xyz.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/xyz/chunk_rgb_to_xyz.js +23 -21
- package/src/view/elements/ColorPickerView.js +296 -296
- package/src/avif/codec/dec/Readme.md +0 -14
- package/src/avif/codec/dec/avif_dec.cpp +0 -234
- package/src/avif/codec/dec/avif_dec.d.ts +0 -3
- package/src/avif/codec/dec/avif_dec.d.ts.map +0 -1
- package/src/avif/codec/dec/avif_dec.js +0 -16
- package/src/avif/codec/dec/avif_dec.wasm +0 -0
- package/src/avif/codec/enc/README.md +0 -37
- package/src/avif/codec/enc/avif_enc.cpp +0 -216
- package/src/avif/codec/enc/avif_enc.d.ts +0 -3
- package/src/avif/codec/enc/avif_enc.d.ts.map +0 -1
- package/src/avif/codec/enc/avif_enc.js +0 -6144
- package/src/avif/codec/enc/avif_enc.wasm +0 -0
- package/src/avif/codec/enc/avif_enc_mt.d.ts +0 -3
- package/src/avif/codec/enc/avif_enc_mt.d.ts.map +0 -1
- package/src/avif/codec/enc/avif_enc_mt.js +0 -6811
- package/src/avif/codec/enc/avif_enc_mt.wasm +0 -0
- package/src/avif/codec/enc/avif_enc_mt.worker.d.mts +0 -2
- package/src/avif/codec/enc/avif_enc_mt.worker.d.mts.map +0 -1
- package/src/avif/codec/enc/avif_enc_mt.worker.d.ts +0 -11
- package/src/avif/codec/enc/avif_enc_mt.worker.d.ts.map +0 -1
- package/src/avif/codec/enc/avif_enc_mt.worker.js +0 -171
- package/src/avif/codec/enc/avif_enc_mt.worker.mjs +0 -1
- package/src/avif/decode.d.ts +0 -3
- package/src/avif/decode.d.ts.map +0 -1
- package/src/avif/decode.js +0 -42
- package/src/avif/encode.d.ts +0 -3
- package/src/avif/encode.d.ts.map +0 -1
- package/src/avif/encode.js +0 -75
- package/src/avif/meta.d.ts +0 -24
- package/src/avif/meta.d.ts.map +0 -1
- package/src/avif/meta.js +0 -23
- package/src/avif/tsconfig.tsbuildinfo +0 -1
- package/src/avif/utils.d.ts +0 -17
- package/src/avif/utils.d.ts.map +0 -1
- package/src/avif/utils.js +0 -31
- package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.d.ts +0 -23
- package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.js +0 -214
- package/src/engine/asset/loaders/image/png/inflate.d.ts +0 -7
- package/src/engine/asset/loaders/image/png/inflate.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/inflate.js +0 -20
- package/src/engine/save/GameStateLoader.d.ts +0 -49
- package/src/engine/save/GameStateLoader.d.ts.map +0 -1
- package/src/engine/save/GameStateLoader.js +0 -168
|
@@ -29,10 +29,12 @@ export class JpegFrame {
|
|
|
29
29
|
mcusPerLine: number;
|
|
30
30
|
mcusPerColumn: number;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* Frame components by the id the `SOF` marker gave them. A `Map` rather than an object: the
|
|
33
|
+
* ids are numbers, and an object would coerce them to strings on the way in and back on the
|
|
34
|
+
* way out.
|
|
35
|
+
* @type {Map<number, JpegFrameComponent>}
|
|
34
36
|
*/
|
|
35
|
-
components:
|
|
37
|
+
components: Map<number, JpegFrameComponent>;
|
|
36
38
|
/**
|
|
37
39
|
*
|
|
38
40
|
* @type {number[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JpegFrame.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/JpegFrame.js"],"names":[],"mappings":"AAAA;IACI;;;OAGG;IACH,UAFU,OAAO,CAEA;IACjB;;;OAGG;IACH,aAFU,OAAO,CAEG;IACpB;;;OAGG;IACH,WAFU,MAAM,CAEF;IACd;;;OAGG;IACH,WAFU,MAAM,CAEF;IACd;;;OAGG;IACH,gBAFU,MAAM,CAEG;IAEnB,aAAS;IACT,aAAS;IAET,oBAAgB;IAChB,sBAAkB;IAElB
|
|
1
|
+
{"version":3,"file":"JpegFrame.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/JpegFrame.js"],"names":[],"mappings":"AAAA;IACI;;;OAGG;IACH,UAFU,OAAO,CAEA;IACjB;;;OAGG;IACH,aAFU,OAAO,CAEG;IACpB;;;OAGG;IACH,WAFU,MAAM,CAEF;IACd;;;OAGG;IACH,WAFU,MAAM,CAEF;IACd;;;OAGG;IACH,gBAFU,MAAM,CAEG;IAEnB,aAAS;IACT,aAAS;IAET,oBAAgB;IAChB,sBAAkB;IAElB;;;;;OAKG;IACH,YAFU,IAAI,MAAM,qBAAqB,CAElB;IAEvB;;;OAGG;IACH,iBAFU,MAAM,EAAE,CAEG;CACxB"}
|
|
@@ -32,10 +32,12 @@ export class JpegFrame {
|
|
|
32
32
|
mcusPerColumn = 0;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* Frame components by the id the `SOF` marker gave them. A `Map` rather than an object: the
|
|
36
|
+
* ids are numbers, and an object would coerce them to strings on the way in and back on the
|
|
37
|
+
* way out.
|
|
38
|
+
* @type {Map<number, JpegFrameComponent>}
|
|
37
39
|
*/
|
|
38
|
-
components =
|
|
40
|
+
components = new Map();
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
43
|
*
|
|
@@ -20,7 +20,8 @@ export class JpegFrameComponent {
|
|
|
20
20
|
blocksPerLine: number;
|
|
21
21
|
blocksPerColumn: number;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Index of this component's quantization table within the `DQT` tables of the file. Set to
|
|
24
|
+
* `-1` once {@link quantizationTable} has been resolved from it.
|
|
24
25
|
* @type {number}
|
|
25
26
|
*/
|
|
26
27
|
quantizationIdx: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JpegFrameComponent.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/JpegFrameComponent.js"],"names":[],"mappings":"AAAA;IACI;;;OAGG;IACH,GAFU,MAAM,CAEX;IACL;;;OAGG;IACH,GAFU,MAAM,CAEX;IAEL;;OAEG;IACH,MAFU,MAAM,CAER;IAER;;OAEG;IACH,QAFU,UAAU,EAAE,EAAE,CAElB;IAEN,sBAAiB;IACjB,wBAAmB;IAEnB
|
|
1
|
+
{"version":3,"file":"JpegFrameComponent.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/JpegFrameComponent.js"],"names":[],"mappings":"AAAA;IACI;;;OAGG;IACH,GAFU,MAAM,CAEX;IACL;;;OAGG;IACH,GAFU,MAAM,CAEX;IAEL;;OAEG;IACH,MAFU,MAAM,CAER;IAER;;OAEG;IACH,QAFU,UAAU,EAAE,EAAE,CAElB;IAEN,sBAAiB;IACjB,wBAAmB;IAEnB;;;;OAIG;IACH,iBAFU,MAAM,CAEG;IAEnB;;OAEG;IACH,mBAFU,UAAU,CAEF;IAElB;;;OAGG;IACH,gBAFU,EAAE,CAEE;IAEd;;;OAGG;IACH,gBAFU,EAAE,CAEE;CACjB"}
|
|
@@ -24,7 +24,8 @@ export class JpegFrameComponent {
|
|
|
24
24
|
blocksPerColumn = 0
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Index of this component's quantization table within the `DQT` tables of the file. Set to
|
|
28
|
+
* `-1` once {@link quantizationTable} has been resolved from it.
|
|
28
29
|
* @type {number}
|
|
29
30
|
*/
|
|
30
31
|
quantizationIdx = 0
|
|
@@ -40,6 +40,23 @@ export class JpegImage {
|
|
|
40
40
|
scaleY: number;
|
|
41
41
|
}[];
|
|
42
42
|
/**
|
|
43
|
+
* Whether the three or four component cases should be read as YCbCr rather than as the channels
|
|
44
|
+
* they nominally are.
|
|
45
|
+
*
|
|
46
|
+
* Three components default to transformed, four to not; an Adobe marker overrides either, and
|
|
47
|
+
* an explicit option overrides that.
|
|
48
|
+
*
|
|
49
|
+
* @param {boolean} fallback what to assume when nothing says
|
|
50
|
+
* @returns {boolean}
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
private __color_transform;
|
|
54
|
+
/**
|
|
55
|
+
* Interleave the components at the requested size.
|
|
56
|
+
*
|
|
57
|
+
* Sampling every component up to full width happens once per row, in
|
|
58
|
+
* {@link jpeg_component_row}; what is left here is the arithmetic that differs between
|
|
59
|
+
* component counts, which is the only thing that ever did.
|
|
43
60
|
*
|
|
44
61
|
* @param {number} width
|
|
45
62
|
* @param {number} height
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JpegImage.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/JpegImage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JpegImage.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/JpegImage.js"],"names":[],"mappings":"AA6IA;IAEI;;;OAGG;IACH,YAFW,UAAU,QAyWpB;IAvRG;;;OAGG;IACH,UAFU,MAAM,EAAE,CAEA;IA0DE,uBAAqD;IAsMzE,cAAiC;IACjC,eAA6B;IAC7B;;;;;;;;;;;MAAgB;IAChB;;;;;MAAkB;IAElB;;;OAGG;IACH,YAFU;QAAC,KAAK,EAAC,UAAU,EAAE,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAA;KAAC,EAAE,CAE1C;IAYxB;;;;;;;;;;OAUG;IACH,0BAUC;IAED;;;;;;;;;;OAUG;IACH,eAJW,MAAM,UACN,MAAM,GACL,UAAU,CAqDrB;IAED;;;;OAIG;IACH;cAHiB,UAAU;eAAQ,MAAM;gBAAS,MAAM;sBAC7C,OAAO,QA+DjB;CACJ"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { clamp } from "../../../../../core/math/clamp.js";
|
|
2
|
+
import { jpeg_component_row } from "./jpeg_component_row.js";
|
|
1
3
|
import { buildComponentData } from "./buildComponentData.js";
|
|
2
4
|
import { buildHuffmanTable } from "./buildHuffmanTable.js";
|
|
3
5
|
import { dctZigZag, decodeScan } from "./decodeScan.js";
|
|
@@ -32,12 +34,109 @@ import { JpegFrameComponent } from "./JpegFrameComponent.js";
|
|
|
32
34
|
// (partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf)
|
|
33
35
|
|
|
34
36
|
/**
|
|
37
|
+
* Value {@link JpegFrameComponent#quantizationIdx} takes once the index has been resolved into
|
|
38
|
+
* `quantizationTable`. The index is a position in a table list that does not outlive `parse`, so
|
|
39
|
+
* keeping it afterwards would be keeping a dangling reference.
|
|
40
|
+
* @type {number}
|
|
41
|
+
*/
|
|
42
|
+
const QUANTIZATION_INDEX_RESOLVED = -1;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Constrain a sample to the 8-bit range. Does not round: every caller writes into a `Uint8Array`,
|
|
46
|
+
* which truncates, and rounding here would change the decoded values.
|
|
35
47
|
*
|
|
36
48
|
* @param {number} a
|
|
37
49
|
* @return {number}
|
|
38
50
|
*/
|
|
39
|
-
function
|
|
40
|
-
return a
|
|
51
|
+
function clamp_to_8bit(a) {
|
|
52
|
+
return clamp(a, 0, 255);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Write one row of three-component data as RGB.
|
|
57
|
+
*
|
|
58
|
+
* @param {Uint8Array[]} rows one full-width row per component
|
|
59
|
+
* @param {number} width
|
|
60
|
+
* @param {boolean} colorTransform whether the components are YCbCr rather than RGB
|
|
61
|
+
* @param {Uint8Array} data
|
|
62
|
+
* @param {number} offset
|
|
63
|
+
* @returns {number} the offset after the row
|
|
64
|
+
*/
|
|
65
|
+
function write_rgb_row(rows, width, colorTransform, data, offset) {
|
|
66
|
+
const row0 = rows[0];
|
|
67
|
+
const row1 = rows[1];
|
|
68
|
+
const row2 = rows[2];
|
|
69
|
+
|
|
70
|
+
if (!colorTransform) {
|
|
71
|
+
for (let x = 0; x < width; x++) {
|
|
72
|
+
data[offset++] = row0[x];
|
|
73
|
+
data[offset++] = row1[x];
|
|
74
|
+
data[offset++] = row2[x];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return offset;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
for (let x = 0; x < width; x++) {
|
|
81
|
+
const Y = row0[x];
|
|
82
|
+
const Cb = row1[x];
|
|
83
|
+
const Cr = row2[x];
|
|
84
|
+
|
|
85
|
+
data[offset++] = clamp_to_8bit(Y + 1.402 * (Cr - 128));
|
|
86
|
+
data[offset++] = clamp_to_8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128));
|
|
87
|
+
data[offset++] = clamp_to_8bit(Y + 1.772 * (Cb - 128));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return offset;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Write one row of four-component data as CMYK.
|
|
95
|
+
*
|
|
96
|
+
* The channels are stored inverted, as Adobe writes them, which is why each one is subtracted from
|
|
97
|
+
* 255 on the way out whether or not it went through the colour transform.
|
|
98
|
+
*
|
|
99
|
+
* @param {Uint8Array[]} rows one full-width row per component
|
|
100
|
+
* @param {number} width
|
|
101
|
+
* @param {boolean} colorTransform whether the first three components are YCbCr rather than CMY
|
|
102
|
+
* @param {Uint8Array} data
|
|
103
|
+
* @param {number} offset
|
|
104
|
+
* @returns {number} the offset after the row
|
|
105
|
+
*/
|
|
106
|
+
function write_cmyk_row(rows, width, colorTransform, data, offset) {
|
|
107
|
+
const row0 = rows[0];
|
|
108
|
+
const row1 = rows[1];
|
|
109
|
+
const row2 = rows[2];
|
|
110
|
+
const row3 = rows[3];
|
|
111
|
+
|
|
112
|
+
for (let x = 0; x < width; x++) {
|
|
113
|
+
const K = row3[x];
|
|
114
|
+
|
|
115
|
+
let C;
|
|
116
|
+
let M;
|
|
117
|
+
let Ye;
|
|
118
|
+
|
|
119
|
+
if (!colorTransform) {
|
|
120
|
+
C = row0[x];
|
|
121
|
+
M = row1[x];
|
|
122
|
+
Ye = row2[x];
|
|
123
|
+
} else {
|
|
124
|
+
const Y = row0[x];
|
|
125
|
+
const Cb = row1[x];
|
|
126
|
+
const Cr = row2[x];
|
|
127
|
+
|
|
128
|
+
C = 255 - clamp_to_8bit(Y + 1.402 * (Cr - 128));
|
|
129
|
+
M = 255 - clamp_to_8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128));
|
|
130
|
+
Ye = 255 - clamp_to_8bit(Y + 1.772 * (Cb - 128));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
data[offset++] = 255 - C;
|
|
134
|
+
data[offset++] = 255 - M;
|
|
135
|
+
data[offset++] = 255 - Ye;
|
|
136
|
+
data[offset++] = 255 - K;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return offset;
|
|
41
140
|
}
|
|
42
141
|
|
|
43
142
|
export class JpegImage {
|
|
@@ -70,38 +169,34 @@ export class JpegImage {
|
|
|
70
169
|
// According to the JPEG standard, the sampling factor must be between 1 and 4
|
|
71
170
|
// See https://github.com/libjpeg-turbo/libjpeg-turbo/blob/9abeff46d87bd201a952e276f3e4339556a403a3/libjpeg.txt#L1138-L1146
|
|
72
171
|
let maxH = 1, maxV = 1;
|
|
73
|
-
|
|
74
|
-
for (
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
if (maxH < component.h) maxH = component.h;
|
|
78
|
-
if (maxV < component.v) maxV = component.v;
|
|
79
|
-
}
|
|
172
|
+
|
|
173
|
+
for (const component of frame.components.values()) {
|
|
174
|
+
if (maxH < component.h) maxH = component.h;
|
|
175
|
+
if (maxV < component.v) maxV = component.v;
|
|
80
176
|
}
|
|
177
|
+
|
|
81
178
|
const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH);
|
|
82
179
|
const mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
for (let
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
row.push(new Int32Array(64));
|
|
99
|
-
blocks.push(row);
|
|
100
|
-
}
|
|
101
|
-
component.blocksPerLine = blocksPerLine;
|
|
102
|
-
component.blocksPerColumn = blocksPerColumn;
|
|
103
|
-
component.blocks = blocks;
|
|
180
|
+
|
|
181
|
+
for (const component of frame.components.values()) {
|
|
182
|
+
const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH);
|
|
183
|
+
const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV);
|
|
184
|
+
const blocksPerLineForMcu = mcusPerLine * component.h;
|
|
185
|
+
const blocksPerColumnForMcu = mcusPerColumn * component.v;
|
|
186
|
+
const blocks = [];
|
|
187
|
+
|
|
188
|
+
// Each block is a Int32Array of length 64 (4 x 64 = 256 bytes)
|
|
189
|
+
|
|
190
|
+
for (let i = 0; i < blocksPerColumnForMcu; i++) {
|
|
191
|
+
const row = [];
|
|
192
|
+
for (let j = 0; j < blocksPerLineForMcu; j++)
|
|
193
|
+
row.push(new Int32Array(64));
|
|
194
|
+
blocks.push(row);
|
|
104
195
|
}
|
|
196
|
+
|
|
197
|
+
component.blocksPerLine = blocksPerLine;
|
|
198
|
+
component.blocksPerColumn = blocksPerColumn;
|
|
199
|
+
component.blocks = blocks;
|
|
105
200
|
}
|
|
106
201
|
frame.maxH = maxH;
|
|
107
202
|
frame.maxV = maxV;
|
|
@@ -249,7 +344,7 @@ export class JpegImage {
|
|
|
249
344
|
frame.precision = data[offset++];
|
|
250
345
|
frame.scanLines = readUint16();
|
|
251
346
|
frame.samplesPerLine = readUint16();
|
|
252
|
-
frame.components =
|
|
347
|
+
frame.components = new Map();
|
|
253
348
|
frame.componentsOrder = [];
|
|
254
349
|
|
|
255
350
|
let componentsCount = data[offset++], componentId;
|
|
@@ -270,7 +365,7 @@ export class JpegImage {
|
|
|
270
365
|
component.v = v;
|
|
271
366
|
component.quantizationIdx = qId;
|
|
272
367
|
|
|
273
|
-
frame.components
|
|
368
|
+
frame.components.set(componentId, component);
|
|
274
369
|
offset += 3;
|
|
275
370
|
}
|
|
276
371
|
prepareComponents(frame);
|
|
@@ -326,7 +421,7 @@ export class JpegImage {
|
|
|
326
421
|
const components = [];
|
|
327
422
|
let component;
|
|
328
423
|
for (i = 0; i < selectorsCount; i++) {
|
|
329
|
-
component = frame.components
|
|
424
|
+
component = frame.components.get(data[offset++]);
|
|
330
425
|
const tableSpec = data[offset++];
|
|
331
426
|
component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4];
|
|
332
427
|
component.huffmanTableAC = huffmanTablesAC[tableSpec & 15];
|
|
@@ -382,12 +477,11 @@ export class JpegImage {
|
|
|
382
477
|
if (frames.length !== 1)
|
|
383
478
|
throw new Error("only single frame JPEGs supported");
|
|
384
479
|
|
|
385
|
-
//
|
|
480
|
+
// resolve each frame's components quantization table
|
|
386
481
|
for (let i = 0; i < frames.length; i++) {
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
delete cp[j].quantizationIdx;
|
|
482
|
+
for (const component of frames[i].components.values()) {
|
|
483
|
+
component.quantizationTable = quantizationTables[component.quantizationIdx];
|
|
484
|
+
component.quantizationIdx = QUANTIZATION_INDEX_RESOLVED;
|
|
391
485
|
}
|
|
392
486
|
}
|
|
393
487
|
|
|
@@ -403,7 +497,7 @@ export class JpegImage {
|
|
|
403
497
|
this.components = [];
|
|
404
498
|
|
|
405
499
|
for (let i = 0; i < frame.componentsOrder.length; i++) {
|
|
406
|
-
const component = frame.components
|
|
500
|
+
const component = frame.components.get(frame.componentsOrder[i]);
|
|
407
501
|
this.components.push({
|
|
408
502
|
lines: buildComponentData(component),
|
|
409
503
|
scaleX: component.h / frame.maxH,
|
|
@@ -413,6 +507,34 @@ export class JpegImage {
|
|
|
413
507
|
}
|
|
414
508
|
|
|
415
509
|
/**
|
|
510
|
+
* Whether the three or four component cases should be read as YCbCr rather than as the channels
|
|
511
|
+
* they nominally are.
|
|
512
|
+
*
|
|
513
|
+
* Three components default to transformed, four to not; an Adobe marker overrides either, and
|
|
514
|
+
* an explicit option overrides that.
|
|
515
|
+
*
|
|
516
|
+
* @param {boolean} fallback what to assume when nothing says
|
|
517
|
+
* @returns {boolean}
|
|
518
|
+
* @private
|
|
519
|
+
*/
|
|
520
|
+
__color_transform(fallback) {
|
|
521
|
+
if (this.adobe && this.adobe.transformCode) {
|
|
522
|
+
return true;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if (typeof this.opts.colorTransform !== 'undefined') {
|
|
526
|
+
return !!this.opts.colorTransform;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
return fallback;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Interleave the components at the requested size.
|
|
534
|
+
*
|
|
535
|
+
* Sampling every component up to full width happens once per row, in
|
|
536
|
+
* {@link jpeg_component_row}; what is left here is the arithmetic that differs between
|
|
537
|
+
* component counts, which is the only thing that ever did.
|
|
416
538
|
*
|
|
417
539
|
* @param {number} width
|
|
418
540
|
* @param {number} height
|
|
@@ -422,134 +544,52 @@ export class JpegImage {
|
|
|
422
544
|
const scaleX = this.width / width;
|
|
423
545
|
const scaleY = this.height / height;
|
|
424
546
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
let x, y;
|
|
428
|
-
let offset = 0;
|
|
429
|
-
let Y, Cb, Cr, K, C, M, Ye, R, G, B;
|
|
430
|
-
let colorTransform;
|
|
431
|
-
const dataLength = width * height * this.components.length;
|
|
547
|
+
const components = this.components;
|
|
548
|
+
const component_count = components.length;
|
|
432
549
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
component1 = this.components[0];
|
|
437
|
-
const lines = component1.lines;
|
|
438
|
-
for (y = 0; y < height; y++) {
|
|
439
|
-
component1Line = lines[0 | (y * component1.scaleY * scaleY)];
|
|
440
|
-
for (x = 0; x < width; x++) {
|
|
441
|
-
Y = component1Line[0 | (x * component1.scaleX * scaleX)];
|
|
550
|
+
if (component_count < 1 || component_count > 4) {
|
|
551
|
+
throw new Error('Unsupported color mode');
|
|
552
|
+
}
|
|
442
553
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
break;
|
|
447
|
-
case 2:
|
|
448
|
-
// PDF might compress two component data in custom colorspace
|
|
449
|
-
component1 = this.components[0];
|
|
450
|
-
component2 = this.components[1];
|
|
451
|
-
for (y = 0; y < height; y++) {
|
|
452
|
-
component1Line = component1.lines[0 | (y * component1.scaleY * scaleY)];
|
|
453
|
-
component2Line = component2.lines[0 | (y * component2.scaleY * scaleY)];
|
|
454
|
-
for (x = 0; x < width; x++) {
|
|
455
|
-
Y = component1Line[0 | (x * component1.scaleX * scaleX)];
|
|
456
|
-
data[offset++] = Y;
|
|
457
|
-
Y = component2Line[0 | (x * component2.scaleX * scaleX)];
|
|
458
|
-
data[offset++] = Y;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
break;
|
|
462
|
-
case 3:
|
|
463
|
-
// The default transform for three components is true
|
|
464
|
-
colorTransform = true;
|
|
465
|
-
// The adobe transform marker overrides any previous setting
|
|
466
|
-
if (this.adobe && this.adobe.transformCode)
|
|
467
|
-
colorTransform = true;
|
|
468
|
-
else if (typeof this.opts.colorTransform !== 'undefined') {
|
|
469
|
-
colorTransform = !!this.opts.colorTransform;
|
|
470
|
-
}
|
|
554
|
+
if (component_count === 4 && !this.adobe) {
|
|
555
|
+
throw new Error('Unsupported color mode (4 components)');
|
|
556
|
+
}
|
|
471
557
|
|
|
472
|
-
|
|
473
|
-
component2 = this.components[1];
|
|
474
|
-
component3 = this.components[2];
|
|
475
|
-
for (y = 0; y < height; y++) {
|
|
558
|
+
const data = new Uint8Array(width * height * component_count);
|
|
476
559
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
component3Line = component3.lines[0 | (y * component3.scaleY * scaleY)];
|
|
480
|
-
for (x = 0; x < width; x++) {
|
|
560
|
+
// one full-width row per component, reused down the image
|
|
561
|
+
const rows = [];
|
|
481
562
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
B = component3Line[0 | (x * component3.scaleX * scaleX)];
|
|
486
|
-
} else {
|
|
487
|
-
Y = component1Line[0 | (x * component1.scaleX * scaleX)];
|
|
488
|
-
Cb = component2Line[0 | (x * component2.scaleX * scaleX)];
|
|
489
|
-
Cr = component3Line[0 | (x * component3.scaleX * scaleX)];
|
|
563
|
+
for (let i = 0; i < component_count; i++) {
|
|
564
|
+
rows.push(new Uint8Array(width));
|
|
565
|
+
}
|
|
490
566
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
B = clampTo8bit(Y + 1.772 * (Cb - 128));
|
|
494
|
-
}
|
|
567
|
+
// three components are YCbCr unless told otherwise, four are CMYK unless told otherwise
|
|
568
|
+
const colorTransform = component_count >= 3 && this.__color_transform(component_count === 3);
|
|
495
569
|
|
|
496
|
-
|
|
497
|
-
data[offset++] = G;
|
|
498
|
-
data[offset++] = B;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
break;
|
|
502
|
-
case 4:
|
|
503
|
-
if (!this.adobe)
|
|
504
|
-
throw new Error('Unsupported color mode (4 components)');
|
|
505
|
-
// The default transform for four components is false
|
|
506
|
-
colorTransform = false;
|
|
507
|
-
// The adobe transform marker overrides any previous setting
|
|
508
|
-
if (this.adobe && this.adobe.transformCode)
|
|
509
|
-
colorTransform = true;
|
|
510
|
-
else if (typeof this.opts.colorTransform !== 'undefined')
|
|
511
|
-
colorTransform = !!this.opts.colorTransform;
|
|
512
|
-
|
|
513
|
-
component1 = this.components[0];
|
|
514
|
-
component2 = this.components[1];
|
|
515
|
-
component3 = this.components[2];
|
|
516
|
-
component4 = this.components[3];
|
|
517
|
-
for (y = 0; y < height; y++) {
|
|
518
|
-
const _y = y * scaleY;
|
|
570
|
+
let offset = 0;
|
|
519
571
|
|
|
520
|
-
|
|
521
|
-
component2Line = component2.lines[0 | (_y * component2.scaleY)];
|
|
522
|
-
component3Line = component3.lines[0 | (_y * component3.scaleY)];
|
|
523
|
-
component4Line = component4.lines[0 | (_y * component4.scaleY)];
|
|
524
|
-
for (x = 0; x < width; x++) {
|
|
525
|
-
const _x = x * scaleX;
|
|
572
|
+
for (let y = 0; y < height; y++) {
|
|
526
573
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
Ye = component3Line[0 | (_x * component3.scaleX)];
|
|
531
|
-
K = component4Line[0 | (_x * component4.scaleX)];
|
|
532
|
-
} else {
|
|
533
|
-
Y = component1Line[0 | (_x * component1.scaleX)];
|
|
534
|
-
Cb = component2Line[0 | (_x * component2.scaleX)];
|
|
535
|
-
Cr = component3Line[0 | (_x * component3.scaleX)];
|
|
536
|
-
K = component4Line[0 | (_x * component4.scaleX)];
|
|
537
|
-
|
|
538
|
-
C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128));
|
|
539
|
-
M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128));
|
|
540
|
-
Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128));
|
|
541
|
-
}
|
|
574
|
+
for (let i = 0; i < component_count; i++) {
|
|
575
|
+
jpeg_component_row(components[i], y, scaleX, scaleY, width, rows[i]);
|
|
576
|
+
}
|
|
542
577
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
578
|
+
if (component_count === 3) {
|
|
579
|
+
offset = write_rgb_row(rows, width, colorTransform, data, offset);
|
|
580
|
+
} else if (component_count === 4) {
|
|
581
|
+
offset = write_cmyk_row(rows, width, colorTransform, data, offset);
|
|
582
|
+
} else {
|
|
583
|
+
// one or two components, carried through as they are: greyscale, or the pair a PDF
|
|
584
|
+
// may have compressed in a colour space of its own
|
|
585
|
+
for (let x = 0; x < width; x++) {
|
|
586
|
+
for (let i = 0; i < component_count; i++) {
|
|
587
|
+
data[offset++] = rows[i][x];
|
|
547
588
|
}
|
|
548
589
|
}
|
|
549
|
-
|
|
550
|
-
default:
|
|
551
|
-
throw new Error('Unsupported color mode');
|
|
590
|
+
}
|
|
552
591
|
}
|
|
592
|
+
|
|
553
593
|
return data;
|
|
554
594
|
}
|
|
555
595
|
|
|
@@ -603,9 +643,9 @@ export class JpegImage {
|
|
|
603
643
|
Y = data[i++];
|
|
604
644
|
K = data[i++];
|
|
605
645
|
|
|
606
|
-
R = 255 -
|
|
607
|
-
G = 255 -
|
|
608
|
-
B = 255 -
|
|
646
|
+
R = 255 - clamp_to_8bit(C * (1 - K / 255) + K);
|
|
647
|
+
G = 255 - clamp_to_8bit(M * (1 - K / 255) + K);
|
|
648
|
+
B = 255 - clamp_to_8bit(Y * (1 - K / 255) + K);
|
|
609
649
|
|
|
610
650
|
imageDataArray[j++] = R;
|
|
611
651
|
imageDataArray[j++] = G;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @param {Int32Array} qt quantization table
|
|
4
4
|
* @param {Int32Array} zz zigzag-ordered DCT coefficients
|
|
5
5
|
* @param {Uint8Array|Uint8ClampedArray} output The output array for the 8x8 block.
|
|
6
|
-
* @see idct8x8_fixed
|
|
7
6
|
*/
|
|
8
7
|
export function idct8x8_float(qt: Int32Array, zz: Int32Array, output: Uint8Array | Uint8ClampedArray): void;
|
|
9
8
|
//# sourceMappingURL=idct8x8_float.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idct8x8_float.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/idct8x8_float.js"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"idct8x8_float.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/idct8x8_float.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,kCAJW,UAAU,MACV,UAAU,UACV,UAAU,GAAC,iBAAiB,QAsBtC"}
|
|
@@ -7,7 +7,6 @@ const p = new Float64Array(64);
|
|
|
7
7
|
* @param {Int32Array} qt quantization table
|
|
8
8
|
* @param {Int32Array} zz zigzag-ordered DCT coefficients
|
|
9
9
|
* @param {Uint8Array|Uint8ClampedArray} output The output array for the 8x8 block.
|
|
10
|
-
* @see idct8x8_fixed
|
|
11
10
|
*/
|
|
12
11
|
export function idct8x8_float(
|
|
13
12
|
qt,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sample one full-width row of a decoded component.
|
|
3
|
+
*
|
|
4
|
+
* A JPEG component may be coded at a fraction of the image's resolution — that is what the `h` and
|
|
5
|
+
* `v` sampling factors mean — and the caller may want the picture at some size other than its coded
|
|
6
|
+
* one. Both are the same operation: step through the component's own grid at a rate that maps the
|
|
7
|
+
* output row onto it, taking the nearest sample.
|
|
8
|
+
*
|
|
9
|
+
* Nearest, not interpolated. That is what the four component cases of `getData` did, twenty-seven
|
|
10
|
+
* times over, and changing it would change every decoded picture. `color/upsample_chroma_row.js` in
|
|
11
|
+
* the AVIF tree does the interpolated version and would be the obvious thing to share, but it
|
|
12
|
+
* expresses subsampling as a shift — it can say "half" and not "a third" — and JPEG's sampling
|
|
13
|
+
* factors run from one to four. Generalising it to rational scaling for this caller's sake would
|
|
14
|
+
* cost the codec that owns it something for nothing.
|
|
15
|
+
*
|
|
16
|
+
* @param {{lines: Uint8Array[], scaleX: number, scaleY: number}} component
|
|
17
|
+
* @param {number} y output row
|
|
18
|
+
* @param {number} scale_x output-to-image horizontal ratio
|
|
19
|
+
* @param {number} scale_y output-to-image vertical ratio
|
|
20
|
+
* @param {number} width output width
|
|
21
|
+
* @param {Uint8Array} destination at least `width` long
|
|
22
|
+
*/
|
|
23
|
+
export function jpeg_component_row(component: {
|
|
24
|
+
lines: Uint8Array[];
|
|
25
|
+
scaleX: number;
|
|
26
|
+
scaleY: number;
|
|
27
|
+
}, y: number, scale_x: number, scale_y: number, width: number, destination: Uint8Array): void;
|
|
28
|
+
//# sourceMappingURL=jpeg_component_row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jpeg_component_row.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/jpeg_component_row.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,8CAPW;IAAC,KAAK,EAAE,UAAU,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,KACrD,MAAM,WACN,MAAM,WACN,MAAM,SACN,MAAM,eACN,UAAU,QAUpB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sample one full-width row of a decoded component.
|
|
3
|
+
*
|
|
4
|
+
* A JPEG component may be coded at a fraction of the image's resolution — that is what the `h` and
|
|
5
|
+
* `v` sampling factors mean — and the caller may want the picture at some size other than its coded
|
|
6
|
+
* one. Both are the same operation: step through the component's own grid at a rate that maps the
|
|
7
|
+
* output row onto it, taking the nearest sample.
|
|
8
|
+
*
|
|
9
|
+
* Nearest, not interpolated. That is what the four component cases of `getData` did, twenty-seven
|
|
10
|
+
* times over, and changing it would change every decoded picture. `color/upsample_chroma_row.js` in
|
|
11
|
+
* the AVIF tree does the interpolated version and would be the obvious thing to share, but it
|
|
12
|
+
* expresses subsampling as a shift — it can say "half" and not "a third" — and JPEG's sampling
|
|
13
|
+
* factors run from one to four. Generalising it to rational scaling for this caller's sake would
|
|
14
|
+
* cost the codec that owns it something for nothing.
|
|
15
|
+
*
|
|
16
|
+
* @param {{lines: Uint8Array[], scaleX: number, scaleY: number}} component
|
|
17
|
+
* @param {number} y output row
|
|
18
|
+
* @param {number} scale_x output-to-image horizontal ratio
|
|
19
|
+
* @param {number} scale_y output-to-image vertical ratio
|
|
20
|
+
* @param {number} width output width
|
|
21
|
+
* @param {Uint8Array} destination at least `width` long
|
|
22
|
+
*/
|
|
23
|
+
export function jpeg_component_row(component, y, scale_x, scale_y, width, destination) {
|
|
24
|
+
const line = component.lines[0 | (y * component.scaleY * scale_y)];
|
|
25
|
+
|
|
26
|
+
const component_scale_x = component.scaleX;
|
|
27
|
+
|
|
28
|
+
for (let x = 0; x < width; x++) {
|
|
29
|
+
destination[x] = line[0 | (x * component_scale_x * scale_x)];
|
|
30
|
+
}
|
|
31
|
+
}
|