Skip to content

feat: Grayscale bit-packed フォーマット (1/2/4 MSB/LSB) を追加#311

Merged
ainyan03 merged 2 commits into
mainfrom
claude/fleximg-grayscale-refactor
Feb 8, 2026
Merged

feat: Grayscale bit-packed フォーマット (1/2/4 MSB/LSB) を追加#311
ainyan03 merged 2 commits into
mainfrom
claude/fleximg-grayscale-refactor

Conversation

@ainyan03
Copy link
Copy Markdown
Owner

@ainyan03 ainyan03 commented Feb 8, 2026

Summary

  • Grayscale1/2/4 MSB/LSB の6フォーマットを新規追加(isIndexed=false, maxPaletteSize=0
  • grayscale8.hgrayscale.h にリネームし、Grayscale8 + GrayscaleN を統合
  • bit_packed_detail ヘルパー関数群(unpackIndexBits, packIndexBits, readPixelDirect)を grayscale.h に移動し、Index/Grayscale で共用
  • IndexN の toStraightgrayscaleN_toStraight に直接設定、fromStraight を委譲ラッパーに変更
  • builtinFormats[] に6エントリ追加、getFormatByName() で名前引き可能
  • DDA転写・バイリニア補間をフルサポート(copyRowDDA_Bit / copyQuadDDA_Bit 共有)

Test plan

  • ネイティブテスト: 179テスト / 67,814アサーション 全通過
  • Wasmリリースビルド成功
  • Wasmデバッグビルド成功
  • 新規テスト19ケース追加(toStraight / fromStraight / sibling / properties / 端数処理 / getFormatByName / DDA)
  • 既存テスト(bit_packed_index_test 含む)に退行なし

- index8_toStraight を削除し、Index8 Descriptor に grayscale8_toStraight を直接設定
- index8_fromStraight を grayscale8_fromStraight への委譲ラッパーに変更
- grayscale8_fromStraight を4ピクセルループ展開版に最適化
- indexN_toStraight の委譲先を grayscale8_toStraight に変更
grayscale8.h を grayscale.h にリネームし、Grayscale1/2/4 MSB/LSB の
6フォーマットを追加。bit_packed_detail ヘルパーを grayscale.h に移動し
Index/Grayscale で共用。IndexN の toStraight/fromStraight を
grayscaleN 関数に統合。19テストケース追加、全179テスト通過。
@ainyan03 ainyan03 merged commit 5c06b08 into main Feb 8, 2026
1 check passed
@ainyan03 ainyan03 deleted the claude/fleximg-grayscale-refactor branch February 8, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant