fix: #96 detail_loss の apply 経路を GLSL/中心点方式に統一し等価テストを追加#116
Merged
Conversation
apply(Filter::DetailLoss) / pipeline が呼ぶ detail_loss_with_cell_size を タイル内全ピクセル linear sRGB 平均からタイル中心点サンプリング(pixelation)に変更。 これで GLSL シェーダ(detail_loss.frag = universal-experience の表示経路 = 正本)・ 等価テスト済みの detail_loss・公開 API(apply 経由)の3者が同一アルゴリズムになった。 以前は apply 経路だけ別アルゴリズム(全平均)で、CPU↔GLSL 等価テストが存在しなかった。 - detail_loss_with_cell_size を中心点サンプリングに統一(正本 = GLSL シェーダ) - apply 経路の関数に対する CPU↔GLSL 等価テストを追加: shader_equiv_apply_detail_loss_cpu_gpu_psnr(cell_size=7 半端境界、PSNR >= 60 dB)、 shader_equiv_apply_detail_loss_cell_size_20_psnr(cell_size=20、PSNR >= 60 dB)。 中心点サンプリング用シミュレータ sim_detail_loss_shader_cell を追加 - detail_loss.frag / detail_loss / detail_loss_with_cell_size の doc を統一後の事実に更新 detail_loss(strength 導出版)と detail_loss_with_cell_size(cell_size 直接指定版)は 同一アルゴリズムでタイルサイズの決め方だけが異なる正当な公開バリアントのため、 削除や deprecation はせず両方残す。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
関連 Issue
closes #96
問題
apply(Filter::DetailLoss)が呼ぶdetail_loss_with_cell_sizeだけがタイル平均アルゴリズムで、GLSL シェーダdetail_loss.frag(universal-experience の Flutter 表示経路=正本)とdetail_loss(strength 版)が実装する中心点サンプリングと乖離していた。さらに shader_equivalence テストは別関数(中心点版)を検証しており、apply 経路の関数は CPU↔GLSL 等価が無検証だった。変更内容
detail_loss_with_cell_sizeをタイル平均→タイル中心点サンプリングに統一(シェーダ・strength 版と同一アルゴリズムに)検証